diff options
| author | sakumisu <[email protected]> | 2024-03-27 21:23:14 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2024-03-27 21:23:14 +0800 |
| commit | 22121bc54d1488c718fc0902dcfec12e9ede19e9 (patch) | |
| tree | fdf460c6284b915b4f6e15751db6333641057878 | |
| parent | 68708c0f3a94ef2cfd6f5128c826599b6b91bb82 (diff) | |
fix warning in 64bit
| -rw-r--r-- | port/ehci/usb_ehci_priv.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/port/ehci/usb_ehci_priv.h b/port/ehci/usb_ehci_priv.h index 693cb805..f6e4ff00 100644 --- a/port/ehci/usb_ehci_priv.h +++ b/port/ehci/usb_ehci_priv.h @@ -5,13 +5,13 @@ #include "usbh_hub.h" #include "usb_hc_ehci.h" -#define EHCI_HCCR ((struct ehci_hccr *)(bus->hcd.reg_base + CONFIG_USB_EHCI_HCCR_OFFSET)) -#define EHCI_HCOR ((struct ehci_hcor *)(bus->hcd.reg_base + CONFIG_USB_EHCI_HCOR_OFFSET)) +#define EHCI_HCCR ((struct ehci_hccr *)(uintptr_t)(bus->hcd.reg_base + CONFIG_USB_EHCI_HCCR_OFFSET)) +#define EHCI_HCOR ((struct ehci_hcor *)(uintptr_t)(bus->hcd.reg_base + CONFIG_USB_EHCI_HCOR_OFFSET)) -#define EHCI_PTR2ADDR(x) ((uint32_t)(x) & ~0x1F) -#define EHCI_ADDR2QH(x) ((struct ehci_qh_hw *)((uint32_t)(x) & ~0x1F)) -#define EHCI_ADDR2QTD(x) ((struct ehci_qtd_hw *)((uint32_t)(x) & ~0x1F)) -#define EHCI_ADDR2ITD(x) ((struct ehci_itd_hw *)((uint32_t)(x) & ~0x1F)) +#define EHCI_PTR2ADDR(x) ((uint32_t)(uintptr_t)(x) & ~0x1F) +#define EHCI_ADDR2QH(x) ((struct ehci_qh_hw *)(uintptr_t)((uint32_t)(x) & ~0x1F)) +#define EHCI_ADDR2QTD(x) ((struct ehci_qtd_hw *)(uintptr_t)((uint32_t)(x) & ~0x1F)) +#define EHCI_ADDR2ITD(x) ((struct ehci_itd_hw *)(uintptr_t)((uint32_t)(x) & ~0x1F)) #define CONFIG_USB_EHCI_QH_NUM CONFIG_USBHOST_PIPE_NUM #define CONFIG_USB_EHCI_QTD_NUM 3 |
