/* Cleans up the board specific fastboot */
void fastboot_shutdown(void)
{
DBG0("\n");
/* when operation is done, usbd must be stopped */
fboot_usb_stop();
}
int fboot_usb_stop (void)
{
DBG0("\n");
/* dont used in usb high speed, but used in common file cmd_usbd.c */
fboot_usb_core_soft_reset();
fboot_usb_phy_off();
return 0;
}
void fboot_usb_core_soft_reset(void)
{
u32 tmp;
DBG0("\n");
writel(CORE_SOFT_RESET, S5P_OTG_GRSTCTL);
do
{
tmp = readl(S5P_OTG_GRSTCTL);
}while(!(tmp & AHB_MASTER_IDLE));
}
/* OTG PHY Power Off */
void fboot_usb_phy_off(void) {
#if defined(CONFIG_S5PC110)
writel(readl(S5P_OTG_PHYPWR)|(0x18), S5P_OTG_PHYPWR);
writel(readl(USB_PHY_CONTROL)&~(1<<0), USB_PHY_CONTROL);
#elif defined(CONFIG_S5PC100)
writel(readl(S5P_OTG_PHYPWR)|(0x3<<3), S5P_OTG_PHYPWR);
OTHERS_REG &= ~(1<<16);
#else
#error "* CFG_ERROR : you have to select C100 or C110 for Android Fastboot"
#endif
}
int do_fastboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])