diff options
Diffstat (limited to 'bootloader')
-rw-r--r-- | bootloader/telechips.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/bootloader/telechips.c b/bootloader/telechips.c index 47e508b8b3..7f9a3556c0 100644 --- a/bootloader/telechips.c +++ b/bootloader/telechips.c | |||
@@ -44,9 +44,15 @@ | |||
44 | #include "file.h" | 44 | #include "file.h" |
45 | #include "common.h" | 45 | #include "common.h" |
46 | 46 | ||
47 | #if defined(COWON_D2) | 47 | #if defined(COWON_D2) || defined(IAUDIO_7) && defined(TCCBOOT) |
48 | #include "pcf50606.h" | 48 | # define REAL_BOOT |
49 | #define LOAD_ADDRESS 0x20000000 /* DRAM_START */ | 49 | #endif |
50 | |||
51 | #ifdef REAL_BOOT | ||
52 | # if defined(COWON_D2) || defined(IAUDIO_7) | ||
53 | # include "pcf50606.h" | ||
54 | # endif | ||
55 | # define LOAD_ADDRESS 0x20000000 /* DRAM_START */ | ||
50 | #endif | 56 | #endif |
51 | 57 | ||
52 | char version[] = APPSVERSION; | 58 | char version[] = APPSVERSION; |
@@ -80,14 +86,14 @@ void show_debug_screen(void) | |||
80 | } else { | 86 | } else { |
81 | power_count = 0; | 87 | power_count = 0; |
82 | } | 88 | } |
83 | 89 | #ifdef BUTTON_SELECT | |
84 | if (button & BUTTON_SELECT){ | 90 | if (button & BUTTON_SELECT){ |
85 | _backlight_off(); | 91 | _backlight_off(); |
86 | } | 92 | } |
87 | else{ | 93 | else{ |
88 | _backlight_on(); | 94 | _backlight_on(); |
89 | } | 95 | } |
90 | 96 | #endif | |
91 | /*printf("Btn: 0x%08x",button); | 97 | /*printf("Btn: 0x%08x",button); |
92 | printf("Tick: %d",current_tick); | 98 | printf("Tick: %d",current_tick); |
93 | printf("GPIOA: 0x%08x",GPIOA); | 99 | printf("GPIOA: 0x%08x",GPIOA); |
@@ -172,13 +178,13 @@ void show_debug_screen(void) | |||
172 | 178 | ||
173 | void* main(void) | 179 | void* main(void) |
174 | { | 180 | { |
175 | #if defined(COWON_D2) && defined(TCCBOOT) | 181 | #ifdef REAL_BOOT |
176 | int rc; | 182 | int rc; |
177 | unsigned char* loadbuffer = (unsigned char*)LOAD_ADDRESS; | 183 | unsigned char* loadbuffer = (unsigned char*)LOAD_ADDRESS; |
178 | #endif | 184 | #endif |
179 | 185 | ||
180 | power_init(); | ||
181 | system_init(); | 186 | system_init(); |
187 | power_init(); | ||
182 | #ifndef COWON_D2 | 188 | #ifndef COWON_D2 |
183 | /* The D2 doesn't enable threading or interrupts */ | 189 | /* The D2 doesn't enable threading or interrupts */ |
184 | kernel_init(); | 190 | kernel_init(); |
@@ -197,7 +203,7 @@ void* main(void) | |||
197 | 203 | ||
198 | /* Only load the firmware if TCCBOOT is defined - this ensures SDRAM_START is | 204 | /* Only load the firmware if TCCBOOT is defined - this ensures SDRAM_START is |
199 | available for loading the firmware. Otherwise display the debug screen. */ | 205 | available for loading the firmware. Otherwise display the debug screen. */ |
200 | #if defined(COWON_D2) && defined(TCCBOOT) | 206 | #ifdef REAL_BOOT |
201 | printf("Rockbox boot loader"); | 207 | printf("Rockbox boot loader"); |
202 | printf("Version %s", version); | 208 | printf("Version %s", version); |
203 | 209 | ||