int v2_usbburning(unsigned timeout) { int cfg = EXT_CLOCK; #if defined(CONFIG_SILENT_CONSOLE) gd->flags &= ~GD_FLG_SILENT; #endif printf("Enter USB burn\n"); set_usb_phy_config(cfg); usb_parameter_init(timeout); if(usb_pcd_init()) { printf("Fail in usb_pcd_init\n"); return __LINE__; } #if (MESON_CPU_TYPE_MESON8 <= MESON_CPU_TYPE) AML_WATCH_DOG_DISABLE(); //disable watchdog #endif// #if (MESON_CPU_TYPE_MESON8 <= MESON_CPU_TYPE) while(1) { //watchdog_clear(); //Elvis Fool if(usb_pcd_irq()) break; } return 0; }
int usb_boot(int clk_cfg) { int cfg = INT_CLOCK; if(clk_cfg) cfg = EXT_CLOCK; set_usb_phy_config(cfg); usb_parameter_init(); if(usb_pcd_init()) return 0; while(1) { //watchdog_clear(); //Elvis Fool if(usb_pcd_irq()) break; } return 0; }