forked from len0rd/rockbox
Slightly improved RoLo for PortalPlayer targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11707 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
99109938fe
commit
cb51abb77c
1 changed files with 8 additions and 7 deletions
|
@ -32,10 +32,8 @@
|
||||||
|
|
||||||
#if !defined(IRIVER_IFP7XX_SERIES) && \
|
#if !defined(IRIVER_IFP7XX_SERIES) && \
|
||||||
(CONFIG_CPU != PP5002) && !defined(IRIVER_H10) && \
|
(CONFIG_CPU != PP5002) && !defined(IRIVER_H10) && \
|
||||||
!defined(IRIVER_H10_5GB) && (CONFIG_CPU != S3C2440) && \
|
!defined(IRIVER_H10_5GB) && (CONFIG_CPU != S3C2440)
|
||||||
!defined(SANSA_E200)
|
|
||||||
/* FIX: this doesn't work on iFP, 3rd Gen ipods, or H10 yet */
|
/* FIX: this doesn't work on iFP, 3rd Gen ipods, or H10 yet */
|
||||||
/* TODO: Test on the Sansa */
|
|
||||||
|
|
||||||
#define IRQ0_EDGE_TRIGGER 0x80
|
#define IRQ0_EDGE_TRIGGER 0x80
|
||||||
|
|
||||||
|
@ -65,7 +63,7 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
|
||||||
{
|
{
|
||||||
long i;
|
long i;
|
||||||
unsigned char* localdest = dest;
|
unsigned char* localdest = dest;
|
||||||
#if (CONFIG_CPU==PP5020)
|
#if (CONFIG_CPU==PP5020) || (CONFIG_CPU==PP5024)
|
||||||
unsigned long* memmapregs = (unsigned long*)0xf000f000;
|
unsigned long* memmapregs = (unsigned long*)0xf000f000;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -80,11 +78,14 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
|
||||||
"jmp (%0) \n"
|
"jmp (%0) \n"
|
||||||
: : "a"(dest)
|
: : "a"(dest)
|
||||||
);
|
);
|
||||||
#elif (CONFIG_CPU==PP5020)
|
#elif (CONFIG_CPU==PP5020) || (CONFIG_CPU==PP5024)
|
||||||
/* Copy a further 8KB of data to try and ensure the cache is flushed */
|
for(i = length; i < length; i++)
|
||||||
for(i = length; i < length+8192; i++)
|
|
||||||
*localdest++ = *source++;
|
*localdest++ = *source++;
|
||||||
|
|
||||||
|
/* Flush cache */
|
||||||
|
outl(inl(0xf000f044) | 0x2, 0xf000f044);
|
||||||
|
while ((inl(0x6000c000) & 0x8000) != 0) {}
|
||||||
|
|
||||||
/* Disable cache */
|
/* Disable cache */
|
||||||
outl(0x0, 0x6000C000);
|
outl(0x0, 0x6000C000);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue