diff options
author | Daniel Ankers <dan@weirdo.org.uk> | 2007-03-04 23:53:38 +0000 |
---|---|---|
committer | Daniel Ankers <dan@weirdo.org.uk> | 2007-03-04 23:53:38 +0000 |
commit | ee07215d506def8d3483f4adf6e1d4ae51c10c52 (patch) | |
tree | 43fc7e55a0ec08546c1fe26d50773beffec92ca6 /firmware | |
parent | fa6c449565508965db9a7d6afb09c7aaebeead41 (diff) | |
download | rockbox-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.c | 11 |
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) | |||
55 | /* Disable cache */ | 55 | /* Disable cache */ |
56 | CACHE_CTL = CACHE_DISABLE; | 56 | CACHE_CTL = CACHE_DISABLE; |
57 | 57 | ||
58 | /* Tell the main core that we're ready to reload */ | ||
59 | cpu_reply = 2; | ||
60 | |||
58 | /* Wait while RoLo loads the image into SDRAM */ | 61 | /* Wait while RoLo loads the image into SDRAM */ |
59 | /* TODO: Accept checksum failure gracefully */ | 62 | /* TODO: Accept checksum failure gracefully */ |
60 | while(cpu_message == 1) {} | 63 | while(cpu_message == 1) {} |
61 | 64 | ||
65 | /* Acknowledge the CPU and then reload */ | ||
62 | cpu_reply = 1; | 66 | cpu_reply = 1; |
63 | 67 | ||
64 | asm volatile( | 68 | asm volatile( |
@@ -111,6 +115,7 @@ void rolo_restart(const unsigned char* source, unsigned char* dest, | |||
111 | ); | 115 | ); |
112 | #elif (CONFIG_CPU==PP5020) || (CONFIG_CPU==PP5024) | 116 | #elif (CONFIG_CPU==PP5020) || (CONFIG_CPU==PP5024) |
113 | 117 | ||
118 | /* Tell the COP that we've finished loading and started rebooting */ | ||
114 | cpu_message = 0; | 119 | cpu_message = 0; |
115 | 120 | ||
116 | /* Flush cache */ | 121 | /* Flush cache */ |
@@ -124,6 +129,7 @@ void rolo_restart(const unsigned char* source, unsigned char* dest, | |||
124 | for (i=0;i<8;i++) | 129 | for (i=0;i<8;i++) |
125 | memmapregs[i]=0; | 130 | memmapregs[i]=0; |
126 | 131 | ||
132 | /* Wait for the COP to tell us it is rebooting */ | ||
127 | while(cpu_reply != 1) {} | 133 | while(cpu_reply != 1) {} |
128 | 134 | ||
129 | asm volatile( | 135 | asm volatile( |
@@ -190,6 +196,11 @@ int rolo_load(const char* filename) | |||
190 | #ifdef CPU_PP | 196 | #ifdef CPU_PP |
191 | cpu_message = COP_REBOOT; | 197 | cpu_message = COP_REBOOT; |
192 | COP_CTL = PROC_WAKE; | 198 | COP_CTL = PROC_WAKE; |
199 | lcd_puts(0, 2, "Waiting for coprocessor..."); | ||
200 | lcd_update(); | ||
201 | while(cpu_reply != 2) {} | ||
202 | lcd_puts(0, 2, " "); | ||
203 | lcd_update(); | ||
193 | #endif | 204 | #endif |
194 | 205 | ||
195 | lseek(fd, FIRMWARE_OFFSET_FILE_DATA, SEEK_SET); | 206 | lseek(fd, FIRMWARE_OFFSET_FILE_DATA, SEEK_SET); |