Skip to contentSkip to conversation

powerpc/85xx: Add support for booting from NAND on MPC8572DS

PATCH Superseded Kumar Gala 1 participant 1 message Nov 19, 2010

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 powerpc/85xx: Add support for booting from NAND on MPC8572DS

Mimic support that exists on MPC8536DS on the MPC8572DS to allow booting from NAND.

---
* Depends on the CONFIG_SYS_EXTRA_ENV_RELOC patch

 board/freescale/mpc8572ds/config.mk            |    6 +
 board/freescale/mpc8572ds/tlb.c                |   14 +++-
 boards.cfg                                     |    1 +
 include/configs/MPC8572DS.h                    |  115 ++++++++++++++++++---
 nand_spl/board/freescale/mpc8572ds/Makefile    |  133 ++++++++++++++++++++++++
 nand_spl/board/freescale/mpc8572ds/nand_boot.c |   82 +++++++++++++++
 6 files changed, 335 insertions(+), 16 deletions(-)
 create mode 100644 nand_spl/board/freescale/mpc8572ds/Makefile
 create mode 100644 nand_spl/board/freescale/mpc8572ds/nand_boot.c
board/freescale/mpc8572ds/config.mk +6 -0
index 5413921..6cea41c 100644
@@ -23,4 +23,10 @@
 #
 # mpc8572ds board
 #
+ifndef NAND_SPL
+ifeq ($(CONFIG_NAND), y)
+LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
+endif
+endif
+
 RESET_VECTOR_ADDRESS = 0xeffffffc
board/freescale/mpc8572ds/tlb.c +13 -1
index 6a2a0b5..575bdb5 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008 Freescale Semiconductor, Inc.
+ * Copyright 2008-2010 Freescale Semiconductor, Inc.
  *
  * (C) Copyright 2000
  * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
@@ -85,6 +85,18 @@ struct fsl_e_tlb_entry tlb_table[] = {
 	SET_TLB_ENTRY(1, PIXIS_BASE, PIXIS_BASE_PHYS,
 		      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
 		      0, 8, BOOKE_PAGESZ_4K, 1),
+
+#if defined(CONFIG_SYS_RAMBOOT) && defined(CONFIG_SYS_INIT_L2_ADDR)
+	/* *I*G - L2SRAM */
+	SET_TLB_ENTRY(1, CONFIG_SYS_INIT_L2_ADDR,
+			CONFIG_SYS_INIT_L2_ADDR_PHYS,
+			MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+			0, 9, BOOKE_PAGESZ_256K, 1),
+	SET_TLB_ENTRY(1, CONFIG_SYS_INIT_L2_ADDR + 0x40000,
+			CONFIG_SYS_INIT_L2_ADDR_PHYS + 0x40000,
+			MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+			0, 10, BOOKE_PAGESZ_256K, 1),
+#endif
 };
 
 int num_tlb_entries = ARRAY_SIZE(tlb_table);
boards.cfg +1 -0
index 08e531e..bafc47d 100644
@@ -581,6 +581,7 @@ MPC8569MDS_ATM	powerpc	mpc85xx		mpc8569mds	freescale	-	MPC8569MDS:ATM
 MPC8569MDS_NAND	powerpc	mpc85xx		mpc8569mds	freescale	-	MPC8569MDS:NAND
 MPC8572DS	powerpc	mpc85xx		mpc8572ds	freescale	-	MPC8572DS
 MPC8572DS_36BIT	powerpc	mpc85xx		mpc8572ds	freescale	-	MPC8572DS:36BIT
+MPC8572DS_NAND	powerpc	mpc85xx		mpc8572ds	freescale	-	MPC8572DS:NAND
 P1011RDB	powerpc	mpc85xx		p1_p2_rdb	freescale	-	P1_P2_RDB:P1011
 P1011RDB_NAND	powerpc	mpc85xx		p1_p2_rdb	freescale	-	P1_P2_RDB:P1011,NAND
 P1011RDB_SDCARD	powerpc	mpc85xx		p1_p2_rdb	freescale	-	P1_P2_RDB:P1011,SDCARD
include/configs/MPC8572DS.h +100 -15

200 lines not on this page · raw message

nand_spl/board/freescale/mpc8572ds/Makefile new file +133 -0

133 lines not on this page · raw message

nand_spl/board/freescale/mpc8572ds/nand_boot.c new file +82 -0

82 lines not on this page · raw message

Signature · 1 line
1.7.2.3