int sunxi_usb_enable_ohci(__u32 usbc_no) { struct sunxi_hci_hcd *sunxi_ohci = NULL; if(usbc_no != 1 && usbc_no != 2){ DMSG_PANIC("ERR:Argmen invalid. usbc_no(%d)\n", usbc_no); return -1; } sunxi_ohci = g_sunxi_ohci[usbc_no]; if(sunxi_ohci == NULL){ DMSG_PANIC("ERR: sunxi_ohci is null\n"); return -1; } if(sunxi_ohci->host_init_state){ DMSG_PANIC("ERR: not support sunxi_usb_enable_ohci\n"); return -1; } if(sunxi_ohci->probe == 1){ DMSG_PANIC("ERR: sunxi_ohci is already enable, can not enable again\n"); return -1; } sunxi_ohci->probe = 1; DMSG_INFO("[%s]: sunxi_usb_enable_ohci\n", sunxi_ohci->hci_name); sunxi_ohci_hcd_probe(sunxi_ohci->pdev); return 0; }
int sunxi_usb_enable_ohci(__u32 usbc_no) { struct sunxi_hci_hcd *sunxi_ohci = NULL; #ifdef CONFIG_USB_HCD_ENHANCE if(usbc_no == 1){ atomic_set(&hci1_thread_scan_flag, 0); } if(usbc_no == 3){ atomic_set(&hci3_thread_scan_flag, 0); } #endif sunxi_ohci = g_sunxi_ohci[usbc_no]; if(sunxi_ohci == NULL){ DMSG_PANIC("ERR: sunxi_ohci is null\n"); return -1; } #if !defined (CONFIG_ARCH_SUN8IW8) && !defined (CONFIG_ARCH_SUN8IW7) && !defined (CONFIG_USB_HCD_ENHANCE) if(sunxi_ohci->host_init_state){ DMSG_PANIC("ERR: not support sunxi_usb_enable_ohci\n"); return -1; } #endif if(sunxi_ohci->probe == 1){ DMSG_PANIC("ERR: sunxi_ohci is already enable, can not enable again\n"); return -1; } sunxi_ohci->probe = 1; DMSG_INFO("[%s]: sunxi_usb_enable_ohci\n", sunxi_ohci->hci_name); sunxi_ohci_hcd_probe(sunxi_ohci->pdev); return 0; }