From 449167b7a92090f889a3bf442e3782721cc6c796 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 20 May 2012 10:49:02 +0200 Subject: Undo f695681 (r30433). USB hardware must be initialized first. This fixes flash/ MMC access on the Ondios when booting from ROM. Add a comment what to pay attention for in the target specific usb_init_device(). --- firmware/usb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'firmware/usb.c') diff --git a/firmware/usb.c b/firmware/usb.c index 56f6fb7230..6823851e08 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -659,6 +659,11 @@ void usb_acknowledge(long id) void usb_init(void) { + /* Do required hardware inits first. For software USB the driver has + * to make sure this won't trigger a transfer completion before the + * queue and thread are created. */ + usb_init_device(); + #ifdef USB_FULL_INIT usb_enable(false); @@ -672,8 +677,6 @@ void usb_init(void) tick_add_task(usb_tick); #endif #endif /* USB_FULL_INIT */ - - usb_init_device(); } void usb_wait_for_disconnect(struct event_queue *q) -- cgit v1.2.3