X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fusb%2Fhost%2Fohci.h;h=23508319320b06a510183d8a581b7587aa144784;hb=064b55cfcb25c0f7692ecf6d4a38f12cd82739f7;hp=9b0c4a2bd91e86baf2716cf070b607527ab16ac5;hpb=e0266f4942f22d3111a5365f3b2c33ecd55730eb;p=u-boot diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 9b0c4a2bd9..2350831932 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 @@ -112,9 +115,7 @@ struct td { __u32 hwNextTD; /* Next TD Pointer */ __u32 hwBE; /* Memory Buffer End Pointer */ -/* #ifndef CONFIG_MPC5200 /\* this seems wrong *\/ */ __u16 hwPSW[MAXPSW]; -/* #endif */ __u8 unused; __u8 index; struct ed *ed; @@ -138,13 +139,8 @@ typedef struct td td_t; #define NUM_INTS 32 /* part of the OHCI standard */ struct ohci_hcca { __u32 int_table[NUM_INTS]; /* Interrupt ED table */ -#if defined(CONFIG_MPC5200) - __u16 pad1; /* set to 0 on each frame_no change */ - __u16 frame_no; /* current frame number */ -#else __u16 frame_no; /* current frame number */ __u16 pad1; /* set to 0 on each frame_no change */ -#endif __u32 done_head; /* info returned for an interrupt */ u8 reserved_for_hc[116]; } __attribute__((aligned(256)));