X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fblackfin%2Fmach-common%2Flock.S;h=30b887e67dd6776def5ef53238ebe3fead7a6bbd;hb=5400c5aa2de41501be7529831c9df36c729bf371;hp=2cbb15b339254dbb46e865fa1da44214fea238a1;hpb=ba7cc09c9c9e29a57045dc5bbf843ac1cfad3283;p=linux-2.6-omap-h63xx.git diff --git a/arch/blackfin/mach-common/lock.S b/arch/blackfin/mach-common/lock.S index 2cbb15b3392..30b887e67dd 100644 --- a/arch/blackfin/mach-common/lock.S +++ b/arch/blackfin/mach-common/lock.S @@ -33,7 +33,7 @@ .text -#ifdef CONFIG_BLKFIN_CACHE_LOCK +#ifdef CONFIG_BFIN_ICACHE_LOCK /* When you come here, it is assumed that * R0 - Which way to be locked @@ -43,12 +43,12 @@ ENTRY(_cache_grab_lock) [--SP]=( R7:0,P5:0 ); - P1.H = (IMEM_CONTROL >> 16); - P1.L = (IMEM_CONTROL & 0xFFFF); - P5.H = (ICPLB_ADDR0 >> 16); - P5.L = (ICPLB_ADDR0 & 0xFFFF); - P4.H = (ICPLB_DATA0 >> 16); - P4.L = (ICPLB_DATA0 & 0xFFFF); + P1.H = HI(IMEM_CONTROL); + P1.L = LO(IMEM_CONTROL); + P5.H = HI(ICPLB_ADDR0); + P5.L = LO(ICPLB_ADDR0); + P4.H = HI(ICPLB_DATA0); + P4.L = LO(ICPLB_DATA0); R7 = R0; /* If the code of interest already resides in the cache @@ -155,6 +155,7 @@ ENTRY(_cache_grab_lock) ( R7:0,P5:0 ) = [SP++]; RTS; +ENDPROC(_cache_grab_lock) /* After the execution of critical code, the code is now locked into * the cache way. Now we need to set ILOC. @@ -166,14 +167,14 @@ ENTRY(_cache_lock) [--SP]=( R7:0,P5:0 ); - P1.H = (IMEM_CONTROL >> 16); - P1.L = (IMEM_CONTROL & 0xFFFF); + P1.H = HI(IMEM_CONTROL); + P1.L = LO(IMEM_CONTROL); /* Disable the Interrupts*/ CLI R3; R7 = [P1]; - R2 = 0xFFFFFF87 (X); + R2 = ~(0x78) (X); /* mask out ILOC */ R7 = R7 & R2; R0 = R0 << 3; R7 = R0 | R7; @@ -186,19 +187,20 @@ ENTRY(_cache_lock) ( R7:0,P5:0 ) = [SP++]; RTS; +ENDPROC(_cache_lock) -#endif /* BLKFIN_CACHE_LOCK */ +#endif /* BFIN_ICACHE_LOCK */ /* Return the ILOC bits of IMEM_CONTROL */ ENTRY(_read_iloc) - - P1.H = (IMEM_CONTROL >> 16); - P1.L = (IMEM_CONTROL & 0xFFFF); + P1.H = HI(IMEM_CONTROL); + P1.L = LO(IMEM_CONTROL); R1 = 0xF; R0 = [P1]; R0 = R0 >> 3; R0 = R0 & R1; RTS; +ENDPROC(_read_iloc)