summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorYing Zhang <b40530@freescale.com>2013-08-16 15:16:14 +0800
committerYork Sun <yorksun@freescale.com>2013-08-20 09:47:59 -0700
commit382ce7e909c09ba28da5763e717efac7a2c4d156 (patch)
treeca23e91193e1e0bb226e437967c94d691f6255e7 /board
parentfdf8529afc39b9d096159b7d3287d7e29e51ec3a (diff)
downloadblackbird-obmc-uboot-382ce7e909c09ba28da5763e717efac7a2c4d156.tar.gz
blackbird-obmc-uboot-382ce7e909c09ba28da5763e717efac7a2c4d156.zip
powerpc : p1022ds : Enable p1022ds to start from eSPI with SPL
Enable p1022ds to start from eSPI with SPL. Signed-off-by: Ying Zhang <b40530@freescale.com> Acked-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/p1022ds/spl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c
index 71a0f85aff..7e89de2b11 100644
--- a/board/freescale/p1022ds/spl.c
+++ b/board/freescale/p1022ds/spl.c
@@ -27,6 +27,7 @@
#include <i2c.h>
#include "../common/ngpixis.h"
#include <fsl_esdhc.h>
+#include <spi_flash.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -53,6 +54,11 @@ void board_init_f(ulong bootflag)
setbits_be32(&gur->pmuxcr,
in_be32(&gur->pmuxcr) | MPC85xx_PMUXCR_SD_DATA);
+#ifdef CONFIG_SPL_SPI_BOOT
+ /* Enable the SPI */
+ clrsetbits_8(&pixis->brdcfg0, PIXIS_ELBC_SPI_MASK, PIXIS_SPI);
+#endif
+
/* Read back the register to synchronize the write. */
in_be32(&gur->pmuxcr);
@@ -66,6 +72,8 @@ void board_init_f(ulong bootflag)
bus_clk / 16 / CONFIG_BAUDRATE);
#ifdef CONFIG_SPL_MMC_BOOT
puts("\nSD boot...\n");
+#elif defined(CONFIG_SPL_SPI_BOOT)
+ puts("\nSPI Flash boot...\n");
#endif
/* copy code to RAM and jump to it - this should not return */
@@ -106,5 +114,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
#ifdef CONFIG_SPL_MMC_BOOT
mmc_boot();
+#elif defined(CONFIG_SPL_SPI_BOOT)
+ spi_boot();
#endif
}
OpenPOWER on IntegriCloud