diff options
| author | Amaury Pouly <pamaury@rockbox.org> | 2011-06-30 17:31:40 +0000 |
|---|---|---|
| committer | Amaury Pouly <pamaury@rockbox.org> | 2011-06-30 17:31:40 +0000 |
| commit | 617d1e9f6b7969aff5e45746b9c5e3cee9ce2c45 (patch) | |
| tree | bf2015d298c2b6bc80189d09b73426380e08451f /bootloader | |
| parent | 4a04c47a97517930b29f00b9d7f4d157cb69fa9b (diff) | |
| download | rockbox-617d1e9f6b7969aff5e45746b9c5e3cee9ce2c45.zip rockbox-617d1e9f6b7969aff5e45746b9c5e3cee9ce2c45.tar.gz rockbox-617d1e9f6b7969aff5e45746b9c5e3cee9ce2c45.tar.bz2 rockbox-617d1e9f6b7969aff5e45746b9c5e3cee9ce2c45.tar.xz | |
imx233/fuze+: ssp, dma, mmc now work properly, partially implement cpu frequency changing, implement panic waiting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30104 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
| -rw-r--r-- | bootloader/imx233.c | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/bootloader/imx233.c b/bootloader/imx233.c index 85a545b..523c902 100644 --- a/bootloader/imx233.c +++ b/bootloader/imx233.c @@ -35,9 +35,7 @@ #include "disk.h" #include "panic.h" #include "power.h" -#include "pinctrl-imx233.h" #include "system-target.h" -#include "ssp-imx233.h" #include "usb.h" @@ -65,41 +63,19 @@ void main(void) //button_debug_screen(); - #if 0 - usb_init(); - usb_start_monitoring(); - extern int usb_status; - usb_status = USB_INSERTED; - usb_status_event(USB_POWERED); - - printf("USB: Connecting"); - - while(1) - { - int button = button_get_w_tmo(HZ/25); - - if(button == SYS_USB_CONNECTED) - break; /* Hit */ - if(button_read_device() & BUTTON_POWER) - power_off(); - yield(); - } - - printf("USB: Connected"); - while(1) - { - int button = button_get_w_tmo(HZ/25); - - if(button_read_device() & BUTTON_POWER) - power_off(); - yield(); - } - #endif - ret = storage_init(); if(ret < 0) error(EATA, ret, true); + #ifdef HAVE_BOOTLOADER_USB_MODE + usb_init(); + usb_core_enable_driver(USB_DRIVER_SERIAL, true); + usb_attach(); + while(!(button_read_device() & BUTTON_POWER)) + yield(); + power_off(); + #endif /* HAVE_BOOTLOADER_USB_MODE */ + while(!disk_init(IF_MV(0))) panicf("disk_init failed!"); |