From ee07215d506def8d3483f4adf6e1d4ae51c10c52 Mon Sep 17 00:00:00 2001 From: Daniel Ankers Date: Sun, 4 Mar 2007 23:53:38 +0000 Subject: Fix RoLo on PortalPlayer targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12609 a1c6a512-1295-4272-9138-f99709370657 --- firmware/rolo.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); -- cgit v1.2.3