summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc8xxx
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2012-09-20 19:02:18 -0500
committerScott Wood <scottwood@freescale.com>2012-11-26 15:41:25 -0600
commitc97cd1ba480482e220c5dcef0cd751d21a1bf74e (patch)
tree72fc693655e3e8e6b9532a347202103db2d5ff8a /arch/powerpc/cpu/mpc8xxx
parent4b919725b66152edd8c7cecc9e42864eec12c57d (diff)
downloadu-boot-imx-c97cd1ba480482e220c5dcef0cd751d21a1bf74e.zip
u-boot-imx-c97cd1ba480482e220c5dcef0cd751d21a1bf74e.tar.gz
u-boot-imx-c97cd1ba480482e220c5dcef0cd751d21a1bf74e.tar.bz2
spl/85xx: new SPL support
Update CONFIG_RAMBOOT and CONFIG_NAND_SPL references to accept CONFIG_SPL and CONFIG_SPL_BUILD, respectively. CONFIG_NAND_SPL can be removed once the last mpc85xx nand_spl target is gone. CONFIG_RAMBOOT will need to remain for other use cases, but it doesn't seem right to overload it for meaning SPL as well as nand_spl does. Even if it's somewhat appropriate for the main u-boot, the SPL itself isn't (necessarily) ramboot, and we don't have separate configs for SPL and main u-boot. It was also inconsistent, as other platforms such as mpc83xx didn't use CONFIG_RAMBOOT in this way. Signed-off-by: Scott Wood <scottwood@freescale.com> Cc: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'arch/powerpc/cpu/mpc8xxx')
-rw-r--r--arch/powerpc/cpu/mpc8xxx/law.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c
index 223cd5d..ce1d71e 100644
--- a/arch/powerpc/cpu/mpc8xxx/law.c
+++ b/arch/powerpc/cpu/mpc8xxx/law.c
@@ -92,7 +92,7 @@ void disable_law(u8 idx)
return;
}
-#ifndef CONFIG_NAND_SPL
+#if !defined(CONFIG_NAND_SPL) && !defined(CONFIG_SPL_BUILD)
static int get_law_entry(u8 i, struct law_entry *e)
{
u32 lawar;
@@ -122,7 +122,7 @@ int set_next_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
return idx;
}
-#ifndef CONFIG_NAND_SPL
+#if !defined(CONFIG_NAND_SPL) && !defined(CONFIG_SPL_BUILD)
int set_last_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
{
u32 idx;
@@ -233,7 +233,7 @@ int set_ddr_laws(u64 start, u64 sz, enum law_trgt_if id)
return 0;
}
-#endif
+#endif /* not SPL */
void init_laws(void)
{
@@ -258,9 +258,10 @@ void init_laws(void)
gd->used_laws |= (1 << i);
}
-#if defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL)
+#if (defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL)) || \
+ (defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD))
/*
- * in NAND boot we've already parsed the law_table and setup those LAWs
+ * in SPL boot we've already parsed the law_table and setup those LAWs
* so don't do it again.
*/
return;