summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorDaniel Ankers <dan@weirdo.org.uk>2007-03-04 23:53:38 +0000
committerDaniel Ankers <dan@weirdo.org.uk>2007-03-04 23:53:38 +0000
commitee07215d506def8d3483f4adf6e1d4ae51c10c52 (patch)
tree43fc7e55a0ec08546c1fe26d50773beffec92ca6 /firmware
parentfa6c449565508965db9a7d6afb09c7aaebeead41 (diff)
downloadrockbox-ee07215d506def8d3483f4adf6e1d4ae51c10c52.tar.gz
rockbox-ee07215d506def8d3483f4adf6e1d4ae51c10c52.zip
Fix RoLo on PortalPlayer targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12609 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/rolo.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/firmware/rolo.c b/firmware/rolo.c
index 4ac730b7ef..0689e8be5b 100644
--- a/firmware/rolo.c
+++ b/firmware/rolo.c
@@ -55,10 +55,14 @@ void rolo_restart_cop(void)
/* Disable cache */
CACHE_CTL = CACHE_DISABLE;
+ /* Tell the main core that we're ready to reload */
+ cpu_reply = 2;
+
/* Wait while RoLo loads the image into SDRAM */
/* TODO: Accept checksum failure gracefully */
while(cpu_message == 1) {}
+ /* Acknowledge the CPU and then reload */
cpu_reply = 1;
asm volatile(
@@ -111,6 +115,7 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
);
#elif (CONFIG_CPU==PP5020) || (CONFIG_CPU==PP5024)
+ /* Tell the COP that we've finished loading and started rebooting */
cpu_message = 0;
/* Flush cache */
@@ -124,6 +129,7 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
for (i=0;i<8;i++)
memmapregs[i]=0;
+ /* Wait for the COP to tell us it is rebooting */
while(cpu_reply != 1) {}
asm volatile(
@@ -190,6 +196,11 @@ int rolo_load(const char* filename)
#ifdef CPU_PP
cpu_message = COP_REBOOT;
COP_CTL = PROC_WAKE;
+ lcd_puts(0, 2, "Waiting for coprocessor...");
+ lcd_update();
+ while(cpu_reply != 2) {}
+ lcd_puts(0, 2, " ");
+ lcd_update();
#endif
lseek(fd, FIRMWARE_OFFSET_FILE_DATA, SEEK_SET);