summaryrefslogtreecommitdiffstats
path: root/bootloader/telechips.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-09-06 17:50:59 +0000
committerDave Chapman <dave@dchapman.com>2008-09-06 17:50:59 +0000
commitd462a64a918117991e11dade2d7fa3a28196e07a (patch)
tree0a6f5ed8777b18bb1641fbb3608f10374901706c /bootloader/telechips.c
parentb87715f670f04c9adbe358c32a385c6771d99a81 (diff)
downloadrockbox-d462a64a918117991e11dade2d7fa3a28196e07a.tar.gz
rockbox-d462a64a918117991e11dade2d7fa3a28196e07a.tar.bz2
rockbox-d462a64a918117991e11dade2d7fa3a28196e07a.zip
Initial commit of iaudio 7 port by Vitja Makarov (FS#9245). Port is at quite an advanced stage, but is troubled by the lack of a reliable NAND driver (similar to the Cowon D2 port) and is not yet suitable for non-developers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18435 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/telechips.c')
-rw-r--r--bootloader/telechips.c24
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 @@
#include "file.h"
#include "common.h"
-#if defined(COWON_D2)
-#include "pcf50606.h"
-#define LOAD_ADDRESS 0x20000000 /* DRAM_START */
+#if defined(COWON_D2) || defined(IAUDIO_7) && defined(TCCBOOT)
+# define REAL_BOOT
+#endif
+
+#ifdef REAL_BOOT
+# if defined(COWON_D2) || defined(IAUDIO_7)
+# include "pcf50606.h"
+# endif
+# define LOAD_ADDRESS 0x20000000 /* DRAM_START */
#endif
char version[] = APPSVERSION;
@@ -80,14 +86,14 @@ void show_debug_screen(void)
} else {
power_count = 0;
}
-
+#ifdef BUTTON_SELECT
if (button & BUTTON_SELECT){
- _backlight_off();
+ _backlight_off();
}
else{
_backlight_on();
}
-
+#endif
/*printf("Btn: 0x%08x",button);
printf("Tick: %d",current_tick);
printf("GPIOA: 0x%08x",GPIOA);
@@ -172,13 +178,13 @@ void show_debug_screen(void)
void* main(void)
{
-#if defined(COWON_D2) && defined(TCCBOOT)
+#ifdef REAL_BOOT
int rc;
unsigned char* loadbuffer = (unsigned char*)LOAD_ADDRESS;
#endif
- power_init();
system_init();
+ power_init();
#ifndef COWON_D2
/* The D2 doesn't enable threading or interrupts */
kernel_init();
@@ -197,7 +203,7 @@ void* main(void)
/* Only load the firmware if TCCBOOT is defined - this ensures SDRAM_START is
available for loading the firmware. Otherwise display the debug screen. */
-#if defined(COWON_D2) && defined(TCCBOOT)
+#ifdef REAL_BOOT
printf("Rockbox boot loader");
printf("Version %s", version);