Here is a stab at adding SPL NAND support for i.MX6. I tried to take into account comments from previous attempts by others but there is still some work to be done and in particular I need some help with the issue of dealing with IMX6Q vs IMX6DL iomux in a way where the current defines can be shared by SPL as well as imximage.
Some of these can be split out of the series if needed but I wanted to post them originally as a series to provide full context. The resulting SPL+u-boot.img has been tested on 4 different Ventana baseboards with a variety of CPU and DDR3 options. Tim Harvey (11): SPL: NAND: remove CONFIG_SYS_NAND_PAGE_SIZE SPL: NAND: add support for mxs nand MX6: provide linker script for SPL MX6: add common SPL configuration MX6: add boot device support SPL MX6: add struct for sharing data between SPL and uboot MX6: use macro building for MX6Q/MX6DL iomux regs MX6: add mmdc configuration for MX6Q/MX6DL IMX: add additional function for pinmux using an array ventana: auto-configure for IMX6Q vs IMX6DL ventana: switch to SPL arch/arm/cpu/armv7/mx6/Makefile | 1 + arch/arm/cpu/armv7/mx6/ddr.c | 542 ++++++++++++++++++++++++++ arch/arm/cpu/armv7/mx6/soc.c | 56 +++ arch/arm/cpu/armv7/mx6/u-boot-spl.lds | 52 +++ arch/arm/imx-common/iomux-v3.c | 19 +- arch/arm/include/asm/arch-mx6/mx6-ddr.h | 225 ++++++++++- arch/arm/include/asm/arch-mx6/mx6dl-ddr.h | 82 ++-- arch/arm/include/asm/arch-mx6/mx6q-ddr.h | 82 ++-- arch/arm/include/asm/arch-mx6/spl.h | 26 ++ arch/arm/include/asm/arch-mx6/sys_proto.h | 5 + arch/arm/include/asm/imx-common/boot_mode.h | 17 + arch/arm/include/asm/imx-common/iomux-v3.h | 5 +- board/gateworks/gw_ventana/Makefile | 2 +- board/gateworks/gw_ventana/README | 91 +++-- board/gateworks/gw_ventana/gw_ventana.c | 502 +++++++++++++++--------- board/gateworks/gw_ventana/gw_ventana.cfg | 15 - board/gateworks/gw_ventana/gw_ventana_spl.c | 394 +++++++++++++++++++ board/gateworks/gw_ventana/gw_ventana_spl.cfg | 29 ++ boards.cfg | 6 +- common/spl/spl_nand.c | 2 +- drivers/mtd/Makefile | 11 + drivers/mtd/nand/Makefile | 9 + drivers/mtd/nand/mxs_nand_spl.c | 46 +++ include/config/uboot.release | 1 + include/configs/gw_ventana.h | 13 +- include/configs/imx6_spl.h | 64 +++ spl/Makefile | 1 + 27 files changed, 1970 insertions(+), 328 deletions(-) create mode 100644 arch/arm/cpu/armv7/mx6/ddr.c create mode 100644 arch/arm/cpu/armv7/mx6/u-boot-spl.lds create mode 100644 arch/arm/include/asm/arch-mx6/spl.h create mode 100644 board/gateworks/gw_ventana/gw_ventana_spl.c create mode 100644 board/gateworks/gw_ventana/gw_ventana_spl.cfg create mode 100644 drivers/mtd/nand/mxs_nand_spl.c create mode 100644 include/config/uboot.release create mode 100644 include/configs/imx6_spl.h -- 1.8.3.2 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot