summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRob Purchase <shotofadds@rockbox.org>2008-04-15 20:02:24 +0000
committerRob Purchase <shotofadds@rockbox.org>2008-04-15 20:02:24 +0000
commitd88c5667d9bef918259b2e1719315a4e948be30a (patch)
treef800d212d7d5ddcfd363eef856fa3c2c625806fa /firmware
parentb36d3c0be228fbf7ad1b193d11d8a3365a045a43 (diff)
downloadrockbox-d88c5667d9bef918259b2e1719315a4e948be30a.tar.gz
rockbox-d88c5667d9bef918259b2e1719315a4e948be30a.zip
Kill some D2 yellows with a simplistic Rolo implementation and NAND driver cleanup. Correct some comments in crt0.s and remove two erroneous null words from rockbox.bin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17127 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/rolo.c12
-rw-r--r--firmware/target/arm/tcc780x/ata-nand-tcc780x.c9
-rw-r--r--firmware/target/arm/tcc780x/crt0.S8
3 files changed, 19 insertions, 10 deletions
diff --git a/firmware/rolo.c b/firmware/rolo.c
index eb49a18c01..848b35b056 100644
--- a/firmware/rolo.c
+++ b/firmware/rolo.c
@@ -167,6 +167,15 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
"mov r0, #0x10000000 \n"
"mov pc, r0 \n"
);
+
+#elif defined(CPU_TCC780X)
+ /* Flush cache */
+ flush_icache();
+
+ asm volatile(
+ "mov pc, %0 \n"
+ : : "r"(dest)
+ );
#endif
}
#endif
@@ -216,7 +225,8 @@ int rolo_load(const char* filename)
length = filesize(fd) - FIRMWARE_OFFSET_FILE_DATA;
-#if defined(CPU_COLDFIRE) || defined(CPU_PP) || (CONFIG_CPU==DM320)
+#if defined(CPU_COLDFIRE) || defined(CPU_PP) || (CONFIG_CPU==DM320) \
+ || defined(CPU_TCC780X)
/* Read and save checksum */
lseek(fd, FIRMWARE_OFFSET_FILE_CRC, SEEK_SET);
if (read(fd, &file_checksum, 4) != 4) {
diff --git a/firmware/target/arm/tcc780x/ata-nand-tcc780x.c b/firmware/target/arm/tcc780x/ata-nand-tcc780x.c
index b47444f3a8..4cf55c0c3c 100644
--- a/firmware/target/arm/tcc780x/ata-nand-tcc780x.c
+++ b/firmware/target/arm/tcc780x/ata-nand-tcc780x.c
@@ -39,9 +39,6 @@ long last_disk_activity = -1;
/** static, private data **/
static bool initialized = false;
-static long next_yield = 0;
-#define MIN_YIELD_PERIOD 2000
-
static struct mutex ata_mtx SHAREDBSS_ATTR;
#define SECTOR_SIZE 512
@@ -740,7 +737,11 @@ int ata_read_sectors(IF_MV2(int drive,) unsigned long start, int incount,
int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count,
const void* outbuf)
{
- #warning function not implemented
+#ifdef HAVE_MULTIVOLUME
+ (void)drive; /* unused for now */
+#endif
+
+ /* TODO: Learn more about TNFTL and implement this one day... */
(void)start;
(void)count;
(void)outbuf;
diff --git a/firmware/target/arm/tcc780x/crt0.S b/firmware/target/arm/tcc780x/crt0.S
index d328291a26..af5bd44192 100644
--- a/firmware/target/arm/tcc780x/crt0.S
+++ b/firmware/target/arm/tcc780x/crt0.S
@@ -35,18 +35,16 @@
start:
#ifdef TCCBOOT
+#ifdef BOOTLOADER
/* Add -DTCCBOOT to EXTRA_DEFINES in the bootloader Makefile to
enable building the bootloader to be appended to the end of the
original firmware, dual-booting based on a key-press.
- NB: On the D2 TCCBOOT currently only works in USB boot mode (via tcctool)
- When flashed to the device, the OF will boot as normal - but holding a
- key to boot Rockbox results in a blank screen and crashed player.
-
The following two values are filled in by mktccboot.
*/
.word 0 /* Saved entrypoint of original firmware*/
.word 0 /* Location in RAM of the start of our bootloader */
+#endif
#else
ldr pc, =start_loc /* jump to the main entry point */
@@ -79,7 +77,7 @@ start_loc:
#error No bootup key detection implemented for this target
#endif
- /* Copy bootloader to safe area - 0x21000000 (DRAM) */
+ /* Copy bootloader to safe area - 0x21F00000 (end of DRAM) */
/* TODO: Adjust this for other targets - DRAM + DRAMSIZE - 0x100000 */
ldr r0, [pc, #-28]
mov r1, #0x22000000