Enable Icache

Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
This commit is contained in:
TsiChungLiew 2007-07-05 23:06:55 -05:00 committed by John Rigby
parent b9bf3de377
commit ddd104f1ed
1 changed files with 37 additions and 38 deletions

View File

@ -31,7 +31,6 @@
#define _START _start
#define _FAULT _fault
#define SAVE_ALL \
move.w #0x2700,%sr; /* disable intrs */ \
subl #60,%sp; /* space for 15 regs */ \
@ -42,7 +41,6 @@
addl #60,%sp; /* space for 15 regs */ \
rte;
.text
/*
* Vector table. This is used for initial platform startup.
@ -149,7 +147,8 @@ _start:
move.l %d0, (%a1)
move.l %d0, (%a2)
/* set stackpointer to end of internal ram to get some stackspace for the first c-code */
/* set stackpointer to end of internal ram to get some stackspace for the
first c-code */
move.l #(CFG_INIT_RAM_ADDR + CFG_INIT_SP_OFFSET), %sp
clr.l %sp@-
@ -271,12 +270,12 @@ icache_enable:
movec %d0, %CACR /* Invalidate cache */
move.l #(CFG_SDRAM_BASE + 0xc000), %d0 /* Setup cache mask */
movec %d0, %ACR0 /* Enable cache */
move.l #(CFG_CS0_BASE + 0xc000), %d0 /* Setup cache mask */
move.l #(CFG_CS0_BASE + 0x0000), %d0 /* Setup cache mask */
movec %d0, %ACR1 /* Enable cache */
/*move.l #0x81000100, %d0*/ /* Setup cache mask */
move.l #0x81000100, %d0 /* Setup cache mask */
move.l #0x80000200, %d0 /* Setup cache mask */
movec %d0, %CACR /* Enable cache */
nop
move.l #(CFG_INIT_RAM_ADDR+CFG_INIT_RAM_END-8), %a1
moveq #1, %d0
@ -304,7 +303,7 @@ icache_status:
.globl icache_invalid
icache_invalid:
move.l #0x00000100, %d0 /* Setup cache mask */
move.l #0x01000000, %d0 /* Setup cache mask */
movec %d0, %CACR /* Enable cache */
rts