Beispiel #1
0
/*
*******************************************************************************
*                     sw_usb_enable_hcd
*
* Description:
*    void
*
* Parameters:
*    void
*
* Return value:
*    void
*
* note:
*    void
*
*******************************************************************************
*/
int sw_usb_enable_hcd(__u32 usbc_no)
{
	if(usbc_no == 0){
#if defined(CONFIG_USB_SW_SUN4I_USB0_OTG) || defined(USB_SW_SUN4I_USB0_HOST_ONLY)
		sw_usb_enable_hcd0();
#endif
	}else if(usbc_no == 1){
#if defined(CONFIG_USB_SW_SUN4I_EHCI0)
		sw_usb_enable_ehci(usbc_no);
#endif

#if defined(CONFIG_USB_SW_SUN4I_OHCI0)
		sw_usb_enable_ohci(usbc_no);
#endif
	}else if(usbc_no == 2){
#if defined(CONFIG_USB_SW_SUN4I_EHCI1)
		sw_usb_enable_ehci(usbc_no);
#endif

#if defined(CONFIG_USB_SW_SUN4I_OHCI1)
		sw_usb_enable_ohci(usbc_no);
#endif
	}else{
		DMSG_PANIC("ERR: unkown usbc_no(%d)\n", usbc_no);
		return -1;
	}

    return 0;
}
/*
*******************************************************************************
*                     sw_usb_enable_hcd
*
* Description:
*    void
*
* Parameters:
*    void
*
* Return value:
*    void
*
* note:
*    void
*
*******************************************************************************
*/
int sw_usb_enable_hcd(__u32 usbc_no)
{
    if(usbc_no == 0) {
        sw_usb_enable_hcd0();
    } else if(usbc_no == 1) {
        sw_usb_enable_hcd1();
    } else if(usbc_no == 2) {
        sw_usb_enable_hcd2();
    } else {
        DMSG_PANIC("ERR: unkown usbc_no(%d)\n", usbc_no);
        return -1;
    }

    return 0;
}