summaryrefslogtreecommitdiffstats
path: root/firmware/rolo.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-09-30 10:53:31 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-09-30 10:53:31 +0000
commite760ba5a04260c8fd994f7cbdc599e560552164e (patch)
treeed57d0dd369c41df6878b160b2c8bd155902e236 /firmware/rolo.c
parent1ed54f4302c7bca01e389e12a6a9867a791a8dba (diff)
downloadrockbox-e760ba5a04260c8fd994f7cbdc599e560552164e.tar.gz
rockbox-e760ba5a04260c8fd994f7cbdc599e560552164e.tar.bz2
rockbox-e760ba5a04260c8fd994f7cbdc599e560552164e.zip
Add some defines for pp502x. No guarantee as to full accuracy yet but that's not really too important. Use them in the code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14912 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/rolo.c')
-rw-r--r--firmware/rolo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware/rolo.c b/firmware/rolo.c
index 9f83f916f9..9f9af40d39 100644
--- a/firmware/rolo.c
+++ b/firmware/rolo.c
@@ -74,7 +74,7 @@ void rolo_restart_cop(void)
invalidate_icache();
/* Disable cache */
- CACHE_CTL = CACHE_DISABLE;
+ CACHE_CTL = CACHE_CTL_DISABLE;
/* Tell the main core that we're ready to reload */
cpu_reply = 1;
@@ -123,9 +123,6 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
{
long i;
unsigned char* localdest = dest;
-#ifdef CPU_PP502x
- unsigned long* memmapregs = (unsigned long*)0xf000f000;
-#endif
/* This is the equivalent of a call to memcpy() but this must be done from
iram to avoid overwriting itself and we don't want to depend on memcpy()
@@ -148,11 +145,14 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
flush_icache();
/* Disable cache */
- CACHE_CTL = CACHE_DISABLE;
+ CACHE_CTL = CACHE_CTL_DISABLE;
/* Reset the memory mapping registers to zero */
- for (i=0;i<8;i++)
- memmapregs[i]=0;
+ {
+ volatile unsigned long *mmap_reg;
+ for (mmap_reg = &MMAP_FIRST; mmap_reg <= &MMAP_LAST; mmap_reg++)
+ *mmap_reg = 0;
+ }
#if NUM_CORES > 1
/* Tell the COP it's safe to continue rebooting */