diff options
| author | sakumisu <[email protected]> | 2022-06-26 17:30:44 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2022-06-26 17:30:44 +0800 |
| commit | 9bd3c00b8c4e6c0f24159cb313db6147e57b50a0 (patch) | |
| tree | d8980667bd43e7d7858d8fce52324ce470f591f6 | |
| parent | 24f0a0bb1eab50953cd83862b19194379e8dc3b8 (diff) | |
fix align32 in 64bit cpu
| -rw-r--r-- | port/ehci/usb_ehci.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/port/ehci/usb_ehci.c b/port/ehci/usb_ehci.c index bd24e232..b823d66e 100644 --- a/port/ehci/usb_ehci.c +++ b/port/ehci/usb_ehci.c @@ -87,7 +87,11 @@ struct usb_ehci_qh_s { struct usb_ehci_epinfo_s *epinfo; /* Endpoint used for the transfer */ uint32_t fqp; /* First qTD in the list (physical address) */ +#if (__riscv_xlen == 64) + uint8_t pad[4]; /* Padding to assure 32-byte alignment */ +#else uint8_t pad[8]; /* Padding to assure 32-byte alignment */ +#endif }; /* Internal representation of the EHCI Queue Element Transfer Descriptor |
