X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fusb%2Fhost%2Fohci.h;h=db0924c943a19fab809449035313febc9cdbb217;hb=f2465934b46235287e07473fa4919035ba1a2b68;hp=9b0c4a2bd91e86baf2716cf070b607527ab16ac5;hpb=0741701acf00749672f75f4c196dabd8b235f741;p=u-boot diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 9b0c4a2bd9..db0924c943 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h @@ -10,12 +10,15 @@ /* * e.g. PCI controllers need this */ + +#include + #ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS -# define ohci_readl(a) __swap_32(*((volatile u32 *)(a))) -# define ohci_writel(a, b) (*((volatile u32 *)(b)) = __swap_32((volatile u32)a)) +# define ohci_readl(a) __swap_32(readl(a)) +# define ohci_writel(v, a) writel(__swap_32(v), a) #else -# define ohci_readl(a) (*((volatile u32 *)(a))) -# define ohci_writel(a, b) (*((volatile u32 *)(b)) = ((volatile u32)a)) +# define ohci_readl(a) readl(a) +# define ohci_writel(v, a) writel(v, a) #endif /* CONFIG_SYS_OHCI_SWAP_REG_ACCESS */ #if ARCH_DMA_MINALIGN > 16