int sunxi_usb_enable_hcd(__u32 usbc_no) { #ifndef SUNXI_USB_FPGA if (usbc_no == 0) { #ifndef CONFIG_ARCH_SUN9IW1 #if defined(CONFIG_USB_SUNXI_USB0_OTG) || defined(USB_SUNXI_USB0_HOST_ONLY) sunxi_usb_enable_hcd0(); #endif #endif } else if (usbc_no == 1) { #if defined(CONFIG_USB_SUNXI_EHCI0) sunxi_usb_enable_ehci(usbc_no); #endif #if defined(CONFIG_USB_SUNXI_OHCI0) sunxi_usb_enable_ohci(usbc_no); #endif } else if (usbc_no == 2) { #if defined(CONFIG_USB_SUNXI_EHCI1) sunxi_usb_enable_ehci(usbc_no); #endif #if defined(CONFIG_USB_SUNXI_OHCI1) sunxi_usb_enable_ohci(usbc_no); #endif } else { DMSG_PANIC("ERR: unkown usbc_no(%d)\n", usbc_no); return -1; } #endif return 0; }
static void insmod_host_driver(struct usb_msg_center_info *center_info) { DMSG_INFO("\n\ninsmod_host_driver\n\n"); set_usb_role(center_info, USB_ROLE_HOST); #if defined (CONFIG_ARCH_SUN8IW8) || defined (CONFIG_ARCH_SUN8IW7) #if defined(CONFIG_USB_SUNXI_EHCI0) sunxi_usb_enable_ehci(0); #endif #if defined(CONFIG_USB_SUNXI_OHCI0) sunxi_usb_enable_ohci(0); #endif #else sunxi_usb_host0_enable(); #endif return; }