Exemple #1
0
/*!
    \brief      initialize the host portion of the driver.
    \param[in]  pudev: pointer to usb device
    \param[in]  core_id: usb otg core identifier(high-speed or full-speed)
    \param[out] none
    \retval     operation status
*/
uint32_t hcd_init(usb_core_handle_struct *pudev, usb_core_id_enum core_id)
{
    pudev->host.connect_status = 0U;

    pudev->host.host_channel[0].endp_mps = 8U;

    usb_core_select(pudev, core_id);

#ifndef DUAL_ROLE_MODE_ENABLED

    USB_GLOBAL_INT_DISABLE();

    usb_core_init(pudev);

    /* force host mode*/
    usb_mode_set(pudev, HOST_MODE);

    usb_hostcore_init(pudev);

    USB_GLOBAL_INT_ENABLE();

#endif

    return 0U;
}
Exemple #2
0
void usb_enable(bool on)
{
    /* FIXME: power up/down usb phy and pll usb */
    if(on)
        usb_core_init();
    else
        usb_core_exit();
}
Exemple #3
0
void usb_enable(bool on)
{
#if defined(HAVE_USBSTACK) && defined(USE_ROCKBOX_USB)
    if (on)
        usb_core_init();
    else
        usb_core_exit();
#else
    (void)on;
#endif
}
/* RB API fuctions */
void usb_enable(bool on)
{
#ifdef HAVE_USBSTACK
    if (on){
        cpu_boost(1);
        usb_core_init();
    } else {
        usb_core_exit();
        cpu_boost(0);
    }
#else
    (void)on;
#endif
}
void usb_enable(bool on)
{
    if(on)
    {
        imx233_enable_usb_pll(true);
        imx233_enable_usb_phy(true);
        imx233_enable_usb_controller(true);
        usb_core_init();
    }
    else
    {
        usb_core_exit();
        imx233_enable_usb_controller(false);
        imx233_enable_usb_phy(false);
        imx233_enable_usb_pll(false);
    }
}
Exemple #6
0
void usb_enable(bool on)
{
    /* Module clock should be on since since this could be called with
     * OFF initially and writing module registers would hardlock otherwise. */
    ccm_module_clock_gating(CG_USBOTG, CGM_ON_RUN_WAIT);
    enable_transceiver(true);

    if (on)
    {
        usb_core_init();
    }
    else
    {
        usb_core_exit();
        enable_transceiver(false);
        ccm_module_clock_gating(CG_USBOTG, CGM_OFF);
    }
}
Exemple #7
0
void usb_enable(bool on)
{
    if (on) usb_core_init();
    else usb_core_exit();
}