int sunxi_usb_disable_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_disable_hcd0(); #endif #endif } else if (usbc_no == 1) { #if defined(CONFIG_USB_SUNXI_EHCI0) sunxi_usb_disable_ehci(usbc_no); #endif #if defined(CONFIG_USB_SUNXI_OHCI0) sunxi_usb_disable_ohci(usbc_no); #endif } else if (usbc_no == 2) { #if defined(CONFIG_USB_SUNXI_EHCI1) sunxi_usb_disable_ehci(usbc_no); #endif #if defined(CONFIG_USB_SUNXI_OHCI1) sunxi_usb_disable_ohci(usbc_no); #endif } else { DMSG_PANIC("ERR: unkown usbc_no(%d)\n", usbc_no); return -1; } #endif return 0; }
static void rmmod_host_driver(struct usb_msg_center_info *center_info) { DMSG_INFO("\n\nrmmod_host_driver\n\n"); #if defined (CONFIG_ARCH_SUN8IW8) || defined (CONFIG_ARCH_SUN8IW7) #if defined(CONFIG_USB_SUNXI_EHCI0) sunxi_usb_disable_ehci(0); #endif #if defined(CONFIG_USB_SUNXI_OHCI0) sunxi_usb_disable_ohci(0); #endif #else { int ret = 0; ret = sunxi_usb_host0_disable(); if (ret != 0) { DMSG_PANIC("err: disable hcd0 failed\n"); return; } } #endif set_usb_role(center_info, USB_ROLE_NULL); return; }