From 617d1e9f6b7969aff5e45746b9c5e3cee9ce2c45 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Thu, 30 Jun 2011 17:31:40 +0000 Subject: 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 --- bootloader/imx233.c | 42 +++++++++--------------------------------- 1 file changed, 9 insertions(+), 33 deletions(-) (limited to 'bootloader') diff --git a/bootloader/imx233.c b/bootloader/imx233.c index 85a545b523..523c902bb6 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!"); -- cgit v1.2.3