summaryrefslogtreecommitdiff
path: root/cleopatre/u-boot-1.1.6/cpu/spc300-fcm3
diff options
context:
space:
mode:
authorsave2009-07-27 12:49:33 +0000
committersave2009-07-27 12:49:33 +0000
commit92e41c26578d36c31490c4343d09484c08c6c85e (patch)
treed896e8bffd2ac9a149af02bba9b9a26de48ae01c /cleopatre/u-boot-1.1.6/cpu/spc300-fcm3
parent85a207141a68f9b6416eff211d9c0fb63005e5aa (diff)
[CLEO][U-BOOT]NVRAM base addr and detection
- Added base address for NVRAM bi field - Stopped U-Boot if NVRAM is not present - if NVRAM not present skip PIO, GPIOs, Ethernet configuration - Added mmu during start-up - Suppressed base address for SPI flash driver - FLASH_SIZE become FLASH AREA git-svn-id: svn+ssh://pessac/svn/cesar/trunk@5077 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cleopatre/u-boot-1.1.6/cpu/spc300-fcm3')
-rw-r--r--cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/nvram.S2
-rw-r--r--cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/start.S11
2 files changed, 7 insertions, 6 deletions
diff --git a/cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/nvram.S b/cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/nvram.S
index b18d9d622c..02409b69b9 100644
--- a/cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/nvram.S
+++ b/cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/nvram.S
@@ -45,11 +45,13 @@
detect_nvram:
ldr r10, =nvram_dft /* if nvram is not found, we will have this value in r10 */
ldr r1, =-1 /* init value for loop counter */
+ ldr r4, =PHYS_FLASH_SPI_1 /* Offset of the SPI Direct access address */
.Lsect:
add r1, r1, #1
cmp r1, #LAST_SECTOR
bge .Lreturn /* we did not found it */
mov r0, r1, lsl #16 /* r0= r1<<16 = r1*0x10000 */
+ add r0, r0, r4 /* Add SPI Direct base address */
ldr r2, [r0, #0] /* load r2 with the first 4 bytes from the sector beginning */
ldr r3, =nvram_magic /* r3 = nvram_magic (previously defined : char *nvram_magic = "NVRAM\0\0\0";) */
ldr r3, [r3, #0] /* r3 <- first 4 bytes of magic word */
diff --git a/cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/start.S b/cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/start.S
index 7aafa237a2..104202f177 100644
--- a/cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/start.S
+++ b/cleopatre/u-boot-1.1.6/cpu/spc300-fcm3/start.S
@@ -257,7 +257,7 @@ wait_mpu_child0:
remap_end:
bl cpu_init_crit
first_init_end:
- /* As we don't call cpu_init_crit we need to find NVRAM address */
+ /* We need to find NVRAM address */
mov ip, lr /* perserve link reg across call */
bl detect_nvram /* r10 will hold the NVRAM address */
mov lr, ip /* restore link */
@@ -266,14 +266,13 @@ first_init_end:
* we do sys-critical inits only at reboot,
* not when booting from ram!
*/
-#ifdef CONFIG_SKIP_LOWLEVEL_INIT
- /* As we don't call cpu_init_crit we need to find NVRAM address */
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
+ bl cpu_init_crit
+#endif
+ /* We need to find NVRAM address */
mov ip, lr /* perserve link reg across call */
bl detect_nvram /* r10 will hold the NVRAM address */
mov lr, ip /* restore link */
-#else
- bl cpu_init_crit
-#endif
#endif
#ifndef CONFIG_SKIP_RELOCATE_UBOOT