diff options
author | William Wilgus <wilgus.william@gmail.com> | 2021-10-02 02:19:10 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2021-10-04 10:56:33 -0400 |
commit | 7c67a48332d0519c43618efd943f19d2e4bf5788 (patch) | |
tree | 98b20f656f3d79f426bde2a6f625dc605655c77b /bootloader/main-pp.c | |
parent | 75524a7eeca2a5771486762b65c7e0e5ad3e4a65 (diff) | |
download | rockbox-7c67a48332d0519c43618efd943f19d2e4bf5788.tar.gz rockbox-7c67a48332d0519c43618efd943f19d2e4bf5788.zip |
Sansa E200v1 Bootloader attempt at enabling USB in boot loader
there is a 1MB free region that is used to load the firmware but we
shouldn't need that till after a USB connection
so here is my 2nd try
Change-Id: I2552db3a7fba019d7e7188984432f758ddafe548
Diffstat (limited to 'bootloader/main-pp.c')
-rw-r--r-- | bootloader/main-pp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c index 08b5ea3ef5..8357b2fff6 100644 --- a/bootloader/main-pp.c +++ b/bootloader/main-pp.c | |||
@@ -51,6 +51,9 @@ | |||
51 | #if defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200) | 51 | #if defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200) |
52 | #include "usb_drv.h" | 52 | #include "usb_drv.h" |
53 | #endif | 53 | #endif |
54 | #if defined(SANSA_E200) && defined(HAVE_BOOTLOADER_USB_MODE) | ||
55 | #include "core_alloc.h" | ||
56 | #endif | ||
54 | #if defined(SAMSUNG_YH925) | 57 | #if defined(SAMSUNG_YH925) |
55 | /* this function (in lcd-yh925.c) resets the screen orientation for the OF | 58 | /* this function (in lcd-yh925.c) resets the screen orientation for the OF |
56 | * for use with dualbooting */ | 59 | * for use with dualbooting */ |
@@ -232,7 +235,6 @@ static int handle_usb(int connect_timeout) | |||
232 | usb = USB_HANDLED; | 235 | usb = USB_HANDLED; |
233 | usb_acknowledge(SYS_USB_CONNECTED_ACK); | 236 | usb_acknowledge(SYS_USB_CONNECTED_ACK); |
234 | usb_wait_for_disconnect(&q); | 237 | usb_wait_for_disconnect(&q); |
235 | break; | ||
236 | } | 238 | } |
237 | 239 | ||
238 | if (connect_timeout != TIMEOUT_BLOCK && | 240 | if (connect_timeout != TIMEOUT_BLOCK && |
@@ -299,6 +301,9 @@ void* main(void) | |||
299 | int usb = USB_EXTRACTED; | 301 | int usb = USB_EXTRACTED; |
300 | 302 | ||
301 | system_init(); | 303 | system_init(); |
304 | #if defined(SANSA_E200) && defined(HAVE_BOOTLOADER_USB_MODE) | ||
305 | core_allocator_init(); | ||
306 | #endif | ||
302 | kernel_init(); | 307 | kernel_init(); |
303 | 308 | ||
304 | #ifdef HAVE_BOOTLOADER_USB_MODE | 309 | #ifdef HAVE_BOOTLOADER_USB_MODE |