summaryrefslogtreecommitdiff
path: root/cpu/mpc86xx
diff options
context:
space:
mode:
authorNick Spence <nick.spence@freescale.com>2008-08-28 14:09:15 -0700
committerWolfgang Denk <wd@denx.de>2008-10-13 13:57:14 +0200
commit392438406041415fe64ab8748ec5ab5ad01d1cf7 (patch)
treee2f9da3de8cd40a451f10c2894077ad932d2ae36 /cpu/mpc86xx
parent5c7cbcd34d0ee566875a4fd0f2a3e5a62bba921c (diff)
downloadu-boot-imx-392438406041415fe64ab8748ec5ab5ad01d1cf7.zip
u-boot-imx-392438406041415fe64ab8748ec5ab5ad01d1cf7.tar.gz
u-boot-imx-392438406041415fe64ab8748ec5ab5ad01d1cf7.tar.bz2
mpc86xx: use r4 instead of r2 in lock_ram_in_cache and unlock_ram_in_cache
This is needed in unlock_ram_in_cache() because it is called from C and will corrupt the small data area anchor that is kept in R2. lock_ram_in_cache() is modified similarly as good coding practice, but is not called from C. Signed-off-by: Nick Spence <nick.spence@freescale.com>
Diffstat (limited to 'cpu/mpc86xx')
-rw-r--r--cpu/mpc86xx/start.S8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpu/mpc86xx/start.S b/cpu/mpc86xx/start.S
index 03f2128..90a1b83 100644
--- a/cpu/mpc86xx/start.S
+++ b/cpu/mpc86xx/start.S
@@ -895,9 +895,9 @@ lock_ram_in_cache:
*/
lis r3, (CFG_INIT_RAM_ADDR & ~31)@h
ori r3, r3, (CFG_INIT_RAM_ADDR & ~31)@l
- li r2, ((CFG_INIT_RAM_END & ~31) + \
+ li r4, ((CFG_INIT_RAM_END & ~31) + \
(CFG_INIT_RAM_ADDR & 31) + 31) / 32
- mtctr r2
+ mtctr r4
1:
dcbz r0, r3
addi r3, r3, 32
@@ -930,9 +930,9 @@ unlock_ram_in_cache:
/* invalidate the INIT_RAM section */
lis r3, (CFG_INIT_RAM_ADDR & ~31)@h
ori r3, r3, (CFG_INIT_RAM_ADDR & ~31)@l
- li r2, ((CFG_INIT_RAM_END & ~31) + \
+ li r4, ((CFG_INIT_RAM_END & ~31) + \
(CFG_INIT_RAM_ADDR & 31) + 31) / 32
- mtctr r2
+ mtctr r4
1: icbi r0, r3
addi r3, r3, 32
bdnz 1b