summaryrefslogtreecommitdiffstats
path: root/firmware/rolo.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/rolo.c')
-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);