Skip to contentSkip to conversation

board/bsc9131rdb:Add NAND boot support using new SPL format

PATCH New Prabhakar Kushwaha 3 participants 4 messages Apr 16, 2013 – Jun 21, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v5 4/5 board/bsc9131rdb:Add NAND boot support using new SPL format

- Add NAND boot target
- defines contants
- Add spl_minimal.c to initialise DDR
- update TLB entries as per NAND boot

---
Based upon git://git.denx.de/u-boot.git branch master

Changes for v2: Sending as it is
Changes for v3: Fix tools/checkpatch errors
Changes for v4: Sending as it is
Changes for v5:
- Rebased
- define CONFIG_SPL_MAX_SIZE as 8192 instead of 8 * 1204

 board/freescale/bsc9131rdb/Makefile      |   16 ++++
 board/freescale/bsc9131rdb/spl_minimal.c |  118 ++++++++++++++++++++++++++++++
 board/freescale/bsc9131rdb/tlb.c         |    8 +-
 boards.cfg                               |    1 +
 include/configs/BSC9131RDB.h             |   49 ++++++++++---
 5 files changed, 177 insertions(+), 15 deletions(-)
 create mode 100644 board/freescale/bsc9131rdb/spl_minimal.c
board/freescale/bsc9131rdb/Makefile +16 -0
index 6f4cb26..2e829ad 100644
@@ -24,12 +24,28 @@ include $(TOPDIR)/config.mk
 
 LIB    = $(obj)lib$(BOARD).o
 
+MINIMAL=
+
+ifdef CONFIG_SPL_BUILD
+ifdef CONFIG_SPL_INIT_MINIMAL
+MINIMAL=y
+endif
+endif
+
+ifdef MINIMAL
+
+COBJS-y	+= spl_minimal.o tlb.o law.o
+
+else
+
 COBJS-y        += $(BOARD).o
 COBJS-y        += ddr.o
 COBJS-y        += law.o
 COBJS-y        += tlb.o
 #COBJS-y		+= bsc9131rdb_mux.o
 
+endif
+
 SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS-y))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
board/freescale/bsc9131rdb/spl_minimal.c new file +118 -0

118 lines not on this page · raw message

board/freescale/bsc9131rdb/tlb.c +4 -4
index 5b68f4a..243a38f 100644
@@ -43,16 +43,16 @@ struct fsl_e_tlb_entry tlb_table[] = {
 
 	/* TLB 1 */
 	/* *I*** - Covers boot page */
-	SET_TLB_ENTRY(1, 0xfffff000, 0xfffff000,
-			MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
-			0, 0, BOOKE_PAGESZ_4K, 1),
+		SET_TLB_ENTRY(1, 0xffffe000, 0xffffe000,
+			      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+			      0, 0, BOOKE_PAGESZ_8K, 1),
 
 	/* *I*G* - CCSRBAR (PA) */
 	SET_TLB_ENTRY(1, CONFIG_SYS_CCSRBAR, CONFIG_SYS_CCSRBAR_PHYS,
 			MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
 			0, 1, BOOKE_PAGESZ_1M, 1),
 
-#if defined(CONFIG_SYS_RAMBOOT)
+#if  defined(CONFIG_SYS_RAMBOOT) || defined(CONFIG_SPL)
 	SET_TLB_ENTRY(1, CONFIG_SYS_DDR_SDRAM_BASE, CONFIG_SYS_DDR_SDRAM_BASE,
 			MAS3_SX|MAS3_SW|MAS3_SR, 0,
 			0, 8, BOOKE_PAGESZ_1G, 1),
boards.cfg +1 -0
index f785da8..5b91e96 100644
@@ -881,6 +881,7 @@ P5020DS_SPIFLASH	     powerpc     mpc85xx     corenet_ds          freescale
 P5020DS_SRIO_PCIE_BOOT          powerpc     mpc85xx     corenet_ds          freescale      -           P5020DS:SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF80000
 P5040DS                      powerpc     mpc85xx     corenet_ds          freescale
 BSC9131RDB_SPIFLASH          powerpc     mpc85xx     bsc9131rdb          freescale      -           BSC9131RDB:BSC9131RDB,SPIFLASH
+BSC9131RDB_NAND              powerpc     mpc85xx     bsc9131rdb          freescale      -           BSC9131RDB:BSC9131RDB,NAND
 BSC9132QDS_NOR_DDRCLK100     powerpc     mpc85xx     bsc9132qds          freescale      -           BSC9132QDS:BSC9132QDS,SYS_CLK_100_DDR_100
 BSC9132QDS_NOR_DDRCLK133     powerpc     mpc85xx     bsc9132qds          freescale      -           BSC9132QDS:BSC9132QDS,SYS_CLK_100_DDR_133
 BSC9132QDS_SDCARD_DDRCLK100  powerpc     mpc85xx     bsc9132qds          freescale      -           BSC9132QDS:BSC9132QDS,SDCARD,SYS_CLK_100_DDR_100
include/configs/BSC9131RDB.h +38 -11

76 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v5 4/5 board/bsc9131rdb:Add NAND boot support using new SPL format

On Tue, Apr 16, 2013 at 2:58 AM, Prabhakar Kushwaha <[email protected]

Quoted 9 lines

wrote:

- Add NAND boot target
- defines contants
- Add spl_minimal.c to initialise DDR
- update TLB entries as per NAND boot

I'm currently applying your SYSCLK change which depends on this patch. As soon as I've pushed that upstream, could you rebase this patch on the top of my tree? That patch added the BSC9131RDB_NAND_SYSCLK100 target, which doesn't make sense without the initial NAND target, so this patch should now add that target in addition to the BSC9131RDB_NAND target.

I should be pushing them up later today.

Thanks,
Andy

#2 lore raw

PATCH v5 4/5 board/bsc9131rdb:Add NAND boot support using new SPL format

Quoted 15 lines · Andy Fleming
Quoted 7 lines · Prabhakar Kushwaha

- Add NAND boot target
- defines contants
- Add spl_minimal.c to initialise DDR
- update TLB entries as per NAND boot

Quoted 8 lines

I'm currently applying your SYSCLK change which depends on this patch. As soon as I've pushed that upstream, could you rebase this patch on the top of my tree? That patch added the BSC9131RDB_NAND_SYSCLK100 target, which doesn't make sense without the initial NAND target, so this patch should now add that target in addition to the BSC9131RDB_NAND target.

I should be pushing them up later today.

Nevermind. It looks like subsequent patches also conflict. I will apply the patches in the requested order. :)

Andy