Coding Style cleanup: remove trailing white space
[platform/kernel/u-boot.git] / drivers / usb / host / ohci.h
index a547337..d977e8f 100644 (file)
@@ -7,6 +7,17 @@
  * usb-ohci.h
  */
 
+/*
+ * e.g. PCI controllers need this
+ */
+#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))
+#else
+# define ohci_readl(a) (*((volatile u32 *)(a)))
+# define ohci_writel(a, b) (*((volatile u32 *)(b)) = ((volatile u32)a))
+#endif /* CONFIG_SYS_OHCI_SWAP_REG_ACCESS */
+
 /* functions for doing board or CPU specific setup/cleanup */
 extern int usb_board_init(void);
 extern int usb_board_stop(void);
@@ -101,7 +112,7 @@ struct ed {
        struct usb_device *usb_dev;
        void *purb;
        __u32 unused[2];
-} __attribute((aligned(16)));
+} __attribute__((aligned(16)));
 typedef struct ed ed_t;
 
 
@@ -161,7 +172,7 @@ struct td {
        __u32 data;
 
        __u32 unused2[2];
-} __attribute((aligned(32)));
+} __attribute__((aligned(32)));
 typedef struct td td_t;
 
 #define OHCI_ED_SKIP   (1 << 14)
@@ -184,7 +195,7 @@ struct ohci_hcca {
 #endif
        __u32   done_head;              /* info returned for an interrupt */
        u8              reserved_for_hc[116];
-} __attribute((aligned(256)));
+} __attribute__((aligned(256)));
 
 
 /*
@@ -196,8 +207,8 @@ struct ohci_hcca {
 
 /*
  * This is the structure of the OHCI controller's memory mapped I/O
- * region.  This is Memory Mapped I/O. You must use the readl() and
- * writel() macros defined in asm/io.h to access these!!
+ * region.  This is Memory Mapped I/O. You must use the ohci_readl() and
+ * ohci_writel() macros defined in this file to access these!!
  */
 struct ohci_regs {
        /* control and status registers */
@@ -228,7 +239,7 @@ struct ohci_regs {
                __u32   status;
                __u32   portstatus[CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS];
        } roothub;
-} __attribute((aligned(32)));
+} __attribute__((aligned(32)));
 
 /* Some EHCI controls */
 #define EHCI_USBCMD_OFF                0x20