#else
# define readl(a) (*((volatile u32 *)(a)))
# define writel(a, b) (*((volatile u32 *)(b)) = ((volatile u32)a))
- #endif /* CFG_OHCI_SWAP_REG_ACCESS */
+ #endif /* CONFIG_SYS_OHCI_SWAP_REG_ACCESS */
-#define min_t(type,x,y) ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
+#define min_t(type, x, y) \
+ ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
#ifdef CONFIG_PCI_OHCI
static struct pci_device_id ohci_pci_ids[] = {
#ifdef SHOW_INFO
#define info(format, arg...) printf("INFO: " format "\n", ## arg)
#else
-#define info(format, arg...) do {} while(0)
+#define info(format, arg...) do {} while (0)
#endif
- #ifdef CFG_OHCI_BE_CONTROLLER
+ #ifdef CONFIG_SYS_OHCI_BE_CONTROLLER
# define m16_swap(x) cpu_to_be16(x)
# define m32_swap(x) cpu_to_be32(x)
#else
pci_dev_t pdev;
#endif
- #ifdef CFG_USB_OHCI_CPU_INIT
+ #ifdef CONFIG_SYS_USB_OHCI_CPU_INIT
/* cpu dependant init */
- if(usb_cpu_init())
+ if (usb_cpu_init())
return -1;
#endif
- #ifdef CFG_USB_OHCI_BOARD_INIT
+ #ifdef CONFIG_SYS_USB_OHCI_BOARD_INIT
/* board dependant init */
- if(usb_board_init())
+ if (usb_board_init())
return -1;
#endif
- memset (&gohci, 0, sizeof (ohci_t));
+ memset(&gohci, 0, sizeof(ohci_t));
/* align the storage */
if ((__u32)&ghcca[0] & 0xff) {
return -1;
}
- /* FIXME this is a second HC reset; why?? */
- /* writel(gohci.hc_control = OHCI_USB_RESET, &gohci.regs->control);
- wait_ms(10); */
- if (hc_start (&gohci) < 0) {
- err ("can't start usb-%s", gohci.slot_name);
- hc_release_ohci (&gohci);
+ if (hc_start(&gohci) < 0) {
+ err("can't start usb-%s", gohci.slot_name);
+ hc_release_ohci(&gohci);
/* Initialization failed */
- #ifdef CFG_USB_OHCI_BOARD_INIT
+ #ifdef CONFIG_SYS_USB_OHCI_BOARD_INIT
/* board dependant cleanup */
usb_board_stop();
#endif
return 0;
/* TODO release any interrupts, etc. */
/* call hc_release_ohci() here ? */
- hc_reset (&gohci);
+ hc_reset(&gohci);
- #ifdef CFG_USB_OHCI_BOARD_INIT
+ #ifdef CONFIG_SYS_USB_OHCI_BOARD_INIT
/* board dependant cleanup */
- if(usb_board_stop())
+ if (usb_board_stop())
return -1;
#endif
- #ifdef CFG_USB_OHCI_CPU_INIT
+ #ifdef CONFIG_SYS_USB_OHCI_CPU_INIT
/* cpu dependant cleanup */
- if(usb_cpu_stop())
+ if (usb_cpu_stop())
return -1;
#endif
/* This driver is no longer initialised. It needs a new low-level