mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-15 16:12:28 -05:00
Rename cache coherency functions.
The old cache coherency function names where wrong and misleading. The new names are (purposely different from vendor manuals) * commit_* (write-back only) * discard_* (removing lines from cache only) * commit_discard_* (write-back and removing lines from cache) It's suspected the old names have led to wrong uses. The old names still exist (as aliases) so every call via the old names need to be double checked and changed to the new name. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28045 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ca0e95ad08
commit
dd5dd8cfd9
8 changed files with 191 additions and 103 deletions
|
|
@ -62,7 +62,7 @@ void __attribute__((interrupt("IRQ"))) irq_handler(void)
|
|||
some other CPU frequency scaling. */
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
void ICODE_ATTR __attribute__((naked)) cpucache_flush(void)
|
||||
void ICODE_ATTR __attribute__((naked)) cpucache_commit(void)
|
||||
{
|
||||
asm volatile(
|
||||
"mov r0, #0xf0000000 \n"
|
||||
|
|
@ -70,14 +70,15 @@ void ICODE_ATTR __attribute__((naked)) cpucache_flush(void)
|
|||
"add r1, r0, #0x2000 \n" /* r1 = CACHE_FLUSH_BASE + CACHE_SIZE */
|
||||
"mov r2, #0 \n"
|
||||
"1: \n"
|
||||
"str r2, [r0], #16 \n" /* Flush */
|
||||
"str r2, [r0], #16 \n" /* Commit */
|
||||
"cmp r0, r1 \n"
|
||||
"blo 1b \n"
|
||||
"bx lr \n"
|
||||
);
|
||||
}
|
||||
void cpucache_flush(void) __attribute__((alias("cpucache_commit")));
|
||||
|
||||
void ICODE_ATTR __attribute__((naked)) cpucache_invalidate(void)
|
||||
void ICODE_ATTR __attribute__((naked)) cpucache_commit_discard(void)
|
||||
{
|
||||
asm volatile(
|
||||
"mov r0, #0xf0000000 \n"
|
||||
|
|
@ -86,13 +87,14 @@ void ICODE_ATTR __attribute__((naked)) cpucache_invalidate(void)
|
|||
"add r1, r0, #0x2000 \n" /* r2 = CACHE_FLUSH_BASE + CACHE_SIZE */
|
||||
"mov r3, #0 \n"
|
||||
"1: \n"
|
||||
"str r3, [r0], #16 \n" /* Flush */
|
||||
"str r3, [r2], #16 \n" /* Invalidate */
|
||||
"str r3, [r0], #16 \n" /* Commit */
|
||||
"str r3, [r2], #16 \n" /* Discard */
|
||||
"cmp r0, r1 \n"
|
||||
"blo 1b \n"
|
||||
"bx lr \n"
|
||||
);
|
||||
}
|
||||
void cpucache_invalidate(void) __attribute__((alias("cpucache_commit_discard")));
|
||||
|
||||
static void ipod_init_cache(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue