arm: ls102xa: Add NAND boot support for LS1021AQDS board
Subsystems (3)
PATCH v3 8/8 arm: ls102xa: Add NAND boot support for LS1021AQDS board
This patch adds NAND boot support for LS1021AQDS board. SPL framework is used. PBL initialize the internal RAM and copy SPL to it, then SPL initialize DDR using SPD and copy u-boot from NAND flash to DDR, finally SPL transfer control to u-boot.
Signed-off-by Prabhakar Kushwaha <[email protected]>
Signed-off-by Alison Wang <[email protected]>
---
Change log:
v3: New file.
arch/arm/include/asm/arch-ls102xa/config.h | 1 + arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h | 2 + board/freescale/ls1021aqds/MAINTAINERS | 1 + board/freescale/ls1021aqds/ls1021aqds.c | 16 ++++++ board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg | 7 +++ configs/ls1021aqds_nand_defconfig | 4 ++ drivers/mtd/nand/fsl_ifc_spl.c | 8 +++ include/configs/ls1021aqds.h | 68 +++++++++++++++++++++++ 8 files changed, 107 insertions(+) create mode 100644 board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg create mode 100644 configs/ls1021aqds_nand_defconfig
arch/arm/include/asm/arch-ls102xa/config.h +1 -0
@@ -13,6 +13,7 @@#define OCRAM_SIZE 0x00020000#define CONFIG_SYS_IMMR 0x01000000 +#define CONFIG_SYS_DCSRBAR 0x20200000#define CONFIG_SYS_FSL_DDR_ADDR (CONFIG_SYS_IMMR + 0x00080000)#define CONFIG_SYS_CCI400_ADDR (CONFIG_SYS_IMMR + 0x00180000)
arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h +2 -0
@@ -29,6 +29,8 @@#define ARCH_TIMER_CTRL_ENABLE (1 << 0)#define SYS_COUNTER_CTRL_ENABLE (1 << 24) +#define DCFG_CCSR_PORSR1_RCW_MASK 0xff800000 +struct sys_info {unsigned long freq_processor[CONFIG_MAX_CPUS ];unsigned long freq_systembus;
board/freescale/ls1021aqds/MAINTAINERS +1 -0
@@ -6,3 +6,4 @@ F: include/configs/ls1021aqds.h F: configs/ls1021aqds_nor_defconfig F: configs/ls1021aqds_ddr4_nor_defconfig F: configs/ls1021aqds_sdcard_defconfig +F: configs/ls1021aqds_nand_defconfig
board/freescale/ls1021aqds/ls1021aqds.c +16 -0
@@ -164,6 +164,22 @@ void board_init_f(ulong dummy) {struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR ; +#ifdef CONFIG_NAND_BOOT +struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR ; +u32 porsr1, pinctl; + +init_early_memctl_regs (); + +/* +* There is LS1 SoC issue where NOR, FPGA are inaccessible during +* NAND boot because IFC signals > IFC_AD7 are not enabled. +* This workaround changes RCW source to make all signals enabled. +*/ + porsr1 =in_be32 (&gur->porsr1); + pinctl = ((porsr1 & ~(DCFG_CCSR_PORSR1_RCW_MASK )) |0x24800000 ); +out_be32 ((unsigned int *)(CONFIG_SYS_DCSRBAR +0x20000 ), pinctl); +#endif +/* Set global data pointer */ gd = &gdata;
board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg new file +7 -0
@@ -0,0 +1,7 @@ +#PBL preamble and RCW header +aa55aa55 01ee0100 +# serdes protocol +0608000a 00000000 00000000 00000000 +60000000 00407900 e0106a00 21046000 +00000000 00000000 00000000 00038000 +00000000 001b7200 00000000 00000000
configs/ls1021aqds_nand_defconfig new file +4 -0
@@ -0,0 +1,4 @@ +CONFIG_SPL=y +CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,NAND_BOOT" ++S:CONFIG_ARM=y ++S:CONFIG_TARGET_LS1021AQDS=y
drivers/mtd/nand/fsl_ifc_spl.c +8 -0
@@ -12,6 +12,14 @@#include <fsl_ifc.h> #include <linux/mtd/nand.h> +void nand_init (void ) +{ +} + +void nand_deselect (void ) +{ +} +static inline int is_blank (uchar *addr,int page_size) {int i;
include/configs/ls1021aqds.h +68 -0
86 lines not on this page · raw message
Signature · 1 line
2.1.0.27.g96db324