Get rid of usb_drv_attach() from USB code.

'Twas an idiosyncrasy of detecting a host upon bus reset, which is
obsolete.

Change-Id: I0adb25e1805022544f52cd0cb766819a367dbde4
This commit is contained in:
Michael Sevakis 2013-05-14 22:13:38 -04:00
parent 8d21fc9229
commit 91b850ec42
5 changed files with 6 additions and 17 deletions

View file

@ -27,7 +27,6 @@ void usb_drv_startup(void);
void usb_drv_int_enable(bool enable); /* Target implemented */
void usb_drv_init(void);
void usb_drv_exit(void);
void usb_drv_attach(void);
void usb_drv_int(void); /* Call from target INT handler */
void usb_drv_stall(int endpoint, bool stall,bool in);
bool usb_drv_stalled(int endpoint,bool in);

View file

@ -42,7 +42,6 @@ void usb_remove_int(void)
void usb_attach(void)
{
usb_drv_attach();
}
void usb_drv_int_enable(bool enable)

View file

@ -123,8 +123,6 @@ void usb_attach(void)
bootloader_install_mode =
(button_status() & USB_BL_INSTALL_MODE_BTN) != 0;
}
usb_drv_attach();
}
static void __attribute__((interrupt("IRQ"))) USB_OTG_HANDLER(void)

View file

@ -108,7 +108,7 @@
static void usb_reset_controller(void)
{
/* enable usb module */
outl(inl(0x7000002C) | 0x3000000, 0x7000002C);
outl(inl(0x7000002C) | 0x3000000, 0x7000002C);
DEV_EN |= DEV_USB0;
DEV_EN |= DEV_USB1;
@ -197,7 +197,11 @@ void usb_enable(bool on)
void usb_attach(void)
{
usb_drv_attach();
#if defined(IPOD_VIDEO)
/* FIXME: Some iPod Video's need this 2nd call of usb_drv_init() to establish
* an USB connection. */
usb_drv_init();
#endif
}
bool usb_plugged(void)

View file

@ -489,17 +489,6 @@ void usb_drv_init(void)
/* now a bus reset will occur. see bus_reset() */
}
/* fully enable driver */
void usb_drv_attach(void)
{
logf("usb_drv_attach");
#if defined(IPOD_VIDEO)
/* FIXME: Some iPod Video's need this 2nd call of usb_drv_init() to establish
* an USB connection. */
usb_drv_init();
#endif
}
void usb_drv_exit(void)
{
usb_drv_stop();