From 382ce7e909c09ba28da5763e717efac7a2c4d156 Mon Sep 17 00:00:00 2001 From: Ying Zhang Date: Fri, 16 Aug 2013 15:16:14 +0800 Subject: powerpc : p1022ds : Enable p1022ds to start from eSPI with SPL Enable p1022ds to start from eSPI with SPL. Signed-off-by: Ying Zhang Acked-by: York Sun --- board/freescale/p1022ds/spl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'board') 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 #include "../common/ngpixis.h" #include +#include 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 } -- cgit v1.2.1