aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kconfig16
-rw-r--r--Makefile10
-rw-r--r--README13
-rw-r--r--api/api_net.c2
-rw-r--r--arch/Kconfig1
-rw-r--r--arch/arm/Kconfig21
-rw-r--r--arch/arm/config.mk5
-rw-r--r--arch/arm/cpu/arm1136/mx31/timer.c2
-rw-r--r--arch/arm/cpu/arm1136/mx35/timer.c2
-rw-r--r--arch/arm/cpu/armv8/Makefile2
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/Kconfig1
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/soc.c2
-rw-r--r--arch/arm/cpu/armv8/s32v234/cpu.c2
-rw-r--r--arch/arm/cpu/pxa/timer.c2
-rw-r--r--arch/arm/dts/r8a7790-lager-u-boot.dts4
-rw-r--r--arch/arm/dts/r8a7793-gose-u-boot.dts4
-rw-r--r--arch/arm/dts/r8a7794-alt-u-boot.dts4
-rw-r--r--arch/arm/dts/rk3188-radxarock-u-boot.dtsi24
-rw-r--r--arch/arm/dts/rk3188-radxarock.dts6
-rw-r--r--arch/arm/dts/rk3188.dtsi8
-rw-r--r--arch/arm/dts/uniphier-v7-u-boot.dtsi16
-rw-r--r--arch/arm/include/asm/arch-omap4/sys_proto.h2
-rw-r--r--arch/arm/include/asm/arch-omap5/sys_proto.h2
-rw-r--r--arch/arm/lib/cmd_boot.c2
-rw-r--r--arch/arm/mach-at91/Kconfig4
-rw-r--r--arch/arm/mach-at91/spl_atmel.c2
-rw-r--r--arch/arm/mach-davinci/spl.c2
-rw-r--r--arch/arm/mach-exynos/clock_init_exynos5.c2
-rw-r--r--arch/arm/mach-exynos/mmu-arm64.c2
-rw-r--r--arch/arm/mach-imx/cmd_dek.c2
-rw-r--r--arch/arm/mach-imx/mx7ulp/Kconfig1
-rw-r--r--arch/arm/mach-imx/mx7ulp/pcc.c2
-rw-r--r--arch/arm/mach-imx/mx7ulp/scg.c2
-rw-r--r--arch/arm/mach-imx/mx8m/clock.c2
-rw-r--r--arch/arm/mach-imx/mx8m/clock_slice.c2
-rw-r--r--arch/arm/mach-imx/timer.c2
-rw-r--r--arch/arm/mach-mvebu/armada3700/cpu.c2
-rw-r--r--arch/arm/mach-mvebu/armada8k/cpu.c2
-rw-r--r--arch/arm/mach-mvebu/sata.c2
-rw-r--r--arch/arm/mach-mvebu/timer.c2
-rw-r--r--arch/arm/mach-omap2/boot-common.c3
-rw-r--r--arch/arm/mach-omap2/omap3/board.c2
-rw-r--r--arch/arm/mach-omap2/omap4/hwinit.c2
-rw-r--r--arch/arm/mach-omap2/omap5/hwinit.c2
-rw-r--r--arch/arm/mach-qemu/Kconfig1
-rw-r--r--arch/arm/mach-rmobile/Kconfig.329
-rw-r--r--arch/arm/mach-rockchip/Kconfig1
-rw-r--r--arch/arm/mach-rockchip/Makefile2
-rwxr-xr-xarch/arm/mach-rockchip/make_fit_atf.py2
-rw-r--r--arch/arm/mach-rockchip/rk3036-board-spl.c2
-rw-r--r--arch/arm/mach-rockchip/rk3188-board-spl.c2
-rw-r--r--arch/arm/mach-rockchip/rk3188-board.c2
-rw-r--r--arch/arm/mach-rockchip/rk322x-board-spl.c4
-rw-r--r--arch/arm/mach-rockchip/rk3288-board-tpl.c2
-rw-r--r--arch/arm/mach-rockchip/rk3368-board-spl.c2
-rw-r--r--arch/arm/mach-rockchip/rk3368-board-tpl.c2
-rw-r--r--arch/arm/mach-rockchip/rk3399-board-spl.c2
-rw-r--r--arch/arm/mach-socfpga/clock_manager_arria10.c2
-rw-r--r--arch/arm/mach-socfpga/clock_manager_gen5.c2
-rw-r--r--arch/arm/mach-socfpga/fpga_manager.c2
-rw-r--r--arch/arm/mach-socfpga/freeze_controller.c2
-rw-r--r--arch/arm/mach-socfpga/misc_arria10.c2
-rw-r--r--arch/arm/mach-socfpga/reset_manager.c2
-rw-r--r--arch/arm/mach-socfpga/reset_manager_gen5.c2
-rw-r--r--arch/arm/mach-socfpga/scan_manager.c2
-rw-r--r--arch/arm/mach-socfpga/system_manager_gen5.c2
-rw-r--r--arch/arm/mach-stm32mp/Kconfig1
-rw-r--r--arch/arm/mach-sunxi/board.c1
-rw-r--r--arch/arm/mach-sunxi/dram_sun9i.c2
-rw-r--r--arch/arm/mach-tegra/Kconfig1
-rw-r--r--arch/arm/mach-tegra/board186.c2
-rw-r--r--arch/arm/mach-tegra/tegra186/nvtboot_board.c2
-rw-r--r--arch/arm/mach-zynq/Kconfig1
-rw-r--r--arch/arm/mach-zynq/ddrc.c2
-rw-r--r--arch/arm/mach-zynq/include/mach/nand.h9
-rw-r--r--arch/arm/mach-zynq/spl.c2
-rw-r--r--arch/microblaze/cpu/spl.c2
-rw-r--r--arch/microblaze/lib/bootm.c2
-rw-r--r--arch/mips/mach-ath79/ar933x/ddr.c2
-rw-r--r--arch/mips/mach-ath79/qca953x/ddr.c2
-rw-r--r--arch/nds32/lib/boot.c2
-rw-r--r--arch/powerpc/cpu/mpc85xx/cpu_init.c2
-rw-r--r--arch/powerpc/cpu/mpc86xx/fdt.c2
-rw-r--r--arch/powerpc/lib/extable.c2
-rw-r--r--arch/powerpc/lib/kgdb.c2
-rw-r--r--arch/powerpc/lib/spl.c2
-rw-r--r--arch/riscv/lib/boot.c2
-rw-r--r--arch/sandbox/lib/bootm.c2
-rw-r--r--arch/x86/cpu/pci.c2
-rw-r--r--arch/x86/cpu/qemu/cpu.c2
-rw-r--r--arch/x86/cpu/tangier/tangier.c2
-rw-r--r--arch/x86/cpu/x86_64/cpu.c2
-rw-r--r--arch/x86/lib/lpc-uclass.c2
-rw-r--r--arch/x86/lib/zimage.c2
-rw-r--r--board/armadeus/opos6uldev/board.c2
-rw-r--r--board/astro/mcf5373l/fpga.c2
-rw-r--r--board/bachmann/ot1200/ot1200_spl.c2
-rw-r--r--board/barco/platinum/spl_picon.c2
-rw-r--r--board/barco/platinum/spl_titanium.c2
-rw-r--r--board/cavium/thunderx/atf.c2
-rw-r--r--board/cei/cei-tk1-som/cei-tk1-som.c2
-rw-r--r--board/compulab/cm_fx6/common.c2
-rw-r--r--board/compulab/cm_fx6/spl.c2
-rw-r--r--board/compulab/cm_t43/spl.c2
-rw-r--r--board/compulab/common/omap3_display.c2
-rw-r--r--board/dhelectronics/dh_imx6/dh_imx6_spl.c2
-rw-r--r--board/engicam/common/spl.c2
-rw-r--r--board/engicam/imx6q/imx6q.c2
-rw-r--r--board/engicam/imx6ul/imx6ul.c2
-rw-r--r--board/esd/vme8349/pci.c2
-rw-r--r--board/freescale/bsc9131rdb/ddr.c2
-rw-r--r--board/freescale/bsc9132qds/ddr.c2
-rw-r--r--board/freescale/common/vid.c2
-rw-r--r--board/freescale/ls1021aqds/ls1021aqds.c2
-rw-r--r--board/freescale/ls1088a/eth_ls1088ardb.c2
-rw-r--r--board/freescale/m5329evb/nand.c2
-rw-r--r--board/freescale/m5373evb/nand.c2
-rw-r--r--board/freescale/mpc8308rdb/mpc8308rdb.c2
-rw-r--r--board/freescale/mpc832xemds/pci.c2
-rw-r--r--board/freescale/mpc8349emds/pci.c2
-rw-r--r--board/freescale/mpc8349itx/pci.c2
-rw-r--r--board/freescale/p1022ds/p1022ds.c2
-rw-r--r--board/freescale/p1023rdb/ddr.c2
-rw-r--r--board/gateworks/gw_ventana/gw_ventana_spl.c2
-rw-r--r--board/gdsys/mpc8308/hrcon.c2
-rw-r--r--board/gdsys/mpc8308/strider.c2
-rw-r--r--board/gdsys/p1022/controlcenterd.c2
-rw-r--r--board/geekbuying/geekbox/geekbox.c2
-rw-r--r--board/intel/edison/edison.c2
-rw-r--r--board/keymile/kmp204x/kmp204x.c2
-rw-r--r--board/kosagi/novena/novena_spl.c2
-rw-r--r--board/liebherr/mccmon6/spl.c2
-rw-r--r--board/mpc8308_p1m/mpc8308_p1m.c2
-rw-r--r--board/nvidia/jetson-tk1/jetson-tk1.c2
-rw-r--r--board/overo/overo.c2
-rw-r--r--board/qca/ap121/ap121.c2
-rw-r--r--board/qca/ap143/ap143.c2
-rw-r--r--board/renesas/alt/Makefile6
-rw-r--r--board/renesas/alt/alt.c209
-rw-r--r--board/renesas/alt/alt_spl.c411
-rw-r--r--board/renesas/gose/Makefile8
-rw-r--r--board/renesas/gose/gose.c190
-rw-r--r--board/renesas/gose/gose_spl.c408
-rw-r--r--board/renesas/lager/Makefile6
-rw-r--r--board/renesas/lager/lager.c206
-rw-r--r--board/renesas/lager/lager_spl.c396
-rw-r--r--board/renesas/silk/silk.c2
-rw-r--r--board/rockchip/evb_rk3036/evb_rk3036.c2
-rw-r--r--board/rockchip/evb_rk3229/evb_rk3229.c1
-rw-r--r--board/rockchip/evb_rk3399/evb-rk3399.c2
-rw-r--r--board/rockchip/kylin_rk3036/kylin_rk3036.c2
-rw-r--r--board/rockchip/sheep_rk3368/sheep_rk3368.c2
-rw-r--r--board/samsung/espresso7420/espresso7420.c2
-rw-r--r--board/samsung/origen/origen.c2
-rw-r--r--board/samsung/trats/trats.c2
-rw-r--r--board/samsung/trats2/trats2.c2
-rw-r--r--board/sbc8349/pci.c2
-rw-r--r--board/sbc8548/sbc8548.c2
-rw-r--r--board/siemens/draco/board.c2
-rw-r--r--board/siemens/pxm2/board.c2
-rw-r--r--board/siemens/rut/board.c2
-rw-r--r--board/theobroma-systems/lion_rk3368/lion_rk3368.c2
-rw-r--r--board/theobroma-systems/puma_rk3399/puma-rk3399.c2
-rw-r--r--board/ti/am335x/board.c2
-rw-r--r--board/ti/ks2_evm/board_k2e.c2
-rw-r--r--board/ti/ks2_evm/board_k2hk.c2
-rw-r--r--board/ti/ks2_evm/board_k2l.c2
-rw-r--r--board/toradex/colibri_vf/dcu.c2
-rw-r--r--board/tplink/wdr4300/wdr4300.c2
-rw-r--r--board/tqc/tqm834x/pci.c2
-rw-r--r--board/tqc/tqma6/tqma6_mba6.c2
-rw-r--r--board/udoo/udoo_spl.c2
-rw-r--r--board/varisys/cyrus/cyrus.c2
-rw-r--r--board/wandboard/spl.c2
-rw-r--r--board/xes/xpedite537x/xpedite537x.c2
-rw-r--r--board/xes/xpedite550x/xpedite550x.c2
-rw-r--r--board/xilinx/zynq/board.c3
-rw-r--r--board/xilinx/zynqmp/zynqmp.c3
-rw-r--r--cmd/Kconfig1
-rw-r--r--cmd/aes.c2
-rw-r--r--cmd/blob.c2
-rw-r--r--cmd/booti.c2
-rw-r--r--cmd/clk.c10
-rw-r--r--cmd/cros_ec.c2
-rw-r--r--cmd/eeprom.c4
-rw-r--r--cmd/i2c.c2
-rw-r--r--common/Kconfig1
-rw-r--r--common/board_r.c4
-rw-r--r--common/cros_ec.c2
-rw-r--r--common/lynxkdi.c2
-rw-r--r--common/main.c2
-rw-r--r--common/spl/Kconfig6
-rw-r--r--common/spl/spl.c2
-rw-r--r--common/spl/spl_mmc.c2
-rw-r--r--common/spl/spl_net.c2
-rw-r--r--common/spl/spl_sata.c2
-rw-r--r--common/spl/spl_sdp.c2
-rw-r--r--common/spl/spl_usb.c2
-rw-r--r--common/usb_hub.c2
-rw-r--r--configs/B4420QDS_NAND_defconfig1
-rw-r--r--configs/B4420QDS_SPIFLASH_defconfig1
-rw-r--r--configs/B4420QDS_defconfig1
-rw-r--r--configs/B4860QDS_NAND_defconfig1
-rw-r--r--configs/B4860QDS_SECURE_BOOT_defconfig1
-rw-r--r--configs/B4860QDS_SPIFLASH_defconfig1
-rw-r--r--configs/B4860QDS_SRIO_PCIE_BOOT_defconfig1
-rw-r--r--configs/B4860QDS_defconfig1
-rw-r--r--configs/BSC9131RDB_NAND_SYSCLK100_defconfig1
-rw-r--r--configs/BSC9131RDB_NAND_defconfig1
-rw-r--r--configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig1
-rw-r--r--configs/BSC9131RDB_SPIFLASH_defconfig1
-rw-r--r--configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig1
-rw-r--r--configs/BSC9132QDS_NAND_DDRCLK100_defconfig1
-rw-r--r--configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig1
-rw-r--r--configs/BSC9132QDS_NAND_DDRCLK133_defconfig1
-rw-r--r--configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig1
-rw-r--r--configs/BSC9132QDS_NOR_DDRCLK100_defconfig1
-rw-r--r--configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig1
-rw-r--r--configs/BSC9132QDS_NOR_DDRCLK133_defconfig1
-rw-r--r--configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig1
-rw-r--r--configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig1
-rw-r--r--configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig1
-rw-r--r--configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig1
-rw-r--r--configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig1
-rw-r--r--configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig1
-rw-r--r--configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig1
-rw-r--r--configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig1
-rw-r--r--configs/C29XPCIE_NAND_defconfig1
-rw-r--r--configs/C29XPCIE_NOR_SECBOOT_defconfig1
-rw-r--r--configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig1
-rw-r--r--configs/C29XPCIE_SPIFLASH_defconfig1
-rw-r--r--configs/C29XPCIE_defconfig1
-rw-r--r--configs/Cyrus_P5020_defconfig1
-rw-r--r--configs/Cyrus_P5040_defconfig1
-rw-r--r--configs/M52277EVB_defconfig1
-rw-r--r--configs/M52277EVB_stmicro_defconfig1
-rw-r--r--configs/M54418TWR_defconfig1
-rw-r--r--configs/M54418TWR_nand_mii_defconfig1
-rw-r--r--configs/M54418TWR_nand_rmii_defconfig1
-rw-r--r--configs/M54418TWR_nand_rmii_lowfreq_defconfig1
-rw-r--r--configs/M54418TWR_serial_mii_defconfig1
-rw-r--r--configs/M54418TWR_serial_rmii_defconfig1
-rw-r--r--configs/M54451EVB_defconfig1
-rw-r--r--configs/M54451EVB_stmicro_defconfig1
-rw-r--r--configs/M54455EVB_a66_defconfig1
-rw-r--r--configs/M54455EVB_defconfig1
-rw-r--r--configs/M54455EVB_i66_defconfig1
-rw-r--r--configs/M54455EVB_intel_defconfig1
-rw-r--r--configs/M54455EVB_stm33_defconfig1
-rw-r--r--configs/MPC8349EMDS_defconfig1
-rw-r--r--configs/MPC8536DS_36BIT_defconfig1
-rw-r--r--configs/MPC8536DS_SDCARD_defconfig1
-rw-r--r--configs/MPC8536DS_SPIFLASH_defconfig1
-rw-r--r--configs/MPC8536DS_defconfig1
-rw-r--r--configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig1
-rw-r--r--configs/P1010RDB-PA_36BIT_NAND_defconfig1
-rw-r--r--configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig1
-rw-r--r--configs/P1010RDB-PA_36BIT_NOR_defconfig1
-rw-r--r--configs/P1010RDB-PA_36BIT_SDCARD_defconfig1
-rw-r--r--configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig1
-rw-r--r--configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig1
-rw-r--r--configs/P1010RDB-PA_NAND_SECBOOT_defconfig1
-rw-r--r--configs/P1010RDB-PA_NAND_defconfig1
-rw-r--r--configs/P1010RDB-PA_NOR_SECBOOT_defconfig1
-rw-r--r--configs/P1010RDB-PA_NOR_defconfig1
-rw-r--r--configs/P1010RDB-PA_SDCARD_defconfig1
-rw-r--r--configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig1
-rw-r--r--configs/P1010RDB-PA_SPIFLASH_defconfig1
-rw-r--r--configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig1
-rw-r--r--configs/P1010RDB-PB_36BIT_NAND_defconfig1
-rw-r--r--configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig1
-rw-r--r--configs/P1010RDB-PB_36BIT_NOR_defconfig1
-rw-r--r--configs/P1010RDB-PB_36BIT_SDCARD_defconfig1
-rw-r--r--configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig1
-rw-r--r--configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig1
-rw-r--r--configs/P1010RDB-PB_NAND_SECBOOT_defconfig1
-rw-r--r--configs/P1010RDB-PB_NAND_defconfig1
-rw-r--r--configs/P1010RDB-PB_NOR_SECBOOT_defconfig1
-rw-r--r--configs/P1010RDB-PB_NOR_defconfig1
-rw-r--r--configs/P1010RDB-PB_SDCARD_defconfig1
-rw-r--r--configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig1
-rw-r--r--configs/P1010RDB-PB_SPIFLASH_defconfig1
-rw-r--r--configs/P1020MBG-PC_36BIT_SDCARD_defconfig1
-rw-r--r--configs/P1020MBG-PC_36BIT_defconfig1
-rw-r--r--configs/P1020MBG-PC_SDCARD_defconfig1
-rw-r--r--configs/P1020MBG-PC_defconfig1
-rw-r--r--configs/P1020RDB-PC_36BIT_NAND_defconfig1
-rw-r--r--configs/P1020RDB-PC_36BIT_SDCARD_defconfig1
-rw-r--r--configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig1
-rw-r--r--configs/P1020RDB-PC_36BIT_defconfig1
-rw-r--r--configs/P1020RDB-PC_NAND_defconfig1
-rw-r--r--configs/P1020RDB-PC_SDCARD_defconfig1
-rw-r--r--configs/P1020RDB-PC_SPIFLASH_defconfig1
-rw-r--r--configs/P1020RDB-PC_defconfig1
-rw-r--r--configs/P1020RDB-PD_NAND_defconfig1
-rw-r--r--configs/P1020RDB-PD_SDCARD_defconfig1
-rw-r--r--configs/P1020RDB-PD_SPIFLASH_defconfig1
-rw-r--r--configs/P1020RDB-PD_defconfig1
-rw-r--r--configs/P1020UTM-PC_36BIT_SDCARD_defconfig1
-rw-r--r--configs/P1020UTM-PC_36BIT_defconfig1
-rw-r--r--configs/P1020UTM-PC_SDCARD_defconfig1
-rw-r--r--configs/P1020UTM-PC_defconfig1
-rw-r--r--configs/P1021RDB-PC_36BIT_NAND_defconfig1
-rw-r--r--configs/P1021RDB-PC_36BIT_SDCARD_defconfig1
-rw-r--r--configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig1
-rw-r--r--configs/P1021RDB-PC_36BIT_defconfig1
-rw-r--r--configs/P1021RDB-PC_NAND_defconfig1
-rw-r--r--configs/P1021RDB-PC_SDCARD_defconfig1
-rw-r--r--configs/P1021RDB-PC_SPIFLASH_defconfig1
-rw-r--r--configs/P1021RDB-PC_defconfig1
-rw-r--r--configs/P1022DS_36BIT_NAND_defconfig1
-rw-r--r--configs/P1022DS_36BIT_SDCARD_defconfig1
-rw-r--r--configs/P1022DS_36BIT_SPIFLASH_defconfig1
-rw-r--r--configs/P1022DS_36BIT_defconfig1
-rw-r--r--configs/P1022DS_NAND_defconfig1
-rw-r--r--configs/P1022DS_SDCARD_defconfig1
-rw-r--r--configs/P1022DS_SPIFLASH_defconfig1
-rw-r--r--configs/P1022DS_defconfig1
-rw-r--r--configs/P1024RDB_36BIT_defconfig1
-rw-r--r--configs/P1024RDB_NAND_defconfig1
-rw-r--r--configs/P1024RDB_SDCARD_defconfig1
-rw-r--r--configs/P1024RDB_SPIFLASH_defconfig1
-rw-r--r--configs/P1024RDB_defconfig1
-rw-r--r--configs/P1025RDB_36BIT_defconfig1
-rw-r--r--configs/P1025RDB_NAND_defconfig1
-rw-r--r--configs/P1025RDB_SDCARD_defconfig1
-rw-r--r--configs/P1025RDB_SPIFLASH_defconfig1
-rw-r--r--configs/P1025RDB_defconfig1
-rw-r--r--configs/P2020RDB-PC_36BIT_NAND_defconfig1
-rw-r--r--configs/P2020RDB-PC_36BIT_SDCARD_defconfig1
-rw-r--r--configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig1
-rw-r--r--configs/P2020RDB-PC_36BIT_defconfig1
-rw-r--r--configs/P2020RDB-PC_NAND_defconfig1
-rw-r--r--configs/P2020RDB-PC_SDCARD_defconfig1
-rw-r--r--configs/P2020RDB-PC_SPIFLASH_defconfig1
-rw-r--r--configs/P2020RDB-PC_defconfig1
-rw-r--r--configs/P2041RDB_NAND_defconfig1
-rw-r--r--configs/P2041RDB_SDCARD_defconfig1
-rw-r--r--configs/P2041RDB_SECURE_BOOT_defconfig1
-rw-r--r--configs/P2041RDB_SPIFLASH_defconfig1
-rw-r--r--configs/P2041RDB_SRIO_PCIE_BOOT_defconfig1
-rw-r--r--configs/P2041RDB_defconfig1
-rw-r--r--configs/P3041DS_NAND_SECURE_BOOT_defconfig1
-rw-r--r--configs/P3041DS_NAND_defconfig1
-rw-r--r--configs/P3041DS_SDCARD_defconfig1
-rw-r--r--configs/P3041DS_SECURE_BOOT_defconfig1
-rw-r--r--configs/P3041DS_SPIFLASH_defconfig1
-rw-r--r--configs/P3041DS_SRIO_PCIE_BOOT_defconfig1
-rw-r--r--configs/P3041DS_defconfig1
-rw-r--r--configs/P4080DS_SDCARD_defconfig1
-rw-r--r--configs/P4080DS_SECURE_BOOT_defconfig1
-rw-r--r--configs/P4080DS_SPIFLASH_defconfig1
-rw-r--r--configs/P4080DS_SRIO_PCIE_BOOT_defconfig1
-rw-r--r--configs/P4080DS_defconfig1
-rw-r--r--configs/P5020DS_NAND_SECURE_BOOT_defconfig1
-rw-r--r--configs/P5020DS_NAND_defconfig1
-rw-r--r--configs/P5020DS_SDCARD_defconfig1
-rw-r--r--configs/P5020DS_SECURE_BOOT_defconfig1
-rw-r--r--configs/P5020DS_SPIFLASH_defconfig1
-rw-r--r--configs/P5020DS_SRIO_PCIE_BOOT_defconfig1
-rw-r--r--configs/P5020DS_defconfig1
-rw-r--r--configs/P5040DS_NAND_SECURE_BOOT_defconfig1
-rw-r--r--configs/P5040DS_NAND_defconfig1
-rw-r--r--configs/P5040DS_SDCARD_defconfig1
-rw-r--r--configs/P5040DS_SECURE_BOOT_defconfig1
-rw-r--r--configs/P5040DS_SPIFLASH_defconfig1
-rw-r--r--configs/P5040DS_defconfig1
-rw-r--r--configs/T1023RDB_NAND_defconfig1
-rw-r--r--configs/T1023RDB_SDCARD_defconfig1
-rw-r--r--configs/T1023RDB_SECURE_BOOT_defconfig1
-rw-r--r--configs/T1023RDB_SPIFLASH_defconfig1
-rw-r--r--configs/T1023RDB_defconfig1
-rw-r--r--configs/T1024QDS_DDR4_SECURE_BOOT_defconfig1
-rw-r--r--configs/T1024QDS_DDR4_defconfig1
-rw-r--r--configs/T1024QDS_NAND_defconfig1
-rw-r--r--configs/T1024QDS_SDCARD_defconfig1
-rw-r--r--configs/T1024QDS_SECURE_BOOT_defconfig1
-rw-r--r--configs/T1024QDS_SPIFLASH_defconfig1
-rw-r--r--configs/T1024QDS_defconfig1
-rw-r--r--configs/T1024RDB_NAND_defconfig1
-rw-r--r--configs/T1024RDB_SDCARD_defconfig1
-rw-r--r--configs/T1024RDB_SECURE_BOOT_defconfig1
-rw-r--r--configs/T1024RDB_SPIFLASH_defconfig1
-rw-r--r--configs/T1024RDB_defconfig1
-rw-r--r--configs/T1040D4RDB_NAND_defconfig1
-rw-r--r--configs/T1040D4RDB_SDCARD_defconfig1
-rw-r--r--configs/T1040D4RDB_SECURE_BOOT_defconfig1
-rw-r--r--configs/T1040D4RDB_SPIFLASH_defconfig1
-rw-r--r--configs/T1040D4RDB_defconfig1
-rw-r--r--configs/T1040QDS_DDR4_defconfig1
-rw-r--r--configs/T1040QDS_SECURE_BOOT_defconfig1
-rw-r--r--configs/T1040QDS_defconfig1
-rw-r--r--configs/T1040RDB_NAND_defconfig1
-rw-r--r--configs/T1040RDB_SDCARD_defconfig1
-rw-r--r--configs/T1040RDB_SECURE_BOOT_defconfig1
-rw-r--r--configs/T1040RDB_SPIFLASH_defconfig1
-rw-r--r--configs/T1040RDB_defconfig1
-rw-r--r--configs/T1042D4RDB_NAND_defconfig1
-rw-r--r--configs/T1042D4RDB_SDCARD_defconfig1
-rw-r--r--configs/T1042D4RDB_SECURE_BOOT_defconfig1
-rw-r--r--configs/T1042D4RDB_SPIFLASH_defconfig1
-rw-r--r--configs/T1042D4RDB_defconfig1
-rw-r--r--configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig1
-rw-r--r--configs/T1042RDB_PI_NAND_defconfig1
-rw-r--r--configs/T1042RDB_PI_SDCARD_defconfig1
-rw-r--r--configs/T1042RDB_PI_SPIFLASH_defconfig1
-rw-r--r--configs/T1042RDB_PI_defconfig1
-rw-r--r--configs/T1042RDB_SECURE_BOOT_defconfig1
-rw-r--r--configs/T1042RDB_defconfig1
-rw-r--r--configs/T2080QDS_NAND_defconfig1
-rw-r--r--configs/T2080QDS_SDCARD_defconfig1
-rw-r--r--configs/T2080QDS_SECURE_BOOT_defconfig1
-rw-r--r--configs/T2080QDS_SPIFLASH_defconfig1
-rw-r--r--configs/T2080QDS_SRIO_PCIE_BOOT_defconfig1
-rw-r--r--configs/T2080QDS_defconfig1
-rw-r--r--configs/T2080RDB_NAND_defconfig1
-rw-r--r--configs/T2080RDB_SDCARD_defconfig1
-rw-r--r--configs/T2080RDB_SECURE_BOOT_defconfig1
-rw-r--r--configs/T2080RDB_SPIFLASH_defconfig1
-rw-r--r--configs/T2080RDB_SRIO_PCIE_BOOT_defconfig1
-rw-r--r--configs/T2080RDB_defconfig1
-rw-r--r--configs/T2081QDS_NAND_defconfig1
-rw-r--r--configs/T2081QDS_SDCARD_defconfig1
-rw-r--r--configs/T2081QDS_SPIFLASH_defconfig1
-rw-r--r--configs/T2081QDS_SRIO_PCIE_BOOT_defconfig1
-rw-r--r--configs/T2081QDS_defconfig1
-rw-r--r--configs/T4160QDS_NAND_defconfig1
-rw-r--r--configs/T4160QDS_SDCARD_defconfig1
-rw-r--r--configs/T4160QDS_SECURE_BOOT_defconfig1
-rw-r--r--configs/T4160QDS_defconfig1
-rw-r--r--configs/T4160RDB_defconfig1
-rw-r--r--configs/T4240QDS_NAND_defconfig1
-rw-r--r--configs/T4240QDS_SDCARD_defconfig1
-rw-r--r--configs/T4240QDS_SECURE_BOOT_defconfig1
-rw-r--r--configs/T4240QDS_SRIO_PCIE_BOOT_defconfig1
-rw-r--r--configs/T4240QDS_defconfig1
-rw-r--r--configs/T4240RDB_SDCARD_defconfig1
-rw-r--r--configs/T4240RDB_defconfig1
-rw-r--r--configs/TWR-P1025_defconfig1
-rw-r--r--configs/UCP1020_SPIFLASH_defconfig1
-rw-r--r--configs/UCP1020_defconfig1
-rw-r--r--configs/adp-ae3xx_defconfig1
-rw-r--r--configs/alt_defconfig50
-rw-r--r--configs/am335x_baltos_defconfig1
-rw-r--r--configs/am335x_boneblack_defconfig1
-rw-r--r--configs/am335x_boneblack_vboot_defconfig1
-rw-r--r--configs/am335x_evm_defconfig1
-rw-r--r--configs/am335x_evm_nor_defconfig1
-rw-r--r--configs/am335x_evm_norboot_defconfig1
-rw-r--r--configs/am335x_evm_spiboot_defconfig1
-rw-r--r--configs/am335x_evm_usbspl_defconfig1
-rw-r--r--configs/am335x_hs_evm_defconfig1
-rw-r--r--configs/am335x_hs_evm_uart_defconfig1
-rw-r--r--configs/am335x_igep003x_defconfig1
-rw-r--r--configs/am335x_pdu001_defconfig1
-rw-r--r--configs/am335x_shc_defconfig1
-rw-r--r--configs/am335x_shc_ict_defconfig1
-rw-r--r--configs/am335x_shc_netboot_defconfig1
-rw-r--r--configs/am335x_shc_prompt_defconfig1
-rw-r--r--configs/am335x_shc_sdboot_defconfig1
-rw-r--r--configs/am335x_shc_sdboot_prompt_defconfig1
-rw-r--r--configs/am335x_sl50_defconfig1
-rw-r--r--configs/am3517_evm_defconfig1
-rw-r--r--configs/am43xx_evm_defconfig1
-rw-r--r--configs/am43xx_evm_ethboot_defconfig1
-rw-r--r--configs/am43xx_evm_qspiboot_defconfig1
-rw-r--r--configs/am43xx_evm_rtconly_defconfig1
-rw-r--r--configs/am43xx_evm_usbhost_boot_defconfig1
-rw-r--r--configs/am43xx_hs_evm_defconfig1
-rw-r--r--configs/am57xx_evm_defconfig1
-rw-r--r--configs/am57xx_hs_evm_defconfig1
-rw-r--r--configs/ap121_defconfig1
-rw-r--r--configs/ap143_defconfig1
-rw-r--r--configs/aristainetos2_defconfig1
-rw-r--r--configs/aristainetos2b_defconfig1
-rw-r--r--configs/aristainetos_defconfig1
-rw-r--r--configs/at91sam9260ek_dataflash_cs0_defconfig1
-rw-r--r--configs/at91sam9260ek_dataflash_cs1_defconfig1
-rw-r--r--configs/at91sam9260ek_nandflash_defconfig1
-rw-r--r--configs/at91sam9261ek_dataflash_cs0_defconfig1
-rw-r--r--configs/at91sam9261ek_dataflash_cs3_defconfig1
-rw-r--r--configs/at91sam9261ek_nandflash_defconfig1
-rw-r--r--configs/at91sam9263ek_dataflash_cs0_defconfig1
-rw-r--r--configs/at91sam9263ek_dataflash_defconfig1
-rw-r--r--configs/at91sam9263ek_nandflash_defconfig1
-rw-r--r--configs/at91sam9263ek_norflash_boot_defconfig1
-rw-r--r--configs/at91sam9263ek_norflash_defconfig1
-rw-r--r--configs/at91sam9g10ek_dataflash_cs0_defconfig1
-rw-r--r--configs/at91sam9g10ek_dataflash_cs3_defconfig1
-rw-r--r--configs/at91sam9g10ek_nandflash_defconfig1
-rw-r--r--configs/at91sam9g20ek_2mmc_defconfig1
-rw-r--r--configs/at91sam9g20ek_2mmc_nandflash_defconfig1
-rw-r--r--configs/at91sam9g20ek_dataflash_cs0_defconfig1
-rw-r--r--configs/at91sam9g20ek_dataflash_cs1_defconfig1
-rw-r--r--configs/at91sam9g20ek_nandflash_defconfig1
-rw-r--r--configs/at91sam9n12ek_mmc_defconfig1
-rw-r--r--configs/at91sam9n12ek_nandflash_defconfig1
-rw-r--r--configs/at91sam9n12ek_spiflash_defconfig1
-rw-r--r--configs/at91sam9rlek_dataflash_defconfig1
-rw-r--r--configs/at91sam9rlek_mmc_defconfig1
-rw-r--r--configs/at91sam9rlek_nandflash_defconfig1
-rw-r--r--configs/at91sam9x5ek_dataflash_defconfig1
-rw-r--r--configs/at91sam9x5ek_mmc_defconfig1
-rw-r--r--configs/at91sam9x5ek_nandflash_defconfig1
-rw-r--r--configs/at91sam9x5ek_spiflash_defconfig1
-rw-r--r--configs/at91sam9xeek_dataflash_cs0_defconfig1
-rw-r--r--configs/at91sam9xeek_dataflash_cs1_defconfig1
-rw-r--r--configs/at91sam9xeek_nandflash_defconfig1
-rw-r--r--configs/bayleybay_defconfig1
-rw-r--r--configs/bg0900_defconfig1
-rw-r--r--configs/birdland_bav335a_defconfig1
-rw-r--r--configs/birdland_bav335b_defconfig1
-rw-r--r--configs/bk4r1_defconfig1
-rw-r--r--configs/brppt1_spi_defconfig1
-rw-r--r--configs/cairo_defconfig1
-rw-r--r--configs/cgtqmx6eval_defconfig1
-rw-r--r--configs/cherryhill_defconfig1
-rw-r--r--configs/chiliboard_defconfig1
-rw-r--r--configs/chromebit_mickey_defconfig1
-rw-r--r--configs/chromebook_jerry_defconfig1
-rw-r--r--configs/chromebook_link64_defconfig1
-rw-r--r--configs/chromebook_link_defconfig1
-rw-r--r--configs/chromebook_minnie_defconfig1
-rw-r--r--configs/chromebook_samus_defconfig1
-rw-r--r--configs/chromebox_panther_defconfig1
-rw-r--r--configs/cl-som-am57x_defconfig1
-rw-r--r--configs/cl-som-imx7_defconfig1
-rw-r--r--configs/cm_fx6_defconfig1
-rw-r--r--configs/cm_t3517_defconfig1
-rw-r--r--configs/cm_t35_defconfig1
-rw-r--r--configs/cm_t43_defconfig1
-rw-r--r--configs/cm_t54_defconfig1
-rw-r--r--configs/colibri_vf_defconfig1
-rw-r--r--configs/comtrend_ar5315u_ram_defconfig1
-rw-r--r--configs/comtrend_ar5387un_ram_defconfig1
-rw-r--r--configs/conga-qeval20-qa3-e3845-internal-uart_defconfig1
-rw-r--r--configs/conga-qeval20-qa3-e3845_defconfig1
-rw-r--r--configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig1
-rw-r--r--configs/controlcenterd_36BIT_SDCARD_defconfig1
-rw-r--r--configs/controlcenterdc_defconfig1
-rw-r--r--configs/coreboot_defconfig1
-rw-r--r--configs/cougarcanyon2_defconfig1
-rw-r--r--configs/crownbay_defconfig1
-rw-r--r--configs/d2net_v2_defconfig1
-rw-r--r--configs/da850_am18xxevm_defconfig1
-rw-r--r--configs/da850evm_defconfig1
-rw-r--r--configs/da850evm_direct_nor_defconfig1
-rw-r--r--configs/devkit3250_defconfig1
-rw-r--r--configs/dfi-bt700-q7x-151_defconfig1
-rw-r--r--configs/dh_imx6_defconfig1
-rw-r--r--configs/display5_defconfig1
-rw-r--r--configs/display5_factory_defconfig1
-rw-r--r--configs/dms-ba16-1g_defconfig1
-rw-r--r--configs/dms-ba16_defconfig1
-rw-r--r--configs/dra7xx_evm_defconfig1
-rw-r--r--configs/dra7xx_hs_evm_defconfig1
-rw-r--r--configs/draco_defconfig1
-rw-r--r--configs/dreamplug_defconfig1
-rw-r--r--configs/ds109_defconfig1
-rw-r--r--configs/duovero_defconfig1
-rw-r--r--configs/ea20_defconfig1
-rw-r--r--configs/efi-x86_defconfig1
-rw-r--r--configs/etamin_defconfig1
-rw-r--r--configs/ethernut5_defconfig1
-rw-r--r--configs/evb-rk3128_defconfig1
-rw-r--r--configs/evb-rk3229_defconfig1
-rw-r--r--configs/evb-rk3288_defconfig1
-rw-r--r--configs/evb-rk3328_defconfig1
-rw-r--r--configs/evb-rk3399_defconfig4
-rw-r--r--configs/fennec-rk3288_defconfig1
-rw-r--r--configs/firefly-rk3288_defconfig1
-rw-r--r--configs/firefly-rk3399_defconfig1
-rw-r--r--configs/flea3_defconfig1
-rw-r--r--configs/galileo_defconfig1
-rw-r--r--configs/ge_b450v3_defconfig1
-rw-r--r--configs/ge_b650v3_defconfig1
-rw-r--r--configs/ge_b850v3_defconfig1
-rw-r--r--configs/gose_defconfig50
-rw-r--r--configs/hsdk_defconfig1
-rw-r--r--configs/ids8313_defconfig2
-rw-r--r--configs/igep0032_defconfig1
-rw-r--r--configs/igep00x0_defconfig1
-rw-r--r--configs/imx6dl_icore_nand_defconfig1
-rw-r--r--configs/imx6q_icore_nand_defconfig1
-rw-r--r--configs/imx6qdl_icore_mipi_defconfig1
-rw-r--r--configs/imx6qdl_icore_mmc_defconfig1
-rw-r--r--configs/imx6qdl_icore_nand_defconfig1
-rw-r--r--configs/imx6qdl_icore_rqs_defconfig1
-rw-r--r--configs/imx6ul_geam_mmc_defconfig1
-rw-r--r--configs/imx6ul_geam_nand_defconfig1
-rw-r--r--configs/imx6ul_isiot_emmc_defconfig1
-rw-r--r--configs/imx6ul_isiot_nand_defconfig1
-rw-r--r--configs/inetspace_v2_defconfig1
-rw-r--r--configs/k2e_evm_defconfig1
-rw-r--r--configs/k2e_hs_evm_defconfig1
-rw-r--r--configs/k2g_evm_defconfig1
-rw-r--r--configs/k2g_hs_evm_defconfig1
-rw-r--r--configs/k2hk_evm_defconfig1
-rw-r--r--configs/k2hk_hs_evm_defconfig1
-rw-r--r--configs/k2l_evm_defconfig1
-rw-r--r--configs/k2l_hs_evm_defconfig1
-rw-r--r--configs/km_kirkwood_128m16_defconfig1
-rw-r--r--configs/km_kirkwood_defconfig1
-rw-r--r--configs/km_kirkwood_pci_defconfig1
-rw-r--r--configs/kmcoge4_defconfig1
-rw-r--r--configs/kmcoge5un_defconfig1
-rw-r--r--configs/kmlion1_defconfig1
-rw-r--r--configs/kmnusa_defconfig1
-rw-r--r--configs/kmsugp1_defconfig1
-rw-r--r--configs/kmsuv31_defconfig1
-rw-r--r--configs/koelsch_defconfig1
-rw-r--r--configs/lager_defconfig50
-rw-r--r--configs/legoev3_defconfig1
-rw-r--r--configs/ls1012a2g5rdb_qspi_defconfig1
-rw-r--r--configs/ls1012afrdm_qspi_defconfig1
-rw-r--r--configs/ls1012aqds_qspi_defconfig1
-rw-r--r--configs/ls1012ardb_qspi_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls1012ardb_qspi_defconfig1
-rw-r--r--configs/ls1021aiot_qspi_defconfig1
-rw-r--r--configs/ls1021aiot_sdcard_defconfig2
-rw-r--r--configs/ls1021aqds_qspi_defconfig1
-rw-r--r--configs/ls1021aqds_sdcard_qspi_defconfig1
-rw-r--r--configs/ls1021atwr_qspi_defconfig1
-rw-r--r--configs/ls1021atwr_sdcard_qspi_defconfig1
-rw-r--r--configs/ls1043aqds_defconfig1
-rw-r--r--configs/ls1043aqds_lpuart_defconfig1
-rw-r--r--configs/ls1043aqds_nand_defconfig1
-rw-r--r--configs/ls1043aqds_nor_ddr3_defconfig1
-rw-r--r--configs/ls1043aqds_qspi_defconfig1
-rw-r--r--configs/ls1043aqds_sdcard_ifc_defconfig1
-rw-r--r--configs/ls1043aqds_sdcard_qspi_defconfig1
-rw-r--r--configs/ls1043ardb_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls1043ardb_defconfig1
-rw-r--r--configs/ls1043ardb_nand_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls1043ardb_nand_defconfig1
-rw-r--r--configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls1043ardb_sdcard_defconfig1
-rw-r--r--configs/ls1046aqds_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls1046aqds_defconfig1
-rw-r--r--configs/ls1046aqds_lpuart_defconfig1
-rw-r--r--configs/ls1046aqds_nand_defconfig2
-rw-r--r--configs/ls1046aqds_qspi_defconfig1
-rw-r--r--configs/ls1046aqds_sdcard_ifc_defconfig2
-rw-r--r--configs/ls1046aqds_sdcard_qspi_defconfig2
-rw-r--r--configs/ls1046ardb_emmc_defconfig2
-rw-r--r--configs/ls1046ardb_qspi_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls1046ardb_qspi_defconfig1
-rw-r--r--configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig2
-rw-r--r--configs/ls1046ardb_sdcard_defconfig2
-rw-r--r--configs/ls1088aqds_defconfig1
-rw-r--r--configs/ls1088aqds_qspi_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls1088aqds_qspi_defconfig1
-rw-r--r--configs/ls1088aqds_sdcard_qspi_defconfig1
-rw-r--r--configs/ls1088ardb_qspi_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls1088ardb_qspi_defconfig1
-rw-r--r--configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls1088ardb_sdcard_qspi_defconfig1
-rw-r--r--configs/ls2080a_emu_defconfig1
-rw-r--r--configs/ls2080a_simu_defconfig1
-rw-r--r--configs/ls2080aqds_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls2080aqds_defconfig1
-rw-r--r--configs/ls2080aqds_nand_defconfig1
-rw-r--r--configs/ls2080aqds_qspi_defconfig1
-rw-r--r--configs/ls2080aqds_sdcard_defconfig1
-rw-r--r--configs/ls2080ardb_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls2080ardb_defconfig1
-rw-r--r--configs/ls2081ardb_defconfig1
-rw-r--r--configs/ls2088ardb_qspi_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls2088ardb_qspi_defconfig1
-rw-r--r--configs/lschlv2_defconfig1
-rw-r--r--configs/lsxhl_defconfig1
-rw-r--r--configs/m28evk_defconfig1
-rw-r--r--configs/marsboard_defconfig1
-rw-r--r--configs/mccmon6_nor_defconfig1
-rw-r--r--configs/mccmon6_sd_defconfig1
-rw-r--r--configs/meesc_dataflash_defconfig1
-rw-r--r--configs/meesc_defconfig1
-rw-r--r--configs/mgcoge3un_defconfig1
-rw-r--r--configs/minnowmax_defconfig1
-rw-r--r--configs/miqi-rk3288_defconfig1
-rw-r--r--configs/mx28evk_auart_console_defconfig1
-rw-r--r--configs/mx28evk_defconfig1
-rw-r--r--configs/mx28evk_nand_defconfig1
-rw-r--r--configs/mx28evk_spi_defconfig1
-rw-r--r--configs/mx31pdk_defconfig1
-rw-r--r--configs/mx35pdk_defconfig1
-rw-r--r--configs/mx51evk_defconfig1
-rw-r--r--configs/mx6qsabrelite_defconfig1
-rw-r--r--configs/mx6sabreauto_defconfig1
-rw-r--r--configs/mx6sabresd_defconfig1
-rw-r--r--configs/mx6slevk_defconfig1
-rw-r--r--configs/mx6slevk_spinor_defconfig1
-rw-r--r--configs/mx6slevk_spl_defconfig1
-rw-r--r--configs/mx6sxsabreauto_defconfig1
-rw-r--r--configs/mx6ul_14x14_evk_defconfig1
-rw-r--r--configs/mx6ul_9x9_evk_defconfig1
-rw-r--r--configs/mx6ull_14x14_evk_defconfig1
-rw-r--r--configs/mx6ull_14x14_evk_plugin_defconfig1
-rw-r--r--configs/mx7dsabresd_defconfig1
-rw-r--r--configs/mx7dsabresd_secure_defconfig1
-rw-r--r--configs/net2big_v2_defconfig1
-rw-r--r--configs/netgear_cg3100d_ram_defconfig1
-rw-r--r--configs/netspace_lite_v2_defconfig1
-rw-r--r--configs/netspace_max_v2_defconfig1
-rw-r--r--configs/netspace_mini_v2_defconfig1
-rw-r--r--configs/netspace_v2_defconfig1
-rw-r--r--configs/nitrogen6dl2g_defconfig1
-rw-r--r--configs/nitrogen6dl_defconfig1
-rw-r--r--configs/nitrogen6q2g_defconfig1
-rw-r--r--configs/nitrogen6q_defconfig1
-rw-r--r--configs/nitrogen6s1g_defconfig1
-rw-r--r--configs/nitrogen6s_defconfig1
-rw-r--r--configs/nokia_rx51_defconfig1
-rw-r--r--configs/nx25-ae250_defconfig1
-rw-r--r--configs/omap3_beagle_defconfig1
-rw-r--r--configs/omap3_evm_defconfig1
-rw-r--r--configs/omap3_ha_defconfig1
-rw-r--r--configs/omap3_logic_defconfig1
-rw-r--r--configs/omap3_overo_defconfig1
-rw-r--r--configs/omap3_pandora_defconfig1
-rw-r--r--configs/omap3_zoom1_defconfig1
-rw-r--r--configs/omap4_panda_defconfig1
-rw-r--r--configs/omap4_sdp4430_defconfig1
-rw-r--r--configs/omap5_uevm_defconfig1
-rw-r--r--configs/omapl138_lcdk_defconfig1
-rw-r--r--configs/ot1200_defconfig1
-rw-r--r--configs/ot1200_spl_defconfig1
-rw-r--r--configs/pcm051_rev1_defconfig1
-rw-r--r--configs/pcm051_rev3_defconfig1
-rw-r--r--configs/pcm058_defconfig1
-rw-r--r--configs/pengwyn_defconfig1
-rw-r--r--configs/pepper_defconfig1
-rw-r--r--configs/pfla02_defconfig1
-rw-r--r--configs/phycore-rk3288_defconfig1
-rw-r--r--configs/pm9261_defconfig1
-rw-r--r--configs/pm9263_defconfig1
-rw-r--r--configs/popmetal-rk3288_defconfig1
-rw-r--r--configs/porter_defconfig1
-rw-r--r--configs/portl2_defconfig1
-rw-r--r--configs/puma-rk3399_defconfig3
-rw-r--r--configs/pxm2_defconfig1
-rw-r--r--configs/qemu-x86_64_defconfig1
-rw-r--r--configs/qemu-x86_defconfig1
-rw-r--r--configs/qemu-x86_efi_payload32_defconfig1
-rw-r--r--configs/qemu-x86_efi_payload64_defconfig1
-rw-r--r--configs/r8a77965_salvator-x_defconfig3
-rw-r--r--configs/r8a77970_eagle_defconfig1
-rw-r--r--configs/rastaban_defconfig1
-rw-r--r--configs/riotboard_defconfig1
-rw-r--r--configs/rock2_defconfig1
-rw-r--r--configs/rock_defconfig4
-rw-r--r--configs/rut_defconfig1
-rw-r--r--configs/s32v234evb_defconfig4
-rw-r--r--configs/sagem_f@st1704_ram_defconfig1
-rw-r--r--configs/sama5d27_som1_ek_mmc_defconfig1
-rw-r--r--configs/sama5d2_xplained_mmc_defconfig1
-rw-r--r--configs/sama5d2_xplained_spiflash_defconfig1
-rw-r--r--configs/sama5d36ek_cmp_mmc_defconfig1
-rw-r--r--configs/sama5d36ek_cmp_nandflash_defconfig1
-rw-r--r--configs/sama5d36ek_cmp_spiflash_defconfig1
-rw-r--r--configs/sama5d3xek_mmc_defconfig1
-rw-r--r--configs/sama5d3xek_nandflash_defconfig1
-rw-r--r--configs/sama5d3xek_spiflash_defconfig1
-rw-r--r--configs/sama5d4_xplained_mmc_defconfig1
-rw-r--r--configs/sama5d4_xplained_nandflash_defconfig1
-rw-r--r--configs/sama5d4_xplained_spiflash_defconfig1
-rw-r--r--configs/sama5d4ek_mmc_defconfig1
-rw-r--r--configs/sama5d4ek_nandflash_defconfig1
-rw-r--r--configs/sama5d4ek_spiflash_defconfig1
-rw-r--r--configs/sandbox64_defconfig1
-rw-r--r--configs/sandbox_defconfig1
-rw-r--r--configs/sh7752evb_defconfig1
-rw-r--r--configs/sh7753evb_defconfig1
-rw-r--r--configs/sh7757lcr_defconfig1
-rw-r--r--configs/silk_defconfig1
-rw-r--r--configs/socfpga_arria10_defconfig5
-rw-r--r--configs/socfpga_arria5_defconfig5
-rw-r--r--configs/socfpga_cyclone5_defconfig5
-rw-r--r--configs/socfpga_dbm_soc1_defconfig3
-rw-r--r--configs/socfpga_de0_nano_soc_defconfig5
-rw-r--r--configs/socfpga_de10_nano_defconfig5
-rw-r--r--configs/socfpga_de1_soc_defconfig5
-rw-r--r--configs/socfpga_is1_defconfig5
-rw-r--r--configs/socfpga_mcvevk_defconfig5
-rw-r--r--configs/socfpga_sockit_defconfig5
-rw-r--r--configs/socfpga_socrates_defconfig5
-rw-r--r--configs/socfpga_sr1500_defconfig5
-rw-r--r--configs/socfpga_vining_fpga_defconfig5
-rw-r--r--configs/som-db5800-som-6867_defconfig1
-rw-r--r--configs/stm32f746-disco_defconfig1
-rw-r--r--configs/stmark2_defconfig1
-rw-r--r--configs/stout_defconfig1
-rw-r--r--configs/syzygy_hub_defconfig1
-rw-r--r--configs/tao3530_defconfig1
-rw-r--r--configs/theadorable-x86-conga-qa3-e3845-pcie-x4_defconfig1
-rw-r--r--configs/theadorable-x86-conga-qa3-e3845_defconfig1
-rw-r--r--configs/theadorable-x86-dfi-bt700_defconfig1
-rw-r--r--configs/thuban_defconfig1
-rw-r--r--configs/ti816x_evm_defconfig1
-rw-r--r--configs/tinker-rk3288_defconfig1
-rw-r--r--configs/tplink_wdr4300_defconfig1
-rw-r--r--configs/tqma6dl_mba6_mmc_defconfig1
-rw-r--r--configs/tqma6dl_mba6_spi_defconfig1
-rw-r--r--configs/tqma6q_mba6_mmc_defconfig1
-rw-r--r--configs/tqma6q_mba6_spi_defconfig1
-rw-r--r--configs/tqma6s_mba6_mmc_defconfig1
-rw-r--r--configs/tqma6s_mba6_spi_defconfig1
-rw-r--r--configs/ts4800_defconfig1
-rw-r--r--configs/usb_a9263_dataflash_defconfig1
-rw-r--r--configs/vexpress_aemv8a_dram_defconfig1
-rw-r--r--configs/vexpress_aemv8a_juno_defconfig1
-rw-r--r--configs/vexpress_aemv8a_semi_defconfig1
-rw-r--r--configs/vexpress_ca15_tc2_defconfig1
-rw-r--r--configs/vexpress_ca5x2_defconfig1
-rw-r--r--configs/vexpress_ca9x4_defconfig1
-rw-r--r--configs/vyasa-rk3288_defconfig1
-rw-r--r--configs/woodburn_defconfig1
-rw-r--r--configs/woodburn_sd_defconfig1
-rw-r--r--configs/work_92105_defconfig1
-rw-r--r--configs/xilinx_zynqmp_zcu100_revC_defconfig1
-rw-r--r--configs/zc5202_defconfig1
-rw-r--r--configs/zc5601_defconfig1
-rw-r--r--configs/zynq_cc108_defconfig1
-rw-r--r--configs/zynq_cse_qspi_defconfig1
-rw-r--r--configs/zynq_microzed_defconfig1
-rw-r--r--configs/zynq_z_turn_defconfig1
-rw-r--r--configs/zynq_zc702_defconfig1
-rw-r--r--configs/zynq_zc706_defconfig1
-rw-r--r--configs/zynq_zc770_xm010_defconfig1
-rw-r--r--configs/zynq_zc770_xm011_defconfig1
-rw-r--r--configs/zynq_zc770_xm011_x16_defconfig3
-rw-r--r--configs/zynq_zc770_xm012_defconfig1
-rw-r--r--configs/zynq_zc770_xm013_defconfig1
-rw-r--r--configs/zynq_zed_defconfig1
-rw-r--r--configs/zynq_zybo_defconfig1
-rw-r--r--disk/Kconfig4
-rw-r--r--disk/part.c2
-rw-r--r--doc/README.clang18
-rw-r--r--doc/README.distro3
-rw-r--r--doc/README.uefi2
-rw-r--r--drivers/adc/adc-uclass.c2
-rw-r--r--drivers/ata/dwc_ahci.c2
-rw-r--r--drivers/clk/at91/clk-plladiv.c2
-rw-r--r--drivers/clk/at91/clk-utmi.c2
-rw-r--r--drivers/clk/at91/sckc.c2
-rw-r--r--drivers/clk/clk-hsdk-cgu.c2
-rw-r--r--drivers/clk/clk_stm32h7.c2
-rw-r--r--drivers/clk/clk_zynqmp.c2
-rw-r--r--drivers/clk/exynos/clk-exynos7420.c2
-rw-r--r--drivers/clk/rockchip/clk_rk3036.c13
-rw-r--r--drivers/clk/rockchip/clk_rk3128.c13
-rw-r--r--drivers/clk/rockchip/clk_rk3188.c2
-rw-r--r--drivers/clk/rockchip/clk_rk322x.c2
-rw-r--r--drivers/clk/rockchip/clk_rk3288.c13
-rw-r--r--drivers/clk/rockchip/clk_rk3328.c2
-rw-r--r--drivers/clk/rockchip/clk_rk3368.c2
-rw-r--r--drivers/clk/rockchip/clk_rk3399.c2
-rw-r--r--drivers/clk/rockchip/clk_rv1108.c12
-rw-r--r--drivers/clk/uniphier/Kconfig1
-rw-r--r--drivers/cpu/cpu-uclass.c2
-rw-r--r--drivers/ddr/altera/sdram.c2
-rw-r--r--drivers/ddr/fsl/main.c2
-rw-r--r--drivers/dma/dma-uclass.c2
-rw-r--r--drivers/fpga/socfpga.c2
-rw-r--r--drivers/fpga/socfpga_arria10.c12
-rw-r--r--drivers/fpga/socfpga_gen5.c2
-rw-r--r--drivers/gpio/hsdk-creg-gpio.c2
-rw-r--r--drivers/gpio/imx_rgpio2p.c2
-rw-r--r--drivers/gpio/mvebu_gpio.c2
-rw-r--r--drivers/gpio/mxc_gpio.c2
-rw-r--r--drivers/gpio/pm8916_gpio.c2
-rw-r--r--drivers/gpio/sandbox.c2
-rw-r--r--drivers/gpio/sunxi_gpio.c2
-rw-r--r--drivers/gpio/tegra186_gpio.c2
-rw-r--r--drivers/gpio/tegra_gpio.c2
-rw-r--r--drivers/i2c/ast_i2c.c2
-rw-r--r--drivers/i2c/i2c-cdns.c2
-rw-r--r--drivers/i2c/imx_lpi2c.c1
-rw-r--r--drivers/i2c/omap24xx_i2c.c2
-rw-r--r--drivers/i2c/rk_i2c.c2
-rw-r--r--drivers/i2c/sandbox_i2c.c2
-rw-r--r--drivers/i2c/stm32f7_i2c.c2
-rw-r--r--drivers/i2c/tegra_i2c.c2
-rw-r--r--drivers/input/cros_ec_keyb.c2
-rw-r--r--drivers/input/tegra-kbc.c2
-rw-r--r--drivers/led/led_gpio.c2
-rw-r--r--drivers/mailbox/mailbox-uclass.c2
-rw-r--r--drivers/mailbox/tegra-hsp.c2
-rw-r--r--drivers/misc/cros_ec.c2
-rw-r--r--drivers/misc/cros_ec_sandbox.c2
-rw-r--r--drivers/misc/cros_ec_spi.c2
-rw-r--r--drivers/misc/i2c_eeprom_emul.c2
-rw-r--r--drivers/misc/spltest_sandbox.c2
-rw-r--r--drivers/misc/syscon_sandbox.c2
-rw-r--r--drivers/mmc/arm_pl180_mmci.c2
-rw-r--r--drivers/mmc/bcm2835_sdhost.c2
-rw-r--r--drivers/mmc/gen_atmel_mci.c2
-rw-r--r--drivers/mmc/meson_gx_mmc.c3
-rw-r--r--drivers/mmc/mmc-uclass.c2
-rw-r--r--drivers/mmc/mmc.c2
-rw-r--r--drivers/mmc/renesas-sdhi.c23
-rw-r--r--drivers/mmc/rockchip_dw_mmc.c2
-rw-r--r--drivers/mmc/rockchip_sdhci.c1
-rw-r--r--drivers/mmc/sandbox_mmc.c2
-rw-r--r--drivers/mmc/stm32_sdmmc2.c2
-rw-r--r--drivers/mmc/tegra_mmc.c2
-rw-r--r--drivers/mmc/tmio-common.c22
-rw-r--r--drivers/mmc/uniphier-sd.c29
-rw-r--r--drivers/mtd/nand/nand.c2
-rw-r--r--drivers/mtd/nand/zynq_nand.c8
-rw-r--r--drivers/mtd/spi/sandbox.c2
-rw-r--r--drivers/mtd/spi/sf_internal.h13
-rw-r--r--drivers/mtd/spi/spi_flash.c170
-rw-r--r--drivers/mtd/spi/spi_flash_ids.c4
-rw-r--r--drivers/net/designware.c2
-rw-r--r--drivers/net/e1000_spi.c2
-rw-r--r--drivers/net/fsl_mcdmafec.c2
-rw-r--r--drivers/net/gmac_rockchip.c2
-rw-r--r--drivers/net/lpc32xx_eth.c2
-rw-r--r--drivers/net/mcffec.c2
-rw-r--r--drivers/net/netconsole.c2
-rw-r--r--drivers/net/phy/micrel_ksz8xxx.c2
-rw-r--r--drivers/net/phy/micrel_ksz90x1.c2
-rw-r--r--drivers/pch/pch-uclass.c2
-rw-r--r--drivers/pci/pci-aardvark.c2
-rw-r--r--drivers/pci/pci-emul-uclass.c2
-rw-r--r--drivers/pci/pci_sandbox.c2
-rw-r--r--drivers/pci/pci_tegra.c2
-rw-r--r--drivers/phy/meson-gxl-usb2.c2
-rw-r--r--drivers/phy/meson-gxl-usb3.c2
-rw-r--r--drivers/phy/phy-uclass.c2
-rw-r--r--drivers/phy/sandbox-phy.c2
-rw-r--r--drivers/pinctrl/aspeed/pinctrl_ast2500.c2
-rw-r--r--drivers/pinctrl/exynos/pinctrl-exynos7420.c2
-rw-r--r--drivers/pinctrl/renesas/pfc.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl_rk3036.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl_rk3328.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl_rk3368.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl_rk3399.c2
-rw-r--r--drivers/pinctrl/rockchip/pinctrl_rv1108.c2
-rw-r--r--drivers/power/domain/power-domain-uclass.c2
-rw-r--r--drivers/power/pmic/act8846.c2
-rw-r--r--drivers/power/pmic/i2c_pmic_emul.c2
-rw-r--r--drivers/power/pmic/lp873x.c2
-rw-r--r--drivers/power/pmic/lp87565.c2
-rw-r--r--drivers/power/pmic/max77686.c2
-rw-r--r--drivers/power/pmic/max8997.c2
-rw-r--r--drivers/power/pmic/max8998.c2
-rw-r--r--drivers/power/pmic/palmas.c2
-rw-r--r--drivers/power/pmic/pfuze100.c2
-rw-r--r--drivers/power/pmic/pm8916.c2
-rw-r--r--drivers/power/pmic/pmic-uclass.c2
-rw-r--r--drivers/power/pmic/pmic_tps65910_dm.c2
-rw-r--r--drivers/power/pmic/rk8xx.c2
-rw-r--r--drivers/power/pmic/s2mps11.c2
-rw-r--r--drivers/power/pmic/s5m8767.c2
-rw-r--r--drivers/power/pmic/sandbox.c2
-rw-r--r--drivers/power/pmic/tps65090.c2
-rw-r--r--drivers/power/regulator/fixed.c2
-rw-r--r--drivers/power/regulator/lp873x_regulator.c2
-rw-r--r--drivers/power/regulator/lp87565_regulator.c2
-rw-r--r--drivers/power/regulator/max77686.c2
-rw-r--r--drivers/power/regulator/palmas_regulator.c2
-rw-r--r--drivers/power/regulator/pbias_regulator.c2
-rw-r--r--drivers/power/regulator/regulator-uclass.c2
-rw-r--r--drivers/power/regulator/s2mps11_regulator.c2
-rw-r--r--drivers/power/regulator/s5m8767.c2
-rw-r--r--drivers/power/regulator/sandbox.c2
-rw-r--r--drivers/pwm/exynos_pwm.c2
-rw-r--r--drivers/pwm/rk_pwm.c2
-rw-r--r--drivers/pwm/sandbox_pwm.c2
-rw-r--r--drivers/pwm/tegra_pwm.c2
-rw-r--r--drivers/ram/rockchip/dmc-rk3368.c2
-rw-r--r--drivers/ram/rockchip/sdram_rk3128.c1
-rw-r--r--drivers/ram/rockchip/sdram_rk3188.c2
-rw-r--r--drivers/ram/rockchip/sdram_rk3288.c2
-rw-r--r--drivers/ram/rockchip/sdram_rk3328.c1
-rw-r--r--drivers/ram/rockchip/sdram_rk3399.c1
-rw-r--r--drivers/ram/stm32_sdram.c2
-rw-r--r--drivers/ram/stm32mp1/stm32mp1_ram.c2
-rw-r--r--drivers/reset/ast2500-reset.c2
-rw-r--r--drivers/reset/reset-uclass.c2
-rw-r--r--drivers/rtc/i2c_rtc_emul.c2
-rw-r--r--drivers/serial/Kconfig7
-rw-r--r--drivers/serial/altera_jtag_uart.c2
-rw-r--r--drivers/serial/lpc32xx_hsuart.c2
-rw-r--r--drivers/serial/serial_linflexuart.c4
-rw-r--r--drivers/serial/serial_meson.c2
-rw-r--r--drivers/serial/serial_stm32.c23
-rw-r--r--drivers/serial/serial_stm32.h12
-rw-r--r--drivers/serial/serial_xuartlite.c2
-rw-r--r--drivers/serial/serial_zynq.c2
-rw-r--r--drivers/spi/Kconfig7
-rw-r--r--drivers/spi/altera_spi.c2
-rw-r--r--drivers/spi/atmel_spi.c2
-rw-r--r--drivers/spi/cf_spi.c8
-rw-r--r--drivers/spi/designware_spi.c2
-rw-r--r--drivers/spi/fsl_dspi.c10
-rw-r--r--drivers/spi/rk_spi.c2
-rw-r--r--drivers/spi/sandbox_spi.c2
-rw-r--r--drivers/spi/tegra114_spi.c2
-rw-r--r--drivers/spmi/spmi-sandbox.c2
-rw-r--r--drivers/spmi/spmi-uclass.c2
-rw-r--r--drivers/sysreset/sysreset_sandbox.c2
-rw-r--r--drivers/timer/ag101p_timer.c2
-rw-r--r--drivers/timer/altera_timer.c2
-rw-r--r--drivers/timer/ast_timer.c2
-rw-r--r--drivers/timer/atcpit100_timer.c2
-rw-r--r--drivers/timer/omap-timer.c2
-rw-r--r--drivers/timer/rockchip_timer.c2
-rw-r--r--drivers/tpm/tpm_tis_infineon.c2
-rw-r--r--drivers/usb/emul/sandbox_flash.c2
-rw-r--r--drivers/usb/emul/sandbox_hub.c2
-rw-r--r--drivers/usb/emul/sandbox_keyb.c2
-rw-r--r--drivers/usb/emul/usb-emul-uclass.c2
-rw-r--r--drivers/usb/gadget/composite.c5
-rw-r--r--drivers/usb/host/dwc2.c2
-rw-r--r--drivers/usb/host/dwc3-of-simple.c2
-rw-r--r--drivers/usb/host/ehci-atmel.c2
-rw-r--r--drivers/usb/host/ehci-tegra.c2
-rw-r--r--drivers/usb/host/usb-sandbox.c2
-rw-r--r--drivers/usb/host/usb-uclass.c2
-rw-r--r--drivers/usb/host/xhci-dwc3.c25
-rw-r--r--drivers/usb/host/xhci-fsl.c2
-rw-r--r--drivers/usb/host/xhci-mvebu.c2
-rw-r--r--drivers/usb/host/xhci-omap.c2
-rw-r--r--drivers/usb/host/xhci-rockchip.c2
-rw-r--r--drivers/usb/host/xhci-zynqmp.c2
-rw-r--r--drivers/usb/musb-new/Kconfig4
-rw-r--r--[-rwxr-xr-x]drivers/video/anx9804.c0
-rw-r--r--drivers/video/backlight_gpio.c2
-rw-r--r--drivers/video/bridge/anx6345.c2
-rw-r--r--drivers/video/exynos/exynos_dp_lowlevel.c2
-rw-r--r--drivers/video/mx3fb.c2
-rw-r--r--drivers/video/pwm_backlight.c2
-rw-r--r--drivers/video/rockchip/rk3288_mipi.c2
-rw-r--r--drivers/video/rockchip/rk3399_mipi.c2
-rw-r--r--drivers/video/rockchip/rk_edp.c2
-rw-r--r--drivers/video/simple_panel.c2
-rw-r--r--drivers/video/tegra124/display.c2
-rw-r--r--drivers/video/tegra124/dp.c2
-rw-r--r--drivers/video/tegra124/sor.c2
-rw-r--r--drivers/video/video-uclass.c2
-rw-r--r--drivers/watchdog/ast_wdt.c2
-rw-r--r--drivers/watchdog/cdns_wdt.c5
-rw-r--r--drivers/watchdog/mpc8xx_wdt.c2
-rw-r--r--drivers/watchdog/sandbox_wdt.c2
-rw-r--r--drivers/watchdog/ulp_wdog.c2
-rw-r--r--drivers/watchdog/wdt-uclass.c2
-rw-r--r--env/ext4.c2
-rw-r--r--env/fat.c2
-rw-r--r--env/sata.c2
-rw-r--r--include/common.h12
-rw-r--r--include/config_fallbacks.h8
-rw-r--r--include/configs/alt.h74
-rw-r--r--[-rwxr-xr-x]include/configs/blanche.h1
-rw-r--r--include/configs/brppt1.h1
-rw-r--r--include/configs/cl-som-imx7.h1
-rw-r--r--include/configs/cm_fx6.h3
-rw-r--r--include/configs/cm_t335.h2
-rw-r--r--include/configs/controlcenterdc.h1
-rw-r--r--include/configs/da850evm.h1
-rw-r--r--include/configs/devkit8000.h5
-rw-r--r--include/configs/draak.h1
-rw-r--r--include/configs/ea20.h1
-rw-r--r--include/configs/eagle.h1
-rw-r--r--include/configs/firefly-rk3288.h3
-rw-r--r--include/configs/gose.h69
-rw-r--r--include/configs/ids8313.h2
-rw-r--r--include/configs/imx6-engicam.h5
-rw-r--r--include/configs/koelsch.h5
-rw-r--r--include/configs/lager.h68
-rw-r--r--include/configs/legoev3.h1
-rw-r--r--include/configs/ls1012a2g5rdb.h2
-rw-r--r--include/configs/ls1021aiot.h1
-rw-r--r--include/configs/ls1046a_common.h2
-rw-r--r--include/configs/microblaze-generic.h1
-rw-r--r--include/configs/mx7ulp_evk.h1
-rw-r--r--include/configs/omapl138_lcdk.h1
-rw-r--r--include/configs/ot1200.h1
-rw-r--r--include/configs/porter.h3
-rw-r--r--include/configs/qemu-arm.h5
-rw-r--r--include/configs/rk3036_common.h4
-rw-r--r--include/configs/rk3128_common.h3
-rw-r--r--include/configs/rk3188_common.h6
-rw-r--r--include/configs/rk322x_common.h3
-rw-r--r--include/configs/rk3288_common.h4
-rw-r--r--include/configs/rk3328_common.h1
-rw-r--r--include/configs/rut.h2
-rw-r--r--include/configs/rv1108_common.h3
-rw-r--r--include/configs/s32v234evb.h3
-rw-r--r--include/configs/siemens-am33x-common.h1
-rw-r--r--include/configs/silk.h3
-rw-r--r--include/configs/stm32mp1.h1
-rw-r--r--include/configs/stout.h1
-rw-r--r--include/configs/taurus.h1
-rw-r--r--include/configs/ti_armv7_common.h5
-rw-r--r--include/configs/ti_armv7_keystone2.h1
-rw-r--r--include/configs/uniphier.h5
-rw-r--r--include/configs/wb50n.h2
-rw-r--r--include/configs/x86-common.h5
-rw-r--r--include/configs/zynq-common.h11
-rw-r--r--include/efi_api.h1
-rw-r--r--include/efi_loader.h19
-rw-r--r--include/efi_selftest.h2
-rw-r--r--include/log.h2
-rw-r--r--lib/Kconfig34
-rw-r--r--lib/Makefile15
-rw-r--r--lib/efi/efi.c2
-rw-r--r--lib/efi/efi_stub.c2
-rw-r--r--lib/efi_loader/Kconfig2
-rw-r--r--lib/efi_loader/efi_boottime.c4
-rw-r--r--lib/efi_loader/efi_device_path.c124
-rw-r--r--lib/efi_loader/efi_device_path_utilities.c133
-rw-r--r--lib/efi_loader/efi_image_loader.c2
-rw-r--r--lib/efi_loader/efi_net.c2
-rw-r--r--lib/efi_selftest/Makefile1
-rw-r--r--lib/efi_selftest/efi_selftest.c14
-rw-r--r--lib/efi_selftest/efi_selftest_devicepath.c2
-rw-r--r--lib/efi_selftest/efi_selftest_devicepath_util.c286
-rw-r--r--lib/of_live.c2
-rw-r--r--lib/panic.c10
-rw-r--r--lib/rsa/Kconfig8
-rw-r--r--lib/smbios.c2
-rw-r--r--lib/tiny-printf.c21
-rw-r--r--lib/vsprintf.c11
-rw-r--r--net/net.c2
-rw-r--r--post/lib_powerpc/cpu.c2
-rw-r--r--scripts/config_whitelist.txt12
-rw-r--r--test/dm/adc.c2
-rw-r--r--test/dm/eth.c2
-rw-r--r--test/dm/gpio.c2
-rw-r--r--test/dm/led.c2
-rw-r--r--test/dm/mmc.c2
-rw-r--r--test/dm/phy.c2
-rw-r--r--test/dm/pmic.c2
-rw-r--r--test/dm/pwm.c2
-rw-r--r--test/dm/regmap.c4
-rw-r--r--test/dm/regulator.c2
-rw-r--r--test/dm/spmi.c2
-rw-r--r--test/dm/syscon.c2
-rw-r--r--test/dm/timer.c2
-rw-r--r--test/dm/usb.c2
-rw-r--r--test/dm/video.c2
-rw-r--r--tools/mkenvimage.c4
-rw-r--r--tools/mkimage.c2
1146 files changed, 3390 insertions, 1762 deletions
diff --git a/Kconfig b/Kconfig
index 6957097499..37331d289a 100644
--- a/Kconfig
+++ b/Kconfig
@@ -68,17 +68,13 @@ config CC_COVERAGE
config DISTRO_DEFAULTS
bool "Select defaults suitable for booting general purpose Linux distributions"
- default y if ARCH_SUNXI || TEGRA
- default y if ARCH_LS2080A
- default y if ARCH_MESON
- default y if ARCH_ROCKCHIP
- default n
imply USE_BOOTCOMMAND
select CMD_BOOTZ if ARM && !ARM64
select CMD_BOOTI if ARM64
select CMD_DHCP if CMD_NET
select CMD_PING if CMD_NET
select CMD_PXE if NET
+ select CMD_ENV_EXISTS
select CMD_EXT2
select CMD_EXT4
select CMD_FAT
@@ -361,6 +357,16 @@ endif # SPL
endif # FIT
+config IMAGE_FORMAT_LEGACY
+ bool "Enable support for the legacy image format"
+ default y if !FIT_SIGNATURE
+ help
+ This option enables the legacy image format. It is enabled by
+ default for backward compatibility, unless FIT_SIGNATURE is
+ set where it is disabled so that unsigned images cannot be
+ loaded. If a board needs the legacy image format support in this
+ case, enable it here.
+
config OF_BOARD_SETUP
bool "Set up board-specific details in device tree before boot"
depends on OF_LIBFDT
diff --git a/Makefile b/Makefile
index 64351eb769..316944c9d0 100644
--- a/Makefile
+++ b/Makefile
@@ -595,6 +595,9 @@ endif
KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks)
+# change __FILE__ to the relative path from the srctree
+KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
+
KBUILD_CFLAGS += -g
# $(KBUILD_AFLAGS) sets -g, which causes gcc to pass a suitable -g<format>
# option to the assembler.
@@ -610,6 +613,13 @@ endif
endif
KBUILD_CFLAGS += $(call cc-option,-Wno-format-nonliteral)
+ifeq ($(cc-name),clang)
+KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
+KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
+KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
+KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
+KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
+endif
# turn jbsr into jsr for m68k
ifeq ($(ARCH),m68k)
diff --git a/README b/README
index 6f98e09e68..a15a3dd39b 100644
--- a/README
+++ b/README
@@ -2413,19 +2413,6 @@ FIT uImage format:
-150 common/cmd_nand.c Incorrect FIT image format
151 common/cmd_nand.c FIT image format OK
-- legacy image format:
- CONFIG_IMAGE_FORMAT_LEGACY
- enables the legacy image format support in U-Boot.
-
- Default:
- enabled if CONFIG_FIT_SIGNATURE is not defined.
-
- CONFIG_DISABLE_IMAGE_LEGACY
- disable the legacy image format
-
- This define is introduced, as the legacy image format is
- enabled per default for backward compatibility.
-
- Standalone program support:
CONFIG_STANDALONE_LOAD_ADDR
diff --git a/api/api_net.c b/api/api_net.c
index 67c291682a..80658b5bdb 100644
--- a/api/api_net.c
+++ b/api/api_net.c
@@ -12,8 +12,6 @@
#include <linux/types.h>
#include <api_public.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define DEBUG
#undef DEBUG
diff --git a/arch/Kconfig b/arch/Kconfig
index e599e7a39c..dd5a887001 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -75,6 +75,7 @@ config SANDBOX
select DM_GPIO
select DM_MMC
select HAVE_BLOCK_DEVICE
+ select SPI
select LZO
imply CMD_GETTIME
imply CMD_HASH
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7212fc5afa..35fcd24274 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -242,6 +242,16 @@ config SYS_CACHELINE_SIZE
default 64 if SYS_CACHE_SHIFT_6
default 32 if SYS_CACHE_SHIFT_5
+config SYS_ARCH_TIMER
+ bool "ARM Generic Timer support"
+ depends on CPU_V7 || ARM64
+ default y if ARM64
+ help
+ The ARM Generic Timer (aka arch-timer) provides an architected
+ interface to a timer source on an SoC.
+ It is mandantory for ARMv8 implementation and widely available
+ on ARMv7 systems.
+
config ARM_SMCCC
bool "Support for ARM SMC Calling Convention (SMCCC)"
depends on CPU_V7 || ARM64
@@ -379,6 +389,7 @@ config ARCH_MVEBU
select DM_SERIAL
select DM_SPI
select DM_SPI_FLASH
+ select SPI
config TARGET_DEVKIT3250
bool "Support devkit3250"
@@ -434,6 +445,7 @@ config TARGET_STV0991
select DM_SERIAL
select DM_SPI
select DM_SPI_FLASH
+ select SPI
select SPI_FLASH
select PL01X_SERIAL
@@ -540,6 +552,7 @@ config ARCH_EXYNOS
select DM_SPI
select DM_GPIO
select DM_KEYBOARD
+ select SPI
imply FAT_WRITE
config ARCH_S5PC1XX
@@ -567,6 +580,7 @@ config ARCH_KEYSTONE
select SUPPORT_SPL
select SYS_THUMB_BUILD
select CMD_POWEROFF
+ select SYS_ARCH_TIMER
imply CMD_MTDPARTS
imply FIT
imply CMD_SAVES
@@ -581,6 +595,7 @@ config ARCH_OMAP2PLUS
config ARCH_MESON
bool "Amlogic Meson"
+ imply DISTRO_DEFAULTS
help
Support for the Meson SoC family developed by Amlogic Inc.,
targeted at media players and tablet computers. We currently
@@ -720,6 +735,7 @@ config ARCH_SUNXI
select USB_KEYBOARD if DISTRO_DEFAULTS
select USE_TINY_PRINTF
imply CMD_GPT
+ imply DISTRO_DEFAULTS
imply FAT_WRITE
imply OF_LIBFDT_OVERLAY
imply PRE_CONSOLE_BUFFER
@@ -760,6 +776,7 @@ config ARCH_ZYNQ
select CLK
select SPL_CLK if SPL
select CLK_ZYNQ
+ select SPI
imply CMD_CLK
imply FAT_WRITE
imply CMD_SPL
@@ -780,6 +797,7 @@ config ARCH_ZYNQMP
config TEGRA
bool "NVIDIA Tegra"
+ imply DISTRO_DEFAULTS
imply FAT_WRITE
config TARGET_VEXPRESS64_AEMV8A
@@ -1177,7 +1195,9 @@ config ARCH_ROCKCHIP
select DM_PWM
select DM_REGULATOR
select ENABLE_ARM_SOC_BOOT0_HOOK
+ select SPI
imply CMD_FASTBOOT
+ imply DISTRO_DEFAULTS
imply FASTBOOT
imply FAT_WRITE
imply USB_FUNCTION_FASTBOOT
@@ -1185,6 +1205,7 @@ config ARCH_ROCKCHIP
imply TPL_SYSRESET
imply ADC
imply SARADC_ROCKCHIP
+ imply SYS_NS16550
config TARGET_THUNDERX_88XX
bool "Support ThunderX 88xx"
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 9c213b897c..b448ed0b3e 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -23,9 +23,8 @@ PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \
$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
# LLVM support
-LLVMS_RELFLAGS := $(call cc-option,-mllvm,) \
- $(call cc-option,-target arm-none-eabi,) \
- $(call cc-option,-arm-use-movt=0,)
+LLVM_RELFLAGS := $(call cc-option,-mllvm,) \
+ $(call cc-option,-mno-movt,)
PLATFORM_RELFLAGS += $(LLVM_RELFLAGS)
PLATFORM_CPPFLAGS += -D__ARM__
diff --git a/arch/arm/cpu/arm1136/mx31/timer.c b/arch/arm/cpu/arm1136/mx31/timer.c
index 3a81ce427c..ea9eca1dbf 100644
--- a/arch/arm/cpu/arm1136/mx31/timer.c
+++ b/arch/arm/cpu/arm1136/mx31/timer.c
@@ -23,8 +23,6 @@
#define GPTCR_CLKSOURCE_32 (4 << 6) /* Clock source */
#define GPTCR_TEN 1 /* Timer enable */
-DECLARE_GLOBAL_DATA_PTR;
-
/* The 32768Hz 32-bit timer overruns in 131072 seconds */
int timer_init(void)
{
diff --git a/arch/arm/cpu/arm1136/mx35/timer.c b/arch/arm/cpu/arm1136/mx35/timer.c
index 4edf533e2a..c396e15ec0 100644
--- a/arch/arm/cpu/arm1136/mx35/timer.c
+++ b/arch/arm/cpu/arm1136/mx35/timer.c
@@ -12,8 +12,6 @@
#include <asm/arch/imx-regs.h>
#include <asm/arch/crm_regs.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* General purpose timers bitfields */
#define GPTCR_SWR (1<<15) /* Software reset */
#define GPTCR_FRR (1<<9) /* Freerun / restart */
diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile
index 1249547436..d18b38eb9e 100644
--- a/arch/arm/cpu/armv8/Makefile
+++ b/arch/arm/cpu/armv8/Makefile
@@ -9,7 +9,7 @@ extra-y := start.o
obj-y += cpu.o
ifndef CONFIG_$(SPL_TPL_)TIMER
-obj-y += generic_timer.o
+obj-$(CONFIG_SYS_ARCH_TIMER) += generic_timer.o
endif
obj-y += cache_v8.o
obj-y += exceptions.o
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index c4a96d48ba..7edc06d202 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -167,6 +167,7 @@ config ARCH_LS2080A
select SYS_I2C_MXC_I2C2
select SYS_I2C_MXC_I2C3
select SYS_I2C_MXC_I2C4
+ imply DISTRO_DEFAULTS
imply PANIC_HANG
config FSL_LSCH2
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index 18fb937a3a..2fdc0eb8d1 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -26,8 +26,6 @@
#endif
#include <fsl_immap.h>
-DECLARE_GLOBAL_DATA_PTR;
-
bool soc_has_dp_ddr(void)
{
struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
diff --git a/arch/arm/cpu/armv8/s32v234/cpu.c b/arch/arm/cpu/armv8/s32v234/cpu.c
index 5c97e0eee4..282cd02f59 100644
--- a/arch/arm/cpu/armv8/s32v234/cpu.c
+++ b/arch/arm/cpu/armv8/s32v234/cpu.c
@@ -12,8 +12,6 @@
#include <asm/arch/mc_me_regs.h>
#include "cpu.h"
-DECLARE_GLOBAL_DATA_PTR;
-
u32 cpu_mask(void)
{
return readl(MC_ME_CS);
diff --git a/arch/arm/cpu/pxa/timer.c b/arch/arm/cpu/pxa/timer.c
index 7c25e67fea..ba332716e8 100644
--- a/arch/arm/cpu/pxa/timer.c
+++ b/arch/arm/cpu/pxa/timer.c
@@ -9,8 +9,6 @@
#include <common.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int timer_init(void)
{
writel(0, CONFIG_SYS_TIMER_COUNTER);
diff --git a/arch/arm/dts/r8a7790-lager-u-boot.dts b/arch/arm/dts/r8a7790-lager-u-boot.dts
index a3f15777a6..a42d61c450 100644
--- a/arch/arm/dts/r8a7790-lager-u-boot.dts
+++ b/arch/arm/dts/r8a7790-lager-u-boot.dts
@@ -8,3 +8,7 @@
#include "r8a7790-lager.dts"
#include "r8a7790-u-boot.dtsi"
+
+&scif0 {
+ u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/r8a7793-gose-u-boot.dts b/arch/arm/dts/r8a7793-gose-u-boot.dts
index 0c16dde4c7..ed6f391c62 100644
--- a/arch/arm/dts/r8a7793-gose-u-boot.dts
+++ b/arch/arm/dts/r8a7793-gose-u-boot.dts
@@ -8,3 +8,7 @@
#include "r8a7793-gose.dts"
#include "r8a7793-u-boot.dtsi"
+
+&scif0 {
+ u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/r8a7794-alt-u-boot.dts b/arch/arm/dts/r8a7794-alt-u-boot.dts
index 8a14e46a7a..e179335d3a 100644
--- a/arch/arm/dts/r8a7794-alt-u-boot.dts
+++ b/arch/arm/dts/r8a7794-alt-u-boot.dts
@@ -8,3 +8,7 @@
#include "r8a7794-alt.dts"
#include "r8a7794-u-boot.dtsi"
+
+&scif2 {
+ u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/rk3188-radxarock-u-boot.dtsi b/arch/arm/dts/rk3188-radxarock-u-boot.dtsi
new file mode 100644
index 0000000000..26f5707bb8
--- /dev/null
+++ b/arch/arm/dts/rk3188-radxarock-u-boot.dtsi
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+&cru {
+ u-boot,dm-spl;
+};
+
+&pinctrl {
+ u-boot,dm-spl;
+};
+
+&uart2 {
+ status = "okay";
+ u-boot,dm-spl;
+};
+
+&timer3 {
+ compatible = "rockchip,rk3368-timer", "rockchip,rk3288-timer";
+ u-boot,dm-spl;
+ clock-frequency = <24000000>;
+};
diff --git a/arch/arm/dts/rk3188-radxarock.dts b/arch/arm/dts/rk3188-radxarock.dts
index 5f5b5e9a1f..0fc4f54af2 100644
--- a/arch/arm/dts/rk3188-radxarock.dts
+++ b/arch/arm/dts/rk3188-radxarock.dts
@@ -7,6 +7,7 @@
/dts-v1/;
#include <dt-bindings/input/input.h>
#include "rk3188.dtsi"
+#include "rk3188-radxarock-u-boot.dtsi"
/ {
model = "Radxa Rock";
@@ -356,11 +357,6 @@
status = "okay";
};
-&uart2 {
- status = "okay";
- u-boot,dm-spl;
-};
-
&uart3 {
status = "okay";
};
diff --git a/arch/arm/dts/rk3188.dtsi b/arch/arm/dts/rk3188.dtsi
index f4d438eb66..aeb5b80e14 100644
--- a/arch/arm/dts/rk3188.dtsi
+++ b/arch/arm/dts/rk3188.dtsi
@@ -105,7 +105,6 @@
compatible = "rockchip,rk3188-cru";
reg = <0x20000000 0x1000>;
rockchip,grf = <&grf>;
- u-boot,dm-spl;
#clock-cells = <1>;
#reset-cells = <1>;
@@ -124,6 +123,12 @@
};
};
+ timer3: timer@2000e000 {
+ compatible = "rockchip,rk3188-timer", "rockchip,rk3288-timer";
+ reg = <0x2000e000 0x20>;
+ interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
usbphy: phy {
compatible = "rockchip,rk3188-usb-phy", "rockchip,rk3288-usb-phy";
rockchip,grf = <&grf>;
@@ -156,7 +161,6 @@
#address-cells = <1>;
#size-cells = <1>;
ranges;
- u-boot,dm-spl;
gpio0: gpio0@2000a000 {
compatible = "rockchip,gpio-bank";
diff --git a/arch/arm/dts/uniphier-v7-u-boot.dtsi b/arch/arm/dts/uniphier-v7-u-boot.dtsi
index 0094a455d2..9459bf0377 100644
--- a/arch/arm/dts/uniphier-v7-u-boot.dtsi
+++ b/arch/arm/dts/uniphier-v7-u-boot.dtsi
@@ -14,22 +14,6 @@
u-boot,dm-pre-reloc;
};
- mioctrl@59810000 {
- u-boot,dm-pre-reloc;
-
- clock {
- u-boot,dm-pre-reloc;
- };
- };
-
- sdctrl@59810000 {
- u-boot,dm-pre-reloc;
-
- clock {
- u-boot,dm-pre-reloc;
- };
- };
-
soc-glue@5f800000 {
u-boot,dm-pre-reloc;
diff --git a/arch/arm/include/asm/arch-omap4/sys_proto.h b/arch/arm/include/asm/arch-omap4/sys_proto.h
index c9f0b3a14b..c8298c57e1 100644
--- a/arch/arm/include/asm/arch-omap4/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap4/sys_proto.h
@@ -16,8 +16,6 @@
#include <asm/arch/mux_omap4.h>
#include <asm/ti-common/sys_proto.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
extern const struct emif_regs emif_regs_elpida_200_mhz_2cs;
extern const struct emif_regs emif_regs_elpida_380_mhz_1cs;
diff --git a/arch/arm/include/asm/arch-omap5/sys_proto.h b/arch/arm/include/asm/arch-omap5/sys_proto.h
index d43cd7f2e7..e99bf77e83 100644
--- a/arch/arm/include/asm/arch-omap5/sys_proto.h
+++ b/arch/arm/include/asm/arch-omap5/sys_proto.h
@@ -16,8 +16,6 @@
#include <asm/arch/clock.h>
#include <asm/ti-common/sys_proto.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Structure for Iodelay configuration registers.
* Theoretical max for g_delay is 21560 ps.
diff --git a/arch/arm/lib/cmd_boot.c b/arch/arm/lib/cmd_boot.c
index 37bb6a567e..781a6eaf52 100644
--- a/arch/arm/lib/cmd_boot.c
+++ b/arch/arm/lib/cmd_boot.c
@@ -21,8 +21,6 @@
#include <common.h>
#include <command.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* ARMv7M does not support ARM instruction mode. However, the
* interworking BLX and BX instructions do encode the ARM/Thumb
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 3621dfa760..1a6ed211e5 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -88,6 +88,7 @@ config TARGET_GURNARD
select DM_SPI
select DM_GPIO
select DM_ETH
+ select SPI
config TARGET_AT91SAM9261EK
bool "Atmel at91sam9261 reference board"
@@ -202,6 +203,7 @@ config TARGET_MA5D4EVK
select SUPPORT_SPL
select DM
select DM_SPI
+ select SPI
config TARGET_MEESC
bool "Support meesc"
@@ -225,6 +227,7 @@ config TARGET_TAURUS
select DM_SPI
select DM_GPIO
select DM_ETH
+ select SPI
config TARGET_SMARTWEB
bool "Support smartweb"
@@ -241,6 +244,7 @@ config TARGET_VINCO
select SUPPORT_SPL
select DM
select DM_SPI
+ select SPI
config TARGET_WB45N
bool "Support Laird WB45N"
diff --git a/arch/arm/mach-at91/spl_atmel.c b/arch/arm/mach-at91/spl_atmel.c
index ce16ef3bdb..ae008d5501 100644
--- a/arch/arm/mach-at91/spl_atmel.c
+++ b/arch/arm/mach-at91/spl_atmel.c
@@ -15,8 +15,6 @@
#include <asm/arch/clk.h>
#include <spl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static void switch_to_main_crystal_osc(void)
{
struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
diff --git a/arch/arm/mach-davinci/spl.c b/arch/arm/mach-davinci/spl.c
index 4c74db9ed0..f455316002 100644
--- a/arch/arm/mach-davinci/spl.c
+++ b/arch/arm/mach-davinci/spl.c
@@ -16,8 +16,6 @@
#include <spi_flash.h>
#include <mmc.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_SPL_LIBCOMMON_SUPPORT
void puts(const char *str)
{
diff --git a/arch/arm/mach-exynos/clock_init_exynos5.c b/arch/arm/mach-exynos/clock_init_exynos5.c
index 1b7498d9d5..2c55e4031f 100644
--- a/arch/arm/mach-exynos/clock_init_exynos5.c
+++ b/arch/arm/mach-exynos/clock_init_exynos5.c
@@ -21,8 +21,6 @@
#define FSYS1_MMC0_DIV_MASK 0xff0f
#define FSYS1_MMC0_DIV_VAL 0x0701
-DECLARE_GLOBAL_DATA_PTR;
-
struct arm_clk_ratios arm_clk_ratios[] = {
#ifdef CONFIG_EXYNOS5420
{
diff --git a/arch/arm/mach-exynos/mmu-arm64.c b/arch/arm/mach-exynos/mmu-arm64.c
index 23814222d8..e0dd94ce24 100644
--- a/arch/arm/mach-exynos/mmu-arm64.c
+++ b/arch/arm/mach-exynos/mmu-arm64.c
@@ -8,8 +8,6 @@
#include <common.h>
#include <asm/armv8/mmu.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_EXYNOS7420
static struct mm_region exynos7420_mem_map[] = {
{
diff --git a/arch/arm/mach-imx/cmd_dek.c b/arch/arm/mach-imx/cmd_dek.c
index ada8adf2f4..62cd56e096 100644
--- a/arch/arm/mach-imx/cmd_dek.c
+++ b/arch/arm/mach-imx/cmd_dek.c
@@ -16,8 +16,6 @@
#include <asm/arch/clock.h>
#include <mapmem.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* blob_dek() - Encapsulate the DEK as a blob using CAM's Key
* @src: - Address of data to be encapsulated
diff --git a/arch/arm/mach-imx/mx7ulp/Kconfig b/arch/arm/mach-imx/mx7ulp/Kconfig
index 1bdc85a9a0..d4b0299dbd 100644
--- a/arch/arm/mach-imx/mx7ulp/Kconfig
+++ b/arch/arm/mach-imx/mx7ulp/Kconfig
@@ -9,6 +9,7 @@ choice
config TARGET_MX7ULP_EVK
bool "Support mx7ulp EVK board"
+ select SYS_ARCH_TIMER
endchoice
diff --git a/arch/arm/mach-imx/mx7ulp/pcc.c b/arch/arm/mach-imx/mx7ulp/pcc.c
index edd84e51b9..1d39c5b1ee 100644
--- a/arch/arm/mach-imx/mx7ulp/pcc.c
+++ b/arch/arm/mach-imx/mx7ulp/pcc.c
@@ -12,8 +12,6 @@
#include <asm/arch/pcc.h>
#include <asm/arch/sys_proto.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define PCC_CLKSRC_TYPES 2
#define PCC_CLKSRC_NUM 7
diff --git a/arch/arm/mach-imx/mx7ulp/scg.c b/arch/arm/mach-imx/mx7ulp/scg.c
index c117af0a0e..341f8cc119 100644
--- a/arch/arm/mach-imx/mx7ulp/scg.c
+++ b/arch/arm/mach-imx/mx7ulp/scg.c
@@ -12,8 +12,6 @@
#include <asm/arch/pcc.h>
#include <asm/arch/sys_proto.h>
-DECLARE_GLOBAL_DATA_PTR;
-
scg_p scg1_regs = (scg_p)SCG1_RBASE;
static u32 scg_src_get_rate(enum scg_clk clksrc)
diff --git a/arch/arm/mach-imx/mx8m/clock.c b/arch/arm/mach-imx/mx8m/clock.c
index c56ba99d5c..0481117343 100644
--- a/arch/arm/mach-imx/mx8m/clock.c
+++ b/arch/arm/mach-imx/mx8m/clock.c
@@ -14,8 +14,6 @@
#include <errno.h>
#include <linux/iopoll.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static struct anamix_pll *ana_pll = (struct anamix_pll *)ANATOP_BASE_ADDR;
static u32 decode_frac_pll(enum clk_root_src frac_pll)
diff --git a/arch/arm/mach-imx/mx8m/clock_slice.c b/arch/arm/mach-imx/mx8m/clock_slice.c
index e734498b94..b851d59c13 100644
--- a/arch/arm/mach-imx/mx8m/clock_slice.c
+++ b/arch/arm/mach-imx/mx8m/clock_slice.c
@@ -12,8 +12,6 @@
#include <asm/io.h>
#include <errno.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static struct ccm_reg *ccm_reg = (struct ccm_reg *)CCM_BASE_ADDR;
static struct clk_root_map root_array[] = {
diff --git a/arch/arm/mach-imx/timer.c b/arch/arm/mach-imx/timer.c
index 69dbf3c2ce..60f706fbe3 100644
--- a/arch/arm/mach-imx/timer.c
+++ b/arch/arm/mach-imx/timer.c
@@ -38,8 +38,6 @@ static struct mxc_gpt *cur_gpt = (struct mxc_gpt *)GPT1_BASE_ADDR;
#define GPTPR_PRESCALER24M_SHIFT 12
#define GPTPR_PRESCALER24M_MASK (0xF << GPTPR_PRESCALER24M_SHIFT)
-DECLARE_GLOBAL_DATA_PTR;
-
static inline int gpt_has_clk_source_osc(void)
{
#if defined(CONFIG_MX6)
diff --git a/arch/arm/mach-mvebu/armada3700/cpu.c b/arch/arm/mach-mvebu/armada3700/cpu.c
index ab4164cbe0..37ef13484c 100644
--- a/arch/arm/mach-mvebu/armada3700/cpu.c
+++ b/arch/arm/mach-mvebu/armada3700/cpu.c
@@ -14,8 +14,6 @@
#include <asm/arch/soc.h>
#include <asm/armv8/mmu.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Armada 3700 */
#define MVEBU_GPIO_NB_REG_BASE (MVEBU_REGISTER(0x13800))
diff --git a/arch/arm/mach-mvebu/armada8k/cpu.c b/arch/arm/mach-mvebu/armada8k/cpu.c
index ce7e913b70..2b3419be03 100644
--- a/arch/arm/mach-mvebu/armada8k/cpu.c
+++ b/arch/arm/mach-mvebu/armada8k/cpu.c
@@ -14,8 +14,6 @@
#include <asm/arch/soc.h>
#include <asm/armv8/mmu.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Armada 7k/8k */
#define MVEBU_RFU_BASE (MVEBU_REGISTER(0x6f0000))
#define RFU_GLOBAL_SW_RST (MVEBU_RFU_BASE + 0x84)
diff --git a/arch/arm/mach-mvebu/sata.c b/arch/arm/mach-mvebu/sata.c
index 5d8032bd89..526c4a61ef 100644
--- a/arch/arm/mach-mvebu/sata.c
+++ b/arch/arm/mach-mvebu/sata.c
@@ -8,8 +8,6 @@
#include <ahci.h>
#include <dm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Dummy implementation that can be overwritten by a board
* specific function
diff --git a/arch/arm/mach-mvebu/timer.c b/arch/arm/mach-mvebu/timer.c
index f5c2eaa808..a86128e871 100644
--- a/arch/arm/mach-mvebu/timer.c
+++ b/arch/arm/mach-mvebu/timer.c
@@ -11,8 +11,6 @@
#include <asm/io.h>
#include <asm/arch/soc.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define TIMER_LOAD_VAL 0xffffffff
static int init_done __attribute__((section(".data"))) = 0;
diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index db68a9d7e2..f9ab5da723 100644
--- a/arch/arm/mach-omap2/boot-common.c
+++ b/arch/arm/mach-omap2/boot-common.c
@@ -196,9 +196,10 @@ u32 spl_boot_mode(const u32 boot_device)
void spl_board_init(void)
{
+#ifdef CONFIG_SPL_SERIAL_SUPPORT
/* Prepare console output */
preloader_console_init();
-
+#endif
#if defined(CONFIG_SPL_NAND_SUPPORT) || defined(CONFIG_SPL_ONENAND_SUPPORT)
gpmc_init();
#endif
diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
index a61b933145..b4c9af1290 100644
--- a/arch/arm/mach-omap2/omap3/board.c
+++ b/arch/arm/mach-omap2/omap3/board.c
@@ -28,8 +28,6 @@
#include <asm/omap_common.h>
#include <linux/compiler.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Declarations */
extern omap3_sysinfo sysinfo;
#ifndef CONFIG_SYS_L2CACHE_OFF
diff --git a/arch/arm/mach-omap2/omap4/hwinit.c b/arch/arm/mach-omap2/omap4/hwinit.c
index 67ab1ccd75..4bda162903 100644
--- a/arch/arm/mach-omap2/omap4/hwinit.c
+++ b/arch/arm/mach-omap2/omap4/hwinit.c
@@ -21,8 +21,6 @@
#include <asm/arch/gpio.h>
#include <asm/omap_common.h>
-DECLARE_GLOBAL_DATA_PTR;
-
u32 *const omap_si_rev = (u32 *)OMAP_SRAM_SCRATCH_OMAP_REV;
static const struct gpio_bank gpio_bank_44xx[6] = {
diff --git a/arch/arm/mach-omap2/omap5/hwinit.c b/arch/arm/mach-omap2/omap5/hwinit.c
index 57f2a8664c..e7a3f57b67 100644
--- a/arch/arm/mach-omap2/omap5/hwinit.c
+++ b/arch/arm/mach-omap2/omap5/hwinit.c
@@ -24,8 +24,6 @@
#include <asm/emif.h>
#include <asm/omap_common.h>
-DECLARE_GLOBAL_DATA_PTR;
-
u32 *const omap_si_rev = (u32 *)OMAP_SRAM_SCRATCH_OMAP_REV;
#ifndef CONFIG_DM_GPIO
diff --git a/arch/arm/mach-qemu/Kconfig b/arch/arm/mach-qemu/Kconfig
index 133163aecf..226dfa362f 100644
--- a/arch/arm/mach-qemu/Kconfig
+++ b/arch/arm/mach-qemu/Kconfig
@@ -16,6 +16,7 @@ config TARGET_QEMU_ARM_32BIT
depends on ARCH_QEMU
select CPU_V7
select ARCH_SUPPORT_PSCI
+ select SYS_ARCH_TIMER
config TARGET_QEMU_ARM_64BIT
bool "Support qemu_arm64"
diff --git a/arch/arm/mach-rmobile/Kconfig.32 b/arch/arm/mach-rmobile/Kconfig.32
index a8835f6571..84c1a6d07b 100644
--- a/arch/arm/mach-rmobile/Kconfig.32
+++ b/arch/arm/mach-rmobile/Kconfig.32
@@ -42,6 +42,9 @@ config TARGET_GOSE
bool "Gose board"
select DM
select DM_SERIAL
+ select SUPPORT_SPL
+ select USE_TINY_PRINTF
+ select SPL_TINY_MEMSET
config TARGET_KOELSCH
bool "Koelsch board"
@@ -55,6 +58,9 @@ config TARGET_LAGER
bool "Lager board"
select DM
select DM_SERIAL
+ select SUPPORT_SPL
+ select USE_TINY_PRINTF
+ select SPL_TINY_MEMSET
config TARGET_KZM9G
bool "KZM9D board"
@@ -63,6 +69,9 @@ config TARGET_ALT
bool "Alt board"
select DM
select DM_SERIAL
+ select SUPPORT_SPL
+ select USE_TINY_PRINTF
+ select SPL_TINY_MEMSET
config TARGET_SILK
bool "Silk board"
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index 0adaed4367..007cb22a34 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -103,7 +103,6 @@ config ROCKCHIP_RK3368
imply SPL_SERIAL_SUPPORT
imply TPL_SERIAL_SUPPORT
select DEBUG_UART_BOARD_INIT
- select SYS_NS16550
help
The Rockchip RK3368 is a ARM-based SoC with a octa-core (organised
into a big and little cluster with 4 cores each) Cortex-A53 including
diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile
index e1b0519b1f..096dbac25b 100644
--- a/arch/arm/mach-rockchip/Makefile
+++ b/arch/arm/mach-rockchip/Makefile
@@ -40,8 +40,10 @@ endif
obj-$(CONFIG_$(SPL_TPL_)RAM) += sdram_common.o
ifndef CONFIG_ARM64
+ifndef CONFIG_ROCKCHIP_RK3188
obj-y += rk_timer.o
endif
+endif
obj-$(CONFIG_ROCKCHIP_RK3036) += rk3036/
obj-$(CONFIG_ROCKCHIP_RK3128) += rk3128/
diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py
index 7c6dd57678..9a404d1d32 100755
--- a/arch/arm/mach-rockchip/make_fit_atf.py
+++ b/arch/arm/mach-rockchip/make_fit_atf.py
@@ -13,8 +13,6 @@ import getopt
# pip install pyelftools
from elftools.elf.elffile import ELFFile
-from elftools.elf.sections import SymbolTableSection
-from elftools.elf.segments import Segment, InterpSegment, NoteSegment
ELF_SEG_P_TYPE='p_type'
ELF_SEG_P_PADDR='p_paddr'
diff --git a/arch/arm/mach-rockchip/rk3036-board-spl.c b/arch/arm/mach-rockchip/rk3036-board-spl.c
index 550e3a1521..4501cd17e3 100644
--- a/arch/arm/mach-rockchip/rk3036-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3036-board-spl.c
@@ -14,8 +14,6 @@
#include <asm/arch/timer.h>
#include <asm/arch/uart.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define GRF_BASE 0x20008000
#define DEBUG_UART_BASE 0x20068000
diff --git a/arch/arm/mach-rockchip/rk3188-board-spl.c b/arch/arm/mach-rockchip/rk3188-board-spl.c
index 74771d3a0b..3ccc4f1205 100644
--- a/arch/arm/mach-rockchip/rk3188-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3188-board-spl.c
@@ -131,8 +131,6 @@ void board_init_f(ulong dummy)
hang();
}
- rockchip_timer_init();
-
ret = rockchip_get_clk(&dev);
if (ret) {
debug("CLK init failed: %d\n", ret);
diff --git a/arch/arm/mach-rockchip/rk3188-board.c b/arch/arm/mach-rockchip/rk3188-board.c
index 916d18fc32..9005705db1 100644
--- a/arch/arm/mach-rockchip/rk3188-board.c
+++ b/arch/arm/mach-rockchip/rk3188-board.c
@@ -18,8 +18,6 @@
#include <asm/gpio.h>
#include <dm/pinctrl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int board_late_init(void)
{
struct rk3188_grf *grf;
diff --git a/arch/arm/mach-rockchip/rk322x-board-spl.c b/arch/arm/mach-rockchip/rk322x-board-spl.c
index 206abfafcd..4d8e8bdeb2 100644
--- a/arch/arm/mach-rockchip/rk322x-board-spl.c
+++ b/arch/arm/mach-rockchip/rk322x-board-spl.c
@@ -21,8 +21,6 @@ u32 spl_boot_device(void)
{
return BOOT_DEVICE_MMC1;
}
-DECLARE_GLOBAL_DATA_PTR;
-
#define GRF_BASE 0x11000000
#define SGRF_BASE 0x10140000
@@ -95,7 +93,7 @@ void board_init_f(ulong dummy)
/* Disable the ddr secure region setting to make it non-secure */
rk_clrreg(SGRF_DDR_CON0, 0x4000);
-#if defined(CONFIG_ROCKCHIP_SPL_BACK_TO_BROM) && !defined(CONFIG_SPL_BOARD_INIT)
+#if defined(CONFIG_SPL_ROCKCHIP_BACK_TO_BROM) && !defined(CONFIG_SPL_BOARD_INIT)
back_to_bootrom(BROM_BOOT_NEXTSTAGE);
#endif
}
diff --git a/arch/arm/mach-rockchip/rk3288-board-tpl.c b/arch/arm/mach-rockchip/rk3288-board-tpl.c
index 150beea02e..6f7097dbdb 100644
--- a/arch/arm/mach-rockchip/rk3288-board-tpl.c
+++ b/arch/arm/mach-rockchip/rk3288-board-tpl.c
@@ -19,8 +19,6 @@
#include <asm/arch/sys_proto.h>
#include <asm/arch/timer.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define GRF_BASE 0xff770000
void board_init_f(ulong dummy)
{
diff --git a/arch/arm/mach-rockchip/rk3368-board-spl.c b/arch/arm/mach-rockchip/rk3368-board-spl.c
index 8055ae538f..a1d504bbd2 100644
--- a/arch/arm/mach-rockchip/rk3368-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3368-board-spl.c
@@ -17,8 +17,6 @@
#include <asm/arch/periph.h>
#include <asm/arch/timer.h>
-DECLARE_GLOBAL_DATA_PTR;
-
void board_debug_uart_init(void)
{
}
diff --git a/arch/arm/mach-rockchip/rk3368-board-tpl.c b/arch/arm/mach-rockchip/rk3368-board-tpl.c
index 60d5aeade9..f5bc0d4cd5 100644
--- a/arch/arm/mach-rockchip/rk3368-board-tpl.c
+++ b/arch/arm/mach-rockchip/rk3368-board-tpl.c
@@ -18,8 +18,6 @@
#include <asm/arch/timer.h>
#include <syscon.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* The SPL (and also the full U-Boot stage on the RK3368) will run in
* secure mode (i.e. EL3) and an ATF will eventually be booted before
diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c
index d35990efd6..4eb7f01c15 100644
--- a/arch/arm/mach-rockchip/rk3399-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3399-board-spl.c
@@ -19,8 +19,6 @@
#include <spl.h>
#include <syscon.h>
-DECLARE_GLOBAL_DATA_PTR;
-
void board_return_to_bootrom(void)
{
back_to_bootrom(BROM_BOOT_NEXTSTAGE);
diff --git a/arch/arm/mach-socfpga/clock_manager_arria10.c b/arch/arm/mach-socfpga/clock_manager_arria10.c
index 623a266f80..4bc4acb9bf 100644
--- a/arch/arm/mach-socfpga/clock_manager_arria10.c
+++ b/arch/arm/mach-socfpga/clock_manager_arria10.c
@@ -10,8 +10,6 @@
#include <dm.h>
#include <asm/arch/clock_manager.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static u32 eosc1_hz;
static u32 cb_intosc_hz;
static u32 f2s_free_hz;
diff --git a/arch/arm/mach-socfpga/clock_manager_gen5.c b/arch/arm/mach-socfpga/clock_manager_gen5.c
index 4e5b6d1693..1b3914ba7d 100644
--- a/arch/arm/mach-socfpga/clock_manager_gen5.c
+++ b/arch/arm/mach-socfpga/clock_manager_gen5.c
@@ -10,8 +10,6 @@
#include <asm/arch/clock_manager.h>
#include <wait_bit.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct socfpga_clock_manager *clock_manager_base =
(struct socfpga_clock_manager *)SOCFPGA_CLKMGR_ADDRESS;
diff --git a/arch/arm/mach-socfpga/fpga_manager.c b/arch/arm/mach-socfpga/fpga_manager.c
index f9095739b0..16e4a7821b 100644
--- a/arch/arm/mach-socfpga/fpga_manager.c
+++ b/arch/arm/mach-socfpga/fpga_manager.c
@@ -15,8 +15,6 @@
#include <asm/arch/reset_manager.h>
#include <asm/arch/system_manager.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Timeout count */
#define FPGA_TIMEOUT_CNT 0x1000000
diff --git a/arch/arm/mach-socfpga/freeze_controller.c b/arch/arm/mach-socfpga/freeze_controller.c
index 71d5d99e9c..62fa854082 100644
--- a/arch/arm/mach-socfpga/freeze_controller.c
+++ b/arch/arm/mach-socfpga/freeze_controller.c
@@ -11,8 +11,6 @@
#include <asm/arch/freeze_controller.h>
#include <linux/errno.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct socfpga_freeze_controller *freeze_controller_base =
(void *)(SOCFPGA_SYSMGR_ADDRESS + SYSMGR_FRZCTRL_ADDRESS);
diff --git a/arch/arm/mach-socfpga/misc_arria10.c b/arch/arm/mach-socfpga/misc_arria10.c
index 9d751f6b2f..475fd59a45 100644
--- a/arch/arm/mach-socfpga/misc_arria10.c
+++ b/arch/arm/mach-socfpga/misc_arria10.c
@@ -28,8 +28,6 @@
#define PINMUX_UART1_TX_SHARED_IO_OFFSET_Q3_7 0x78
#define PINMUX_UART1_TX_SHARED_IO_OFFSET_Q4_3 0x98
-DECLARE_GLOBAL_DATA_PTR;
-
#if defined(CONFIG_SPL_BUILD)
static struct pl310_regs *const pl310 =
(struct pl310_regs *)CONFIG_SYS_PL310_BASE;
diff --git a/arch/arm/mach-socfpga/reset_manager.c b/arch/arm/mach-socfpga/reset_manager.c
index 29438ed533..484b295cd3 100644
--- a/arch/arm/mach-socfpga/reset_manager.c
+++ b/arch/arm/mach-socfpga/reset_manager.c
@@ -9,8 +9,6 @@
#include <asm/io.h>
#include <asm/arch/reset_manager.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct socfpga_reset_manager *reset_manager_base =
(void *)SOCFPGA_RSTMGR_ADDRESS;
diff --git a/arch/arm/mach-socfpga/reset_manager_gen5.c b/arch/arm/mach-socfpga/reset_manager_gen5.c
index aa88adb414..c59127456c 100644
--- a/arch/arm/mach-socfpga/reset_manager_gen5.c
+++ b/arch/arm/mach-socfpga/reset_manager_gen5.c
@@ -11,8 +11,6 @@
#include <asm/arch/reset_manager.h>
#include <asm/arch/system_manager.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct socfpga_reset_manager *reset_manager_base =
(void *)SOCFPGA_RSTMGR_ADDRESS;
static const struct socfpga_system_manager *sysmgr_regs =
diff --git a/arch/arm/mach-socfpga/scan_manager.c b/arch/arm/mach-socfpga/scan_manager.c
index 566b33f2b6..8b271b1f45 100644
--- a/arch/arm/mach-socfpga/scan_manager.c
+++ b/arch/arm/mach-socfpga/scan_manager.c
@@ -28,8 +28,6 @@
#define SCANMGR_STAT_ACTIVE (1 << 31)
#define SCANMGR_STAT_WFIFOCNT_MASK 0x70000000
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct socfpga_scan_manager *scan_manager_base =
(void *)(SOCFPGA_SCANMGR_ADDRESS);
static const struct socfpga_freeze_controller *freeze_controller_base =
diff --git a/arch/arm/mach-socfpga/system_manager_gen5.c b/arch/arm/mach-socfpga/system_manager_gen5.c
index 3588a570a7..e0af7753b0 100644
--- a/arch/arm/mach-socfpga/system_manager_gen5.c
+++ b/arch/arm/mach-socfpga/system_manager_gen5.c
@@ -9,8 +9,6 @@
#include <asm/arch/system_manager.h>
#include <asm/arch/fpga_manager.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static struct socfpga_system_manager *sysmgr_regs =
(struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS;
diff --git a/arch/arm/mach-stm32mp/Kconfig b/arch/arm/mach-stm32mp/Kconfig
index 8ca97bf0c9..4d59480c19 100644
--- a/arch/arm/mach-stm32mp/Kconfig
+++ b/arch/arm/mach-stm32mp/Kconfig
@@ -27,6 +27,7 @@ config TARGET_STM32MP1
select CPU_V7
select PINCTRL_STM32
select STM32_RESET
+ select SYS_ARCH_TIMER
select SYSRESET_SYSCON
help
target STMicroelectronics SOC STM32MP1 family
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 1753faec1d..ac456ca0c6 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -209,7 +209,6 @@ void s_init(void)
}
#ifdef CONFIG_SPL_BUILD
-DECLARE_GLOBAL_DATA_PTR;
#endif
/* The sunxi internal brom will try to loader external bootloader
diff --git a/arch/arm/mach-sunxi/dram_sun9i.c b/arch/arm/mach-sunxi/dram_sun9i.c
index 8c681f3541..e7d423f861 100644
--- a/arch/arm/mach-sunxi/dram_sun9i.c
+++ b/arch/arm/mach-sunxi/dram_sun9i.c
@@ -20,8 +20,6 @@
#include <asm/arch/dram.h>
#include <asm/arch/sys_proto.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define DRAM_CLK (CONFIG_DRAM_CLK * 1000000)
/*
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index fd0082d22a..5fa3e6b6ad 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -35,6 +35,7 @@ config TEGRA_COMMON
select DM_SPI
select DM_SPI_FLASH
select MISC
+ select SPI
select OF_CONTROL
select VIDCONSOLE_AS_LCD if DM_VIDEO
select BOARD_EARLY_INIT_F
diff --git a/arch/arm/mach-tegra/board186.c b/arch/arm/mach-tegra/board186.c
index 691c3fd98d..9e95123c55 100644
--- a/arch/arm/mach-tegra/board186.c
+++ b/arch/arm/mach-tegra/board186.c
@@ -7,8 +7,6 @@
#include <common.h>
#include <asm/arch/tegra.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int board_early_init_f(void)
{
return 0;
diff --git a/arch/arm/mach-tegra/tegra186/nvtboot_board.c b/arch/arm/mach-tegra/tegra186/nvtboot_board.c
index 8ecb454443..bef3ce8fc8 100644
--- a/arch/arm/mach-tegra/tegra186/nvtboot_board.c
+++ b/arch/arm/mach-tegra/tegra186/nvtboot_board.c
@@ -11,8 +11,6 @@
#include <asm/arch/tegra.h>
#include <asm/armv8/mmu.h>
-DECLARE_GLOBAL_DATA_PTR;
-
extern unsigned long nvtboot_boot_x0;
/*
diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
index 87729047f9..1352359438 100644
--- a/arch/arm/mach-zynq/Kconfig
+++ b/arch/arm/mach-zynq/Kconfig
@@ -36,6 +36,7 @@ config ZYNQ_DDRC_INIT
want to skip ddr init and this option is useful for it.
config SYS_BOARD
+ string "Board name"
default "zynq"
config SYS_VENDOR
diff --git a/arch/arm/mach-zynq/ddrc.c b/arch/arm/mach-zynq/ddrc.c
index 047a7b4d9c..795e2bd003 100644
--- a/arch/arm/mach-zynq/ddrc.c
+++ b/arch/arm/mach-zynq/ddrc.c
@@ -10,8 +10,6 @@
#include <asm/arch/sys_proto.h>
#include <asm/arch/hardware.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_ZYNQ_DDRC_INIT
void zynq_ddrc_init(void) {}
#else
diff --git a/arch/arm/mach-zynq/include/mach/nand.h b/arch/arm/mach-zynq/include/mach/nand.h
deleted file mode 100644
index 61ef45f582..0000000000
--- a/arch/arm/mach-zynq/include/mach/nand.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Copyright (C) 2017 National Instruments Corp.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include <nand.h>
-
-void zynq_nand_init(void);
diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c
index 0a303f41eb..d1e61aab11 100644
--- a/arch/arm/mach-zynq/spl.c
+++ b/arch/arm/mach-zynq/spl.c
@@ -13,8 +13,6 @@
#include <asm/arch/sys_proto.h>
#include <asm/arch/ps7_init_gpl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
void board_init_f(ulong dummy)
{
ps7_init();
diff --git a/arch/microblaze/cpu/spl.c b/arch/microblaze/cpu/spl.c
index 3d57a5a859..3407e36c5c 100644
--- a/arch/microblaze/cpu/spl.c
+++ b/arch/microblaze/cpu/spl.c
@@ -12,8 +12,6 @@
#include <asm/io.h>
#include <asm/u-boot.h>
-DECLARE_GLOBAL_DATA_PTR;
-
bool boot_linux;
u32 spl_boot_device(void)
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 154671d480..0be72f5433 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -15,8 +15,6 @@
#include <u-boot/zlib.h>
#include <asm/byteorder.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int do_bootm_linux(int flag, int argc, char * const argv[],
bootm_headers_t *images)
{
diff --git a/arch/mips/mach-ath79/ar933x/ddr.c b/arch/mips/mach-ath79/ar933x/ddr.c
index 2a25e23869..eeaf4aec4d 100644
--- a/arch/mips/mach-ath79/ar933x/ddr.c
+++ b/arch/mips/mach-ath79/ar933x/ddr.c
@@ -12,8 +12,6 @@
#include <mach/ar71xx_regs.h>
#include <mach/ath79.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define DDR_CTRL_UPD_EMR3S BIT(5)
#define DDR_CTRL_UPD_EMR2S BIT(4)
#define DDR_CTRL_PRECHARGE BIT(3)
diff --git a/arch/mips/mach-ath79/qca953x/ddr.c b/arch/mips/mach-ath79/qca953x/ddr.c
index c6049d8958..92d591c2a6 100644
--- a/arch/mips/mach-ath79/qca953x/ddr.c
+++ b/arch/mips/mach-ath79/qca953x/ddr.c
@@ -12,8 +12,6 @@
#include <mach/ar71xx_regs.h>
#include <mach/ath79.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define DDR_CTRL_UPD_EMR3S BIT(5)
#define DDR_CTRL_UPD_EMR2S BIT(4)
#define DDR_CTRL_PRECHARGE BIT(3)
diff --git a/arch/nds32/lib/boot.c b/arch/nds32/lib/boot.c
index f9c1c6b3ff..1313506ed5 100644
--- a/arch/nds32/lib/boot.c
+++ b/arch/nds32/lib/boot.c
@@ -9,8 +9,6 @@
#include <common.h>
#include <command.h>
-DECLARE_GLOBAL_DATA_PTR;
-
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
int argc, char * const argv[])
{
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index b350bfeb06..99abb6786c 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -54,8 +54,6 @@
#include <fsl_qe.h>
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_SYS_FSL_SINGLE_SOURCE_CLK
/*
* For deriving usb clock from 100MHz sysclk, reference divisor is set
diff --git a/arch/powerpc/cpu/mpc86xx/fdt.c b/arch/powerpc/cpu/mpc86xx/fdt.c
index 948ad8fa1c..4bd36b6886 100644
--- a/arch/powerpc/cpu/mpc86xx/fdt.c
+++ b/arch/powerpc/cpu/mpc86xx/fdt.c
@@ -9,8 +9,6 @@
#include <fdt_support.h>
#include <asm/mp.h>
-DECLARE_GLOBAL_DATA_PTR;
-
extern void ft_fixup_num_cores(void *blob);
extern void ft_srio_setup(void *blob);
diff --git a/arch/powerpc/lib/extable.c b/arch/powerpc/lib/extable.c
index ed047da452..2f8b9326f9 100644
--- a/arch/powerpc/lib/extable.c
+++ b/arch/powerpc/lib/extable.c
@@ -21,8 +21,6 @@
* on our cache or tlb entries.
*/
-DECLARE_GLOBAL_DATA_PTR;
-
struct exception_table_entry
{
unsigned long insn, fixup;
diff --git a/arch/powerpc/lib/kgdb.c b/arch/powerpc/lib/kgdb.c
index aa16a00a42..f580c023e5 100644
--- a/arch/powerpc/lib/kgdb.c
+++ b/arch/powerpc/lib/kgdb.c
@@ -52,7 +52,7 @@ static struct hard_trap_info
{ 0x300, SIGSEGV }, /* address error (store) */
{ 0x400, SIGBUS }, /* instruction bus error */
{ 0x500, SIGINT }, /* interrupt */
- { 0x600, SIGBUS }, /* alingment */
+ { 0x600, SIGBUS }, /* alignment */
{ 0x700, SIGTRAP }, /* breakpoint trap */
{ 0x800, SIGFPE }, /* fpu unavail */
{ 0x900, SIGALRM }, /* decrementer */
diff --git a/arch/powerpc/lib/spl.c b/arch/powerpc/lib/spl.c
index b93197030e..bc477175af 100644
--- a/arch/powerpc/lib/spl.c
+++ b/arch/powerpc/lib/spl.c
@@ -9,8 +9,6 @@
#include <image.h>
#include <linux/compiler.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* This function jumps to an image with argument. Normally an FDT or ATAGS
* image.
diff --git a/arch/riscv/lib/boot.c b/arch/riscv/lib/boot.c
index 39ba9b49ff..ffad66d683 100644
--- a/arch/riscv/lib/boot.c
+++ b/arch/riscv/lib/boot.c
@@ -8,8 +8,6 @@
#include <common.h>
#include <command.h>
-DECLARE_GLOBAL_DATA_PTR;
-
unsigned long do_go_exec(ulong (*entry)(int, char * const []),
int argc, char * const argv[])
{
diff --git a/arch/sandbox/lib/bootm.c b/arch/sandbox/lib/bootm.c
index 0c9a7979d2..c7226ff30d 100644
--- a/arch/sandbox/lib/bootm.c
+++ b/arch/sandbox/lib/bootm.c
@@ -7,8 +7,6 @@
#include <common.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define LINUX_ARM_ZIMAGE_MAGIC 0x016f2818
struct arm_z_header {
diff --git a/arch/x86/cpu/pci.c b/arch/x86/cpu/pci.c
index c9c7637fa7..2728c00227 100644
--- a/arch/x86/cpu/pci.c
+++ b/arch/x86/cpu/pci.c
@@ -17,8 +17,6 @@
#include <asm/io.h>
#include <asm/pci.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int pci_x86_read_config(struct udevice *bus, pci_dev_t bdf, uint offset,
ulong *valuep, enum pci_size_t size)
{
diff --git a/arch/x86/cpu/qemu/cpu.c b/arch/x86/cpu/qemu/cpu.c
index b1a965e715..b53630b099 100644
--- a/arch/x86/cpu/qemu/cpu.c
+++ b/arch/x86/cpu/qemu/cpu.c
@@ -11,8 +11,6 @@
#include <qfw.h>
#include <asm/cpu.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int cpu_qemu_get_desc(struct udevice *dev, char *buf, int size)
{
if (size < CPU_MAX_NAME_LEN)
diff --git a/arch/x86/cpu/tangier/tangier.c b/arch/x86/cpu/tangier/tangier.c
index 20d6c6039b..ac8733c75e 100644
--- a/arch/x86/cpu/tangier/tangier.c
+++ b/arch/x86/cpu/tangier/tangier.c
@@ -8,8 +8,6 @@
#include <asm/scu.h>
#include <asm/u-boot-x86.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Miscellaneous platform dependent initializations
*/
diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c
index cafae15af0..693d1a31f3 100644
--- a/arch/x86/cpu/x86_64/cpu.c
+++ b/arch/x86/cpu/x86_64/cpu.c
@@ -8,8 +8,6 @@
#include <common.h>
#include <debug_uart.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Global declaration of gd */
struct global_data *global_data_ptr;
diff --git a/arch/x86/lib/lpc-uclass.c b/arch/x86/lib/lpc-uclass.c
index eb033e6b3f..37b0c216c2 100644
--- a/arch/x86/lib/lpc-uclass.c
+++ b/arch/x86/lib/lpc-uclass.c
@@ -8,8 +8,6 @@
#include <common.h>
#include <dm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
UCLASS_DRIVER(lpc) = {
.id = UCLASS_LPC,
.name = "lpc",
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 6af1bf4678..9932ee69a0 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -28,8 +28,6 @@
#include <linux/compiler.h>
#include <linux/libfdt.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Memory lay-out:
*
diff --git a/board/armadeus/opos6uldev/board.c b/board/armadeus/opos6uldev/board.c
index 646094aef4..02d8940355 100644
--- a/board/armadeus/opos6uldev/board.c
+++ b/board/armadeus/opos6uldev/board.c
@@ -13,8 +13,6 @@
#include <asm/io.h>
#include <common.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_VIDEO_MXS
#define LCD_PAD_CTRL ( \
PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \
diff --git a/board/astro/mcf5373l/fpga.c b/board/astro/mcf5373l/fpga.c
index 53e00728c3..72b93ac1e5 100644
--- a/board/astro/mcf5373l/fpga.c
+++ b/board/astro/mcf5373l/fpga.c
@@ -25,8 +25,6 @@
#include <asm/io.h>
#include "fpga.h"
-DECLARE_GLOBAL_DATA_PTR;
-
int altera_pre_fn(int cookie)
{
gpio_t *gpiop = (gpio_t *)MMAP_GPIO;
diff --git a/board/bachmann/ot1200/ot1200_spl.c b/board/bachmann/ot1200/ot1200_spl.c
index f3dff95710..dd1ade7877 100644
--- a/board/bachmann/ot1200/ot1200_spl.c
+++ b/board/bachmann/ot1200/ot1200_spl.c
@@ -8,8 +8,6 @@
#include <spl.h>
#include <asm/arch/mx6-ddr.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Configure MX6Q/DUAL mmdc DDR io registers */
static struct mx6dq_iomux_ddr_regs ot1200_ddr_ioregs = {
/* SDCLK[0:1], CAS, RAS, Reset: Differential input, 48ohm */
diff --git a/board/barco/platinum/spl_picon.c b/board/barco/platinum/spl_picon.c
index f49adf0329..0f6ff3a38f 100644
--- a/board/barco/platinum/spl_picon.c
+++ b/board/barco/platinum/spl_picon.c
@@ -21,8 +21,6 @@
#include "platinum.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#undef RTT_NOM_120OHM /* use 120ohm Rtt_nom vs 60ohm (lower power) */
/* Configure MX6Q/DUAL mmdc DDR io registers */
diff --git a/board/barco/platinum/spl_titanium.c b/board/barco/platinum/spl_titanium.c
index c27fb4836a..7af890a902 100644
--- a/board/barco/platinum/spl_titanium.c
+++ b/board/barco/platinum/spl_titanium.c
@@ -21,8 +21,6 @@
#include "platinum.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#undef RTT_NOM_120OHM /* use 120ohm Rtt_nom vs 60ohm (lower power) */
/* Configure MX6Q/DUAL mmdc DDR io registers */
diff --git a/board/cavium/thunderx/atf.c b/board/cavium/thunderx/atf.c
index 6ab9de944f..51b4a9fa27 100644
--- a/board/cavium/thunderx/atf.c
+++ b/board/cavium/thunderx/atf.c
@@ -16,8 +16,6 @@
#include <malloc.h>
-DECLARE_GLOBAL_DATA_PTR;
-
ssize_t atf_read_mmc(uintptr_t offset, void *buffer, size_t size)
{
struct pt_regs regs;
diff --git a/board/cei/cei-tk1-som/cei-tk1-som.c b/board/cei/cei-tk1-som/cei-tk1-som.c
index 7c87bd1eb1..c2e27b7b67 100644
--- a/board/cei/cei-tk1-som/cei-tk1-som.c
+++ b/board/cei/cei-tk1-som/cei-tk1-som.c
@@ -13,8 +13,6 @@
#include "pinmux-config-cei-tk1-som.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Routine: pinmux_init
* Description: Do individual peripheral pinmux configs
diff --git a/board/compulab/cm_fx6/common.c b/board/compulab/cm_fx6/common.c
index 19fa5d3cf7..796931dc99 100644
--- a/board/compulab/cm_fx6/common.c
+++ b/board/compulab/cm_fx6/common.c
@@ -15,8 +15,6 @@
#include <fsl_esdhc.h>
#include "common.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_FSL_ESDHC
#define USDHC_PAD_CTRL (PAD_CTL_PUS_47K_UP | \
PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \
diff --git a/board/compulab/cm_fx6/spl.c b/board/compulab/cm_fx6/spl.c
index 16e5bf8dfa..924f5d79df 100644
--- a/board/compulab/cm_fx6/spl.c
+++ b/board/compulab/cm_fx6/spl.c
@@ -20,8 +20,6 @@
#include <fsl_esdhc.h>
#include "common.h"
-DECLARE_GLOBAL_DATA_PTR;
-
enum ddr_config {
DDR_16BIT_256MB,
DDR_32BIT_512MB,
diff --git a/board/compulab/cm_t43/spl.c b/board/compulab/cm_t43/spl.c
index b7d118eb9c..ccdf6b3e34 100644
--- a/board/compulab/cm_t43/spl.c
+++ b/board/compulab/cm_t43/spl.c
@@ -14,8 +14,6 @@
#include <power/tps65218.h>
#include "board.h"
-DECLARE_GLOBAL_DATA_PTR;
-
const struct dpll_params dpll_mpu = { 800, 24, 1, -1, -1, -1, -1 };
const struct dpll_params dpll_core = { 1000, 24, -1, -1, 10, 8, 4 };
const struct dpll_params dpll_per = { 960, 24, 5, -1, -1, -1, -1 };
diff --git a/board/compulab/common/omap3_display.c b/board/compulab/common/omap3_display.c
index ed2077e361..e19fbb9161 100644
--- a/board/compulab/common/omap3_display.c
+++ b/board/compulab/common/omap3_display.c
@@ -17,8 +17,6 @@
#include <scf0403_lcd.h>
#include <asm/arch-omap3/dss.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum display_type {
NONE,
DVI,
diff --git a/board/dhelectronics/dh_imx6/dh_imx6_spl.c b/board/dhelectronics/dh_imx6/dh_imx6_spl.c
index 57ae7f15ce..c4b81a9f92 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6_spl.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6_spl.c
@@ -45,8 +45,6 @@
(PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_LOW | PAD_CTL_DSE_80ohm | \
PAD_CTL_SRE_FAST | PAD_CTL_HYS)
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct mx6dq_iomux_ddr_regs dhcom6dq_ddr_ioregs = {
.dram_sdclk_0 = 0x00020030,
.dram_sdclk_1 = 0x00020030,
diff --git a/board/engicam/common/spl.c b/board/engicam/common/spl.c
index 6e2389dd4b..6d4f8c3426 100644
--- a/board/engicam/common/spl.c
+++ b/board/engicam/common/spl.c
@@ -23,8 +23,6 @@
#include <asm/mach-imx/iomux-v3.h>
#include <asm/mach-imx/video.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define UART_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS)
diff --git a/board/engicam/imx6q/imx6q.c b/board/engicam/imx6q/imx6q.c
index fe37088b49..1c57358d16 100644
--- a/board/engicam/imx6q/imx6q.c
+++ b/board/engicam/imx6q/imx6q.c
@@ -22,8 +22,6 @@
#include "../common/board.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_NAND_MXS
#define GPMI_PAD_CTRL0 (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP)
#define GPMI_PAD_CTRL1 (PAD_CTL_DSE_40ohm | PAD_CTL_SPEED_MED | \
diff --git a/board/engicam/imx6ul/imx6ul.c b/board/engicam/imx6ul/imx6ul.c
index a903a3603b..26c6354c37 100644
--- a/board/engicam/imx6ul/imx6ul.c
+++ b/board/engicam/imx6ul/imx6ul.c
@@ -22,8 +22,6 @@
#include "../common/board.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_NAND_MXS
#define GPMI_PAD_CTRL0 (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP)
diff --git a/board/esd/vme8349/pci.c b/board/esd/vme8349/pci.c
index 4d3b21ddff..f1cfa23b42 100644
--- a/board/esd/vme8349/pci.c
+++ b/board/esd/vme8349/pci.c
@@ -20,8 +20,6 @@
#include <asm/fsl_i2c.h>
#include "vme8349pin.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static struct pci_region pci1_regions[] = {
{
bus_start: CONFIG_SYS_PCI1_MEM_BASE,
diff --git a/board/freescale/bsc9131rdb/ddr.c b/board/freescale/bsc9131rdb/ddr.c
index 339c576256..2a5e61e230 100644
--- a/board/freescale/bsc9131rdb/ddr.c
+++ b/board/freescale/bsc9131rdb/ddr.c
@@ -13,8 +13,6 @@
#include <asm/io.h>
#include <asm/fsl_law.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_SYS_DDR_RAW_TIMING
#define CONFIG_SYS_DRAM_SIZE 1024
diff --git a/board/freescale/bsc9132qds/ddr.c b/board/freescale/bsc9132qds/ddr.c
index 43f163a2c6..49b6b8fe58 100644
--- a/board/freescale/bsc9132qds/ddr.c
+++ b/board/freescale/bsc9132qds/ddr.c
@@ -13,8 +13,6 @@
#include <asm/io.h>
#include <asm/fsl_law.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_SYS_DDR_RAW_TIMING
fsl_ddr_cfg_regs_t ddr_cfg_regs_800 = {
diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c
index a9451c5c6e..eb25f5e23f 100644
--- a/board/freescale/common/vid.c
+++ b/board/freescale/common/vid.c
@@ -17,8 +17,6 @@
#endif
#include "vid.h"
-DECLARE_GLOBAL_DATA_PTR;
-
int __weak i2c_multiplexer_select_vid_channel(u8 channel)
{
return 0;
diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c
index 8b3f4ad78d..99c103239b 100644
--- a/board/freescale/ls1021aqds/ls1021aqds.c
+++ b/board/freescale/ls1021aqds/ls1021aqds.c
@@ -38,8 +38,6 @@
#define SET_SDHC_MUX_SEL(reg, value) ((reg & 0x0f) | value)
#define SET_EC_MUX_SEL(reg, value) ((reg & 0xf0) | value)
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
MUX_TYPE_CAN,
MUX_TYPE_IIC2,
diff --git a/board/freescale/ls1088a/eth_ls1088ardb.c b/board/freescale/ls1088a/eth_ls1088ardb.c
index 97accc90fd..fa86118acc 100644
--- a/board/freescale/ls1088a/eth_ls1088ardb.c
+++ b/board/freescale/ls1088a/eth_ls1088ardb.c
@@ -18,8 +18,6 @@
#include <fsl-mc/fsl_mc.h>
#include <fsl-mc/ldpaa_wriop.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int board_eth_init(bd_t *bis)
{
#if defined(CONFIG_FSL_MC_ENET)
diff --git a/board/freescale/m5329evb/nand.c b/board/freescale/m5329evb/nand.c
index 88496812bf..291346d612 100644
--- a/board/freescale/m5329evb/nand.c
+++ b/board/freescale/m5329evb/nand.c
@@ -13,8 +13,6 @@
#include <asm/io.h>
#include <asm/immap.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#if defined(CONFIG_CMD_NAND)
#include <nand.h>
#include <linux/mtd/mtd.h>
diff --git a/board/freescale/m5373evb/nand.c b/board/freescale/m5373evb/nand.c
index a96a59991f..4b0354029d 100644
--- a/board/freescale/m5373evb/nand.c
+++ b/board/freescale/m5373evb/nand.c
@@ -13,8 +13,6 @@
#include <asm/io.h>
#include <asm/immap.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#if defined(CONFIG_CMD_NAND)
#include <nand.h>
#include <linux/mtd/mtd.h>
diff --git a/board/freescale/mpc8308rdb/mpc8308rdb.c b/board/freescale/mpc8308rdb/mpc8308rdb.c
index 93c7200509..0cf1c08f29 100644
--- a/board/freescale/mpc8308rdb/mpc8308rdb.c
+++ b/board/freescale/mpc8308rdb/mpc8308rdb.c
@@ -20,8 +20,6 @@
#include <asm/fsl_serdes.h>
#include <asm/fsl_mpc83xx_serdes.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* The following are used to control the SPI chip selects for the SPI command.
*/
diff --git a/board/freescale/mpc832xemds/pci.c b/board/freescale/mpc832xemds/pci.c
index e8b2b11d88..274bf9384e 100644
--- a/board/freescale/mpc832xemds/pci.c
+++ b/board/freescale/mpc832xemds/pci.c
@@ -16,8 +16,6 @@
#include <asm/fsl_i2c.h>
#include "../common/pq-mds-pib.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static struct pci_region pci1_regions[] = {
{
bus_start: CONFIG_SYS_PCI1_MEM_BASE,
diff --git a/board/freescale/mpc8349emds/pci.c b/board/freescale/mpc8349emds/pci.c
index 9f7324fedd..311517f75b 100644
--- a/board/freescale/mpc8349emds/pci.c
+++ b/board/freescale/mpc8349emds/pci.c
@@ -12,8 +12,6 @@
#include <i2c.h>
#include <asm/fsl_i2c.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static struct pci_region pci1_regions[] = {
{
bus_start: CONFIG_SYS_PCI1_MEM_BASE,
diff --git a/board/freescale/mpc8349itx/pci.c b/board/freescale/mpc8349itx/pci.c
index afc9df0923..adb0ed8081 100644
--- a/board/freescale/mpc8349itx/pci.c
+++ b/board/freescale/mpc8349itx/pci.c
@@ -13,8 +13,6 @@
#include <i2c.h>
#include <asm/fsl_i2c.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static struct pci_region pci1_regions[] = {
{
bus_start: CONFIG_SYS_PCI1_MEM_BASE,
diff --git a/board/freescale/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c
index 4e3c824e75..89acea33d1 100644
--- a/board/freescale/p1022ds/p1022ds.c
+++ b/board/freescale/p1022ds/p1022ds.c
@@ -28,8 +28,6 @@
#include "../common/ngpixis.h"
-DECLARE_GLOBAL_DATA_PTR;
-
int board_early_init_f(void)
{
ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
diff --git a/board/freescale/p1023rdb/ddr.c b/board/freescale/p1023rdb/ddr.c
index d587df527a..191a824411 100644
--- a/board/freescale/p1023rdb/ddr.c
+++ b/board/freescale/p1023rdb/ddr.c
@@ -13,8 +13,6 @@
#include <asm/io.h>
#include <asm/fsl_law.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* CONFIG_SYS_DDR_RAW_TIMING */
/*
* Hynix H5TQ1G83TFR-H9C
diff --git a/board/gateworks/gw_ventana/gw_ventana_spl.c b/board/gateworks/gw_ventana/gw_ventana_spl.c
index bdbe5e7027..ee93e545de 100644
--- a/board/gateworks/gw_ventana/gw_ventana_spl.c
+++ b/board/gateworks/gw_ventana/gw_ventana_spl.c
@@ -21,8 +21,6 @@
#include "gsc.h"
#include "common.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define RTT_NOM_120OHM /* use 120ohm Rtt_nom vs 60ohm (lower power) */
#define GSC_EEPROM_DDR_SIZE 0x2B /* enum (512,1024,2048) MB */
#define GSC_EEPROM_DDR_WIDTH 0x2D /* enum (32,64) bit */
diff --git a/board/gdsys/mpc8308/hrcon.c b/board/gdsys/mpc8308/hrcon.c
index ed5cb33279..d1ed273a08 100644
--- a/board/gdsys/mpc8308/hrcon.c
+++ b/board/gdsys/mpc8308/hrcon.c
@@ -33,8 +33,6 @@
#include <miiphy.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MAX_MUX_CHANNELS 2
enum {
diff --git a/board/gdsys/mpc8308/strider.c b/board/gdsys/mpc8308/strider.c
index c8ea8a4ae0..c3b09b29d5 100644
--- a/board/gdsys/mpc8308/strider.c
+++ b/board/gdsys/mpc8308/strider.c
@@ -36,8 +36,6 @@
#include <miiphy.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MAX_MUX_CHANNELS 2
enum {
diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c
index b5f445a943..7bdc924a89 100644
--- a/board/gdsys/p1022/controlcenterd.c
+++ b/board/gdsys/p1022/controlcenterd.c
@@ -44,8 +44,6 @@
#include "../common/dp501.h"
#include "controlcenterd-id.h"
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
HWVER_100 = 0,
HWVER_110 = 1,
diff --git a/board/geekbuying/geekbox/geekbox.c b/board/geekbuying/geekbox/geekbox.c
index 88b67f9d5f..b638186e8f 100644
--- a/board/geekbuying/geekbox/geekbox.c
+++ b/board/geekbuying/geekbox/geekbox.c
@@ -6,8 +6,6 @@
#include <common.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int board_init(void)
{
return 0;
diff --git a/board/intel/edison/edison.c b/board/intel/edison/edison.c
index 4b1e6d0f47..e3334f8438 100644
--- a/board/intel/edison/edison.c
+++ b/board/intel/edison/edison.c
@@ -17,8 +17,6 @@
#include <asm/scu.h>
#include <asm/u-boot-x86.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static struct dwc3_device dwc3_device_data = {
.maximum_speed = USB_SPEED_HIGH,
.base = CONFIG_SYS_USB_OTG_BASE,
diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c
index d70b1d1393..bc229e872f 100644
--- a/board/keymile/kmp204x/kmp204x.c
+++ b/board/keymile/kmp204x/kmp204x.c
@@ -24,8 +24,6 @@
#include "../common/common.h"
#include "kmp204x.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
int checkboard(void)
diff --git a/board/kosagi/novena/novena_spl.c b/board/kosagi/novena/novena_spl.c
index b4a68da88f..0dd0b6eec2 100644
--- a/board/kosagi/novena/novena_spl.c
+++ b/board/kosagi/novena/novena_spl.c
@@ -27,8 +27,6 @@
#include "novena.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define UART_PAD_CTRL \
(PAD_CTL_PKE | PAD_CTL_PUE | \
PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
diff --git a/board/liebherr/mccmon6/spl.c b/board/liebherr/mccmon6/spl.c
index 196da46df9..61d12ba239 100644
--- a/board/liebherr/mccmon6/spl.c
+++ b/board/liebherr/mccmon6/spl.c
@@ -20,8 +20,6 @@
#include <asm/arch/sys_proto.h>
#include <spl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#if defined(CONFIG_SPL_BUILD)
#include <asm/arch/mx6-ddr.h>
/*
diff --git a/board/mpc8308_p1m/mpc8308_p1m.c b/board/mpc8308_p1m/mpc8308_p1m.c
index e96645f82d..a5a036f9cf 100644
--- a/board/mpc8308_p1m/mpc8308_p1m.c
+++ b/board/mpc8308_p1m/mpc8308_p1m.c
@@ -16,8 +16,6 @@
#include <asm/fsl_serdes.h>
#include <asm/fsl_mpc83xx_serdes.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int checkboard(void)
{
printf("Board: MPC8308 P1M\n");
diff --git a/board/nvidia/jetson-tk1/jetson-tk1.c b/board/nvidia/jetson-tk1/jetson-tk1.c
index c20da29a98..31695d4a0f 100644
--- a/board/nvidia/jetson-tk1/jetson-tk1.c
+++ b/board/nvidia/jetson-tk1/jetson-tk1.c
@@ -15,8 +15,6 @@
#include "pinmux-config-jetson-tk1.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Routine: pinmux_init
* Description: Do individual peripheral pinmux configs
diff --git a/board/overo/overo.c b/board/overo/overo.c
index 7b44a37103..102f9805fa 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -32,8 +32,6 @@
#include <asm/ehci-omap.h>
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
#define TWL4030_I2C_BUS 0
#define EXPANSION_EEPROM_I2C_BUS 2
#define EXPANSION_EEPROM_I2C_ADDRESS 0x51
diff --git a/board/qca/ap121/ap121.c b/board/qca/ap121/ap121.c
index ac9be35dd9..56ae8e1ea4 100644
--- a/board/qca/ap121/ap121.c
+++ b/board/qca/ap121/ap121.c
@@ -13,8 +13,6 @@
#include <mach/ath79.h>
#include <debug_uart.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_DEBUG_UART_BOARD_INIT
void board_debug_uart_init(void)
{
diff --git a/board/qca/ap143/ap143.c b/board/qca/ap143/ap143.c
index 19b55acbf2..1ebd362256 100644
--- a/board/qca/ap143/ap143.c
+++ b/board/qca/ap143/ap143.c
@@ -13,8 +13,6 @@
#include <mach/ath79.h>
#include <debug_uart.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_DEBUG_UART_BOARD_INIT
void board_debug_uart_init(void)
{
diff --git a/board/renesas/alt/Makefile b/board/renesas/alt/Makefile
index 22ab1f43d9..53418699b2 100644
--- a/board/renesas/alt/Makefile
+++ b/board/renesas/alt/Makefile
@@ -6,4 +6,8 @@
# SPDX-License-Identifier: GPL-2.0
#
-obj-y := alt.o qos.o ../rcar-common/common.o
+ifdef CONFIG_SPL_BUILD
+obj-y := alt_spl.o
+else
+obj-y := alt.o qos.o
+endif
diff --git a/board/renesas/alt/alt.c b/board/renesas/alt/alt.c
index f2200ef081..7598b1a4b9 100644
--- a/board/renesas/alt/alt.c
+++ b/board/renesas/alt/alt.c
@@ -43,176 +43,65 @@ void s_init(void)
qos_init();
}
-#define TMU0_MSTP125 (1 << 25)
-#define SCIF2_MSTP719 (1 << 19)
-#define ETHER_MSTP813 (1 << 13)
-#define IIC1_MSTP323 (1 << 23)
-#define MMC0_MSTP315 (1 << 15)
-#define SDHI0_MSTP314 (1 << 14)
-#define SDHI1_MSTP312 (1 << 12)
+#define TMU0_MSTP125 BIT(25)
+#define MMC0_MSTP315 BIT(15)
#define SD1CKCR 0xE6150078
-#define SD1_97500KHZ 0x7
+#define SD_97500KHZ 0x7
int board_early_init_f(void)
{
/* TMU */
mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
- /* SCIF2 */
- mstp_clrbits_le32(MSTPSR7, SMSTPCR7, SCIF2_MSTP719);
+ /* Set SD1 to the 97.5MHz */
+ writel(SD_97500KHZ, SD1CKCR);
- /* ETHER */
- mstp_clrbits_le32(MSTPSR8, SMSTPCR8, ETHER_MSTP813);
-
- /* IIC1 / sh-i2c ch1 */
- mstp_clrbits_le32(MSTPSR3, SMSTPCR3, IIC1_MSTP323);
-
-#ifdef CONFIG_SH_MMCIF
- /* MMC */
- mstp_clrbits_le32(MSTPSR3, SMSTPCR3, MMC0_MSTP315);
-#endif
-
-#ifdef CONFIG_SH_SDHI
- /* SDHI0, 1 */
- mstp_clrbits_le32(MSTPSR3, SMSTPCR3, SDHI0_MSTP314 | SDHI1_MSTP312);
-
- /*
- * SD0 clock is set to 97.5MHz by default.
- * Set SD1 to the 97.5MHz as well.
- */
- writel(SD1_97500KHZ, SD1CKCR);
-#endif
return 0;
}
+#define ETHERNET_PHY_RESET 56 /* GPIO 1 24 */
+
int board_init(void)
{
/* adress of boot parameters */
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
- /* Init PFC controller */
- r8a7794_pinmux_init();
-
- /* Ether Enable */
-#if defined(CONFIG_R8A7794_ETHERNET_B)
- gpio_request(GPIO_FN_ETH_CRS_DV_B, NULL);
- gpio_request(GPIO_FN_ETH_RX_ER_B, NULL);
- gpio_request(GPIO_FN_ETH_RXD0_B, NULL);
- gpio_request(GPIO_FN_ETH_RXD1_B, NULL);
- gpio_request(GPIO_FN_ETH_LINK_B, NULL);
- gpio_request(GPIO_FN_ETH_REFCLK_B, NULL);
- gpio_request(GPIO_FN_ETH_MDIO_B, NULL);
- gpio_request(GPIO_FN_ETH_TXD1_B, NULL);
- gpio_request(GPIO_FN_ETH_TX_EN_B, NULL);
- gpio_request(GPIO_FN_ETH_MAGIC_B, NULL);
- gpio_request(GPIO_FN_ETH_TXD0_B, NULL);
- gpio_request(GPIO_FN_ETH_MDC_B, NULL);
-#else
- gpio_request(GPIO_FN_ETH_CRS_DV, NULL);
- gpio_request(GPIO_FN_ETH_RX_ER, NULL);
- gpio_request(GPIO_FN_ETH_RXD0, NULL);
- gpio_request(GPIO_FN_ETH_RXD1, NULL);
- gpio_request(GPIO_FN_ETH_LINK, NULL);
- gpio_request(GPIO_FN_ETH_REFCLK, NULL);
- gpio_request(GPIO_FN_ETH_MDIO, NULL);
- gpio_request(GPIO_FN_ETH_TXD1, NULL);
- gpio_request(GPIO_FN_ETH_TX_EN, NULL);
- gpio_request(GPIO_FN_ETH_MAGIC, NULL);
- gpio_request(GPIO_FN_ETH_TXD0, NULL);
- gpio_request(GPIO_FN_ETH_MDC, NULL);
-#endif
- gpio_request(GPIO_FN_IRQ8, NULL);
-
- /* PHY reset */
- gpio_request(GPIO_GP_1_24, NULL);
- gpio_direction_output(GPIO_GP_1_24, 0);
+ /* Force ethernet PHY out of reset */
+ gpio_request(ETHERNET_PHY_RESET, "phy_reset");
+ gpio_direction_output(ETHERNET_PHY_RESET, 0);
mdelay(20);
- gpio_set_value(GPIO_GP_1_24, 1);
+ gpio_direction_output(ETHERNET_PHY_RESET, 1);
udelay(1);
return 0;
}
-#define CXR24 0xEE7003C0 /* MAC address high register */
-#define CXR25 0xEE7003C8 /* MAC address low register */
-int board_eth_init(bd_t *bis)
+int dram_init(void)
{
-#ifdef CONFIG_SH_ETHER
- int ret = -ENODEV;
- u32 val;
- unsigned char enetaddr[6];
-
- ret = sh_eth_initialize(bis);
- if (!eth_env_get_enetaddr("ethaddr", enetaddr))
- return ret;
+ if (fdtdec_setup_memory_size() != 0)
+ return -EINVAL;
- /* Set Mac address */
- val = enetaddr[0] << 24 | enetaddr[1] << 16 |
- enetaddr[2] << 8 | enetaddr[3];
- writel(val, CXR24);
-
- val = enetaddr[4] << 8 | enetaddr[5];
- writel(val, CXR25);
-
- return ret;
-#else
return 0;
-#endif
}
-int board_mmc_init(bd_t *bis)
+int dram_init_banksize(void)
{
- int ret = -ENODEV;
-
-#ifdef CONFIG_SH_MMCIF
- gpio_request(GPIO_GP_4_31, NULL);
- gpio_set_value(GPIO_GP_4_31, 1);
-
- ret = mmcif_mmc_init();
-#endif
-
-#ifdef CONFIG_SH_SDHI
- gpio_request(GPIO_FN_SD0_DATA0, NULL);
- gpio_request(GPIO_FN_SD0_DATA1, NULL);
- gpio_request(GPIO_FN_SD0_DATA2, NULL);
- gpio_request(GPIO_FN_SD0_DATA3, NULL);
- gpio_request(GPIO_FN_SD0_CLK, NULL);
- gpio_request(GPIO_FN_SD0_CMD, NULL);
- gpio_request(GPIO_FN_SD0_CD, NULL);
- gpio_request(GPIO_FN_SD1_DATA0, NULL);
- gpio_request(GPIO_FN_SD1_DATA1, NULL);
- gpio_request(GPIO_FN_SD1_DATA2, NULL);
- gpio_request(GPIO_FN_SD1_DATA3, NULL);
- gpio_request(GPIO_FN_SD1_CLK, NULL);
- gpio_request(GPIO_FN_SD1_CMD, NULL);
- gpio_request(GPIO_FN_SD1_CD, NULL);
-
- /* SDHI 0 */
- gpio_request(GPIO_GP_2_26, NULL);
- gpio_request(GPIO_GP_2_29, NULL);
- gpio_direction_output(GPIO_GP_2_26, 1);
- gpio_direction_output(GPIO_GP_2_29, 1);
-
- ret = sh_sdhi_init(CONFIG_SYS_SH_SDHI0_BASE, 0,
- SH_SDHI_QUIRK_16BIT_BUF);
- if (ret)
- return ret;
+ fdtdec_setup_memory_banksize();
- /* SDHI 1 */
- gpio_request(GPIO_GP_4_26, NULL);
- gpio_request(GPIO_GP_4_29, NULL);
- gpio_direction_output(GPIO_GP_4_26, 1);
- gpio_direction_output(GPIO_GP_4_29, 1);
-
- ret = sh_sdhi_init(CONFIG_SYS_SH_SDHI1_BASE, 1, 0);
-#endif
- return ret;
+ return 0;
}
-int dram_init(void)
+/* KSZ8041RNLI */
+#define PHY_CONTROL1 0x1E
+#define PHY_LED_MODE 0xC0000
+#define PHY_LED_MODE_ACK 0x4000
+int board_phy_config(struct phy_device *phydev)
{
- gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
+ int ret = phy_read(phydev, MDIO_DEVAD_NONE, PHY_CONTROL1);
+ ret &= ~PHY_LED_MODE;
+ ret |= PHY_LED_MODE_ACK;
+ ret = phy_write(phydev, MDIO_DEVAD_NONE, PHY_CONTROL1, (u16)ret);
return 0;
}
@@ -223,22 +112,38 @@ const struct rmobile_sysinfo sysinfo = {
void reset_cpu(ulong addr)
{
- u8 val;
+ struct udevice *dev;
+ const u8 pmic_bus = 1;
+ const u8 pmic_addr = 0x58;
+ u8 data;
+ int ret;
- i2c_set_bus_num(1); /* PowerIC connected to ch1 */
- i2c_read(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1);
- val |= 0x02;
- i2c_write(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1);
+ ret = i2c_get_chip_for_busnum(pmic_bus, pmic_addr, 1, &dev);
+ if (ret)
+ hang();
+
+ ret = dm_i2c_read(dev, 0x13, &data, 1);
+ if (ret)
+ hang();
+
+ data |= BIT(1);
+
+ ret = dm_i2c_write(dev, 0x13, &data, 1);
+ if (ret)
+ hang();
}
-static const struct sh_serial_platdata serial_platdata = {
- .base = SCIF2_BASE,
- .type = PORT_SCIF,
- .clk = 14745600,
- .clk_mode = EXT_CLK,
-};
+enum env_location env_get_location(enum env_operation op, int prio)
+{
+ const u32 load_magic = 0xb33fc0de;
-U_BOOT_DEVICE(alt_serials) = {
- .name = "serial_sh",
- .platdata = &serial_platdata,
-};
+ /* Block environment access if loaded using JTAG */
+ if ((readl(CONFIG_SPL_TEXT_BASE + 0x24) == load_magic) &&
+ (op != ENVOP_INIT))
+ return ENVL_UNKNOWN;
+
+ if (prio)
+ return ENVL_UNKNOWN;
+
+ return ENVL_SPI_FLASH;
+}
diff --git a/board/renesas/alt/alt_spl.c b/board/renesas/alt/alt_spl.c
new file mode 100644
index 0000000000..f893a49257
--- /dev/null
+++ b/board/renesas/alt/alt_spl.c
@@ -0,0 +1,411 @@
+/*
+ * board/renesas/alt/alt_spl.c
+ *
+ * Copyright (C) 2018 Marek Vasut <marek.vasut@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#include <common.h>
+#include <malloc.h>
+#include <dm/platform_data/serial_sh.h>
+#include <asm/processor.h>
+#include <asm/mach-types.h>
+#include <asm/io.h>
+#include <linux/errno.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/gpio.h>
+#include <asm/arch/rmobile.h>
+#include <asm/arch/rcar-mstp.h>
+
+#include <spl.h>
+
+#define TMU0_MSTP125 BIT(25)
+#define SCIF2_MSTP719 BIT(19)
+#define QSPI_MSTP917 BIT(17)
+
+#define SD1CKCR 0xE6150078
+#define SD_97500KHZ 0x7
+
+struct reg_config {
+ u16 off;
+ u32 val;
+};
+
+static void dbsc_wait(u16 reg)
+{
+ static const u32 dbsc3_0_base = DBSC3_0_BASE;
+
+ while (!(readl(dbsc3_0_base + reg) & BIT(0)))
+ ;
+}
+
+static void spl_init_sys(void)
+{
+ u32 r0 = 0;
+
+ writel(0xa5a5a500, 0xe6020004);
+ writel(0xa5a5a500, 0xe6030004);
+
+ asm volatile(
+ /* ICIALLU - Invalidate I$ to PoU */
+ "mcr 15, 0, %0, cr7, cr5, 0 \n"
+ /* BPIALL - Invalidate branch predictors */
+ "mcr 15, 0, %0, cr7, cr5, 6 \n"
+ /* Set SCTLR[IZ] */
+ "mrc 15, 0, %0, cr1, cr0, 0 \n"
+ "orr %0, #0x1800 \n"
+ "mcr 15, 0, %0, cr1, cr0, 0 \n"
+ "isb sy \n"
+ :"=r"(r0));
+}
+
+static void spl_init_pfc(void)
+{
+ static const struct reg_config pfc_with_unlock[] = {
+ { 0x0090, 0x00000000 },
+ { 0x0094, 0x00000000 },
+ { 0x0098, 0x00000000 },
+ { 0x0020, 0x00000000 },
+ { 0x0024, 0x00000000 },
+ { 0x0028, 0x40000000 },
+ { 0x002c, 0x00000155 },
+ { 0x0030, 0x00000002 },
+ { 0x0034, 0x00000000 },
+ { 0x0038, 0x00000000 },
+ { 0x003c, 0x00000000 },
+ { 0x0040, 0x60000000 },
+ { 0x0044, 0x36dab6db },
+ { 0x0048, 0x926da012 },
+ { 0x004c, 0x0008c383 },
+ { 0x0050, 0x00000000 },
+ { 0x0054, 0x00000140 },
+ { 0x0004, 0xffffffff },
+ { 0x0008, 0x00ec3fff },
+ { 0x000c, 0x5bffffff },
+ { 0x0010, 0x01bfe1ff },
+ { 0x0014, 0x5bffffff },
+ { 0x0018, 0x0f4b200f },
+ { 0x001c, 0x03ffffff },
+ };
+
+ static const struct reg_config pfc_without_unlock[] = {
+ { 0x0100, 0x00000000 },
+ { 0x0104, 0x4203fc00 },
+ { 0x0108, 0x00000000 },
+ { 0x010c, 0x159007ff },
+ { 0x0110, 0x80000000 },
+ { 0x0114, 0x00de481f },
+ { 0x0118, 0x00000000 },
+ };
+
+ static const struct reg_config pfc_with_unlock2[] = {
+ { 0x0060, 0xffffffff },
+ { 0x0064, 0xfffff000 },
+ { 0x0068, 0x55555500 },
+ { 0x006c, 0xffffff00 },
+ { 0x0070, 0x00000000 },
+ };
+
+ static const u32 pfc_base = 0xe6060000;
+
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(pfc_with_unlock); i++) {
+ writel(~pfc_with_unlock[i].val, pfc_base);
+ writel(pfc_with_unlock[i].val,
+ pfc_base | pfc_with_unlock[i].off);
+ }
+
+ for (i = 0; i < ARRAY_SIZE(pfc_without_unlock); i++)
+ writel(pfc_without_unlock[i].val,
+ pfc_base | pfc_without_unlock[i].off);
+
+ for (i = 0; i < ARRAY_SIZE(pfc_with_unlock2); i++) {
+ writel(~pfc_with_unlock2[i].val, pfc_base);
+ writel(pfc_with_unlock2[i].val,
+ pfc_base | pfc_with_unlock2[i].off);
+ }
+}
+
+static void spl_init_gpio(void)
+{
+ static const u16 gpio_offs[] = {
+ 0x1000, 0x2000, 0x3000, 0x4000, 0x5000
+ };
+
+ static const struct reg_config gpio_set[] = {
+ { 0x2000, 0x24000000 },
+ { 0x4000, 0xa4000000 },
+ { 0x5000, 0x0004c000 },
+ };
+
+ static const struct reg_config gpio_clr[] = {
+ { 0x1000, 0x01000000 },
+ { 0x2000, 0x24000000 },
+ { 0x3000, 0x00000000 },
+ { 0x4000, 0xa4000000 },
+ { 0x5000, 0x0084c380 },
+ };
+
+ static const u32 gpio_base = 0xe6050000;
+
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(gpio_offs); i++)
+ writel(0, gpio_base | 0x20 | gpio_offs[i]);
+
+ for (i = 0; i < ARRAY_SIZE(gpio_offs); i++)
+ writel(0, gpio_base | 0x00 | gpio_offs[i]);
+
+ for (i = 0; i < ARRAY_SIZE(gpio_set); i++)
+ writel(gpio_set[i].val, gpio_base | 0x08 | gpio_set[i].off);
+
+ for (i = 0; i < ARRAY_SIZE(gpio_clr); i++)
+ writel(gpio_clr[i].val, gpio_base | 0x04 | gpio_clr[i].off);
+}
+
+static void spl_init_lbsc(void)
+{
+ static const struct reg_config lbsc_config[] = {
+ { 0x00, 0x00000020 },
+ { 0x08, 0x00002020 },
+ { 0x30, 0x2a103320 },
+ { 0x38, 0xff70ff70 },
+ };
+
+ static const u16 lbsc_offs[] = {
+ 0x80, 0x84, 0x88, 0x8c, 0xa0, 0xc0, 0xc4, 0xc8
+ };
+
+ static const u32 lbsc_base = 0xfec00200;
+
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(lbsc_config); i++) {
+ writel(lbsc_config[i].val,
+ lbsc_base | lbsc_config[i].off);
+ writel(lbsc_config[i].val,
+ lbsc_base | (lbsc_config[i].off + 4));
+ }
+
+ for (i = 0; i < ARRAY_SIZE(lbsc_offs); i++)
+ writel(0, lbsc_base | lbsc_offs[i]);
+}
+
+static void spl_init_dbsc(void)
+{
+ static const struct reg_config dbsc_config1[] = {
+ { 0x0018, 0x21000000 },
+ { 0x0018, 0x11000000 },
+ { 0x0018, 0x10000000 },
+ { 0x0280, 0x0000a55a },
+ { 0x0290, 0x00000001 },
+ { 0x02a0, 0x80000000 },
+ { 0x0290, 0x00000004 },
+ };
+
+ static const struct reg_config dbsc_config2[] = {
+ { 0x0290, 0x00000006 },
+ { 0x02a0, 0x0005c000 },
+ };
+
+ static const struct reg_config dbsc_config4[] = {
+ { 0x0290, 0x00000010 },
+ { 0x02a0, 0xf00464db },
+ { 0x0290, 0x00000061 },
+ { 0x02a0, 0x0000006d },
+ { 0x0290, 0x00000001 },
+ { 0x02a0, 0x00000073 },
+ { 0x0020, 0x00000007 },
+ { 0x0024, 0x0f030a02 },
+ { 0x0030, 0x00000001 },
+ { 0x00b0, 0x00000000 },
+ { 0x0040, 0x00000009 },
+ { 0x0044, 0x00000007 },
+ { 0x0048, 0x00000000 },
+ { 0x0050, 0x00000009 },
+ { 0x0054, 0x000a0009 },
+ { 0x0058, 0x00000021 },
+ { 0x005c, 0x00000018 },
+ { 0x0060, 0x00000005 },
+ { 0x0064, 0x0000001b },
+ { 0x0068, 0x00000007 },
+ { 0x006c, 0x0000000a },
+ { 0x0070, 0x00000009 },
+ { 0x0074, 0x00000010 },
+ { 0x0078, 0x000000ae },
+ { 0x007c, 0x00140005 },
+ { 0x0080, 0x00050004 },
+ { 0x0084, 0x50213005 },
+ { 0x0088, 0x000c0000 },
+ { 0x008c, 0x00000200 },
+ { 0x0090, 0x00000040 },
+ { 0x0100, 0x00000001 },
+ { 0x00c0, 0x00020001 },
+ { 0x00c8, 0x20082008 },
+ { 0x0380, 0x00020003 },
+ { 0x0390, 0x0000001f },
+ };
+
+ static const struct reg_config dbsc_config5[] = {
+ { 0x0244, 0x00000011 },
+ { 0x0290, 0x00000003 },
+ { 0x02a0, 0x0300c4e1 },
+ { 0x0290, 0x00000023 },
+ { 0x02a0, 0x00fcb6d0 },
+ { 0x0290, 0x00000011 },
+ { 0x02a0, 0x1000040b },
+ { 0x0290, 0x00000012 },
+ { 0x02a0, 0x85589955 },
+ { 0x0290, 0x00000013 },
+ { 0x02a0, 0x1a852400 },
+ { 0x0290, 0x00000014 },
+ { 0x02a0, 0x300210b4 },
+ { 0x0290, 0x00000015 },
+ { 0x02a0, 0x00000b50 },
+ { 0x0290, 0x00000016 },
+ { 0x02a0, 0x00000006 },
+ { 0x0290, 0x00000017 },
+ { 0x02a0, 0x00000010 },
+ { 0x0290, 0x0000001a },
+ { 0x02a0, 0x910035c7 },
+ { 0x0290, 0x00000004 },
+ };
+
+ static const struct reg_config dbsc_config6[] = {
+ { 0x0290, 0x00000001 },
+ { 0x02a0, 0x00000181 },
+ { 0x0018, 0x11000000 },
+ { 0x0290, 0x00000004 },
+ };
+
+ static const struct reg_config dbsc_config7[] = {
+ { 0x0290, 0x00000001 },
+ { 0x02a0, 0x0000fe01 },
+ { 0x0304, 0x00000000 },
+ { 0x00f4, 0x01004c20 },
+ { 0x00f8, 0x014000aa },
+ { 0x00e0, 0x00000140 },
+ { 0x00e4, 0x00081450 },
+ { 0x00e8, 0x00010000 },
+ { 0x0290, 0x00000004 },
+ };
+
+ static const struct reg_config dbsc_config8[] = {
+ { 0x0014, 0x00000001 },
+ { 0x0010, 0x00000001 },
+ { 0x0280, 0x00000000 },
+ };
+
+ static const u32 dbsc3_0_base = DBSC3_0_BASE;
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config1); i++)
+ writel(dbsc_config1[i].val, dbsc3_0_base | dbsc_config1[i].off);
+
+ dbsc_wait(0x2a0);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config2); i++)
+ writel(dbsc_config2[i].val, dbsc3_0_base | dbsc_config2[i].off);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config4); i++)
+ writel(dbsc_config4[i].val, dbsc3_0_base | dbsc_config4[i].off);
+
+ dbsc_wait(0x240);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config5); i++)
+ writel(dbsc_config5[i].val, dbsc3_0_base | dbsc_config5[i].off);
+
+ dbsc_wait(0x2a0);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config6); i++)
+ writel(dbsc_config6[i].val, dbsc3_0_base | dbsc_config6[i].off);
+
+ dbsc_wait(0x2a0);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config7); i++)
+ writel(dbsc_config7[i].val, dbsc3_0_base | dbsc_config7[i].off);
+
+ dbsc_wait(0x2a0);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config8); i++)
+ writel(dbsc_config8[i].val, dbsc3_0_base | dbsc_config8[i].off);
+
+}
+
+static void spl_init_qspi(void)
+{
+ mstp_clrbits_le32(MSTPSR9, SMSTPCR9, QSPI_MSTP917);
+
+ static const u32 qspi_base = 0xe6b10000;
+
+ writeb(0x08, qspi_base + 0x00);
+ writeb(0x00, qspi_base + 0x01);
+ writeb(0x06, qspi_base + 0x02);
+ writeb(0x01, qspi_base + 0x0a);
+ writeb(0x00, qspi_base + 0x0b);
+ writeb(0x00, qspi_base + 0x0c);
+ writeb(0x00, qspi_base + 0x0d);
+ writeb(0x00, qspi_base + 0x0e);
+
+ writew(0xe080, qspi_base + 0x10);
+
+ writeb(0xc0, qspi_base + 0x18);
+ writeb(0x00, qspi_base + 0x18);
+ writeb(0x00, qspi_base + 0x08);
+ writeb(0x48, qspi_base + 0x00);
+}
+
+void board_init_f(ulong dummy)
+{
+ mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
+ mstp_clrbits_le32(MSTPSR7, SMSTPCR7, SCIF2_MSTP719);
+
+ /* Set SD1 to the 97.5MHz */
+ writel(SD_97500KHZ, SD1CKCR);
+
+ spl_init_sys();
+ spl_init_pfc();
+ spl_init_gpio();
+ spl_init_lbsc();
+ spl_init_dbsc();
+ spl_init_qspi();
+}
+
+void spl_board_init(void)
+{
+ /* UART clocks enabled and gd valid - init serial console */
+ preloader_console_init();
+}
+
+void board_boot_order(u32 *spl_boot_list)
+{
+ const u32 jtag_magic = 0x1337c0de;
+ const u32 load_magic = 0xb33fc0de;
+
+ /*
+ * If JTAG probe sets special word at 0xe6300020, then it must
+ * put U-Boot into RAM and SPL will start it from RAM.
+ */
+ if (readl(CONFIG_SPL_TEXT_BASE + 0x20) == jtag_magic) {
+ printf("JTAG boot detected!\n");
+
+ while (readl(CONFIG_SPL_TEXT_BASE + 0x24) != load_magic)
+ ;
+
+ spl_boot_list[0] = BOOT_DEVICE_RAM;
+ spl_boot_list[1] = BOOT_DEVICE_NONE;
+
+ return;
+ }
+
+ /* Boot from SPI NOR with YMODEM UART fallback. */
+ spl_boot_list[0] = BOOT_DEVICE_SPI;
+ spl_boot_list[1] = BOOT_DEVICE_UART;
+ spl_boot_list[2] = BOOT_DEVICE_NONE;
+}
+
+void reset_cpu(ulong addr)
+{
+}
diff --git a/board/renesas/gose/Makefile b/board/renesas/gose/Makefile
index e09ae1e414..c6a1dc21cd 100644
--- a/board/renesas/gose/Makefile
+++ b/board/renesas/gose/Makefile
@@ -1,9 +1,13 @@
#
-# board/renesas/alt/Makefile
+# board/renesas/gose/Makefile
#
# Copyright (C) 2014 Renesas Electronics Corporation
#
# SPDX-License-Identifier: GPL-2.0
#
-obj-y := gose.o qos.o ../rcar-common/common.o
+ifdef CONFIG_SPL_BUILD
+obj-y := gose_spl.o
+else
+obj-y := gose.o qos.o
+endif
diff --git a/board/renesas/gose/gose.c b/board/renesas/gose/gose.c
index 99d4ba6fd8..c9209701dd 100644
--- a/board/renesas/gose/gose.c
+++ b/board/renesas/gose/gose.c
@@ -46,13 +46,7 @@ void s_init(void)
qos_init();
}
-#define TMU0_MSTP125 (1 << 25)
-#define SCIF0_MSTP721 (1 << 21)
-#define ETHER_MSTP813 (1 << 13)
-
-#define SDHI0_MSTP314 (1 << 14)
-#define SDHI1_MSTP312 (1 << 12)
-#define SDHI2_MSTP311 (1 << 11)
+#define TMU0_MSTP125 BIT(25)
#define SD1CKCR 0xE6150078
#define SD2CKCR 0xE615026C
@@ -60,143 +54,59 @@ void s_init(void)
int board_early_init_f(void)
{
- /* TMU0 */
mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
- /* SCIF0 */
- mstp_clrbits_le32(MSTPSR7, SMSTPCR7, SCIF0_MSTP721);
-
- /* ETHER */
- mstp_clrbits_le32(MSTPSR8, SMSTPCR8, ETHER_MSTP813);
-
- /* SDHI */
- mstp_clrbits_le32(MSTPSR3, SMSTPCR3,
- SDHI0_MSTP314 | SDHI1_MSTP312 | SDHI2_MSTP311);
+ /*
+ * SD0 clock is set to 97.5MHz by default.
+ * Set SD1 and SD2 to the 97.5MHz as well.
+ */
writel(SD_97500KHZ, SD1CKCR);
writel(SD_97500KHZ, SD2CKCR);
return 0;
}
-#define PUPR5 0xE6060114
-#define PUPR5_ETH 0x3FFC0000
-#define PUPR5_ETH_MAGIC (1 << 27)
+#define ETHERNET_PHY_RESET 176 /* GPIO 5 22 */
int board_init(void)
{
/* adress of boot parameters */
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
- /* Init PFC controller */
- r8a7793_pinmux_init();
-
- /* ETHER Enable */
- gpio_request(GPIO_FN_ETH_CRS_DV, NULL);
- gpio_request(GPIO_FN_ETH_RX_ER, NULL);
- gpio_request(GPIO_FN_ETH_RXD0, NULL);
- gpio_request(GPIO_FN_ETH_RXD1, NULL);
- gpio_request(GPIO_FN_ETH_LINK, NULL);
- gpio_request(GPIO_FN_ETH_REFCLK, NULL);
- gpio_request(GPIO_FN_ETH_MDIO, NULL);
- gpio_request(GPIO_FN_ETH_TXD1, NULL);
- gpio_request(GPIO_FN_ETH_TX_EN, NULL);
- gpio_request(GPIO_FN_ETH_TXD0, NULL);
- gpio_request(GPIO_FN_ETH_MDC, NULL);
- gpio_request(GPIO_FN_IRQ0, NULL);
-
- mstp_clrbits_le32(PUPR5, PUPR5, PUPR5_ETH & ~PUPR5_ETH_MAGIC);
- gpio_request(GPIO_GP_5_22, NULL); /* PHY_RST */
- mstp_clrbits_le32(PUPR5, PUPR5, PUPR5_ETH_MAGIC);
-
- gpio_direction_output(GPIO_GP_5_22, 0);
- mdelay(20);
- gpio_set_value(GPIO_GP_5_22, 1);
- udelay(1);
+ /* Force ethernet PHY out of reset */
+ gpio_request(ETHERNET_PHY_RESET, "phy_reset");
+ gpio_direction_output(ETHERNET_PHY_RESET, 0);
+ mdelay(10);
+ gpio_direction_output(ETHERNET_PHY_RESET, 1);
return 0;
}
-#define CXR24 0xEE7003C0 /* MAC address high register */
-#define CXR25 0xEE7003C8 /* MAC address low register */
-
-int board_eth_init(bd_t *bis)
+int dram_init(void)
{
- int ret = -ENODEV;
- u32 val;
- unsigned char enetaddr[6];
-
-#ifdef CONFIG_SH_ETHER
- ret = sh_eth_initialize(bis);
- if (!eth_env_get_enetaddr("ethaddr", enetaddr))
- return ret;
-
- /* Set Mac address */
- val = enetaddr[0] << 24 | enetaddr[1] << 16 |
- enetaddr[2] << 8 | enetaddr[3];
- writel(val, CXR24);
+ if (fdtdec_setup_memory_size() != 0)
+ return -EINVAL;
- val = enetaddr[4] << 8 | enetaddr[5];
- writel(val, CXR25);
-#endif
-
- return ret;
+ return 0;
}
-int board_mmc_init(bd_t *bis)
+int dram_init_banksize(void)
{
- int ret = -ENODEV;
-
-#ifdef CONFIG_SH_SDHI
- gpio_request(GPIO_FN_SD0_DATA0, NULL);
- gpio_request(GPIO_FN_SD0_DATA1, NULL);
- gpio_request(GPIO_FN_SD0_DATA2, NULL);
- gpio_request(GPIO_FN_SD0_DATA3, NULL);
- gpio_request(GPIO_FN_SD0_CLK, NULL);
- gpio_request(GPIO_FN_SD0_CMD, NULL);
- gpio_request(GPIO_FN_SD0_CD, NULL);
- gpio_request(GPIO_FN_SD2_DATA0, NULL);
- gpio_request(GPIO_FN_SD2_DATA1, NULL);
- gpio_request(GPIO_FN_SD2_DATA2, NULL);
- gpio_request(GPIO_FN_SD2_DATA3, NULL);
- gpio_request(GPIO_FN_SD2_CLK, NULL);
- gpio_request(GPIO_FN_SD2_CMD, NULL);
- gpio_request(GPIO_FN_SD2_CD, NULL);
-
- /* SDHI 0 */
- gpio_request(GPIO_GP_7_17, NULL);
- gpio_request(GPIO_GP_2_12, NULL);
- gpio_direction_output(GPIO_GP_7_17, 1); /* power on */
- gpio_direction_output(GPIO_GP_2_12, 1); /* 1: 3.3V, 0: 1.8V */
-
- ret = sh_sdhi_init(CONFIG_SYS_SH_SDHI0_BASE, 0,
- SH_SDHI_QUIRK_16BIT_BUF);
- if (ret)
- return ret;
-
- /* SDHI 1 */
- gpio_request(GPIO_GP_7_18, NULL);
- gpio_request(GPIO_GP_2_13, NULL);
- gpio_direction_output(GPIO_GP_7_18, 1); /* power on */
- gpio_direction_output(GPIO_GP_2_13, 1); /* 1: 3.3V, 0: 1.8V */
-
- ret = sh_sdhi_init(CONFIG_SYS_SH_SDHI1_BASE, 1, 0);
- if (ret)
- return ret;
-
- /* SDHI 2 */
- gpio_request(GPIO_GP_7_19, NULL);
- gpio_request(GPIO_GP_2_26, NULL);
- gpio_direction_output(GPIO_GP_7_19, 1); /* power on */
- gpio_direction_output(GPIO_GP_2_26, 1); /* 1: 3.3V, 0: 1.8V */
+ fdtdec_setup_memory_banksize();
- ret = sh_sdhi_init(CONFIG_SYS_SH_SDHI2_BASE, 2, 0);
-#endif
- return ret;
+ return 0;
}
-int dram_init(void)
+/* KSZ8041RNLI */
+#define PHY_CONTROL1 0x1E
+#define PHY_LED_MODE 0xC0000
+#define PHY_LED_MODE_ACK 0x4000
+int board_phy_config(struct phy_device *phydev)
{
- gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
+ int ret = phy_read(phydev, MDIO_DEVAD_NONE, PHY_CONTROL1);
+ ret &= ~PHY_LED_MODE;
+ ret |= PHY_LED_MODE_ACK;
+ ret = phy_write(phydev, MDIO_DEVAD_NONE, PHY_CONTROL1, (u16)ret);
return 0;
}
@@ -207,22 +117,38 @@ const struct rmobile_sysinfo sysinfo = {
void reset_cpu(ulong addr)
{
- u8 val;
+ struct udevice *dev;
+ const u8 pmic_bus = 6;
+ const u8 pmic_addr = 0x58;
+ u8 data;
+ int ret;
+
+ ret = i2c_get_chip_for_busnum(pmic_bus, pmic_addr, 1, &dev);
+ if (ret)
+ hang();
+
+ ret = dm_i2c_read(dev, 0x13, &data, 1);
+ if (ret)
+ hang();
+
+ data |= BIT(1);
- i2c_set_bus_num(2); /* PowerIC connected to ch2 */
- i2c_read(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1);
- val |= 0x02;
- i2c_write(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1);
+ ret = dm_i2c_write(dev, 0x13, &data, 1);
+ if (ret)
+ hang();
}
-static const struct sh_serial_platdata serial_platdata = {
- .base = SCIF0_BASE,
- .type = PORT_SCIF,
- .clk = 14745600,
- .clk_mode = EXT_CLK,
-};
+enum env_location env_get_location(enum env_operation op, int prio)
+{
+ const u32 load_magic = 0xb33fc0de;
-U_BOOT_DEVICE(gose_serials) = {
- .name = "serial_sh",
- .platdata = &serial_platdata,
-};
+ /* Block environment access if loaded using JTAG */
+ if ((readl(CONFIG_SPL_TEXT_BASE + 0x24) == load_magic) &&
+ (op != ENVOP_INIT))
+ return ENVL_UNKNOWN;
+
+ if (prio)
+ return ENVL_UNKNOWN;
+
+ return ENVL_SPI_FLASH;
+}
diff --git a/board/renesas/gose/gose_spl.c b/board/renesas/gose/gose_spl.c
new file mode 100644
index 0000000000..17b9da69d0
--- /dev/null
+++ b/board/renesas/gose/gose_spl.c
@@ -0,0 +1,408 @@
+/*
+ * board/renesas/gose/gose_spl.c
+ *
+ * Copyright (C) 2018 Marek Vasut <marek.vasut@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#include <common.h>
+#include <malloc.h>
+#include <dm/platform_data/serial_sh.h>
+#include <asm/processor.h>
+#include <asm/mach-types.h>
+#include <asm/io.h>
+#include <linux/errno.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/gpio.h>
+#include <asm/arch/rmobile.h>
+#include <asm/arch/rcar-mstp.h>
+
+#include <spl.h>
+
+#define TMU0_MSTP125 BIT(25)
+#define SCIF0_MSTP721 BIT(21)
+#define QSPI_MSTP917 BIT(17)
+
+#define SD2CKCR 0xE615026C
+#define SD_97500KHZ 0x7
+
+struct reg_config {
+ u16 off;
+ u32 val;
+};
+
+static void dbsc_wait(u16 reg)
+{
+ static const u32 dbsc3_0_base = DBSC3_0_BASE;
+
+ while (!(readl(dbsc3_0_base + reg) & BIT(0)))
+ ;
+}
+
+static void spl_init_sys(void)
+{
+ u32 r0 = 0;
+
+ writel(0xa5a5a500, 0xe6020004);
+ writel(0xa5a5a500, 0xe6030004);
+
+ asm volatile(
+ /* ICIALLU - Invalidate I$ to PoU */
+ "mcr 15, 0, %0, cr7, cr5, 0 \n"
+ /* BPIALL - Invalidate branch predictors */
+ "mcr 15, 0, %0, cr7, cr5, 6 \n"
+ /* Set SCTLR[IZ] */
+ "mrc 15, 0, %0, cr1, cr0, 0 \n"
+ "orr %0, #0x1800 \n"
+ "mcr 15, 0, %0, cr1, cr0, 0 \n"
+ "isb sy \n"
+ :"=r"(r0));
+}
+
+static void spl_init_pfc(void)
+{
+ static const struct reg_config pfc_with_unlock[] = {
+ { 0x0090, 0x60000000 },
+ { 0x0094, 0x60000000 },
+ { 0x0098, 0x00800200 },
+ { 0x009c, 0x00000000 },
+ { 0x0020, 0x00000000 },
+ { 0x0024, 0x00000000 },
+ { 0x0028, 0x000244c8 },
+ { 0x002c, 0x00000000 },
+ { 0x0030, 0x00002400 },
+ { 0x0034, 0x01520000 },
+ { 0x0038, 0x00724003 },
+ { 0x003c, 0x00000000 },
+ { 0x0040, 0x00000000 },
+ { 0x0044, 0x00000000 },
+ { 0x0048, 0x00000000 },
+ { 0x004c, 0x00000000 },
+ { 0x0050, 0x00000000 },
+ { 0x0054, 0x00000000 },
+ { 0x0058, 0x00000000 },
+ { 0x005c, 0x00000000 },
+ { 0x0160, 0x00000000 },
+ { 0x0004, 0xffffffff },
+ { 0x0008, 0x00ec3fff },
+ { 0x000c, 0x3bc001e7 },
+ { 0x0010, 0x5bffffff },
+ { 0x0014, 0x1ffffffb },
+ { 0x0018, 0x01bffff0 },
+ { 0x001c, 0xcf7fffff },
+ { 0x0074, 0x0381fc00 },
+ };
+
+ static const struct reg_config pfc_without_unlock[] = {
+ { 0x0100, 0xffffffdf },
+ { 0x0104, 0xc883c3ff },
+ { 0x0108, 0x1201f3c9 },
+ { 0x010c, 0x00000000 },
+ { 0x0110, 0xffffeb04 },
+ { 0x0114, 0xc003ffff },
+ { 0x0118, 0x0800000f },
+ { 0x011c, 0x001800f0 },
+ };
+
+ static const u32 pfc_base = 0xe6060000;
+
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(pfc_with_unlock); i++) {
+ writel(~pfc_with_unlock[i].val, pfc_base);
+ writel(pfc_with_unlock[i].val,
+ pfc_base | pfc_with_unlock[i].off);
+ }
+
+ for (i = 0; i < ARRAY_SIZE(pfc_without_unlock); i++)
+ writel(pfc_without_unlock[i].val,
+ pfc_base | pfc_without_unlock[i].off);
+}
+
+static void spl_init_gpio(void)
+{
+ static const u16 gpio_offs[] = {
+ 0x1000, 0x2000, 0x3000, 0x4000, 0x5000, 0x5400, 0x5800
+ };
+
+ static const struct reg_config gpio_set[] = {
+ { 0x2000, 0x04381000 },
+ { 0x5000, 0x00000000 },
+ { 0x5800, 0x000e0000 },
+ };
+
+ static const struct reg_config gpio_clr[] = {
+ { 0x1000, 0x00000000 },
+ { 0x2000, 0x04381010 },
+ { 0x3000, 0x00000000 },
+ { 0x4000, 0x00000000 },
+ { 0x5000, 0x00400000 },
+ { 0x5400, 0x00000000 },
+ { 0x5800, 0x000e0380 },
+ };
+
+ static const u32 gpio_base = 0xe6050000;
+
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(gpio_offs); i++)
+ writel(0, gpio_base | 0x20 | gpio_offs[i]);
+
+ for (i = 0; i < ARRAY_SIZE(gpio_offs); i++)
+ writel(0, gpio_base | 0x00 | gpio_offs[i]);
+
+ for (i = 0; i < ARRAY_SIZE(gpio_set); i++)
+ writel(gpio_set[i].val, gpio_base | 0x08 | gpio_set[i].off);
+
+ for (i = 0; i < ARRAY_SIZE(gpio_clr); i++)
+ writel(gpio_clr[i].val, gpio_base | 0x04 | gpio_clr[i].off);
+}
+
+static void spl_init_lbsc(void)
+{
+ static const struct reg_config lbsc_config[] = {
+ { 0x00, 0x00000020 },
+ { 0x08, 0x00002020 },
+ { 0x30, 0x2a103320 },
+ { 0x38, 0xff70ff70 },
+ };
+
+ static const u16 lbsc_offs[] = {
+ 0x80, 0x84, 0x88, 0x8c, 0xa0, 0xc0, 0xc4, 0xc8, 0x180
+ };
+
+ static const u32 lbsc_base = 0xfec00200;
+
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(lbsc_config); i++) {
+ writel(lbsc_config[i].val,
+ lbsc_base | lbsc_config[i].off);
+ writel(lbsc_config[i].val,
+ lbsc_base | (lbsc_config[i].off + 4));
+ }
+
+ for (i = 0; i < ARRAY_SIZE(lbsc_offs); i++)
+ writel(0, lbsc_base | lbsc_offs[i]);
+}
+
+static void spl_init_dbsc(void)
+{
+ static const struct reg_config dbsc_config1[] = {
+ { 0x0280, 0x0000a55a },
+ { 0x0018, 0x21000000 },
+ { 0x0018, 0x11000000 },
+ { 0x0018, 0x10000000 },
+ { 0x0290, 0x00000001 },
+ { 0x02a0, 0x80000000 },
+ { 0x0290, 0x00000004 },
+ };
+
+ static const struct reg_config dbsc_config2[] = {
+ { 0x0290, 0x00000006 },
+ { 0x02a0, 0x0001c000 },
+ };
+
+ static const struct reg_config dbsc_config4[] = {
+ { 0x0290, 0x00000010 },
+ { 0x02a0, 0xf00464db },
+ { 0x0290, 0x00000061 },
+ { 0x02a0, 0x0000006d },
+ { 0x0290, 0x00000001 },
+ { 0x02a0, 0x00000073 },
+ { 0x0020, 0x00000007 },
+ { 0x0024, 0x0f030a02 },
+ { 0x0030, 0x00000001 },
+ { 0x00b0, 0x00000000 },
+ { 0x0040, 0x0000000b },
+ { 0x0044, 0x00000008 },
+ { 0x0048, 0x00000000 },
+ { 0x0050, 0x0000000b },
+ { 0x0054, 0x000c000b },
+ { 0x0058, 0x00000027 },
+ { 0x005c, 0x0000001c },
+ { 0x0060, 0x00000006 },
+ { 0x0064, 0x00000020 },
+ { 0x0068, 0x00000008 },
+ { 0x006c, 0x0000000c },
+ { 0x0070, 0x00000009 },
+ { 0x0074, 0x00000012 },
+ { 0x0078, 0x000000d0 },
+ { 0x007c, 0x00140005 },
+ { 0x0080, 0x00050004 },
+ { 0x0084, 0x70233005 },
+ { 0x0088, 0x000c0000 },
+ { 0x008c, 0x00000200 },
+ { 0x0090, 0x00000040 },
+ { 0x0100, 0x00000001 },
+ { 0x00c0, 0x00020001 },
+ { 0x00c8, 0x20042004 },
+ { 0x0380, 0x00020002 },
+ { 0x0390, 0x0000001f },
+ };
+
+ static const struct reg_config dbsc_config5[] = {
+ { 0x0244, 0x00000011 },
+ { 0x0290, 0x00000003 },
+ { 0x02a0, 0x0300c561 },
+ { 0x0290, 0x00000023 },
+ { 0x02a0, 0x00fcdb60 },
+ { 0x0290, 0x00000011 },
+ { 0x02a0, 0x1000040b },
+ { 0x0290, 0x00000012 },
+ { 0x02a0, 0x9d9cbb66 },
+ { 0x0290, 0x00000013 },
+ { 0x02a0, 0x1a868400 },
+ { 0x0290, 0x00000014 },
+ { 0x02a0, 0x300214d8 },
+ { 0x0290, 0x00000015 },
+ { 0x02a0, 0x00000d70 },
+ { 0x0290, 0x00000016 },
+ { 0x02a0, 0x00000006 },
+ { 0x0290, 0x00000017 },
+ { 0x02a0, 0x00000018 },
+ { 0x0290, 0x0000001a },
+ { 0x02a0, 0x910035c7 },
+ { 0x0290, 0x00000004 },
+ };
+
+ static const struct reg_config dbsc_config6[] = {
+ { 0x0290, 0x00000001 },
+ { 0x02a0, 0x00000181 },
+ { 0x0018, 0x11000000 },
+ { 0x0290, 0x00000004 },
+ };
+
+ static const struct reg_config dbsc_config7[] = {
+ { 0x0290, 0x00000001 },
+ { 0x02a0, 0x0000fe01 },
+ { 0x0304, 0x00000000 },
+ { 0x00f4, 0x01004c20 },
+ { 0x00f8, 0x014000aa },
+ { 0x00e0, 0x00000140 },
+ { 0x00e4, 0x00081860 },
+ { 0x00e8, 0x00010000 },
+ { 0x0290, 0x00000004 },
+ };
+
+ static const struct reg_config dbsc_config8[] = {
+ { 0x0014, 0x00000001 },
+ { 0x0010, 0x00000001 },
+ { 0x0280, 0x00000000 },
+ };
+
+ static const u32 dbsc3_0_base = DBSC3_0_BASE;
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config1); i++)
+ writel(dbsc_config1[i].val, dbsc3_0_base | dbsc_config1[i].off);
+
+ dbsc_wait(0x2a0);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config2); i++)
+ writel(dbsc_config2[i].val, dbsc3_0_base | dbsc_config2[i].off);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config4); i++)
+ writel(dbsc_config4[i].val, dbsc3_0_base | dbsc_config4[i].off);
+
+ dbsc_wait(0x240);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config5); i++)
+ writel(dbsc_config5[i].val, dbsc3_0_base | dbsc_config5[i].off);
+
+ dbsc_wait(0x2a0);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config6); i++)
+ writel(dbsc_config6[i].val, dbsc3_0_base | dbsc_config6[i].off);
+
+ dbsc_wait(0x2a0);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config7); i++)
+ writel(dbsc_config7[i].val, dbsc3_0_base | dbsc_config7[i].off);
+
+ dbsc_wait(0x2a0);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config8); i++)
+ writel(dbsc_config8[i].val, dbsc3_0_base | dbsc_config8[i].off);
+
+}
+
+static void spl_init_qspi(void)
+{
+ mstp_clrbits_le32(MSTPSR9, SMSTPCR9, QSPI_MSTP917);
+
+ static const u32 qspi_base = 0xe6b10000;
+
+ writeb(0x08, qspi_base + 0x00);
+ writeb(0x00, qspi_base + 0x01);
+ writeb(0x06, qspi_base + 0x02);
+ writeb(0x01, qspi_base + 0x0a);
+ writeb(0x00, qspi_base + 0x0b);
+ writeb(0x00, qspi_base + 0x0c);
+ writeb(0x00, qspi_base + 0x0d);
+ writeb(0x00, qspi_base + 0x0e);
+
+ writew(0xe080, qspi_base + 0x10);
+
+ writeb(0xc0, qspi_base + 0x18);
+ writeb(0x00, qspi_base + 0x18);
+ writeb(0x00, qspi_base + 0x08);
+ writeb(0x48, qspi_base + 0x00);
+}
+
+void board_init_f(ulong dummy)
+{
+ mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
+ mstp_clrbits_le32(MSTPSR7, SMSTPCR7, SCIF0_MSTP721);
+
+ /*
+ * SD0 clock is set to 97.5MHz by default.
+ * Set SD2 to the 97.5MHz as well.
+ */
+ writel(SD_97500KHZ, SD2CKCR);
+
+ spl_init_sys();
+ spl_init_pfc();
+ spl_init_gpio();
+ spl_init_lbsc();
+ spl_init_dbsc();
+ spl_init_qspi();
+}
+
+void spl_board_init(void)
+{
+ /* UART clocks enabled and gd valid - init serial console */
+ preloader_console_init();
+}
+
+void board_boot_order(u32 *spl_boot_list)
+{
+ const u32 jtag_magic = 0x1337c0de;
+ const u32 load_magic = 0xb33fc0de;
+
+ /*
+ * If JTAG probe sets special word at 0xe6300020, then it must
+ * put U-Boot into RAM and SPL will start it from RAM.
+ */
+ if (readl(CONFIG_SPL_TEXT_BASE + 0x20) == jtag_magic) {
+ printf("JTAG boot detected!\n");
+
+ while (readl(CONFIG_SPL_TEXT_BASE + 0x24) != load_magic)
+ ;
+
+ spl_boot_list[0] = BOOT_DEVICE_RAM;
+ spl_boot_list[1] = BOOT_DEVICE_NONE;
+
+ return;
+ }
+
+ /* Boot from SPI NOR with YMODEM UART fallback. */
+ spl_boot_list[0] = BOOT_DEVICE_SPI;
+ spl_boot_list[1] = BOOT_DEVICE_UART;
+ spl_boot_list[2] = BOOT_DEVICE_NONE;
+}
+
+void reset_cpu(ulong addr)
+{
+}
diff --git a/board/renesas/lager/Makefile b/board/renesas/lager/Makefile
index 0e44c69fd6..379368fdfc 100644
--- a/board/renesas/lager/Makefile
+++ b/board/renesas/lager/Makefile
@@ -6,4 +6,8 @@
# SPDX-License-Identifier: GPL-2.0
#
-obj-y := lager.o qos.o ../rcar-common/common.o
+ifdef CONFIG_SPL_BUILD
+obj-y := lager_spl.o
+else
+obj-y := lager.o qos.o
+endif
diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c
index 3566bcc788..505efb5bc4 100644
--- a/board/renesas/lager/lager.c
+++ b/board/renesas/lager/lager.c
@@ -57,105 +57,60 @@ void s_init(void)
qos_init();
}
-#define TMU0_MSTP125 (1 << 25)
-#define SCIF0_MSTP721 (1 << 21)
-#define ETHER_MSTP813 (1 << 13)
-#define MMC1_MSTP305 (1 << 5)
+#define TMU0_MSTP125 BIT(25)
-#define MSTPSR3 0xE6150048
-#define SMSTPCR3 0xE615013C
-#define SDHI0_MSTP314 (1 << 14)
-#define SDHI1_MSTP313 (1 << 13)
-#define SDHI2_MSTP312 (1 << 12)
-
-#define SD2CKCR 0xE6150078
-#define SD2_97500KHZ 0x7
+#define SD1CKCR 0xE6150078
+#define SD2CKCR 0xE615026C
+#define SD_97500KHZ 0x7
int board_early_init_f(void)
{
- /* TMU0 */
mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
- /* SCIF0 */
- mstp_clrbits_le32(MSTPSR7, SMSTPCR7, SCIF0_MSTP721);
- /* ETHER */
- mstp_clrbits_le32(MSTPSR8, SMSTPCR8, ETHER_MSTP813);
- /* eMMC */
- mstp_clrbits_le32(MSTPSR3, SMSTPCR3, MMC1_MSTP305);
- /* SDHI0, 2 */
- mstp_clrbits_le32(MSTPSR3, SMSTPCR3, SDHI0_MSTP314 | SDHI2_MSTP312);
/*
* SD0 clock is set to 97.5MHz by default.
- * Set SD2 to the 97.5MHz as well.
+ * Set SD1 and SD2 to the 97.5MHz as well.
*/
- writel(SD2_97500KHZ, SD2CKCR);
+ writel(SD_97500KHZ, SD1CKCR);
+ writel(SD_97500KHZ, SD2CKCR);
return 0;
}
-DECLARE_GLOBAL_DATA_PTR;
+#define ETHERNET_PHY_RESET 185 /* GPIO 5 31 */
+
int board_init(void)
{
/* adress of boot parameters */
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
- /* Init PFC controller */
- r8a7790_pinmux_init();
-
- /* ETHER Enable */
- gpio_request(GPIO_FN_ETH_CRS_DV, NULL);
- gpio_request(GPIO_FN_ETH_RX_ER, NULL);
- gpio_request(GPIO_FN_ETH_RXD0, NULL);
- gpio_request(GPIO_FN_ETH_RXD1, NULL);
- gpio_request(GPIO_FN_ETH_LINK, NULL);
- gpio_request(GPIO_FN_ETH_REF_CLK, NULL);
- gpio_request(GPIO_FN_ETH_MDIO, NULL);
- gpio_request(GPIO_FN_ETH_TXD1, NULL);
- gpio_request(GPIO_FN_ETH_TX_EN, NULL);
- gpio_request(GPIO_FN_ETH_MAGIC, NULL);
- gpio_request(GPIO_FN_ETH_TXD0, NULL);
- gpio_request(GPIO_FN_ETH_MDC, NULL);
- gpio_request(GPIO_FN_IRQ0, NULL);
-
- gpio_request(GPIO_GP_5_31, NULL); /* PHY_RST */
- gpio_direction_output(GPIO_GP_5_31, 0);
- mdelay(20);
- gpio_set_value(GPIO_GP_5_31, 1);
- udelay(1);
+ /* Force ethernet PHY out of reset */
+ gpio_request(ETHERNET_PHY_RESET, "phy_reset");
+ gpio_direction_output(ETHERNET_PHY_RESET, 0);
+ mdelay(10);
+ gpio_direction_output(ETHERNET_PHY_RESET, 1);
return 0;
}
-#define CXR24 0xEE7003C0 /* MAC address high register */
-#define CXR25 0xEE7003C8 /* MAC address low register */
-int board_eth_init(bd_t *bis)
+int dram_init(void)
{
- int ret = -ENODEV;
-
-#ifdef CONFIG_SH_ETHER
- u32 val;
- unsigned char enetaddr[6];
+ if (fdtdec_setup_memory_size() != 0)
+ return -EINVAL;
- ret = sh_eth_initialize(bis);
- if (!eth_env_get_enetaddr("ethaddr", enetaddr))
- return ret;
-
- /* Set Mac address */
- val = enetaddr[0] << 24 | enetaddr[1] << 16 |
- enetaddr[2] << 8 | enetaddr[3];
- writel(val, CXR24);
-
- val = enetaddr[4] << 8 | enetaddr[5];
- writel(val, CXR25);
+ return 0;
+}
-#endif
+int dram_init_banksize(void)
+{
+ fdtdec_setup_memory_banksize();
- return ret;
+ return 0;
}
-/* lager has KSZ8041NL/RNL */
-#define PHY_CONTROL1 0x1E
-#define PHY_LED_MODE 0xC0000
+/* KSZ8041NL/RNL */
+#define PHY_CONTROL1 0x1E
+#define PHY_LED_MODE 0xC0000
#define PHY_LED_MODE_ACK 0x4000
int board_phy_config(struct phy_device *phydev)
{
@@ -167,97 +122,44 @@ int board_phy_config(struct phy_device *phydev)
return 0;
}
-int board_mmc_init(bd_t *bis)
+const struct rmobile_sysinfo sysinfo = {
+ CONFIG_ARCH_RMOBILE_BOARD_STRING
+};
+
+void reset_cpu(ulong addr)
{
- int ret = -ENODEV;
-
-#ifdef CONFIG_SH_MMCIF
- gpio_request(GPIO_FN_MMC1_D0, NULL);
- gpio_request(GPIO_FN_MMC1_D1, NULL);
- gpio_request(GPIO_FN_MMC1_D2, NULL);
- gpio_request(GPIO_FN_MMC1_D3, NULL);
- gpio_request(GPIO_FN_MMC1_D4, NULL);
- gpio_request(GPIO_FN_MMC1_D5, NULL);
- gpio_request(GPIO_FN_MMC1_D6, NULL);
- gpio_request(GPIO_FN_MMC1_D7, NULL);
- gpio_request(GPIO_FN_MMC1_CLK, NULL);
- gpio_request(GPIO_FN_MMC1_CMD, NULL);
-
- ret = mmcif_mmc_init();
-#endif
-
-#ifdef CONFIG_SH_SDHI
- gpio_request(GPIO_FN_SD0_DAT0, NULL);
- gpio_request(GPIO_FN_SD0_DAT1, NULL);
- gpio_request(GPIO_FN_SD0_DAT2, NULL);
- gpio_request(GPIO_FN_SD0_DAT3, NULL);
- gpio_request(GPIO_FN_SD0_CLK, NULL);
- gpio_request(GPIO_FN_SD0_CMD, NULL);
- gpio_request(GPIO_FN_SD0_CD, NULL);
- gpio_request(GPIO_FN_SD2_DAT0, NULL);
- gpio_request(GPIO_FN_SD2_DAT1, NULL);
- gpio_request(GPIO_FN_SD2_DAT2, NULL);
- gpio_request(GPIO_FN_SD2_DAT3, NULL);
- gpio_request(GPIO_FN_SD2_CLK, NULL);
- gpio_request(GPIO_FN_SD2_CMD, NULL);
- gpio_request(GPIO_FN_SD2_CD, NULL);
+ struct udevice *dev;
+ const u8 pmic_bus = 2;
+ const u8 pmic_addr = 0x58;
+ u8 data;
+ int ret;
- /*
- * SDHI 0
- * need JP3 set to pin-1 side on board.
- */
- gpio_request(GPIO_GP_5_24, NULL);
- gpio_request(GPIO_GP_5_29, NULL);
- gpio_direction_output(GPIO_GP_5_24, 1); /* power on */
- gpio_direction_output(GPIO_GP_5_29, 1); /* 1: 3.3V, 0: 1.8V */
+ ret = i2c_get_chip_for_busnum(pmic_bus, pmic_addr, 1, &dev);
+ if (ret)
+ hang();
- ret = sh_sdhi_init(CONFIG_SYS_SH_SDHI0_BASE, 0,
- SH_SDHI_QUIRK_16BIT_BUF);
+ ret = dm_i2c_read(dev, 0x13, &data, 1);
if (ret)
- return ret;
+ hang();
- /* SDHI 2 */
- gpio_request(GPIO_GP_5_25, NULL);
- gpio_request(GPIO_GP_5_30, NULL);
- gpio_direction_output(GPIO_GP_5_25, 1); /* power on */
- gpio_direction_output(GPIO_GP_5_30, 1); /* 1: 3.3V, 0: 1.8V */
+ data |= BIT(1);
- ret = sh_sdhi_init(CONFIG_SYS_SH_SDHI2_BASE, 2, 0);
-#endif
- return ret;
+ ret = dm_i2c_write(dev, 0x13, &data, 1);
+ if (ret)
+ hang();
}
-
-int dram_init(void)
+enum env_location env_get_location(enum env_operation op, int prio)
{
- gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
+ const u32 load_magic = 0xb33fc0de;
- return 0;
-}
+ /* Block environment access if loaded using JTAG */
+ if ((readl(CONFIG_SPL_TEXT_BASE + 0x24) == load_magic) &&
+ (op != ENVOP_INIT))
+ return ENVL_UNKNOWN;
-const struct rmobile_sysinfo sysinfo = {
- CONFIG_ARCH_RMOBILE_BOARD_STRING
-};
-
-void reset_cpu(ulong addr)
-{
- u8 val;
+ if (prio)
+ return ENVL_UNKNOWN;
- i2c_set_bus_num(3); /* PowerIC connected to ch3 */
- i2c_init(400000, 0);
- i2c_read(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1);
- val |= 0x02;
- i2c_write(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1);
+ return ENVL_SPI_FLASH;
}
-
-static const struct sh_serial_platdata serial_platdata = {
- .base = SCIF0_BASE,
- .type = PORT_SCIF,
- .clk = 14745600,
- .clk_mode = EXT_CLK,
-};
-
-U_BOOT_DEVICE(lager_serials) = {
- .name = "serial_sh",
- .platdata = &serial_platdata,
-};
diff --git a/board/renesas/lager/lager_spl.c b/board/renesas/lager/lager_spl.c
new file mode 100644
index 0000000000..5730eb2f1e
--- /dev/null
+++ b/board/renesas/lager/lager_spl.c
@@ -0,0 +1,396 @@
+/*
+ * board/renesas/lager/lager_spl.c
+ *
+ * Copyright (C) 2018 Marek Vasut <marek.vasut@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#include <common.h>
+#include <malloc.h>
+#include <dm/platform_data/serial_sh.h>
+#include <asm/processor.h>
+#include <asm/mach-types.h>
+#include <asm/io.h>
+#include <linux/errno.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/gpio.h>
+#include <asm/arch/rmobile.h>
+#include <asm/arch/rcar-mstp.h>
+
+#include <spl.h>
+
+#define TMU0_MSTP125 BIT(25)
+#define SCIF0_MSTP721 BIT(21)
+#define QSPI_MSTP917 BIT(17)
+
+#define SD2CKCR 0xE615026C
+#define SD_97500KHZ 0x7
+
+struct reg_config {
+ u16 off;
+ u32 val;
+};
+
+static void dbsc_wait(u16 reg)
+{
+ static const u32 dbsc3_0_base = DBSC3_0_BASE;
+
+ while (!(readl(dbsc3_0_base + reg) & BIT(0)))
+ ;
+}
+
+static void spl_init_sys(void)
+{
+ u32 r0 = 0;
+
+ writel(0xa5a5a500, 0xe6020004);
+ writel(0xa5a5a500, 0xe6030004);
+
+ asm volatile(
+ /* ICIALLU - Invalidate I$ to PoU */
+ "mcr 15, 0, %0, cr7, cr5, 0 \n"
+ /* BPIALL - Invalidate branch predictors */
+ "mcr 15, 0, %0, cr7, cr5, 6 \n"
+ /* Set SCTLR[IZ] */
+ "mrc 15, 0, %0, cr1, cr0, 0 \n"
+ "orr %0, #0x1800 \n"
+ "mcr 15, 0, %0, cr1, cr0, 0 \n"
+ "isb sy \n"
+ :"=r"(r0));
+}
+
+static void spl_init_pfc(void)
+{
+ static const struct reg_config pfc_with_unlock[] = {
+ { 0x0090, 0x00000000 },
+ { 0x0094, 0x00000000 },
+ { 0x0098, 0xc0000000 },
+ { 0x0020, 0x00000000 },
+ { 0x0024, 0x00000000 },
+ { 0x0028, 0x00000000 },
+ { 0x002c, 0x20000000 },
+ { 0x0030, 0x00001249 },
+ { 0x0034, 0x00000278 },
+ { 0x0038, 0x00000841 },
+ { 0x003c, 0x00000000 },
+ { 0x0040, 0x00000000 },
+ { 0x0044, 0x10000000 },
+ { 0x0048, 0x00000001 },
+ { 0x004c, 0x0004aab0 },
+ { 0x0050, 0x37301b00 },
+ { 0x0054, 0x00048da3 },
+ { 0x0058, 0x089044a1 },
+ { 0x005c, 0x2a3a55b4 },
+ { 0x0160, 0x00000003 },
+ { 0x0004, 0xffffffff },
+ { 0x0008, 0x2aef3fff },
+ { 0x000c, 0x3fffffff },
+ { 0x0010, 0xff7fc07f },
+ { 0x0014, 0x7f3ff3f8 },
+ { 0x0018, 0x1cfdfff7 },
+ };
+
+ static const struct reg_config pfc_without_unlock[] = {
+ { 0x0100, 0x1fffffff },
+ { 0x0104, 0xffff0318 },
+ { 0x0108, 0x387fffe1 },
+ { 0x010c, 0x00803f80 },
+ { 0x0110, 0x1520009f },
+ { 0x0114, 0x00000000 },
+ { 0x0118, 0x00000000 },
+ };
+
+ static const u32 pfc_base = 0xe6060000;
+
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(pfc_with_unlock); i++) {
+ writel(~pfc_with_unlock[i].val, pfc_base);
+ writel(pfc_with_unlock[i].val,
+ pfc_base | pfc_with_unlock[i].off);
+ }
+
+ for (i = 0; i < ARRAY_SIZE(pfc_without_unlock); i++)
+ writel(pfc_without_unlock[i].val,
+ pfc_base | pfc_without_unlock[i].off);
+}
+
+static void spl_init_gpio(void)
+{
+ static const u16 gpio_offs[] = {
+ 0x1000, 0x3000, 0x4000, 0x5000
+ };
+
+ static const struct reg_config gpio_set[] = {
+ { 0x4000, 0x00c00000 },
+ { 0x5000, 0x63020000 },
+ };
+
+ static const struct reg_config gpio_clr[] = {
+ { 0x1000, 0x00000000 },
+ { 0x3000, 0x00000000 },
+ { 0x4000, 0x00c00000 },
+ { 0x5000, 0xe3020000 },
+ };
+
+ static const u32 gpio_base = 0xe6050000;
+
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(gpio_offs); i++)
+ writel(0, gpio_base | 0x20 | gpio_offs[i]);
+
+ for (i = 0; i < ARRAY_SIZE(gpio_offs); i++)
+ writel(0, gpio_base | 0x00 | gpio_offs[i]);
+
+ for (i = 0; i < ARRAY_SIZE(gpio_set); i++)
+ writel(gpio_set[i].val, gpio_base | 0x08 | gpio_set[i].off);
+
+ for (i = 0; i < ARRAY_SIZE(gpio_clr); i++)
+ writel(gpio_clr[i].val, gpio_base | 0x04 | gpio_clr[i].off);
+}
+
+static void spl_init_lbsc(void)
+{
+ static const struct reg_config lbsc_config[] = {
+ { 0x00, 0x00000020 },
+ { 0x08, 0x00002020 },
+ { 0x30, 0x02150326 },
+ { 0x38, 0x077f077f },
+ };
+
+ static const u16 lbsc_offs[] = {
+ 0x80, 0x84, 0x88, 0x8c, 0xa0, 0xc0, 0xc4, 0xc8, 0x180
+ };
+
+ static const u32 lbsc_base = 0xfec00200;
+
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(lbsc_config); i++) {
+ writel(lbsc_config[i].val,
+ lbsc_base | lbsc_config[i].off);
+ writel(lbsc_config[i].val,
+ lbsc_base | (lbsc_config[i].off + 4));
+ }
+
+ for (i = 0; i < ARRAY_SIZE(lbsc_offs); i++)
+ writel(0, lbsc_base | lbsc_offs[i]);
+}
+
+static void spl_init_dbsc(void)
+{
+ static const struct reg_config dbsc_config1[] = {
+ { 0x0018, 0x21000000 },
+ { 0x0018, 0x11000000 },
+ { 0x0018, 0x10000000 },
+ { 0x0280, 0x0000a55a },
+ { 0x0290, 0x00000001 },
+ { 0x02a0, 0x80000000 },
+ { 0x0290, 0x00000004 },
+ };
+
+ static const struct reg_config dbsc_config4[] = {
+ { 0x0290, 0x00000010 },
+ { 0x02a0, 0xf004649b },
+ { 0x0290, 0x0000000f },
+ { 0x02a0, 0x00181ee4 },
+ { 0x0290, 0x00000060 },
+ { 0x02a0, 0x330657b2 },
+ { 0x0290, 0x00000001 },
+ { 0x02a0, 0x00000071 },
+ { 0x0020, 0x00000007 },
+ { 0x0024, 0x10030a02 },
+ { 0x0030, 0x00000001 },
+ { 0x00b0, 0x00000000 },
+ { 0x0040, 0x0000000b },
+ { 0x0044, 0x00000008 },
+ { 0x0048, 0x00000000 },
+ { 0x0050, 0x0000000b },
+ { 0x0054, 0x000c000b },
+ { 0x0058, 0x00000027 },
+ { 0x005c, 0x0000001c },
+ { 0x0060, 0x00000005 },
+ { 0x0064, 0x00000018 },
+ { 0x0068, 0x00000008 },
+ { 0x006c, 0x0000000c },
+ { 0x0070, 0x00000009 },
+ { 0x0074, 0x00000012 },
+ { 0x0078, 0x000000d0 },
+ { 0x007c, 0x00140005 },
+ { 0x0080, 0x00050004 },
+ { 0x0084, 0x70233005 },
+ { 0x0088, 0x000c0000 },
+ { 0x008c, 0x00000300 },
+ { 0x0090, 0x00000040 },
+ { 0x0100, 0x00000001 },
+ { 0x00c0, 0x00020001 },
+ { 0x00c8, 0x20082008 },
+ { 0x0380, 0x00020002 },
+ { 0x0390, 0x0000000f },
+ };
+
+ static const struct reg_config dbsc_config5[] = {
+ { 0x0244, 0x00000011 },
+ { 0x0290, 0x00000006 },
+ { 0x02a0, 0x0005c000 },
+ { 0x0290, 0x00000003 },
+ { 0x02a0, 0x0300c481 },
+ { 0x0290, 0x00000023 },
+ { 0x02a0, 0x00fdb6c0 },
+ { 0x0290, 0x00000011 },
+ { 0x02a0, 0x1000040b },
+ { 0x0290, 0x00000012 },
+ { 0x02a0, 0x9d5cbb66 },
+ { 0x0290, 0x00000013 },
+ { 0x02a0, 0x1a868300 },
+ { 0x0290, 0x00000014 },
+ { 0x02a0, 0x300214d8 },
+ { 0x0290, 0x00000015 },
+ { 0x02a0, 0x00000d70 },
+ { 0x0290, 0x00000016 },
+ { 0x02a0, 0x00000006 },
+ { 0x0290, 0x00000017 },
+ { 0x02a0, 0x00000018 },
+ { 0x0290, 0x0000001a },
+ { 0x02a0, 0x910035c7 },
+ { 0x0290, 0x00000004 },
+ };
+
+ static const struct reg_config dbsc_config6[] = {
+ { 0x0290, 0x00000001 },
+ { 0x02a0, 0x00000181 },
+ { 0x0018, 0x11000000 },
+ { 0x0290, 0x00000004 },
+ };
+
+ static const struct reg_config dbsc_config7[] = {
+ { 0x0290, 0x00000001 },
+ { 0x02a0, 0x0000fe01 },
+ { 0x0290, 0x00000004 },
+ };
+
+ static const struct reg_config dbsc_config8[] = {
+ { 0x0304, 0x00000000 },
+ { 0x00f4, 0x01004c20 },
+ { 0x00f8, 0x014000aa },
+ { 0x00e0, 0x00000140 },
+ { 0x00e4, 0x00081860 },
+ { 0x00e8, 0x00010000 },
+ { 0x0014, 0x00000001 },
+ { 0x0010, 0x00000001 },
+ { 0x0280, 0x00000000 },
+ };
+
+ static const u32 dbsc3_0_base = DBSC3_0_BASE;
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config1); i++)
+ writel(dbsc_config1[i].val, dbsc3_0_base | dbsc_config1[i].off);
+
+ dbsc_wait(0x2a0);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config4); i++)
+ writel(dbsc_config4[i].val, dbsc3_0_base | dbsc_config4[i].off);
+
+ dbsc_wait(0x240);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config5); i++)
+ writel(dbsc_config5[i].val, dbsc3_0_base | dbsc_config5[i].off);
+
+ dbsc_wait(0x2a0);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config6); i++)
+ writel(dbsc_config6[i].val, dbsc3_0_base | dbsc_config6[i].off);
+
+ dbsc_wait(0x2a0);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config7); i++)
+ writel(dbsc_config7[i].val, dbsc3_0_base | dbsc_config7[i].off);
+
+ dbsc_wait(0x2a0);
+
+ for (i = 0; i < ARRAY_SIZE(dbsc_config8); i++)
+ writel(dbsc_config8[i].val, dbsc3_0_base | dbsc_config8[i].off);
+
+}
+
+static void spl_init_qspi(void)
+{
+ mstp_clrbits_le32(MSTPSR9, SMSTPCR9, QSPI_MSTP917);
+
+ static const u32 qspi_base = 0xe6b10000;
+
+ writeb(0x08, qspi_base + 0x00);
+ writeb(0x00, qspi_base + 0x01);
+ writeb(0x06, qspi_base + 0x02);
+ writeb(0x01, qspi_base + 0x0a);
+ writeb(0x00, qspi_base + 0x0b);
+ writeb(0x00, qspi_base + 0x0c);
+ writeb(0x00, qspi_base + 0x0d);
+ writeb(0x00, qspi_base + 0x0e);
+
+ writew(0xe080, qspi_base + 0x10);
+
+ writeb(0xc0, qspi_base + 0x18);
+ writeb(0x00, qspi_base + 0x18);
+ writeb(0x00, qspi_base + 0x08);
+ writeb(0x48, qspi_base + 0x00);
+}
+
+void board_init_f(ulong dummy)
+{
+ mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
+ mstp_clrbits_le32(MSTPSR7, SMSTPCR7, SCIF0_MSTP721);
+
+ /*
+ * SD0 clock is set to 97.5MHz by default.
+ * Set SD2 to the 97.5MHz as well.
+ */
+ writel(SD_97500KHZ, SD2CKCR);
+
+ spl_init_sys();
+ spl_init_pfc();
+ spl_init_gpio();
+ spl_init_lbsc();
+ spl_init_dbsc();
+ spl_init_qspi();
+}
+
+void spl_board_init(void)
+{
+ /* UART clocks enabled and gd valid - init serial console */
+ preloader_console_init();
+}
+
+void board_boot_order(u32 *spl_boot_list)
+{
+ const u32 jtag_magic = 0x1337c0de;
+ const u32 load_magic = 0xb33fc0de;
+
+ /*
+ * If JTAG probe sets special word at 0xe6300020, then it must
+ * put U-Boot into RAM and SPL will start it from RAM.
+ */
+ if (readl(CONFIG_SPL_TEXT_BASE + 0x20) == jtag_magic) {
+ printf("JTAG boot detected!\n");
+
+ while (readl(CONFIG_SPL_TEXT_BASE + 0x24) != load_magic)
+ ;
+
+ spl_boot_list[0] = BOOT_DEVICE_RAM;
+ spl_boot_list[1] = BOOT_DEVICE_NONE;
+
+ return;
+ }
+
+ /* Boot from SPI NOR with YMODEM UART fallback. */
+ spl_boot_list[0] = BOOT_DEVICE_SPI;
+ spl_boot_list[1] = BOOT_DEVICE_UART;
+ spl_boot_list[2] = BOOT_DEVICE_NONE;
+}
+
+void reset_cpu(ulong addr)
+{
+}
diff --git a/board/renesas/silk/silk.c b/board/renesas/silk/silk.c
index bfe9909daf..c932c255a0 100644
--- a/board/renesas/silk/silk.c
+++ b/board/renesas/silk/silk.c
@@ -114,7 +114,7 @@ void reset_cpu(ulong addr)
{
struct udevice *dev;
const u8 pmic_bus = 1;
- const u8 pmic_addr = 0x58;
+ const u8 pmic_addr = 0x5a;
u8 data;
int ret;
diff --git a/board/rockchip/evb_rk3036/evb_rk3036.c b/board/rockchip/evb_rk3036/evb_rk3036.c
index 288370a80b..86187e37c2 100644
--- a/board/rockchip/evb_rk3036/evb_rk3036.c
+++ b/board/rockchip/evb_rk3036/evb_rk3036.c
@@ -10,8 +10,6 @@
#include <asm/arch/uart.h>
#include <asm/arch/sdram_rk3036.h>
-DECLARE_GLOBAL_DATA_PTR;
-
void get_ddr_config(struct rk3036_ddr_config *config)
{
/* K4B4G1646Q config */
diff --git a/board/rockchip/evb_rk3229/evb_rk3229.c b/board/rockchip/evb_rk3229/evb_rk3229.c
index a9a3a40ce8..5fe1868f61 100644
--- a/board/rockchip/evb_rk3229/evb_rk3229.c
+++ b/board/rockchip/evb_rk3229/evb_rk3229.c
@@ -9,4 +9,3 @@
#include <asm/io.h>
#include <asm/arch/uart.h>
-DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c
index 502dec325f..0f9267b68e 100644
--- a/board/rockchip/evb_rk3399/evb-rk3399.c
+++ b/board/rockchip/evb_rk3399/evb-rk3399.c
@@ -12,8 +12,6 @@
#include <power/regulator.h>
#include <spl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int board_init(void)
{
struct udevice *pinctrl, *regulator;
diff --git a/board/rockchip/kylin_rk3036/kylin_rk3036.c b/board/rockchip/kylin_rk3036/kylin_rk3036.c
index 9134994874..e1af124e32 100644
--- a/board/rockchip/kylin_rk3036/kylin_rk3036.c
+++ b/board/rockchip/kylin_rk3036/kylin_rk3036.c
@@ -11,8 +11,6 @@
#include <asm/arch/sdram_rk3036.h>
#include <asm/gpio.h>
-DECLARE_GLOBAL_DATA_PTR;
-
void get_ddr_config(struct rk3036_ddr_config *config)
{
/* K4B4G1646Q config */
diff --git a/board/rockchip/sheep_rk3368/sheep_rk3368.c b/board/rockchip/sheep_rk3368/sheep_rk3368.c
index 17adb02469..348818cbf0 100644
--- a/board/rockchip/sheep_rk3368/sheep_rk3368.c
+++ b/board/rockchip/sheep_rk3368/sheep_rk3368.c
@@ -9,8 +9,6 @@
#include <asm/arch/grf_rk3368.h>
#include <syscon.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int mach_cpu_init(void)
{
return 0;
diff --git a/board/samsung/espresso7420/espresso7420.c b/board/samsung/espresso7420/espresso7420.c
index 04a83bc07d..1ed8680010 100644
--- a/board/samsung/espresso7420/espresso7420.c
+++ b/board/samsung/espresso7420/espresso7420.c
@@ -8,8 +8,6 @@
#include <common.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int exynos_init(void)
{
return 0;
diff --git a/board/samsung/origen/origen.c b/board/samsung/origen/origen.c
index 99a2facd1e..3d27a9433b 100644
--- a/board/samsung/origen/origen.c
+++ b/board/samsung/origen/origen.c
@@ -13,8 +13,6 @@
#include <asm/arch/pinmux.h>
#include <usb.h>
-DECLARE_GLOBAL_DATA_PTR;
-
u32 get_board_rev(void)
{
return 0;
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index f0913383b9..781b579967 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -30,8 +30,6 @@
#include "setup.h"
-DECLARE_GLOBAL_DATA_PTR;
-
unsigned int board_rev;
#ifdef CONFIG_REVISION_TAG
diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index f9acbd3571..6abafeb1b3 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -24,8 +24,6 @@
#include <usb/dwc2_udc.h>
#include <usb_mass_storage.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static unsigned int board_rev = -1;
static inline u32 get_model_rev(void);
diff --git a/board/sbc8349/pci.c b/board/sbc8349/pci.c
index e792fe313d..9b1560bd77 100644
--- a/board/sbc8349/pci.c
+++ b/board/sbc8349/pci.c
@@ -16,8 +16,6 @@
#include <i2c.h>
#include <asm/fsl_i2c.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static struct pci_region pci1_regions[] = {
{
bus_start: CONFIG_SYS_PCI1_MEM_BASE,
diff --git a/board/sbc8548/sbc8548.c b/board/sbc8548/sbc8548.c
index 1a48a6c89f..566777cf7f 100644
--- a/board/sbc8548/sbc8548.c
+++ b/board/sbc8548/sbc8548.c
@@ -24,8 +24,6 @@
#include <linux/libfdt.h>
#include <fdt_support.h>
-DECLARE_GLOBAL_DATA_PTR;
-
void local_bus_init(void);
int board_early_init_f (void)
diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c
index c705b5ab0f..c7a6a7aaa3 100644
--- a/board/siemens/draco/board.c
+++ b/board/siemens/draco/board.c
@@ -36,8 +36,6 @@
#include "../common/factoryset.h"
#include <nand.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_SPL_BUILD
static struct draco_baseboard_id __attribute__((section(".data"))) settings;
diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c
index ab54e58861..7339135050 100644
--- a/board/siemens/pxm2/board.c
+++ b/board/siemens/pxm2/board.c
@@ -39,8 +39,6 @@
#include <nand.h>
#include <bmp_layout.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_SPL_BUILD
static void board_init_ddr(void)
{
diff --git a/board/siemens/rut/board.c b/board/siemens/rut/board.c
index 2a97414baf..ed5cde3a0b 100644
--- a/board/siemens/rut/board.c
+++ b/board/siemens/rut/board.c
@@ -35,8 +35,6 @@
#include "../common/factoryset.h"
#include "../../../drivers/video/da8xx-fb.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Read header information from EEPROM into global structure.
*/
diff --git a/board/theobroma-systems/lion_rk3368/lion_rk3368.c b/board/theobroma-systems/lion_rk3368/lion_rk3368.c
index 73b14883c3..c8fe4d5678 100644
--- a/board/theobroma-systems/lion_rk3368/lion_rk3368.c
+++ b/board/theobroma-systems/lion_rk3368/lion_rk3368.c
@@ -12,8 +12,6 @@
#include <asm/arch/timer.h>
#include <syscon.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int mach_cpu_init(void)
{
return 0;
diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
index 1d8b605b69..a5371fc078 100644
--- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c
+++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
@@ -24,8 +24,6 @@
#include <power/regulator.h>
#include <u-boot/sha256.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int board_init(void)
{
int ret;
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index c33bf58ddc..896b9b63bb 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -243,9 +243,11 @@ static struct emif_regs ddr3_icev2_emif_reg_data = {
#ifdef CONFIG_SPL_OS_BOOT
int spl_start_uboot(void)
{
+#ifdef CONFIG_SPL_SERIAL_SUPPORT
/* break into full u-boot on 'c' */
if (serial_tstc() && serial_getc() == 'c')
return 1;
+#endif
#ifdef CONFIG_SPL_ENV_SUPPORT
env_init();
diff --git a/board/ti/ks2_evm/board_k2e.c b/board/ti/ks2_evm/board_k2e.c
index 6c77d915e5..e96636b6ec 100644
--- a/board/ti/ks2_evm/board_k2e.c
+++ b/board/ti/ks2_evm/board_k2e.c
@@ -12,8 +12,6 @@
#include <asm/arch/hardware.h>
#include <asm/ti-common/keystone_net.h>
-DECLARE_GLOBAL_DATA_PTR;
-
unsigned int get_external_clk(u32 clk)
{
unsigned int clk_freq;
diff --git a/board/ti/ks2_evm/board_k2hk.c b/board/ti/ks2_evm/board_k2hk.c
index e99e6355b4..d61f72921a 100644
--- a/board/ti/ks2_evm/board_k2hk.c
+++ b/board/ti/ks2_evm/board_k2hk.c
@@ -12,8 +12,6 @@
#include <asm/arch/hardware.h>
#include <asm/ti-common/keystone_net.h>
-DECLARE_GLOBAL_DATA_PTR;
-
unsigned int external_clk[ext_clk_count] = {
[sys_clk] = 122880000,
[alt_core_clk] = 125000000,
diff --git a/board/ti/ks2_evm/board_k2l.c b/board/ti/ks2_evm/board_k2l.c
index c65f33131d..b114c24690 100644
--- a/board/ti/ks2_evm/board_k2l.c
+++ b/board/ti/ks2_evm/board_k2l.c
@@ -12,8 +12,6 @@
#include <asm/arch/hardware.h>
#include <asm/ti-common/keystone_net.h>
-DECLARE_GLOBAL_DATA_PTR;
-
unsigned int get_external_clk(u32 clk)
{
unsigned int clk_freq;
diff --git a/board/toradex/colibri_vf/dcu.c b/board/toradex/colibri_vf/dcu.c
index 3fa6a763d8..c0add005eb 100644
--- a/board/toradex/colibri_vf/dcu.c
+++ b/board/toradex/colibri_vf/dcu.c
@@ -11,8 +11,6 @@
#include <fsl_dcu_fb.h>
#include "div64.h"
-DECLARE_GLOBAL_DATA_PTR;
-
unsigned int dcu_set_pixel_clock(unsigned int pixclock)
{
struct ccm_reg *ccm = (struct ccm_reg *)CCM_BASE_ADDR;
diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
index 0f59648b1f..ac265579e8 100644
--- a/board/tplink/wdr4300/wdr4300.c
+++ b/board/tplink/wdr4300/wdr4300.c
@@ -13,8 +13,6 @@
#include <mach/ddr.h>
#include <debug_uart.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_USB
static void wdr4300_usb_start(void)
{
diff --git a/board/tqc/tqm834x/pci.c b/board/tqc/tqm834x/pci.c
index 1acec84968..43ecdf1495 100644
--- a/board/tqc/tqm834x/pci.c
+++ b/board/tqc/tqm834x/pci.c
@@ -14,8 +14,6 @@
#include <i2c.h>
#include <asm/fsl_i2c.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static struct pci_region pci1_regions[] = {
{
bus_start: CONFIG_SYS_PCI1_MEM_BASE,
diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tqc/tqma6/tqma6_mba6.c
index be4c132fbe..37ad916853 100644
--- a/board/tqc/tqma6/tqma6_mba6.c
+++ b/board/tqc/tqma6/tqma6_mba6.c
@@ -30,8 +30,6 @@
#include "tqma6_bb.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS)
diff --git a/board/udoo/udoo_spl.c b/board/udoo/udoo_spl.c
index 694055bd2e..c862ed15d9 100644
--- a/board/udoo/udoo_spl.c
+++ b/board/udoo/udoo_spl.c
@@ -21,8 +21,6 @@
#include <asm/arch/sys_proto.h>
#include <spl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#if defined(CONFIG_SPL_BUILD)
#include <asm/arch/mx6-ddr.h>
diff --git a/board/varisys/cyrus/cyrus.c b/board/varisys/cyrus/cyrus.c
index f4586272b1..1daea066a3 100644
--- a/board/varisys/cyrus/cyrus.c
+++ b/board/varisys/cyrus/cyrus.c
@@ -22,8 +22,6 @@
#include "cyrus.h"
#include "../common/eeprom.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define GPIO_OPENDRAIN 0x30000000
#define GPIO_DIR 0x3c000004
#define GPIO_INITIAL 0x30000000
diff --git a/board/wandboard/spl.c b/board/wandboard/spl.c
index 5b9622e75e..d03ab43942 100644
--- a/board/wandboard/spl.c
+++ b/board/wandboard/spl.c
@@ -20,8 +20,6 @@
#include <asm/arch/sys_proto.h>
#include <spl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#if defined(CONFIG_SPL_BUILD)
#include <asm/arch/mx6-ddr.h>
/*
diff --git a/board/xes/xpedite537x/xpedite537x.c b/board/xes/xpedite537x/xpedite537x.c
index ae606f5ba7..785533d7f2 100644
--- a/board/xes/xpedite537x/xpedite537x.c
+++ b/board/xes/xpedite537x/xpedite537x.c
@@ -16,8 +16,6 @@
#include <fdt_support.h>
#include <pca953x.h>
-DECLARE_GLOBAL_DATA_PTR;
-
extern void ft_board_pci_setup(void *blob, bd_t *bd);
static void flash_cs_fixup(void)
diff --git a/board/xes/xpedite550x/xpedite550x.c b/board/xes/xpedite550x/xpedite550x.c
index c90bb89dae..080197c1c6 100644
--- a/board/xes/xpedite550x/xpedite550x.c
+++ b/board/xes/xpedite550x/xpedite550x.c
@@ -16,8 +16,6 @@
#include <fdt_support.h>
#include <pca953x.h>
-DECLARE_GLOBAL_DATA_PTR;
-
extern void ft_board_pci_setup(void *blob, bd_t *bd);
static void flash_cs_fixup(void)
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 838ac0f4c4..2f4679e211 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -184,7 +184,8 @@ int dram_init(void)
#else
int dram_init(void)
{
- gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
+ gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
+ CONFIG_SYS_SDRAM_SIZE);
zynq_ddrc_init();
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 0d1bd5412b..3c4cf80b23 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -377,7 +377,8 @@ int dram_init(void)
#else
int dram_init(void)
{
- gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
+ gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
+ CONFIG_SYS_SDRAM_SIZE);
return 0;
}
diff --git a/cmd/Kconfig b/cmd/Kconfig
index bc1d2f31c0..225bb002a6 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1660,6 +1660,7 @@ config CMD_KGDB
config CMD_LOG
bool "log - Generation, control and access to logging"
+ select LOG
help
This provides access to logging features. It allows the output of
log data to be controlled to a limited extent (setting up the default
diff --git a/cmd/aes.c b/cmd/aes.c
index 9d1a740bee..23bc88038f 100644
--- a/cmd/aes.c
+++ b/cmd/aes.c
@@ -14,8 +14,6 @@
#include <asm/byteorder.h>
#include <linux/compiler.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* do_aes() - Handle the "aes" command-line command
* @cmdtp: Command data struct pointer
diff --git a/cmd/blob.c b/cmd/blob.c
index bdd4cfda0b..ae06ba70ae 100644
--- a/cmd/blob.c
+++ b/cmd/blob.c
@@ -12,8 +12,6 @@
#include <asm/byteorder.h>
#include <linux/compiler.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* blob_decap() - Decapsulate the data as a blob
* @key_mod: - Pointer to key modifier/key
diff --git a/cmd/booti.c b/cmd/booti.c
index fff9369763..f1e607ae0d 100644
--- a/cmd/booti.c
+++ b/cmd/booti.c
@@ -14,8 +14,6 @@
#include <linux/kernel.h>
#include <linux/sizes.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Image booting support
*/
diff --git a/cmd/clk.c b/cmd/clk.c
index 6d3d46a184..52b25405ce 100644
--- a/cmd/clk.c
+++ b/cmd/clk.c
@@ -16,7 +16,15 @@ int __weak soc_clk_dump(void)
static int do_clk_dump(cmd_tbl_t *cmdtp, int flag, int argc,
char *const argv[])
{
- return soc_clk_dump();
+ int ret;
+
+ ret = soc_clk_dump();
+ if (ret < 0) {
+ printf("Clock dump error %d\n", ret);
+ ret = CMD_RET_FAILURE;
+ }
+
+ return ret;
}
static cmd_tbl_t cmd_clk_sub[] = {
diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c
index af0b4eee78..c1e2850887 100644
--- a/cmd/cros_ec.c
+++ b/cmd/cros_ec.c
@@ -17,8 +17,6 @@
/* Note: depends on enum ec_current_image */
static const char * const ec_current_image_name[] = {"unknown", "RO", "RW"};
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* Decode a flash region parameter
*
diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index c61b396a62..7608be10f5 100644
--- a/cmd/eeprom.c
+++ b/cmd/eeprom.c
@@ -68,7 +68,7 @@ __weak int eeprom_write_enable(unsigned dev_addr, int state)
void eeprom_init(int bus)
{
/* SPI EEPROM */
-#if defined(CONFIG_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
+#if defined(CONFIG_MPC8XX_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
spi_init_f();
#endif
@@ -131,7 +131,7 @@ static int eeprom_rw_block(unsigned offset, uchar *addr, unsigned alen,
int ret = 0;
/* SPI */
-#if defined(CONFIG_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
+#if defined(CONFIG_MPC8XX_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
if (read)
spi_read(addr, alen, buffer, len);
else
diff --git a/cmd/i2c.c b/cmd/i2c.c
index bfddf8be1b..8eca6fffaa 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -79,8 +79,6 @@
#include <asm/byteorder.h>
#include <linux/compiler.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Display values from last command.
* Memory modify remembered values are different from display memory.
*/
diff --git a/common/Kconfig b/common/Kconfig
index 03eeeb2402..4c7a1a9af8 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -424,6 +424,7 @@ menu "Logging"
config LOG
bool "Enable logging support"
+ select DM
help
This enables support for logging of status and debug messages. These
can be displayed on the console, recorded in a memory buffer, or
diff --git a/common/board_r.c b/common/board_r.c
index 0f4479a58b..7a3d4ca088 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -386,8 +386,8 @@ static int initr_flash(void)
#if defined(CONFIG_PPC) && !defined(CONFIG_DM_SPI)
static int initr_spi(void)
{
- /* PPC does this here */
-#ifdef CONFIG_SPI
+ /* MPC8xx does this here */
+#ifdef CONFIG_MPC8XX_SPI
#if !defined(CONFIG_ENV_IS_IN_EEPROM)
spi_init_f();
#endif
diff --git a/common/cros_ec.c b/common/cros_ec.c
index 7a4f785bc8..1a0caf80dd 100644
--- a/common/cros_ec.c
+++ b/common/cros_ec.c
@@ -13,8 +13,6 @@
#include <dm.h>
#include <errno.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct cros_ec_dev *board_get_cros_ec_dev(void)
{
struct udevice *dev;
diff --git a/common/lynxkdi.c b/common/lynxkdi.c
index f2b95ac8d3..1c8e122c32 100644
--- a/common/lynxkdi.c
+++ b/common/lynxkdi.c
@@ -20,6 +20,4 @@
#include <lynxkdi.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#error "Lynx KDI support not implemented for configured CPU"
diff --git a/common/main.c b/common/main.c
index 6a1159879e..66a03a156e 100644
--- a/common/main.c
+++ b/common/main.c
@@ -13,8 +13,6 @@
#include <console.h>
#include <version.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Board-specific Platform code can reimplement show_boot_progress () if needed
*/
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 4d27565566..259f96607e 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -626,6 +626,8 @@ config SPL_SATA_SUPPORT
config SPL_SERIAL_SUPPORT
bool "Support serial"
+ select SPL_PRINTF
+ select SPL_STRTO
help
Enable support for serial in SPL. This allows use of a serial UART
for displaying messages while SPL is running. It also brings in
@@ -751,6 +753,7 @@ config SPL_WATCHDOG_SUPPORT
config SPL_YMODEM_SUPPORT
bool "Support loading using Ymodem"
+ depends on SPL_SERIAL_SUPPORT
help
While loading from serial is slow it can be a useful backup when
there is no other option. The Ymodem protocol provides a reliable
@@ -926,6 +929,8 @@ config TPL_RAM_DEVICE
config TPL_SERIAL_SUPPORT
bool "Support serial"
+ select TPL_PRINTF
+ select TPL_STRTO
help
Enable support for serial in TPL. See SPL_SERIAL_SUPPORT for
details.
@@ -951,6 +956,7 @@ config TPL_SPI_SUPPORT
config TPL_YMODEM_SUPPORT
bool "Support loading using Ymodem"
+ depends on TPL_SERIAL_SUPPORT
help
While loading from serial is slow it can be a useful backup when
there is no other option. The Ymodem protocol provides a reliable
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 61d3071324..794dbd0312 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -471,6 +471,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
jump_to_image_no_args(&spl_image);
}
+#ifdef CONFIG_SPL_SERIAL_SUPPORT
/*
* This requires UART clocks to be enabled. In order for this to work the
* caller must ensure that the gd pointer is valid.
@@ -491,6 +492,7 @@ void preloader_console_init(void)
spl_display_print();
#endif
}
+#endif
/**
* spl_relocate_stack_gd() - Relocate stack ready for board_init_r() execution
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 4aa0b2caf3..e780b82fd2 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -16,8 +16,6 @@
#include <mmc.h>
#include <image.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int mmc_load_legacy(struct spl_image_info *spl_image, struct mmc *mmc,
ulong sector, struct image_header *header)
{
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c
index 50d02478d5..33f3b74a97 100644
--- a/common/spl/spl_net.c
+++ b/common/spl/spl_net.c
@@ -13,8 +13,6 @@
#include <net.h>
#include <linux/libfdt.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#if defined(CONFIG_SPL_ETH_SUPPORT) || defined(CONFIG_SPL_USB_ETHER)
static ulong spl_net_load_read(struct spl_load_info *load, ulong sector,
ulong count, void *buf)
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c
index bac11f64f1..357f8e5bd9 100644
--- a/common/spl/spl_sata.c
+++ b/common/spl/spl_sata.c
@@ -18,8 +18,6 @@
#include <fat.h>
#include <image.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int spl_sata_load_image(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev)
{
diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c
index 0c4603a3db..69390edcba 100644
--- a/common/spl/spl_sdp.c
+++ b/common/spl/spl_sdp.c
@@ -11,8 +11,6 @@
#include <g_dnl.h>
#include <sdp.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int spl_sdp_load_image(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev)
{
diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c
index 567a450505..5aac10bd57 100644
--- a/common/spl/spl_usb.c
+++ b/common/spl/spl_usb.c
@@ -16,8 +16,6 @@
#include <usb.h>
#include <fat.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_USB_STORAGE
static int usb_stor_curr_dev = -1; /* current device */
#endif
diff --git a/common/usb_hub.c b/common/usb_hub.c
index b46dfa16cc..0729a20df4 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -37,8 +37,6 @@
#endif
#include <asm/unaligned.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#include <usb.h>
#define USB_BUFSIZ 512
diff --git a/configs/B4420QDS_NAND_defconfig b/configs/B4420QDS_NAND_defconfig
index e12c8ea044..c7df871695 100644
--- a/configs/B4420QDS_NAND_defconfig
+++ b/configs/B4420QDS_NAND_defconfig
@@ -43,6 +43,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/B4420QDS_SPIFLASH_defconfig b/configs/B4420QDS_SPIFLASH_defconfig
index fae510c48e..1e51e8448e 100644
--- a/configs/B4420QDS_SPIFLASH_defconfig
+++ b/configs/B4420QDS_SPIFLASH_defconfig
@@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/B4420QDS_defconfig b/configs/B4420QDS_defconfig
index 9971bfb0dc..3cf1935e31 100644
--- a/configs/B4420QDS_defconfig
+++ b/configs/B4420QDS_defconfig
@@ -31,6 +31,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/B4860QDS_NAND_defconfig b/configs/B4860QDS_NAND_defconfig
index bf56300674..63c7d161f4 100644
--- a/configs/B4860QDS_NAND_defconfig
+++ b/configs/B4860QDS_NAND_defconfig
@@ -43,6 +43,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/B4860QDS_SECURE_BOOT_defconfig b/configs/B4860QDS_SECURE_BOOT_defconfig
index b275271580..40a2ba062c 100644
--- a/configs/B4860QDS_SECURE_BOOT_defconfig
+++ b/configs/B4860QDS_SECURE_BOOT_defconfig
@@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/B4860QDS_SPIFLASH_defconfig b/configs/B4860QDS_SPIFLASH_defconfig
index a59e560819..866aa2d0bf 100644
--- a/configs/B4860QDS_SPIFLASH_defconfig
+++ b/configs/B4860QDS_SPIFLASH_defconfig
@@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/B4860QDS_SRIO_PCIE_BOOT_defconfig b/configs/B4860QDS_SRIO_PCIE_BOOT_defconfig
index ee0a054565..774fc5d511 100644
--- a/configs/B4860QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/B4860QDS_SRIO_PCIE_BOOT_defconfig
@@ -31,6 +31,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/B4860QDS_defconfig b/configs/B4860QDS_defconfig
index 5e1528c997..087ab6318e 100644
--- a/configs/B4860QDS_defconfig
+++ b/configs/B4860QDS_defconfig
@@ -31,6 +31,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9131RDB_NAND_SYSCLK100_defconfig b/configs/BSC9131RDB_NAND_SYSCLK100_defconfig
index d44d8d0183..32d35a7ed9 100644
--- a/configs/BSC9131RDB_NAND_SYSCLK100_defconfig
+++ b/configs/BSC9131RDB_NAND_SYSCLK100_defconfig
@@ -36,6 +36,7 @@ CONFIG_NETDEVICES=y
CONFIG_TSEC_ENET=y
# CONFIG_PCI is not set
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9131RDB_NAND_defconfig b/configs/BSC9131RDB_NAND_defconfig
index 9b8e96474f..626ec70eef 100644
--- a/configs/BSC9131RDB_NAND_defconfig
+++ b/configs/BSC9131RDB_NAND_defconfig
@@ -35,6 +35,7 @@ CONFIG_NETDEVICES=y
CONFIG_TSEC_ENET=y
# CONFIG_PCI is not set
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig b/configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig
index 76966818ed..ecdc472be4 100644
--- a/configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig
+++ b/configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig
@@ -31,6 +31,7 @@ CONFIG_NETDEVICES=y
CONFIG_TSEC_ENET=y
# CONFIG_PCI is not set
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9131RDB_SPIFLASH_defconfig b/configs/BSC9131RDB_SPIFLASH_defconfig
index 1d852029a9..4636a91a55 100644
--- a/configs/BSC9131RDB_SPIFLASH_defconfig
+++ b/configs/BSC9131RDB_SPIFLASH_defconfig
@@ -31,6 +31,7 @@ CONFIG_NETDEVICES=y
CONFIG_TSEC_ENET=y
# CONFIG_PCI is not set
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig b/configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig
index a0b81e478b..34a4c33bd4 100644
--- a/configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig
+++ b/configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_NAND_DDRCLK100_defconfig b/configs/BSC9132QDS_NAND_DDRCLK100_defconfig
index d3e579b034..90255b7939 100644
--- a/configs/BSC9132QDS_NAND_DDRCLK100_defconfig
+++ b/configs/BSC9132QDS_NAND_DDRCLK100_defconfig
@@ -40,6 +40,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig b/configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig
index 7abc5c5df8..5c8f2b8a8e 100644
--- a/configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig
+++ b/configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_NAND_DDRCLK133_defconfig b/configs/BSC9132QDS_NAND_DDRCLK133_defconfig
index 9a2a1f1bc9..8740dcfae6 100644
--- a/configs/BSC9132QDS_NAND_DDRCLK133_defconfig
+++ b/configs/BSC9132QDS_NAND_DDRCLK133_defconfig
@@ -40,6 +40,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig b/configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig
index f5e56e8da8..59f3158f26 100644
--- a/configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig
+++ b/configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_NOR_DDRCLK100_defconfig b/configs/BSC9132QDS_NOR_DDRCLK100_defconfig
index 5137bbc84d..bc1795f768 100644
--- a/configs/BSC9132QDS_NOR_DDRCLK100_defconfig
+++ b/configs/BSC9132QDS_NOR_DDRCLK100_defconfig
@@ -35,6 +35,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig b/configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig
index 06e46a7a20..1ec257939e 100644
--- a/configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig
+++ b/configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_NOR_DDRCLK133_defconfig b/configs/BSC9132QDS_NOR_DDRCLK133_defconfig
index 89e39f77d8..342346df40 100644
--- a/configs/BSC9132QDS_NOR_DDRCLK133_defconfig
+++ b/configs/BSC9132QDS_NOR_DDRCLK133_defconfig
@@ -35,6 +35,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig b/configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig
index 2288900a04..13b7898953 100644
--- a/configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig
+++ b/configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig b/configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig
index b1533a2258..9c93f008c5 100644
--- a/configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig
+++ b/configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig
@@ -35,6 +35,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig b/configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig
index 17fc7df872..0446e25cfc 100644
--- a/configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig
+++ b/configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig b/configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig
index fef8b9ced9..a04bc1af44 100644
--- a/configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig
+++ b/configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig
@@ -35,6 +35,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig b/configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig
index d19d748903..476892879e 100644
--- a/configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig
+++ b/configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig b/configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig
index added1a3b2..e49dc66fc7 100644
--- a/configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig
+++ b/configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig
@@ -35,6 +35,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig b/configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig
index a4d505c81d..52a27985e1 100644
--- a/configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig
+++ b/configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig b/configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig
index e84909dbe7..4939775d6d 100644
--- a/configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig
+++ b/configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig
@@ -35,6 +35,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/C29XPCIE_NAND_defconfig b/configs/C29XPCIE_NAND_defconfig
index c2b016a478..804d1b3f35 100644
--- a/configs/C29XPCIE_NAND_defconfig
+++ b/configs/C29XPCIE_NAND_defconfig
@@ -43,5 +43,6 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/C29XPCIE_NOR_SECBOOT_defconfig b/configs/C29XPCIE_NOR_SECBOOT_defconfig
index 75e993bee9..2596b45f8b 100644
--- a/configs/C29XPCIE_NOR_SECBOOT_defconfig
+++ b/configs/C29XPCIE_NOR_SECBOOT_defconfig
@@ -30,6 +30,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_RSA=y
CONFIG_SPL_RSA=y
diff --git a/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig b/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig
index 87d544bed8..a4ca6f559a 100644
--- a/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig
+++ b/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig
@@ -31,6 +31,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_RSA=y
CONFIG_SPL_RSA=y
diff --git a/configs/C29XPCIE_SPIFLASH_defconfig b/configs/C29XPCIE_SPIFLASH_defconfig
index cec758c9d5..690f73213a 100644
--- a/configs/C29XPCIE_SPIFLASH_defconfig
+++ b/configs/C29XPCIE_SPIFLASH_defconfig
@@ -30,5 +30,6 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/C29XPCIE_defconfig b/configs/C29XPCIE_defconfig
index 9acd10192a..7be21872df 100644
--- a/configs/C29XPCIE_defconfig
+++ b/configs/C29XPCIE_defconfig
@@ -29,5 +29,6 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/Cyrus_P5020_defconfig b/configs/Cyrus_P5020_defconfig
index 32a280c380..df4168ade4 100644
--- a/configs/Cyrus_P5020_defconfig
+++ b/configs/Cyrus_P5020_defconfig
@@ -32,6 +32,7 @@ CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/Cyrus_P5040_defconfig b/configs/Cyrus_P5040_defconfig
index 9a6b2f21a5..c6a36393a4 100644
--- a/configs/Cyrus_P5040_defconfig
+++ b/configs/Cyrus_P5040_defconfig
@@ -32,6 +32,7 @@ CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/M52277EVB_defconfig b/configs/M52277EVB_defconfig
index fc6ee0ec5b..233e258a61 100644
--- a/configs/M52277EVB_defconfig
+++ b/configs/M52277EVB_defconfig
@@ -20,4 +20,5 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M52277EVB_stmicro_defconfig b/configs/M52277EVB_stmicro_defconfig
index 9000208262..573cea9655 100644
--- a/configs/M52277EVB_stmicro_defconfig
+++ b/configs/M52277EVB_stmicro_defconfig
@@ -19,4 +19,5 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M54418TWR_defconfig b/configs/M54418TWR_defconfig
index 11e6aab841..8d6e1dfc43 100644
--- a/configs/M54418TWR_defconfig
+++ b/configs/M54418TWR_defconfig
@@ -22,4 +22,5 @@ CONFIG_CMD_CACHE=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M54418TWR_nand_mii_defconfig b/configs/M54418TWR_nand_mii_defconfig
index 0907f15df7..5fe6b1bc17 100644
--- a/configs/M54418TWR_nand_mii_defconfig
+++ b/configs/M54418TWR_nand_mii_defconfig
@@ -21,4 +21,5 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M54418TWR_nand_rmii_defconfig b/configs/M54418TWR_nand_rmii_defconfig
index d1571d5c52..968707734b 100644
--- a/configs/M54418TWR_nand_rmii_defconfig
+++ b/configs/M54418TWR_nand_rmii_defconfig
@@ -21,4 +21,5 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M54418TWR_nand_rmii_lowfreq_defconfig b/configs/M54418TWR_nand_rmii_lowfreq_defconfig
index 2f4157f444..8002697baf 100644
--- a/configs/M54418TWR_nand_rmii_lowfreq_defconfig
+++ b/configs/M54418TWR_nand_rmii_lowfreq_defconfig
@@ -21,4 +21,5 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M54418TWR_serial_mii_defconfig b/configs/M54418TWR_serial_mii_defconfig
index 45efe2a5d2..4e8ef73222 100644
--- a/configs/M54418TWR_serial_mii_defconfig
+++ b/configs/M54418TWR_serial_mii_defconfig
@@ -22,4 +22,5 @@ CONFIG_CMD_CACHE=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M54418TWR_serial_rmii_defconfig b/configs/M54418TWR_serial_rmii_defconfig
index 11e6aab841..8d6e1dfc43 100644
--- a/configs/M54418TWR_serial_rmii_defconfig
+++ b/configs/M54418TWR_serial_rmii_defconfig
@@ -22,4 +22,5 @@ CONFIG_CMD_CACHE=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M54451EVB_defconfig b/configs/M54451EVB_defconfig
index 16a7fc6f39..d42ba8ac91 100644
--- a/configs/M54451EVB_defconfig
+++ b/configs/M54451EVB_defconfig
@@ -24,4 +24,5 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M54451EVB_stmicro_defconfig b/configs/M54451EVB_stmicro_defconfig
index 4bbdfef9fd..724e512083 100644
--- a/configs/M54451EVB_stmicro_defconfig
+++ b/configs/M54451EVB_stmicro_defconfig
@@ -23,4 +23,5 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M54455EVB_a66_defconfig b/configs/M54455EVB_a66_defconfig
index b449bbea22..11d7b734e3 100644
--- a/configs/M54455EVB_a66_defconfig
+++ b/configs/M54455EVB_a66_defconfig
@@ -28,4 +28,5 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M54455EVB_defconfig b/configs/M54455EVB_defconfig
index b33199db78..5620c4ec54 100644
--- a/configs/M54455EVB_defconfig
+++ b/configs/M54455EVB_defconfig
@@ -29,4 +29,5 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M54455EVB_i66_defconfig b/configs/M54455EVB_i66_defconfig
index 9d7b5565f2..d1dbd9cda5 100644
--- a/configs/M54455EVB_i66_defconfig
+++ b/configs/M54455EVB_i66_defconfig
@@ -28,4 +28,5 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M54455EVB_intel_defconfig b/configs/M54455EVB_intel_defconfig
index 256e1705ed..3af7dbfe25 100644
--- a/configs/M54455EVB_intel_defconfig
+++ b/configs/M54455EVB_intel_defconfig
@@ -28,4 +28,5 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/M54455EVB_stm33_defconfig b/configs/M54455EVB_stm33_defconfig
index e5f8cf571f..28a2e48a74 100644
--- a/configs/M54455EVB_stm33_defconfig
+++ b/configs/M54455EVB_stm33_defconfig
@@ -28,4 +28,5 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
diff --git a/configs/MPC8349EMDS_defconfig b/configs/MPC8349EMDS_defconfig
index 159cc0156f..5de115536b 100644
--- a/configs/MPC8349EMDS_defconfig
+++ b/configs/MPC8349EMDS_defconfig
@@ -18,5 +18,6 @@ CONFIG_NETDEVICES=y
CONFIG_TSEC_ENET=y
# CONFIG_PCI is not set
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_MPC8XXX_SPI=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/MPC8536DS_36BIT_defconfig b/configs/MPC8536DS_36BIT_defconfig
index 999d7763ef..f8b32130dd 100644
--- a/configs/MPC8536DS_36BIT_defconfig
+++ b/configs/MPC8536DS_36BIT_defconfig
@@ -34,6 +34,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/MPC8536DS_SDCARD_defconfig b/configs/MPC8536DS_SDCARD_defconfig
index 72d888c8ae..f313762906 100644
--- a/configs/MPC8536DS_SDCARD_defconfig
+++ b/configs/MPC8536DS_SDCARD_defconfig
@@ -33,6 +33,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/MPC8536DS_SPIFLASH_defconfig b/configs/MPC8536DS_SPIFLASH_defconfig
index 66a3f570d4..b60ea6c7c7 100644
--- a/configs/MPC8536DS_SPIFLASH_defconfig
+++ b/configs/MPC8536DS_SPIFLASH_defconfig
@@ -33,6 +33,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/MPC8536DS_defconfig b/configs/MPC8536DS_defconfig
index e55a7763cd..4d85e84adb 100644
--- a/configs/MPC8536DS_defconfig
+++ b/configs/MPC8536DS_defconfig
@@ -33,6 +33,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig b/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig
index ab7bc0e044..39f231b2c9 100644
--- a/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig
@@ -37,6 +37,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_36BIT_NAND_defconfig b/configs/P1010RDB-PA_36BIT_NAND_defconfig
index 48379288c1..a82ce3184d 100644
--- a/configs/P1010RDB-PA_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NAND_defconfig
@@ -50,6 +50,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig b/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig
index 83e37888fd..840aa206ed 100644
--- a/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_36BIT_NOR_defconfig b/configs/P1010RDB-PA_36BIT_NOR_defconfig
index 16cecdb5dd..58650ef3bc 100644
--- a/configs/P1010RDB-PA_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NOR_defconfig
@@ -35,6 +35,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
index 9e1ffbb7f9..2e9b2a750e 100644
--- a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
@@ -46,6 +46,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig
index 043af5dd7e..3f29ae8059 100644
--- a/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig
@@ -37,6 +37,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
index 0cba8c48bb..416dd74f53 100644
--- a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
@@ -47,6 +47,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_NAND_SECBOOT_defconfig b/configs/P1010RDB-PA_NAND_SECBOOT_defconfig
index bac2a4c481..fdf6593093 100644
--- a/configs/P1010RDB-PA_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_NAND_SECBOOT_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_NAND_defconfig b/configs/P1010RDB-PA_NAND_defconfig
index e65004f86a..e2af792c9e 100644
--- a/configs/P1010RDB-PA_NAND_defconfig
+++ b/configs/P1010RDB-PA_NAND_defconfig
@@ -49,6 +49,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_NOR_SECBOOT_defconfig b/configs/P1010RDB-PA_NOR_SECBOOT_defconfig
index 32459c7dc2..612e62a2d1 100644
--- a/configs/P1010RDB-PA_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_NOR_SECBOOT_defconfig
@@ -35,6 +35,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_NOR_defconfig b/configs/P1010RDB-PA_NOR_defconfig
index 7ee963f99a..c556d9c70d 100644
--- a/configs/P1010RDB-PA_NOR_defconfig
+++ b/configs/P1010RDB-PA_NOR_defconfig
@@ -34,6 +34,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_SDCARD_defconfig b/configs/P1010RDB-PA_SDCARD_defconfig
index 198839c77f..ff48e67f7f 100644
--- a/configs/P1010RDB-PA_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_SDCARD_defconfig
@@ -45,6 +45,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig
index 7b8c77bbcd..c67100ea39 100644
--- a/configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PA_SPIFLASH_defconfig b/configs/P1010RDB-PA_SPIFLASH_defconfig
index 9b3cf7f17f..8a22084b58 100644
--- a/configs/P1010RDB-PA_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_SPIFLASH_defconfig
@@ -46,6 +46,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig b/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig
index e5d8c9a37d..1f8bbc68cc 100644
--- a/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig
@@ -37,6 +37,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_36BIT_NAND_defconfig b/configs/P1010RDB-PB_36BIT_NAND_defconfig
index ddac227115..f87ed06ef9 100644
--- a/configs/P1010RDB-PB_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NAND_defconfig
@@ -50,6 +50,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig b/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig
index fe47582adb..a6dff0d3a2 100644
--- a/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_36BIT_NOR_defconfig b/configs/P1010RDB-PB_36BIT_NOR_defconfig
index 12b87a3371..a119521310 100644
--- a/configs/P1010RDB-PB_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NOR_defconfig
@@ -35,6 +35,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
index fe7203cb74..070116b75e 100644
--- a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
@@ -46,6 +46,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig
index bb1adb7f60..e88b7bb765 100644
--- a/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig
@@ -37,6 +37,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
index 266fb8e1d2..61d8226d09 100644
--- a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
@@ -47,6 +47,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_NAND_SECBOOT_defconfig b/configs/P1010RDB-PB_NAND_SECBOOT_defconfig
index 4687455af5..cbb36b99bf 100644
--- a/configs/P1010RDB-PB_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_NAND_SECBOOT_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_NAND_defconfig b/configs/P1010RDB-PB_NAND_defconfig
index 30a91f27dd..28962e148d 100644
--- a/configs/P1010RDB-PB_NAND_defconfig
+++ b/configs/P1010RDB-PB_NAND_defconfig
@@ -49,6 +49,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_NOR_SECBOOT_defconfig b/configs/P1010RDB-PB_NOR_SECBOOT_defconfig
index ca7ea2bade..cf1f3d0933 100644
--- a/configs/P1010RDB-PB_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_NOR_SECBOOT_defconfig
@@ -35,6 +35,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_NOR_defconfig b/configs/P1010RDB-PB_NOR_defconfig
index 77e8e81a3e..c63fbc69f9 100644
--- a/configs/P1010RDB-PB_NOR_defconfig
+++ b/configs/P1010RDB-PB_NOR_defconfig
@@ -34,6 +34,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_SDCARD_defconfig b/configs/P1010RDB-PB_SDCARD_defconfig
index d318cb2ed0..36e17b8900 100644
--- a/configs/P1010RDB-PB_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_SDCARD_defconfig
@@ -45,6 +45,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig
index 7baa576304..452b144c8d 100644
--- a/configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1010RDB-PB_SPIFLASH_defconfig b/configs/P1010RDB-PB_SPIFLASH_defconfig
index 3894be6c9f..bcc98b51ad 100644
--- a/configs/P1010RDB-PB_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_SPIFLASH_defconfig
@@ -46,6 +46,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020MBG-PC_36BIT_SDCARD_defconfig b/configs/P1020MBG-PC_36BIT_SDCARD_defconfig
index 1330091f3d..576cf9d2aa 100644
--- a/configs/P1020MBG-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1020MBG-PC_36BIT_SDCARD_defconfig
@@ -42,6 +42,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020MBG-PC_36BIT_defconfig b/configs/P1020MBG-PC_36BIT_defconfig
index af18212a7b..ec333f52c3 100644
--- a/configs/P1020MBG-PC_36BIT_defconfig
+++ b/configs/P1020MBG-PC_36BIT_defconfig
@@ -32,6 +32,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020MBG-PC_SDCARD_defconfig b/configs/P1020MBG-PC_SDCARD_defconfig
index 5368c298f3..25fa7e4949 100644
--- a/configs/P1020MBG-PC_SDCARD_defconfig
+++ b/configs/P1020MBG-PC_SDCARD_defconfig
@@ -41,6 +41,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020MBG-PC_defconfig b/configs/P1020MBG-PC_defconfig
index e10a1891f7..b911b55c80 100644
--- a/configs/P1020MBG-PC_defconfig
+++ b/configs/P1020MBG-PC_defconfig
@@ -31,6 +31,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020RDB-PC_36BIT_NAND_defconfig b/configs/P1020RDB-PC_36BIT_NAND_defconfig
index 66b3c70639..0c0fade40f 100644
--- a/configs/P1020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P1020RDB-PC_36BIT_NAND_defconfig
@@ -47,6 +47,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
index d565cd65d4..035189f4a0 100644
--- a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
@@ -44,6 +44,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
index ad6c6f0e4d..dd4801bb95 100644
--- a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -45,6 +45,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020RDB-PC_36BIT_defconfig b/configs/P1020RDB-PC_36BIT_defconfig
index c46ff0e2b8..b3d01b3683 100644
--- a/configs/P1020RDB-PC_36BIT_defconfig
+++ b/configs/P1020RDB-PC_36BIT_defconfig
@@ -34,6 +34,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020RDB-PC_NAND_defconfig b/configs/P1020RDB-PC_NAND_defconfig
index f73e5a3f82..ffa2a697cb 100644
--- a/configs/P1020RDB-PC_NAND_defconfig
+++ b/configs/P1020RDB-PC_NAND_defconfig
@@ -46,6 +46,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020RDB-PC_SDCARD_defconfig b/configs/P1020RDB-PC_SDCARD_defconfig
index 62fcbab50d..e9ba730979 100644
--- a/configs/P1020RDB-PC_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_SDCARD_defconfig
@@ -43,6 +43,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020RDB-PC_SPIFLASH_defconfig b/configs/P1020RDB-PC_SPIFLASH_defconfig
index 3acd28d8ba..2021ea2de5 100644
--- a/configs/P1020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_SPIFLASH_defconfig
@@ -44,6 +44,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020RDB-PC_defconfig b/configs/P1020RDB-PC_defconfig
index dd86d3861d..3007352cec 100644
--- a/configs/P1020RDB-PC_defconfig
+++ b/configs/P1020RDB-PC_defconfig
@@ -33,6 +33,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020RDB-PD_NAND_defconfig b/configs/P1020RDB-PD_NAND_defconfig
index 56e8652d6e..64af48b6ce 100644
--- a/configs/P1020RDB-PD_NAND_defconfig
+++ b/configs/P1020RDB-PD_NAND_defconfig
@@ -49,6 +49,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020RDB-PD_SDCARD_defconfig b/configs/P1020RDB-PD_SDCARD_defconfig
index 6d6432953a..18594eb913 100644
--- a/configs/P1020RDB-PD_SDCARD_defconfig
+++ b/configs/P1020RDB-PD_SDCARD_defconfig
@@ -46,6 +46,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020RDB-PD_SPIFLASH_defconfig b/configs/P1020RDB-PD_SPIFLASH_defconfig
index f6e4b417b4..8c25ee8dc5 100644
--- a/configs/P1020RDB-PD_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PD_SPIFLASH_defconfig
@@ -47,6 +47,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020RDB-PD_defconfig b/configs/P1020RDB-PD_defconfig
index fda0ced544..b227ef32e3 100644
--- a/configs/P1020RDB-PD_defconfig
+++ b/configs/P1020RDB-PD_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020UTM-PC_36BIT_SDCARD_defconfig b/configs/P1020UTM-PC_36BIT_SDCARD_defconfig
index c70e54327c..115b19b486 100644
--- a/configs/P1020UTM-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1020UTM-PC_36BIT_SDCARD_defconfig
@@ -42,6 +42,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020UTM-PC_36BIT_defconfig b/configs/P1020UTM-PC_36BIT_defconfig
index c831c6131c..27d34a9e41 100644
--- a/configs/P1020UTM-PC_36BIT_defconfig
+++ b/configs/P1020UTM-PC_36BIT_defconfig
@@ -32,6 +32,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020UTM-PC_SDCARD_defconfig b/configs/P1020UTM-PC_SDCARD_defconfig
index 1f358bf968..f4746eb94f 100644
--- a/configs/P1020UTM-PC_SDCARD_defconfig
+++ b/configs/P1020UTM-PC_SDCARD_defconfig
@@ -41,6 +41,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1020UTM-PC_defconfig b/configs/P1020UTM-PC_defconfig
index 613ad491f5..5ca4ea04e5 100644
--- a/configs/P1020UTM-PC_defconfig
+++ b/configs/P1020UTM-PC_defconfig
@@ -31,6 +31,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1021RDB-PC_36BIT_NAND_defconfig b/configs/P1021RDB-PC_36BIT_NAND_defconfig
index f57e4b079d..c35777e579 100644
--- a/configs/P1021RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P1021RDB-PC_36BIT_NAND_defconfig
@@ -51,6 +51,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1021RDB-PC_36BIT_SDCARD_defconfig b/configs/P1021RDB-PC_36BIT_SDCARD_defconfig
index 8e6f811433..6ed700b5a3 100644
--- a/configs/P1021RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1021RDB-PC_36BIT_SDCARD_defconfig
@@ -48,6 +48,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig
index 320f04341d..ae45a3088f 100644
--- a/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig
@@ -49,6 +49,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1021RDB-PC_36BIT_defconfig b/configs/P1021RDB-PC_36BIT_defconfig
index 25493700d6..840bea4926 100644
--- a/configs/P1021RDB-PC_36BIT_defconfig
+++ b/configs/P1021RDB-PC_36BIT_defconfig
@@ -38,6 +38,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1021RDB-PC_NAND_defconfig b/configs/P1021RDB-PC_NAND_defconfig
index d26524cbbe..704c9c79c8 100644
--- a/configs/P1021RDB-PC_NAND_defconfig
+++ b/configs/P1021RDB-PC_NAND_defconfig
@@ -50,6 +50,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1021RDB-PC_SDCARD_defconfig b/configs/P1021RDB-PC_SDCARD_defconfig
index bab0e47b1b..7af7c58aff 100644
--- a/configs/P1021RDB-PC_SDCARD_defconfig
+++ b/configs/P1021RDB-PC_SDCARD_defconfig
@@ -47,6 +47,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1021RDB-PC_SPIFLASH_defconfig b/configs/P1021RDB-PC_SPIFLASH_defconfig
index 95feedbaa7..9f516582b8 100644
--- a/configs/P1021RDB-PC_SPIFLASH_defconfig
+++ b/configs/P1021RDB-PC_SPIFLASH_defconfig
@@ -48,6 +48,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1021RDB-PC_defconfig b/configs/P1021RDB-PC_defconfig
index 9008e314e3..127a9126c6 100644
--- a/configs/P1021RDB-PC_defconfig
+++ b/configs/P1021RDB-PC_defconfig
@@ -37,6 +37,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1022DS_36BIT_NAND_defconfig b/configs/P1022DS_36BIT_NAND_defconfig
index 66d003c958..7f450ead29 100644
--- a/configs/P1022DS_36BIT_NAND_defconfig
+++ b/configs/P1022DS_36BIT_NAND_defconfig
@@ -50,6 +50,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1022DS_36BIT_SDCARD_defconfig b/configs/P1022DS_36BIT_SDCARD_defconfig
index 71107b4531..83bc9eb068 100644
--- a/configs/P1022DS_36BIT_SDCARD_defconfig
+++ b/configs/P1022DS_36BIT_SDCARD_defconfig
@@ -47,6 +47,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1022DS_36BIT_SPIFLASH_defconfig b/configs/P1022DS_36BIT_SPIFLASH_defconfig
index 4f0d58ce3f..97eb5bcb9a 100644
--- a/configs/P1022DS_36BIT_SPIFLASH_defconfig
+++ b/configs/P1022DS_36BIT_SPIFLASH_defconfig
@@ -48,6 +48,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1022DS_36BIT_defconfig b/configs/P1022DS_36BIT_defconfig
index fd4bbae592..10024e4bd9 100644
--- a/configs/P1022DS_36BIT_defconfig
+++ b/configs/P1022DS_36BIT_defconfig
@@ -37,6 +37,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1022DS_NAND_defconfig b/configs/P1022DS_NAND_defconfig
index 537d8955c6..efecd958d3 100644
--- a/configs/P1022DS_NAND_defconfig
+++ b/configs/P1022DS_NAND_defconfig
@@ -49,6 +49,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1022DS_SDCARD_defconfig b/configs/P1022DS_SDCARD_defconfig
index db8897cc03..26edeab0ff 100644
--- a/configs/P1022DS_SDCARD_defconfig
+++ b/configs/P1022DS_SDCARD_defconfig
@@ -46,6 +46,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1022DS_SPIFLASH_defconfig b/configs/P1022DS_SPIFLASH_defconfig
index 0e7b681e8b..50f2beb545 100644
--- a/configs/P1022DS_SPIFLASH_defconfig
+++ b/configs/P1022DS_SPIFLASH_defconfig
@@ -47,6 +47,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1022DS_defconfig b/configs/P1022DS_defconfig
index 7742a01199..d4d9ee0b15 100644
--- a/configs/P1022DS_defconfig
+++ b/configs/P1022DS_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1024RDB_36BIT_defconfig b/configs/P1024RDB_36BIT_defconfig
index 56c8fa599f..ef432e40b1 100644
--- a/configs/P1024RDB_36BIT_defconfig
+++ b/configs/P1024RDB_36BIT_defconfig
@@ -34,6 +34,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1024RDB_NAND_defconfig b/configs/P1024RDB_NAND_defconfig
index fee335cd01..56c710a037 100644
--- a/configs/P1024RDB_NAND_defconfig
+++ b/configs/P1024RDB_NAND_defconfig
@@ -46,6 +46,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1024RDB_SDCARD_defconfig b/configs/P1024RDB_SDCARD_defconfig
index 1beafe2c82..a7ec666637 100644
--- a/configs/P1024RDB_SDCARD_defconfig
+++ b/configs/P1024RDB_SDCARD_defconfig
@@ -43,6 +43,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1024RDB_SPIFLASH_defconfig b/configs/P1024RDB_SPIFLASH_defconfig
index 156d95b4de..a8dad14b95 100644
--- a/configs/P1024RDB_SPIFLASH_defconfig
+++ b/configs/P1024RDB_SPIFLASH_defconfig
@@ -44,6 +44,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1024RDB_defconfig b/configs/P1024RDB_defconfig
index a378a5f751..f07cd20896 100644
--- a/configs/P1024RDB_defconfig
+++ b/configs/P1024RDB_defconfig
@@ -33,6 +33,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1025RDB_36BIT_defconfig b/configs/P1025RDB_36BIT_defconfig
index d1f29ca56a..8d8172bab9 100644
--- a/configs/P1025RDB_36BIT_defconfig
+++ b/configs/P1025RDB_36BIT_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1025RDB_NAND_defconfig b/configs/P1025RDB_NAND_defconfig
index ef26c9530e..8faf46d3b3 100644
--- a/configs/P1025RDB_NAND_defconfig
+++ b/configs/P1025RDB_NAND_defconfig
@@ -48,6 +48,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1025RDB_SDCARD_defconfig b/configs/P1025RDB_SDCARD_defconfig
index 4677d30778..1249ea5aab 100644
--- a/configs/P1025RDB_SDCARD_defconfig
+++ b/configs/P1025RDB_SDCARD_defconfig
@@ -45,6 +45,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1025RDB_SPIFLASH_defconfig b/configs/P1025RDB_SPIFLASH_defconfig
index f84ca86f85..1cceda4f0e 100644
--- a/configs/P1025RDB_SPIFLASH_defconfig
+++ b/configs/P1025RDB_SPIFLASH_defconfig
@@ -46,6 +46,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P1025RDB_defconfig b/configs/P1025RDB_defconfig
index 312980591f..6c4110a07a 100644
--- a/configs/P1025RDB_defconfig
+++ b/configs/P1025RDB_defconfig
@@ -35,6 +35,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2020RDB-PC_36BIT_NAND_defconfig b/configs/P2020RDB-PC_36BIT_NAND_defconfig
index a8305c78b3..82db6d46cb 100644
--- a/configs/P2020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P2020RDB-PC_36BIT_NAND_defconfig
@@ -51,6 +51,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
index 6dba0320d1..dd4ce100c9 100644
--- a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
@@ -48,6 +48,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
index 418619221a..76d63a9f5b 100644
--- a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -49,6 +49,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2020RDB-PC_36BIT_defconfig b/configs/P2020RDB-PC_36BIT_defconfig
index 659a258620..a8a46b800a 100644
--- a/configs/P2020RDB-PC_36BIT_defconfig
+++ b/configs/P2020RDB-PC_36BIT_defconfig
@@ -38,6 +38,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2020RDB-PC_NAND_defconfig b/configs/P2020RDB-PC_NAND_defconfig
index f27d00c3ae..60247120aa 100644
--- a/configs/P2020RDB-PC_NAND_defconfig
+++ b/configs/P2020RDB-PC_NAND_defconfig
@@ -50,6 +50,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2020RDB-PC_SDCARD_defconfig b/configs/P2020RDB-PC_SDCARD_defconfig
index e625f9da5d..b5ff49da49 100644
--- a/configs/P2020RDB-PC_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_SDCARD_defconfig
@@ -47,6 +47,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2020RDB-PC_SPIFLASH_defconfig b/configs/P2020RDB-PC_SPIFLASH_defconfig
index d81186206d..a5e114a637 100644
--- a/configs/P2020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_SPIFLASH_defconfig
@@ -48,6 +48,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2020RDB-PC_defconfig b/configs/P2020RDB-PC_defconfig
index 1aa38f0687..6d651c99e9 100644
--- a/configs/P2020RDB-PC_defconfig
+++ b/configs/P2020RDB-PC_defconfig
@@ -37,6 +37,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2041RDB_NAND_defconfig b/configs/P2041RDB_NAND_defconfig
index f6d52a5faf..e07fee79f8 100644
--- a/configs/P2041RDB_NAND_defconfig
+++ b/configs/P2041RDB_NAND_defconfig
@@ -34,6 +34,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2041RDB_SDCARD_defconfig b/configs/P2041RDB_SDCARD_defconfig
index 47fe40cdd4..2fb56eb9ea 100644
--- a/configs/P2041RDB_SDCARD_defconfig
+++ b/configs/P2041RDB_SDCARD_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2041RDB_SECURE_BOOT_defconfig b/configs/P2041RDB_SECURE_BOOT_defconfig
index be468bdcd3..5b111a816a 100644
--- a/configs/P2041RDB_SECURE_BOOT_defconfig
+++ b/configs/P2041RDB_SECURE_BOOT_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2041RDB_SPIFLASH_defconfig b/configs/P2041RDB_SPIFLASH_defconfig
index 54996d0471..ab9eb410c7 100644
--- a/configs/P2041RDB_SPIFLASH_defconfig
+++ b/configs/P2041RDB_SPIFLASH_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2041RDB_SRIO_PCIE_BOOT_defconfig b/configs/P2041RDB_SRIO_PCIE_BOOT_defconfig
index 256c68b158..9970f7edca 100644
--- a/configs/P2041RDB_SRIO_PCIE_BOOT_defconfig
+++ b/configs/P2041RDB_SRIO_PCIE_BOOT_defconfig
@@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P2041RDB_defconfig b/configs/P2041RDB_defconfig
index da2d6140ff..9fd7f43ea4 100644
--- a/configs/P2041RDB_defconfig
+++ b/configs/P2041RDB_defconfig
@@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P3041DS_NAND_SECURE_BOOT_defconfig b/configs/P3041DS_NAND_SECURE_BOOT_defconfig
index d8ccd15c46..b2a243e54d 100644
--- a/configs/P3041DS_NAND_SECURE_BOOT_defconfig
+++ b/configs/P3041DS_NAND_SECURE_BOOT_defconfig
@@ -35,6 +35,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P3041DS_NAND_defconfig b/configs/P3041DS_NAND_defconfig
index 78621932b1..9c6c5c7017 100644
--- a/configs/P3041DS_NAND_defconfig
+++ b/configs/P3041DS_NAND_defconfig
@@ -34,6 +34,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P3041DS_SDCARD_defconfig b/configs/P3041DS_SDCARD_defconfig
index 98e04d48df..ba0b487b65 100644
--- a/configs/P3041DS_SDCARD_defconfig
+++ b/configs/P3041DS_SDCARD_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P3041DS_SECURE_BOOT_defconfig b/configs/P3041DS_SECURE_BOOT_defconfig
index ce352acf92..5016f5c83c 100644
--- a/configs/P3041DS_SECURE_BOOT_defconfig
+++ b/configs/P3041DS_SECURE_BOOT_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P3041DS_SPIFLASH_defconfig b/configs/P3041DS_SPIFLASH_defconfig
index 51a1ce973f..b86534b8a1 100644
--- a/configs/P3041DS_SPIFLASH_defconfig
+++ b/configs/P3041DS_SPIFLASH_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P3041DS_SRIO_PCIE_BOOT_defconfig b/configs/P3041DS_SRIO_PCIE_BOOT_defconfig
index a0fc3faaa6..09cfe218c9 100644
--- a/configs/P3041DS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/P3041DS_SRIO_PCIE_BOOT_defconfig
@@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P3041DS_defconfig b/configs/P3041DS_defconfig
index 0ef284d93d..487627bcbb 100644
--- a/configs/P3041DS_defconfig
+++ b/configs/P3041DS_defconfig
@@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P4080DS_SDCARD_defconfig b/configs/P4080DS_SDCARD_defconfig
index 88ac8b4ce3..5ae9bacfd7 100644
--- a/configs/P4080DS_SDCARD_defconfig
+++ b/configs/P4080DS_SDCARD_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P4080DS_SECURE_BOOT_defconfig b/configs/P4080DS_SECURE_BOOT_defconfig
index 00d8e00685..ee3869bcbc 100644
--- a/configs/P4080DS_SECURE_BOOT_defconfig
+++ b/configs/P4080DS_SECURE_BOOT_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P4080DS_SPIFLASH_defconfig b/configs/P4080DS_SPIFLASH_defconfig
index 5833628cbe..9593a98ec0 100644
--- a/configs/P4080DS_SPIFLASH_defconfig
+++ b/configs/P4080DS_SPIFLASH_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P4080DS_SRIO_PCIE_BOOT_defconfig b/configs/P4080DS_SRIO_PCIE_BOOT_defconfig
index 3528e2343c..9f1e3fafa4 100644
--- a/configs/P4080DS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/P4080DS_SRIO_PCIE_BOOT_defconfig
@@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P4080DS_defconfig b/configs/P4080DS_defconfig
index 7842ac7891..0306eb2815 100644
--- a/configs/P4080DS_defconfig
+++ b/configs/P4080DS_defconfig
@@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P5020DS_NAND_SECURE_BOOT_defconfig b/configs/P5020DS_NAND_SECURE_BOOT_defconfig
index c8cfb2ca46..eb1799e753 100644
--- a/configs/P5020DS_NAND_SECURE_BOOT_defconfig
+++ b/configs/P5020DS_NAND_SECURE_BOOT_defconfig
@@ -36,6 +36,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P5020DS_NAND_defconfig b/configs/P5020DS_NAND_defconfig
index 6c2f90cd44..b60ae5d097 100644
--- a/configs/P5020DS_NAND_defconfig
+++ b/configs/P5020DS_NAND_defconfig
@@ -35,6 +35,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P5020DS_SDCARD_defconfig b/configs/P5020DS_SDCARD_defconfig
index ffc7b6c3b6..41418f0b6e 100644
--- a/configs/P5020DS_SDCARD_defconfig
+++ b/configs/P5020DS_SDCARD_defconfig
@@ -34,6 +34,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P5020DS_SECURE_BOOT_defconfig b/configs/P5020DS_SECURE_BOOT_defconfig
index f135aea5c9..5dcf1902b8 100644
--- a/configs/P5020DS_SECURE_BOOT_defconfig
+++ b/configs/P5020DS_SECURE_BOOT_defconfig
@@ -34,6 +34,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P5020DS_SPIFLASH_defconfig b/configs/P5020DS_SPIFLASH_defconfig
index 602fbd0e8d..352acfbc88 100644
--- a/configs/P5020DS_SPIFLASH_defconfig
+++ b/configs/P5020DS_SPIFLASH_defconfig
@@ -34,6 +34,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P5020DS_SRIO_PCIE_BOOT_defconfig b/configs/P5020DS_SRIO_PCIE_BOOT_defconfig
index 11c525b857..1b85099612 100644
--- a/configs/P5020DS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/P5020DS_SRIO_PCIE_BOOT_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P5020DS_defconfig b/configs/P5020DS_defconfig
index 08213292c5..157ec66fc0 100644
--- a/configs/P5020DS_defconfig
+++ b/configs/P5020DS_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P5040DS_NAND_SECURE_BOOT_defconfig b/configs/P5040DS_NAND_SECURE_BOOT_defconfig
index 504405d03b..f7f56fe0ae 100644
--- a/configs/P5040DS_NAND_SECURE_BOOT_defconfig
+++ b/configs/P5040DS_NAND_SECURE_BOOT_defconfig
@@ -36,6 +36,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P5040DS_NAND_defconfig b/configs/P5040DS_NAND_defconfig
index d4941b4965..71ecf0f990 100644
--- a/configs/P5040DS_NAND_defconfig
+++ b/configs/P5040DS_NAND_defconfig
@@ -35,6 +35,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P5040DS_SDCARD_defconfig b/configs/P5040DS_SDCARD_defconfig
index c077632be9..30eafb7ad2 100644
--- a/configs/P5040DS_SDCARD_defconfig
+++ b/configs/P5040DS_SDCARD_defconfig
@@ -34,6 +34,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P5040DS_SECURE_BOOT_defconfig b/configs/P5040DS_SECURE_BOOT_defconfig
index 04a8b5232b..05d6ba2dd1 100644
--- a/configs/P5040DS_SECURE_BOOT_defconfig
+++ b/configs/P5040DS_SECURE_BOOT_defconfig
@@ -34,6 +34,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P5040DS_SPIFLASH_defconfig b/configs/P5040DS_SPIFLASH_defconfig
index bf271125cc..3bfb4228c7 100644
--- a/configs/P5040DS_SPIFLASH_defconfig
+++ b/configs/P5040DS_SPIFLASH_defconfig
@@ -34,6 +34,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/P5040DS_defconfig b/configs/P5040DS_defconfig
index 82b252f06d..dddf46c271 100644
--- a/configs/P5040DS_defconfig
+++ b/configs/P5040DS_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1023RDB_NAND_defconfig b/configs/T1023RDB_NAND_defconfig
index b48c2b7967..fc2a8927c7 100644
--- a/configs/T1023RDB_NAND_defconfig
+++ b/configs/T1023RDB_NAND_defconfig
@@ -50,6 +50,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1023RDB_SDCARD_defconfig b/configs/T1023RDB_SDCARD_defconfig
index c621bff0a7..81f6f3ab99 100644
--- a/configs/T1023RDB_SDCARD_defconfig
+++ b/configs/T1023RDB_SDCARD_defconfig
@@ -49,6 +49,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1023RDB_SECURE_BOOT_defconfig b/configs/T1023RDB_SECURE_BOOT_defconfig
index 43000952a5..62ae4a20b5 100644
--- a/configs/T1023RDB_SECURE_BOOT_defconfig
+++ b/configs/T1023RDB_SECURE_BOOT_defconfig
@@ -39,6 +39,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1023RDB_SPIFLASH_defconfig b/configs/T1023RDB_SPIFLASH_defconfig
index e3df26366a..569d1fdb31 100644
--- a/configs/T1023RDB_SPIFLASH_defconfig
+++ b/configs/T1023RDB_SPIFLASH_defconfig
@@ -50,6 +50,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1023RDB_defconfig b/configs/T1023RDB_defconfig
index 0813fac8ef..efde0f0652 100644
--- a/configs/T1023RDB_defconfig
+++ b/configs/T1023RDB_defconfig
@@ -38,6 +38,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1024QDS_DDR4_SECURE_BOOT_defconfig b/configs/T1024QDS_DDR4_SECURE_BOOT_defconfig
index 1e084f0661..7a814df986 100644
--- a/configs/T1024QDS_DDR4_SECURE_BOOT_defconfig
+++ b/configs/T1024QDS_DDR4_SECURE_BOOT_defconfig
@@ -42,6 +42,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1024QDS_DDR4_defconfig b/configs/T1024QDS_DDR4_defconfig
index 50b81edd5f..5b8f016f5f 100644
--- a/configs/T1024QDS_DDR4_defconfig
+++ b/configs/T1024QDS_DDR4_defconfig
@@ -39,6 +39,7 @@ CONFIG_SPI_FLASH_SST=y
CONFIG_PHYLIB=y
CONFIG_NETDEVICES=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1024QDS_NAND_defconfig b/configs/T1024QDS_NAND_defconfig
index 92757c68d6..28e2ed92eb 100644
--- a/configs/T1024QDS_NAND_defconfig
+++ b/configs/T1024QDS_NAND_defconfig
@@ -54,6 +54,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1024QDS_SDCARD_defconfig b/configs/T1024QDS_SDCARD_defconfig
index 1e98b226db..90c11ff70e 100644
--- a/configs/T1024QDS_SDCARD_defconfig
+++ b/configs/T1024QDS_SDCARD_defconfig
@@ -53,6 +53,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1024QDS_SECURE_BOOT_defconfig b/configs/T1024QDS_SECURE_BOOT_defconfig
index e2cfcc5358..e68d0722fa 100644
--- a/configs/T1024QDS_SECURE_BOOT_defconfig
+++ b/configs/T1024QDS_SECURE_BOOT_defconfig
@@ -43,6 +43,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1024QDS_SPIFLASH_defconfig b/configs/T1024QDS_SPIFLASH_defconfig
index 804c5ff088..b1acb83f8c 100644
--- a/configs/T1024QDS_SPIFLASH_defconfig
+++ b/configs/T1024QDS_SPIFLASH_defconfig
@@ -54,6 +54,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1024QDS_defconfig b/configs/T1024QDS_defconfig
index d8c1159efb..0f92e2f290 100644
--- a/configs/T1024QDS_defconfig
+++ b/configs/T1024QDS_defconfig
@@ -42,6 +42,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1024RDB_NAND_defconfig b/configs/T1024RDB_NAND_defconfig
index fce137a5aa..7a8a8f2688 100644
--- a/configs/T1024RDB_NAND_defconfig
+++ b/configs/T1024RDB_NAND_defconfig
@@ -52,6 +52,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1024RDB_SDCARD_defconfig b/configs/T1024RDB_SDCARD_defconfig
index 62d14612cc..a5073d378d 100644
--- a/configs/T1024RDB_SDCARD_defconfig
+++ b/configs/T1024RDB_SDCARD_defconfig
@@ -51,6 +51,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1024RDB_SECURE_BOOT_defconfig b/configs/T1024RDB_SECURE_BOOT_defconfig
index 76589e4c93..fcd2049c89 100644
--- a/configs/T1024RDB_SECURE_BOOT_defconfig
+++ b/configs/T1024RDB_SECURE_BOOT_defconfig
@@ -41,6 +41,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1024RDB_SPIFLASH_defconfig b/configs/T1024RDB_SPIFLASH_defconfig
index 0d3c4eb324..1f19f6fd00 100644
--- a/configs/T1024RDB_SPIFLASH_defconfig
+++ b/configs/T1024RDB_SPIFLASH_defconfig
@@ -52,6 +52,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1024RDB_defconfig b/configs/T1024RDB_defconfig
index 7f9fb28701..73cd63b7d6 100644
--- a/configs/T1024RDB_defconfig
+++ b/configs/T1024RDB_defconfig
@@ -40,6 +40,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1040D4RDB_NAND_defconfig b/configs/T1040D4RDB_NAND_defconfig
index 19c1c5fa51..2e041fd774 100644
--- a/configs/T1040D4RDB_NAND_defconfig
+++ b/configs/T1040D4RDB_NAND_defconfig
@@ -49,6 +49,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1040D4RDB_SDCARD_defconfig b/configs/T1040D4RDB_SDCARD_defconfig
index c986b58900..5b80494028 100644
--- a/configs/T1040D4RDB_SDCARD_defconfig
+++ b/configs/T1040D4RDB_SDCARD_defconfig
@@ -48,6 +48,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1040D4RDB_SECURE_BOOT_defconfig b/configs/T1040D4RDB_SECURE_BOOT_defconfig
index 6ff2860c31..5bf8fb4769 100644
--- a/configs/T1040D4RDB_SECURE_BOOT_defconfig
+++ b/configs/T1040D4RDB_SECURE_BOOT_defconfig
@@ -38,6 +38,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1040D4RDB_SPIFLASH_defconfig b/configs/T1040D4RDB_SPIFLASH_defconfig
index f79e700515..9e68b1dff0 100644
--- a/configs/T1040D4RDB_SPIFLASH_defconfig
+++ b/configs/T1040D4RDB_SPIFLASH_defconfig
@@ -49,6 +49,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1040D4RDB_defconfig b/configs/T1040D4RDB_defconfig
index c7dd13c0ec..7ce8a0a477 100644
--- a/configs/T1040D4RDB_defconfig
+++ b/configs/T1040D4RDB_defconfig
@@ -37,6 +37,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1040QDS_DDR4_defconfig b/configs/T1040QDS_DDR4_defconfig
index a523908c9a..1ae33dbafd 100644
--- a/configs/T1040QDS_DDR4_defconfig
+++ b/configs/T1040QDS_DDR4_defconfig
@@ -42,6 +42,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1040QDS_SECURE_BOOT_defconfig b/configs/T1040QDS_SECURE_BOOT_defconfig
index 2e3f028183..966685bd81 100644
--- a/configs/T1040QDS_SECURE_BOOT_defconfig
+++ b/configs/T1040QDS_SECURE_BOOT_defconfig
@@ -44,6 +44,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1040QDS_defconfig b/configs/T1040QDS_defconfig
index b52a18e9fd..4040a10b4c 100644
--- a/configs/T1040QDS_defconfig
+++ b/configs/T1040QDS_defconfig
@@ -43,6 +43,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1040RDB_NAND_defconfig b/configs/T1040RDB_NAND_defconfig
index 4e621035f6..82263dc818 100644
--- a/configs/T1040RDB_NAND_defconfig
+++ b/configs/T1040RDB_NAND_defconfig
@@ -50,6 +50,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1040RDB_SDCARD_defconfig b/configs/T1040RDB_SDCARD_defconfig
index f1fddee92c..fbc498890a 100644
--- a/configs/T1040RDB_SDCARD_defconfig
+++ b/configs/T1040RDB_SDCARD_defconfig
@@ -49,6 +49,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1040RDB_SECURE_BOOT_defconfig b/configs/T1040RDB_SECURE_BOOT_defconfig
index 4b240c19dc..cac97fe89c 100644
--- a/configs/T1040RDB_SECURE_BOOT_defconfig
+++ b/configs/T1040RDB_SECURE_BOOT_defconfig
@@ -39,6 +39,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1040RDB_SPIFLASH_defconfig b/configs/T1040RDB_SPIFLASH_defconfig
index 8db1093975..f8d5b0619b 100644
--- a/configs/T1040RDB_SPIFLASH_defconfig
+++ b/configs/T1040RDB_SPIFLASH_defconfig
@@ -50,6 +50,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1040RDB_defconfig b/configs/T1040RDB_defconfig
index 6ec8f856c1..d85885e24c 100644
--- a/configs/T1040RDB_defconfig
+++ b/configs/T1040RDB_defconfig
@@ -38,6 +38,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1042D4RDB_NAND_defconfig b/configs/T1042D4RDB_NAND_defconfig
index 7694551222..946ff768d6 100644
--- a/configs/T1042D4RDB_NAND_defconfig
+++ b/configs/T1042D4RDB_NAND_defconfig
@@ -50,6 +50,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1042D4RDB_SDCARD_defconfig b/configs/T1042D4RDB_SDCARD_defconfig
index 19b79614a6..6f12ac6a0a 100644
--- a/configs/T1042D4RDB_SDCARD_defconfig
+++ b/configs/T1042D4RDB_SDCARD_defconfig
@@ -49,6 +49,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1042D4RDB_SECURE_BOOT_defconfig b/configs/T1042D4RDB_SECURE_BOOT_defconfig
index 12c686a192..2f6b37d2e4 100644
--- a/configs/T1042D4RDB_SECURE_BOOT_defconfig
+++ b/configs/T1042D4RDB_SECURE_BOOT_defconfig
@@ -39,6 +39,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1042D4RDB_SPIFLASH_defconfig b/configs/T1042D4RDB_SPIFLASH_defconfig
index 05fa81b51c..2d7437a2f0 100644
--- a/configs/T1042D4RDB_SPIFLASH_defconfig
+++ b/configs/T1042D4RDB_SPIFLASH_defconfig
@@ -50,6 +50,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1042D4RDB_defconfig b/configs/T1042D4RDB_defconfig
index 8b9cfb221c..b645fe278f 100644
--- a/configs/T1042D4RDB_defconfig
+++ b/configs/T1042D4RDB_defconfig
@@ -38,6 +38,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig b/configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig
index f6ddc0a97c..62bb8fc3a9 100644
--- a/configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig
+++ b/configs/T1042RDB_PI_NAND_SECURE_BOOT_defconfig
@@ -55,6 +55,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1042RDB_PI_NAND_defconfig b/configs/T1042RDB_PI_NAND_defconfig
index 97c408bab5..1fde14cf7f 100644
--- a/configs/T1042RDB_PI_NAND_defconfig
+++ b/configs/T1042RDB_PI_NAND_defconfig
@@ -52,6 +52,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1042RDB_PI_SDCARD_defconfig b/configs/T1042RDB_PI_SDCARD_defconfig
index f02783bf18..f8e4b33e99 100644
--- a/configs/T1042RDB_PI_SDCARD_defconfig
+++ b/configs/T1042RDB_PI_SDCARD_defconfig
@@ -51,6 +51,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1042RDB_PI_SPIFLASH_defconfig b/configs/T1042RDB_PI_SPIFLASH_defconfig
index 16ae65020c..c57fbfc412 100644
--- a/configs/T1042RDB_PI_SPIFLASH_defconfig
+++ b/configs/T1042RDB_PI_SPIFLASH_defconfig
@@ -52,6 +52,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1042RDB_PI_defconfig b/configs/T1042RDB_PI_defconfig
index 0899ee566d..ebeaf9380f 100644
--- a/configs/T1042RDB_PI_defconfig
+++ b/configs/T1042RDB_PI_defconfig
@@ -40,6 +40,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1042RDB_SECURE_BOOT_defconfig b/configs/T1042RDB_SECURE_BOOT_defconfig
index a56f9da19a..654f8a6878 100644
--- a/configs/T1042RDB_SECURE_BOOT_defconfig
+++ b/configs/T1042RDB_SECURE_BOOT_defconfig
@@ -38,6 +38,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T1042RDB_defconfig b/configs/T1042RDB_defconfig
index 2a05527898..10bb12d1b4 100644
--- a/configs/T1042RDB_defconfig
+++ b/configs/T1042RDB_defconfig
@@ -37,6 +37,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2080QDS_NAND_defconfig b/configs/T2080QDS_NAND_defconfig
index 7dcd52ba98..b6880beff4 100644
--- a/configs/T2080QDS_NAND_defconfig
+++ b/configs/T2080QDS_NAND_defconfig
@@ -48,6 +48,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2080QDS_SDCARD_defconfig b/configs/T2080QDS_SDCARD_defconfig
index fb4dec152a..6588f14149 100644
--- a/configs/T2080QDS_SDCARD_defconfig
+++ b/configs/T2080QDS_SDCARD_defconfig
@@ -47,6 +47,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2080QDS_SECURE_BOOT_defconfig b/configs/T2080QDS_SECURE_BOOT_defconfig
index a8532e5e9d..34b1a385cf 100644
--- a/configs/T2080QDS_SECURE_BOOT_defconfig
+++ b/configs/T2080QDS_SECURE_BOOT_defconfig
@@ -37,6 +37,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2080QDS_SPIFLASH_defconfig b/configs/T2080QDS_SPIFLASH_defconfig
index 7653ed066e..41945db432 100644
--- a/configs/T2080QDS_SPIFLASH_defconfig
+++ b/configs/T2080QDS_SPIFLASH_defconfig
@@ -48,6 +48,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
index ae163ba455..d2f01de6a5 100644
--- a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2080QDS_defconfig b/configs/T2080QDS_defconfig
index 0c6c62b186..626feddff8 100644
--- a/configs/T2080QDS_defconfig
+++ b/configs/T2080QDS_defconfig
@@ -36,6 +36,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2080RDB_NAND_defconfig b/configs/T2080RDB_NAND_defconfig
index 7f3091cadf..59a81ac205 100644
--- a/configs/T2080RDB_NAND_defconfig
+++ b/configs/T2080RDB_NAND_defconfig
@@ -48,6 +48,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2080RDB_SDCARD_defconfig b/configs/T2080RDB_SDCARD_defconfig
index 0d62c74b6c..dc3a2231fb 100644
--- a/configs/T2080RDB_SDCARD_defconfig
+++ b/configs/T2080RDB_SDCARD_defconfig
@@ -47,6 +47,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2080RDB_SECURE_BOOT_defconfig b/configs/T2080RDB_SECURE_BOOT_defconfig
index a4f584c9df..44730c97cd 100644
--- a/configs/T2080RDB_SECURE_BOOT_defconfig
+++ b/configs/T2080RDB_SECURE_BOOT_defconfig
@@ -37,6 +37,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2080RDB_SPIFLASH_defconfig b/configs/T2080RDB_SPIFLASH_defconfig
index cbff19c901..1c4f97fdf7 100644
--- a/configs/T2080RDB_SPIFLASH_defconfig
+++ b/configs/T2080RDB_SPIFLASH_defconfig
@@ -48,6 +48,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig b/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig
index f6ac85d24a..17d3ee97c9 100644
--- a/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2080RDB_defconfig b/configs/T2080RDB_defconfig
index 1be3419eb0..9dfc6c9e13 100644
--- a/configs/T2080RDB_defconfig
+++ b/configs/T2080RDB_defconfig
@@ -36,6 +36,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2081QDS_NAND_defconfig b/configs/T2081QDS_NAND_defconfig
index 25f124153a..1c422acddc 100644
--- a/configs/T2081QDS_NAND_defconfig
+++ b/configs/T2081QDS_NAND_defconfig
@@ -48,6 +48,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2081QDS_SDCARD_defconfig b/configs/T2081QDS_SDCARD_defconfig
index d1500e6128..9a15eabe6e 100644
--- a/configs/T2081QDS_SDCARD_defconfig
+++ b/configs/T2081QDS_SDCARD_defconfig
@@ -47,6 +47,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2081QDS_SPIFLASH_defconfig b/configs/T2081QDS_SPIFLASH_defconfig
index fb17bf964a..727eb86e7d 100644
--- a/configs/T2081QDS_SPIFLASH_defconfig
+++ b/configs/T2081QDS_SPIFLASH_defconfig
@@ -48,6 +48,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig b/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig
index 25ceffacc6..545913a64e 100644
--- a/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig
@@ -33,6 +33,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T2081QDS_defconfig b/configs/T2081QDS_defconfig
index 8f6b66e156..1c15a7ee47 100644
--- a/configs/T2081QDS_defconfig
+++ b/configs/T2081QDS_defconfig
@@ -36,6 +36,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T4160QDS_NAND_defconfig b/configs/T4160QDS_NAND_defconfig
index eea656aa85..d1ffbbd71b 100644
--- a/configs/T4160QDS_NAND_defconfig
+++ b/configs/T4160QDS_NAND_defconfig
@@ -43,6 +43,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T4160QDS_SDCARD_defconfig b/configs/T4160QDS_SDCARD_defconfig
index 13f01334b5..f1a9439c41 100644
--- a/configs/T4160QDS_SDCARD_defconfig
+++ b/configs/T4160QDS_SDCARD_defconfig
@@ -42,6 +42,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T4160QDS_SECURE_BOOT_defconfig b/configs/T4160QDS_SECURE_BOOT_defconfig
index 57496bd803..6a5e4c262a 100644
--- a/configs/T4160QDS_SECURE_BOOT_defconfig
+++ b/configs/T4160QDS_SECURE_BOOT_defconfig
@@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T4160QDS_defconfig b/configs/T4160QDS_defconfig
index 7304c07b97..e52636b57f 100644
--- a/configs/T4160QDS_defconfig
+++ b/configs/T4160QDS_defconfig
@@ -31,6 +31,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T4160RDB_defconfig b/configs/T4160RDB_defconfig
index d780ef7a5c..36223ad06b 100644
--- a/configs/T4160RDB_defconfig
+++ b/configs/T4160RDB_defconfig
@@ -31,6 +31,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T4240QDS_NAND_defconfig b/configs/T4240QDS_NAND_defconfig
index 73e15cf9e3..8bddd6a8c2 100644
--- a/configs/T4240QDS_NAND_defconfig
+++ b/configs/T4240QDS_NAND_defconfig
@@ -43,6 +43,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T4240QDS_SDCARD_defconfig b/configs/T4240QDS_SDCARD_defconfig
index 8aaa90b33f..269509a79e 100644
--- a/configs/T4240QDS_SDCARD_defconfig
+++ b/configs/T4240QDS_SDCARD_defconfig
@@ -42,6 +42,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T4240QDS_SECURE_BOOT_defconfig b/configs/T4240QDS_SECURE_BOOT_defconfig
index 228bdaa4ce..ffce440183 100644
--- a/configs/T4240QDS_SECURE_BOOT_defconfig
+++ b/configs/T4240QDS_SECURE_BOOT_defconfig
@@ -32,6 +32,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T4240QDS_SRIO_PCIE_BOOT_defconfig b/configs/T4240QDS_SRIO_PCIE_BOOT_defconfig
index d2c71e446c..5f5ceda666 100644
--- a/configs/T4240QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T4240QDS_SRIO_PCIE_BOOT_defconfig
@@ -31,6 +31,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T4240QDS_defconfig b/configs/T4240QDS_defconfig
index c1a66db285..17b63baf60 100644
--- a/configs/T4240QDS_defconfig
+++ b/configs/T4240QDS_defconfig
@@ -31,6 +31,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T4240RDB_SDCARD_defconfig b/configs/T4240RDB_SDCARD_defconfig
index 73328dd8f1..10f869ac18 100644
--- a/configs/T4240RDB_SDCARD_defconfig
+++ b/configs/T4240RDB_SDCARD_defconfig
@@ -42,6 +42,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/T4240RDB_defconfig b/configs/T4240RDB_defconfig
index 8d1eb1c17b..101c7a7f76 100644
--- a/configs/T4240RDB_defconfig
+++ b/configs/T4240RDB_defconfig
@@ -31,6 +31,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/TWR-P1025_defconfig b/configs/TWR-P1025_defconfig
index edba6ef604..0b3eb32931 100644
--- a/configs/TWR-P1025_defconfig
+++ b/configs/TWR-P1025_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/UCP1020_SPIFLASH_defconfig b/configs/UCP1020_SPIFLASH_defconfig
index d606067ebb..d588dcbac2 100644
--- a/configs/UCP1020_SPIFLASH_defconfig
+++ b/configs/UCP1020_SPIFLASH_defconfig
@@ -44,6 +44,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/UCP1020_defconfig b/configs/UCP1020_defconfig
index ffec2b0582..aab3ca029c 100644
--- a/configs/UCP1020_defconfig
+++ b/configs/UCP1020_defconfig
@@ -44,6 +44,7 @@ CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_TSEC_ENET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/adp-ae3xx_defconfig b/configs/adp-ae3xx_defconfig
index af17718f90..553ebc84a8 100644
--- a/configs/adp-ae3xx_defconfig
+++ b/configs/adp-ae3xx_defconfig
@@ -37,6 +37,7 @@ CONFIG_FTMAC100=y
CONFIG_BAUDRATE=38400
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_ATCSPI200_SPI=y
CONFIG_TIMER=y
diff --git a/configs/alt_defconfig b/configs/alt_defconfig
index 19ae070895..82499615c7 100644
--- a/configs/alt_defconfig
+++ b/configs/alt_defconfig
@@ -1,17 +1,37 @@
CONFIG_ARM=y
+CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
+# CONFIG_SPL_USE_ARCH_MEMCPY is not set
+# CONFIG_SPL_USE_ARCH_MEMSET is not set
CONFIG_ARCH_RMOBILE=y
-CONFIG_SYS_TEXT_BASE=0xE6304000
-CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SYS_TEXT_BASE=0x50000000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x8000
CONFIG_R8A7794=y
CONFIG_TARGET_ALT=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
+CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="r8a7794-alt-u-boot"
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000
+CONFIG_FIT=y
CONFIG_BOOTDELAY=3
CONFIG_VERSION_VARIABLE=y
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_SPL_RAM_SUPPORT=y
+CONFIG_SPL_RAM_DEVICE=y
+CONFIG_SPL_SPI_LOAD=y
+CONFIG_SPL_YMODEM_SUPPORT=y
+CONFIG_HUSH_PARSER=y
CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_IMI is not set
# CONFIG_CMD_XIMG is not set
+CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
+CONFIG_CMD_PCI=y
CONFIG_CMD_SDRAM=y
CONFIG_CMD_SF=y
CONFIG_CMD_SPI=y
@@ -19,22 +39,44 @@ CONFIG_CMD_USB=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_TIME=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_OF_CONTROL=y
+CONFIG_OF_EMBED=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_CLK=y
+CONFIG_CLK_RENESAS=y
+CONFIG_DM_GPIO=y
+CONFIG_RCAR_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_RCAR_IIC=y
+CONFIG_DM_MMC=y
CONFIG_SH_MMCIF=y
+CONFIG_RENESAS_SDHI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_PHY_MICREL=y
-CONFIG_NETDEVICES=y
+CONFIG_DM_ETH=y
CONFIG_SH_ETHER=y
-CONFIG_BAUDRATE=38400
+CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_PCI_RCAR_GEN2=y
+CONFIG_PINCTRL=y
+CONFIG_PINCONF=y
+CONFIG_PINCTRL_PFC=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_SPI=y
CONFIG_SH_QSPI=y
CONFIG_USB=y
+CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_PCI=y
CONFIG_USB_STORAGE=y
diff --git a/configs/am335x_baltos_defconfig b/configs/am335x_baltos_defconfig
index 71d09714af..6b5755c1ae 100644
--- a/configs/am335x_baltos_defconfig
+++ b/configs/am335x_baltos_defconfig
@@ -46,6 +46,7 @@ CONFIG_NAND=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/am335x_boneblack_defconfig b/configs/am335x_boneblack_defconfig
index 5688e44c0b..5c01b20dff 100644
--- a/configs/am335x_boneblack_defconfig
+++ b/configs/am335x_boneblack_defconfig
@@ -33,6 +33,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig
index b9726edc47..abbacdc77e 100644
--- a/configs/am335x_boneblack_vboot_defconfig
+++ b/configs/am335x_boneblack_vboot_defconfig
@@ -39,6 +39,7 @@ CONFIG_DM_ETH=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_GIGE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index 3f8a2a24e2..6732013b03 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -42,6 +42,7 @@ CONFIG_DM_ETH=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_GIGE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
diff --git a/configs/am335x_evm_nor_defconfig b/configs/am335x_evm_nor_defconfig
index af12695ed9..bbde07fb1d 100644
--- a/configs/am335x_evm_nor_defconfig
+++ b/configs/am335x_evm_nor_defconfig
@@ -32,6 +32,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/am335x_evm_norboot_defconfig b/configs/am335x_evm_norboot_defconfig
index 068c3f27ad..3ddcf64942 100644
--- a/configs/am335x_evm_norboot_defconfig
+++ b/configs/am335x_evm_norboot_defconfig
@@ -27,6 +27,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/am335x_evm_spiboot_defconfig b/configs/am335x_evm_spiboot_defconfig
index 23ad6793c8..10eb0fe1ee 100644
--- a/configs/am335x_evm_spiboot_defconfig
+++ b/configs/am335x_evm_spiboot_defconfig
@@ -31,6 +31,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/am335x_evm_usbspl_defconfig b/configs/am335x_evm_usbspl_defconfig
index 25d01bb53f..dc9ac216c2 100644
--- a/configs/am335x_evm_usbspl_defconfig
+++ b/configs/am335x_evm_usbspl_defconfig
@@ -40,6 +40,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/am335x_hs_evm_defconfig b/configs/am335x_hs_evm_defconfig
index f473210280..0c59f3fe3a 100644
--- a/configs/am335x_hs_evm_defconfig
+++ b/configs/am335x_hs_evm_defconfig
@@ -50,6 +50,7 @@ CONFIG_DM_ETH=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_GIGE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
diff --git a/configs/am335x_hs_evm_uart_defconfig b/configs/am335x_hs_evm_uart_defconfig
index 1321d52130..a57cef50f7 100644
--- a/configs/am335x_hs_evm_uart_defconfig
+++ b/configs/am335x_hs_evm_uart_defconfig
@@ -47,6 +47,7 @@ CONFIG_DM_ETH=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_GIGE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
diff --git a/configs/am335x_igep003x_defconfig b/configs/am335x_igep003x_defconfig
index 48dc3c970a..5f57a678df 100644
--- a/configs/am335x_igep003x_defconfig
+++ b/configs/am335x_igep003x_defconfig
@@ -45,6 +45,7 @@ CONFIG_NAND=y
CONFIG_MTD_UBI_FASTMAP=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/am335x_pdu001_defconfig b/configs/am335x_pdu001_defconfig
index a9d0f8e016..ea3b43d0c6 100644
--- a/configs/am335x_pdu001_defconfig
+++ b/configs/am335x_pdu001_defconfig
@@ -49,5 +49,6 @@ CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_TPS65910=y
CONFIG_CONS_INDEX=4
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
# CONFIG_USE_TINY_PRINTF is not set
# CONFIG_EFI_LOADER is not set
diff --git a/configs/am335x_shc_defconfig b/configs/am335x_shc_defconfig
index 3158c55651..709094b4a7 100644
--- a/configs/am335x_shc_defconfig
+++ b/configs/am335x_shc_defconfig
@@ -39,6 +39,7 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
CONFIG_LZO=y
diff --git a/configs/am335x_shc_ict_defconfig b/configs/am335x_shc_ict_defconfig
index 4dab0a0cd3..7413f6cf28 100644
--- a/configs/am335x_shc_ict_defconfig
+++ b/configs/am335x_shc_ict_defconfig
@@ -40,6 +40,7 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
CONFIG_LZO=y
diff --git a/configs/am335x_shc_netboot_defconfig b/configs/am335x_shc_netboot_defconfig
index 83124b6d4f..b60ee9d035 100644
--- a/configs/am335x_shc_netboot_defconfig
+++ b/configs/am335x_shc_netboot_defconfig
@@ -41,6 +41,7 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
CONFIG_LZO=y
diff --git a/configs/am335x_shc_prompt_defconfig b/configs/am335x_shc_prompt_defconfig
index 1b0d92bb69..59806adbf0 100644
--- a/configs/am335x_shc_prompt_defconfig
+++ b/configs/am335x_shc_prompt_defconfig
@@ -38,6 +38,7 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
CONFIG_LZO=y
diff --git a/configs/am335x_shc_sdboot_defconfig b/configs/am335x_shc_sdboot_defconfig
index d4c3bfb856..d970172b8f 100644
--- a/configs/am335x_shc_sdboot_defconfig
+++ b/configs/am335x_shc_sdboot_defconfig
@@ -40,6 +40,7 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
CONFIG_LZO=y
diff --git a/configs/am335x_shc_sdboot_prompt_defconfig b/configs/am335x_shc_sdboot_prompt_defconfig
index d4c3bfb856..d970172b8f 100644
--- a/configs/am335x_shc_sdboot_prompt_defconfig
+++ b/configs/am335x_shc_sdboot_prompt_defconfig
@@ -40,6 +40,7 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
CONFIG_LZO=y
diff --git a/configs/am335x_sl50_defconfig b/configs/am335x_sl50_defconfig
index d51812e257..3f2eeadc2c 100644
--- a/configs/am335x_sl50_defconfig
+++ b/configs/am335x_sl50_defconfig
@@ -43,6 +43,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_MMC_OMAP_HS=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
CONFIG_LZO=y
diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig
index 26f3a96b2c..8a94fd3ce0 100644
--- a/configs/am3517_evm_defconfig
+++ b/configs/am3517_evm_defconfig
@@ -37,6 +37,7 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
CONFIG_SPL_NAND_SIMPLE=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
CONFIG_USB_MUSB_AM35X=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index edb41193be..06e6c0d5b0 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -40,6 +40,7 @@ CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_GIGE=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_TI_QSPI=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
diff --git a/configs/am43xx_evm_ethboot_defconfig b/configs/am43xx_evm_ethboot_defconfig
index fcb502c605..c6f6d4f9ac 100644
--- a/configs/am43xx_evm_ethboot_defconfig
+++ b/configs/am43xx_evm_ethboot_defconfig
@@ -44,6 +44,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig
index 99daf5d9e0..bcb7d22a2f 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -42,6 +42,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
diff --git a/configs/am43xx_evm_rtconly_defconfig b/configs/am43xx_evm_rtconly_defconfig
index 339a1c6fc3..a4d0210930 100644
--- a/configs/am43xx_evm_rtconly_defconfig
+++ b/configs/am43xx_evm_rtconly_defconfig
@@ -41,6 +41,7 @@ CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_GIGE=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_TI_QSPI=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
index 4e9a614250..f2c20ab40f 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -54,6 +54,7 @@ CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_GIGE=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_TI_QSPI=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig
index d290af0e28..a6fa2e54be 100644
--- a/configs/am43xx_hs_evm_defconfig
+++ b/configs/am43xx_hs_evm_defconfig
@@ -51,6 +51,7 @@ CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_GIGE=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_TI_QSPI=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig
index 6b11b3476c..0e99268441 100644
--- a/configs/am57xx_evm_defconfig
+++ b/configs/am57xx_evm_defconfig
@@ -63,6 +63,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_PALMAS=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig
index ca9742f118..165c2a40ba 100644
--- a/configs/am57xx_hs_evm_defconfig
+++ b/configs/am57xx_hs_evm_defconfig
@@ -66,6 +66,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_PALMAS=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
diff --git a/configs/ap121_defconfig b/configs/ap121_defconfig
index 2d418f6d33..1eff3ed767 100644
--- a/configs/ap121_defconfig
+++ b/configs/ap121_defconfig
@@ -54,6 +54,7 @@ CONFIG_DEBUG_UART_BASE=0xb8020000
CONFIG_DEBUG_UART_CLOCK=25000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_AR933X_UART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_ATH79_SPI=y
CONFIG_LZMA=y
diff --git a/configs/ap143_defconfig b/configs/ap143_defconfig
index 4c39b34a55..77fb0a4f88 100644
--- a/configs/ap143_defconfig
+++ b/configs/ap143_defconfig
@@ -49,6 +49,7 @@ CONFIG_DEBUG_UART_CLOCK=25000000
CONFIG_DEBUG_UART_SHIFT=2
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_ATH79_SPI=y
CONFIG_LZMA=y
diff --git a/configs/aristainetos2_defconfig b/configs/aristainetos2_defconfig
index d0e9829372..60fd211ce9 100644
--- a/configs/aristainetos2_defconfig
+++ b/configs/aristainetos2_defconfig
@@ -43,6 +43,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/aristainetos2b_defconfig b/configs/aristainetos2b_defconfig
index 617416e1ac..a3537c1211 100644
--- a/configs/aristainetos2b_defconfig
+++ b/configs/aristainetos2b_defconfig
@@ -43,6 +43,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/aristainetos_defconfig b/configs/aristainetos_defconfig
index 78e93523a2..990aa499f7 100644
--- a/configs/aristainetos_defconfig
+++ b/configs/aristainetos_defconfig
@@ -41,6 +41,7 @@ CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9260ek_dataflash_cs0_defconfig b/configs/at91sam9260ek_dataflash_cs0_defconfig
index fdf751f2d7..1a3d5ec725 100644
--- a/configs/at91sam9260ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9260ek_dataflash_cs0_defconfig
@@ -46,6 +46,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9260ek_dataflash_cs1_defconfig b/configs/at91sam9260ek_dataflash_cs1_defconfig
index c40480cc64..b16fff6a96 100644
--- a/configs/at91sam9260ek_dataflash_cs1_defconfig
+++ b/configs/at91sam9260ek_dataflash_cs1_defconfig
@@ -46,6 +46,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9260ek_nandflash_defconfig b/configs/at91sam9260ek_nandflash_defconfig
index a990db9196..8cacec8683 100644
--- a/configs/at91sam9260ek_nandflash_defconfig
+++ b/configs/at91sam9260ek_nandflash_defconfig
@@ -46,6 +46,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9261ek_dataflash_cs0_defconfig b/configs/at91sam9261ek_dataflash_cs0_defconfig
index d6ab479895..dd2c890667 100644
--- a/configs/at91sam9261ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs0_defconfig
@@ -45,6 +45,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9261ek_dataflash_cs3_defconfig b/configs/at91sam9261ek_dataflash_cs3_defconfig
index 03e0dba2a1..b035ed612a 100644
--- a/configs/at91sam9261ek_dataflash_cs3_defconfig
+++ b/configs/at91sam9261ek_dataflash_cs3_defconfig
@@ -45,6 +45,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9261ek_nandflash_defconfig b/configs/at91sam9261ek_nandflash_defconfig
index ca372a3992..91cfb8f85c 100644
--- a/configs/at91sam9261ek_nandflash_defconfig
+++ b/configs/at91sam9261ek_nandflash_defconfig
@@ -45,6 +45,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9263ek_dataflash_cs0_defconfig b/configs/at91sam9263ek_dataflash_cs0_defconfig
index a6ea260891..c017f36db8 100644
--- a/configs/at91sam9263ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9263ek_dataflash_cs0_defconfig
@@ -51,6 +51,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9263ek_dataflash_defconfig b/configs/at91sam9263ek_dataflash_defconfig
index a6ea260891..c017f36db8 100644
--- a/configs/at91sam9263ek_dataflash_defconfig
+++ b/configs/at91sam9263ek_dataflash_defconfig
@@ -51,6 +51,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9263ek_nandflash_defconfig b/configs/at91sam9263ek_nandflash_defconfig
index 4ab4b4e282..538ac35b55 100644
--- a/configs/at91sam9263ek_nandflash_defconfig
+++ b/configs/at91sam9263ek_nandflash_defconfig
@@ -51,6 +51,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9263ek_norflash_boot_defconfig b/configs/at91sam9263ek_norflash_boot_defconfig
index 72685f3c49..d1491cac5e 100644
--- a/configs/at91sam9263ek_norflash_boot_defconfig
+++ b/configs/at91sam9263ek_norflash_boot_defconfig
@@ -50,6 +50,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9263ek_norflash_defconfig b/configs/at91sam9263ek_norflash_defconfig
index dfd6c2e7e4..c0f27b265f 100644
--- a/configs/at91sam9263ek_norflash_defconfig
+++ b/configs/at91sam9263ek_norflash_defconfig
@@ -50,6 +50,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9g10ek_dataflash_cs0_defconfig b/configs/at91sam9g10ek_dataflash_cs0_defconfig
index e2bd1ba395..b013a3ac91 100644
--- a/configs/at91sam9g10ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9g10ek_dataflash_cs0_defconfig
@@ -45,6 +45,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9g10ek_dataflash_cs3_defconfig b/configs/at91sam9g10ek_dataflash_cs3_defconfig
index c825cf5461..f44fdf9987 100644
--- a/configs/at91sam9g10ek_dataflash_cs3_defconfig
+++ b/configs/at91sam9g10ek_dataflash_cs3_defconfig
@@ -45,6 +45,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9g10ek_nandflash_defconfig b/configs/at91sam9g10ek_nandflash_defconfig
index 55606358ba..b3478239f0 100644
--- a/configs/at91sam9g10ek_nandflash_defconfig
+++ b/configs/at91sam9g10ek_nandflash_defconfig
@@ -45,6 +45,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/at91sam9g20ek_2mmc_defconfig b/configs/at91sam9g20ek_2mmc_defconfig
index ba7a83144f..59fd5972b5 100644
--- a/configs/at91sam9g20ek_2mmc_defconfig
+++ b/configs/at91sam9g20ek_2mmc_defconfig
@@ -48,6 +48,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9g20ek_2mmc_nandflash_defconfig b/configs/at91sam9g20ek_2mmc_nandflash_defconfig
index 5f4ccb954b..c4638248c8 100644
--- a/configs/at91sam9g20ek_2mmc_nandflash_defconfig
+++ b/configs/at91sam9g20ek_2mmc_nandflash_defconfig
@@ -48,6 +48,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9g20ek_dataflash_cs0_defconfig b/configs/at91sam9g20ek_dataflash_cs0_defconfig
index add4c58fb6..a0d7665447 100644
--- a/configs/at91sam9g20ek_dataflash_cs0_defconfig
+++ b/configs/at91sam9g20ek_dataflash_cs0_defconfig
@@ -46,6 +46,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9g20ek_dataflash_cs1_defconfig b/configs/at91sam9g20ek_dataflash_cs1_defconfig
index 528b112fce..5241d05541 100644
--- a/configs/at91sam9g20ek_dataflash_cs1_defconfig
+++ b/configs/at91sam9g20ek_dataflash_cs1_defconfig
@@ -46,6 +46,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9g20ek_nandflash_defconfig b/configs/at91sam9g20ek_nandflash_defconfig
index dbd0c6133e..e3536da262 100644
--- a/configs/at91sam9g20ek_nandflash_defconfig
+++ b/configs/at91sam9g20ek_nandflash_defconfig
@@ -46,6 +46,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9n12ek_mmc_defconfig b/configs/at91sam9n12ek_mmc_defconfig
index 710b102f4d..0062e0cade 100644
--- a/configs/at91sam9n12ek_mmc_defconfig
+++ b/configs/at91sam9n12ek_mmc_defconfig
@@ -47,6 +47,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9n12ek_nandflash_defconfig b/configs/at91sam9n12ek_nandflash_defconfig
index 2089fdf895..add2b35307 100644
--- a/configs/at91sam9n12ek_nandflash_defconfig
+++ b/configs/at91sam9n12ek_nandflash_defconfig
@@ -47,6 +47,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9n12ek_spiflash_defconfig b/configs/at91sam9n12ek_spiflash_defconfig
index 7d2a05628e..5829b4722d 100644
--- a/configs/at91sam9n12ek_spiflash_defconfig
+++ b/configs/at91sam9n12ek_spiflash_defconfig
@@ -47,6 +47,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9rlek_dataflash_defconfig b/configs/at91sam9rlek_dataflash_defconfig
index 7f3fd4d2f0..a207e4bd4e 100644
--- a/configs/at91sam9rlek_dataflash_defconfig
+++ b/configs/at91sam9rlek_dataflash_defconfig
@@ -47,6 +47,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9rlek_mmc_defconfig b/configs/at91sam9rlek_mmc_defconfig
index 84c9fa597f..18ff7c8621 100644
--- a/configs/at91sam9rlek_mmc_defconfig
+++ b/configs/at91sam9rlek_mmc_defconfig
@@ -47,6 +47,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9rlek_nandflash_defconfig b/configs/at91sam9rlek_nandflash_defconfig
index 21b19587af..085f5f644c 100644
--- a/configs/at91sam9rlek_nandflash_defconfig
+++ b/configs/at91sam9rlek_nandflash_defconfig
@@ -47,6 +47,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9x5ek_dataflash_defconfig b/configs/at91sam9x5ek_dataflash_defconfig
index b119acfaee..ffed17904a 100644
--- a/configs/at91sam9x5ek_dataflash_defconfig
+++ b/configs/at91sam9x5ek_dataflash_defconfig
@@ -50,6 +50,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9x5ek_mmc_defconfig b/configs/at91sam9x5ek_mmc_defconfig
index eb2375476b..29176ae00a 100644
--- a/configs/at91sam9x5ek_mmc_defconfig
+++ b/configs/at91sam9x5ek_mmc_defconfig
@@ -50,6 +50,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9x5ek_nandflash_defconfig b/configs/at91sam9x5ek_nandflash_defconfig
index a33ad2ee26..4d16eb5a8b 100644
--- a/configs/at91sam9x5ek_nandflash_defconfig
+++ b/configs/at91sam9x5ek_nandflash_defconfig
@@ -50,6 +50,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9x5ek_spiflash_defconfig b/configs/at91sam9x5ek_spiflash_defconfig
index 4647e1ac55..52c419d050 100644
--- a/configs/at91sam9x5ek_spiflash_defconfig
+++ b/configs/at91sam9x5ek_spiflash_defconfig
@@ -50,6 +50,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9xeek_dataflash_cs0_defconfig b/configs/at91sam9xeek_dataflash_cs0_defconfig
index 24aa2a1457..9e588c0292 100644
--- a/configs/at91sam9xeek_dataflash_cs0_defconfig
+++ b/configs/at91sam9xeek_dataflash_cs0_defconfig
@@ -46,6 +46,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9xeek_dataflash_cs1_defconfig b/configs/at91sam9xeek_dataflash_cs1_defconfig
index 598f029bed..47a9beacec 100644
--- a/configs/at91sam9xeek_dataflash_cs1_defconfig
+++ b/configs/at91sam9xeek_dataflash_cs1_defconfig
@@ -46,6 +46,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/at91sam9xeek_nandflash_defconfig b/configs/at91sam9xeek_nandflash_defconfig
index 2b228d818f..0103d5c0dc 100644
--- a/configs/at91sam9xeek_nandflash_defconfig
+++ b/configs/at91sam9xeek_nandflash_defconfig
@@ -46,6 +46,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/bayleybay_defconfig b/configs/bayleybay_defconfig
index 436bb64d85..25ec79de75 100644
--- a/configs/bayleybay_defconfig
+++ b/configs/bayleybay_defconfig
@@ -46,6 +46,7 @@ CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CPU=y
CONFIG_E1000=y
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
diff --git a/configs/bg0900_defconfig b/configs/bg0900_defconfig
index 8a5309231c..fa8f6dcba8 100644
--- a/configs/bg0900_defconfig
+++ b/configs/bg0900_defconfig
@@ -34,5 +34,6 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_CONS_INDEX=0
+CONFIG_SPI=y
CONFIG_MXS_SPI=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/birdland_bav335a_defconfig b/configs/birdland_bav335a_defconfig
index edc24d62a0..51b3e6b4e1 100644
--- a/configs/birdland_bav335a_defconfig
+++ b/configs/birdland_bav335a_defconfig
@@ -51,6 +51,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/birdland_bav335b_defconfig b/configs/birdland_bav335b_defconfig
index 4f814e4172..29b223a580 100644
--- a/configs/birdland_bav335b_defconfig
+++ b/configs/birdland_bav335b_defconfig
@@ -51,6 +51,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/bk4r1_defconfig b/configs/bk4r1_defconfig
index 441a156918..c90ed96ef0 100644
--- a/configs/bk4r1_defconfig
+++ b/configs/bk4r1_defconfig
@@ -40,5 +40,6 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/brppt1_spi_defconfig b/configs/brppt1_spi_defconfig
index e31fb94bff..8d4f1c1252 100644
--- a/configs/brppt1_spi_defconfig
+++ b/configs/brppt1_spi_defconfig
@@ -63,6 +63,7 @@ CONFIG_SPI_FLASH_STMICRO=y
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/cairo_defconfig b/configs/cairo_defconfig
index 88f48482a3..0a772a284c 100644
--- a/configs/cairo_defconfig
+++ b/configs/cairo_defconfig
@@ -31,6 +31,7 @@ CONFIG_NAND=y
CONFIG_SPL_NAND_SIMPLE=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
# CONFIG_REGEX is not set
diff --git a/configs/cgtqmx6eval_defconfig b/configs/cgtqmx6eval_defconfig
index e28c683839..d4204aa712 100644
--- a/configs/cgtqmx6eval_defconfig
+++ b/configs/cgtqmx6eval_defconfig
@@ -53,6 +53,7 @@ CONFIG_DFU_MMC=y
CONFIG_DFU_SF=y
CONFIG_FSL_ESDHC=y
CONFIG_PHYLIB=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/cherryhill_defconfig b/configs/cherryhill_defconfig
index 64e38b97db..b0cc49fba8 100644
--- a/configs/cherryhill_defconfig
+++ b/configs/cherryhill_defconfig
@@ -34,5 +34,6 @@ CONFIG_CPU=y
CONFIG_RTL8169=y
CONFIG_DEBUG_UART_BASE=0x3f8
CONFIG_DEBUG_UART_CLOCK=1843200
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
diff --git a/configs/chiliboard_defconfig b/configs/chiliboard_defconfig
index 344a3a08dc..66f28bd448 100644
--- a/configs/chiliboard_defconfig
+++ b/configs/chiliboard_defconfig
@@ -36,6 +36,7 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/chromebit_mickey_defconfig b/configs/chromebit_mickey_defconfig
index d8ab84b8e4..d1728ef639 100644
--- a/configs/chromebit_mickey_defconfig
+++ b/configs/chromebit_mickey_defconfig
@@ -71,7 +71,6 @@ CONFIG_SPL_RAM=y
CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_ROCKCHIP_SERIAL=y
CONFIG_ROCKCHIP_SPI=y
CONFIG_SYSRESET=y
diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig
index 5dabae5434..43d93f4637 100644
--- a/configs/chromebook_jerry_defconfig
+++ b/configs/chromebook_jerry_defconfig
@@ -72,7 +72,6 @@ CONFIG_SPL_RAM=y
CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_ROCKCHIP_SERIAL=y
CONFIG_ROCKCHIP_SPI=y
CONFIG_SYSRESET=y
diff --git a/configs/chromebook_link64_defconfig b/configs/chromebook_link64_defconfig
index dfc022df2e..236f0bd7a4 100644
--- a/configs/chromebook_link64_defconfig
+++ b/configs/chromebook_link64_defconfig
@@ -67,6 +67,7 @@ CONFIG_DEBUG_UART_BASE=0x3f8
CONFIG_DEBUG_UART_CLOCK=1843200
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_SPL_TIMER=y
CONFIG_TIMER_EARLY=y
CONFIG_TPM_TIS_LPC=y
diff --git a/configs/chromebook_link_defconfig b/configs/chromebook_link_defconfig
index deffd86cd8..2cedf06c2c 100644
--- a/configs/chromebook_link_defconfig
+++ b/configs/chromebook_link_defconfig
@@ -51,6 +51,7 @@ CONFIG_DEBUG_UART_BASE=0x3f8
CONFIG_DEBUG_UART_CLOCK=1843200
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_TIMER_EARLY=y
CONFIG_TPM_TIS_LPC=y
CONFIG_USB_STORAGE=y
diff --git a/configs/chromebook_minnie_defconfig b/configs/chromebook_minnie_defconfig
index c54c00f484..706809ca53 100644
--- a/configs/chromebook_minnie_defconfig
+++ b/configs/chromebook_minnie_defconfig
@@ -71,7 +71,6 @@ CONFIG_SPL_RAM=y
CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_ROCKCHIP_SERIAL=y
CONFIG_ROCKCHIP_SPI=y
CONFIG_SYSRESET=y
diff --git a/configs/chromebook_samus_defconfig b/configs/chromebook_samus_defconfig
index 8e6441b188..5be5226e71 100644
--- a/configs/chromebook_samus_defconfig
+++ b/configs/chromebook_samus_defconfig
@@ -49,6 +49,7 @@ CONFIG_DEBUG_UART_BASE=0x3f8
CONFIG_DEBUG_UART_CLOCK=1843200
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_TPM_TIS_LPC=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
diff --git a/configs/chromebox_panther_defconfig b/configs/chromebox_panther_defconfig
index eb85e6be5f..886c167358 100644
--- a/configs/chromebox_panther_defconfig
+++ b/configs/chromebox_panther_defconfig
@@ -42,6 +42,7 @@ CONFIG_CROS_EC=y
CONFIG_CROS_EC_LPC=y
CONFIG_RTL8169=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_TPM_TIS_LPC=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
diff --git a/configs/cl-som-am57x_defconfig b/configs/cl-som-am57x_defconfig
index 873f80dab0..008b6e814b 100644
--- a/configs/cl-som-am57x_defconfig
+++ b/configs/cl-som-am57x_defconfig
@@ -48,6 +48,7 @@ CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
diff --git a/configs/cl-som-imx7_defconfig b/configs/cl-som-imx7_defconfig
index 0861e6207f..a582ee4024 100644
--- a/configs/cl-som-imx7_defconfig
+++ b/configs/cl-som-imx7_defconfig
@@ -48,6 +48,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_FSL_ESDHC=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index 5926004001..65c4cbed12 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -65,6 +65,7 @@ CONFIG_SPI_FLASH_WINBOND=y
CONFIG_PHYLIB=y
CONFIG_DM_PMIC=y
CONFIG_DM_REGULATOR=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/cm_t3517_defconfig b/configs/cm_t3517_defconfig
index 97ed53249a..f41f267d5f 100644
--- a/configs/cm_t3517_defconfig
+++ b/configs/cm_t3517_defconfig
@@ -46,6 +46,7 @@ CONFIG_SMC911X_BASE=0x2D000000
CONFIG_SMC911X_32_BIT=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/cm_t35_defconfig b/configs/cm_t35_defconfig
index 5640f22bcd..8548ceba71 100644
--- a/configs/cm_t35_defconfig
+++ b/configs/cm_t35_defconfig
@@ -47,6 +47,7 @@ CONFIG_SMC911X_BASE=0x2C000000
CONFIG_SMC911X_32_BIT=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/cm_t43_defconfig b/configs/cm_t43_defconfig
index 917bd6a7e9..b75043ad15 100644
--- a/configs/cm_t43_defconfig
+++ b/configs/cm_t43_defconfig
@@ -60,6 +60,7 @@ CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
diff --git a/configs/cm_t54_defconfig b/configs/cm_t54_defconfig
index 20cb0fde0b..a5d9c7e11a 100644
--- a/configs/cm_t54_defconfig
+++ b/configs/cm_t54_defconfig
@@ -34,6 +34,7 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_SCSI=y
CONFIG_CONS_INDEX=4
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig
index 77ad26e017..8c2e8d656d 100644
--- a/configs/colibri_vf_defconfig
+++ b/configs/colibri_vf_defconfig
@@ -53,6 +53,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/comtrend_ar5315u_ram_defconfig b/configs/comtrend_ar5315u_ram_defconfig
index 6b2c3555fe..e319df8ecc 100644
--- a/configs/comtrend_ar5315u_ram_defconfig
+++ b/configs/comtrend_ar5315u_ram_defconfig
@@ -48,6 +48,7 @@ CONFIG_RESET_BCM6345=y
# CONFIG_SPL_SERIAL_PRESENT is not set
CONFIG_DM_SERIAL=y
CONFIG_BCM6345_SERIAL=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_BCM63XX_HSSPI=y
CONFIG_USB=y
diff --git a/configs/comtrend_ar5387un_ram_defconfig b/configs/comtrend_ar5387un_ram_defconfig
index efccf9adec..50238f654b 100644
--- a/configs/comtrend_ar5387un_ram_defconfig
+++ b/configs/comtrend_ar5387un_ram_defconfig
@@ -49,6 +49,7 @@ CONFIG_RESET_BCM6345=y
# CONFIG_SPL_SERIAL_PRESENT is not set
CONFIG_DM_SERIAL=y
CONFIG_BCM6345_SERIAL=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_BCM63XX_HSSPI=y
CONFIG_USB=y
diff --git a/configs/conga-qeval20-qa3-e3845-internal-uart_defconfig b/configs/conga-qeval20-qa3-e3845-internal-uart_defconfig
index 26726ab960..86390b4aba 100644
--- a/configs/conga-qeval20-qa3-e3845-internal-uart_defconfig
+++ b/configs/conga-qeval20-qa3-e3845-internal-uart_defconfig
@@ -55,6 +55,7 @@ CONFIG_WINBOND_W83627=y
CONFIG_E1000=y
CONFIG_DEBUG_UART_BASE=0x3f8
CONFIG_DEBUG_UART_CLOCK=1843200
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
diff --git a/configs/conga-qeval20-qa3-e3845_defconfig b/configs/conga-qeval20-qa3-e3845_defconfig
index 6c2771e8d4..6b9b406e50 100644
--- a/configs/conga-qeval20-qa3-e3845_defconfig
+++ b/configs/conga-qeval20-qa3-e3845_defconfig
@@ -51,6 +51,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_INTEL=y
CONFIG_WINBOND_W83627=y
CONFIG_E1000=y
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
diff --git a/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig b/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig
index b0091765b6..7db07935b9 100644
--- a/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig
+++ b/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig
@@ -43,6 +43,7 @@ CONFIG_NETDEVICES=y
CONFIG_TSEC_ENET=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_TPM_AUTH_SESSIONS=y
CONFIG_USB=y
diff --git a/configs/controlcenterd_36BIT_SDCARD_defconfig b/configs/controlcenterd_36BIT_SDCARD_defconfig
index 472f3635dd..830792d6ef 100644
--- a/configs/controlcenterd_36BIT_SDCARD_defconfig
+++ b/configs/controlcenterd_36BIT_SDCARD_defconfig
@@ -43,6 +43,7 @@ CONFIG_NETDEVICES=y
CONFIG_TSEC_ENET=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_TPM_AUTH_SESSIONS=y
CONFIG_USB=y
diff --git a/configs/controlcenterdc_defconfig b/configs/controlcenterdc_defconfig
index 5fe18c6264..92d289e6a6 100644
--- a/configs/controlcenterdc_defconfig
+++ b/configs/controlcenterdc_defconfig
@@ -4,6 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x00800000
CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_TARGET_CONTROLCENTERDC=y
+CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI_SUPPORT=y
CONFIG_SPL=y
diff --git a/configs/coreboot_defconfig b/configs/coreboot_defconfig
index cc3a6c0a3f..6af2f23462 100644
--- a/configs/coreboot_defconfig
+++ b/configs/coreboot_defconfig
@@ -35,6 +35,7 @@ CONFIG_ISO_PARTITION=y
CONFIG_EFI_PARTITION=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
+CONFIG_SPI=y
CONFIG_TPM_TIS_LPC=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
diff --git a/configs/cougarcanyon2_defconfig b/configs/cougarcanyon2_defconfig
index 0310bbb723..6c79b77d06 100644
--- a/configs/cougarcanyon2_defconfig
+++ b/configs/cougarcanyon2_defconfig
@@ -32,6 +32,7 @@ CONFIG_EFI_PARTITION=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
# CONFIG_VIDEO_VESA is not set
diff --git a/configs/crownbay_defconfig b/configs/crownbay_defconfig
index 2ef8d39dfc..53245f4a66 100644
--- a/configs/crownbay_defconfig
+++ b/configs/crownbay_defconfig
@@ -40,6 +40,7 @@ CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CPU=y
CONFIG_E1000=y
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
diff --git a/configs/d2net_v2_defconfig b/configs/d2net_v2_defconfig
index b346fa221a..3995ac9906 100644
--- a/configs/d2net_v2_defconfig
+++ b/configs/d2net_v2_defconfig
@@ -32,6 +32,7 @@ CONFIG_MVSATA_IDE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/da850_am18xxevm_defconfig b/configs/da850_am18xxevm_defconfig
index a216c9888d..a21d64050f 100644
--- a/configs/da850_am18xxevm_defconfig
+++ b/configs/da850_am18xxevm_defconfig
@@ -43,6 +43,7 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_DAVINCI_SPI=y
# CONFIG_FAT_WRITE is not set
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index 90f4f5b16d..dcadcec3e5 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -46,6 +46,7 @@ CONFIG_SPI_FLASH_WINBOND=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_DAVINCI_SPI=y
# CONFIG_FAT_WRITE is not set
diff --git a/configs/da850evm_direct_nor_defconfig b/configs/da850evm_direct_nor_defconfig
index bde8995d73..f71d351ad3 100644
--- a/configs/da850evm_direct_nor_defconfig
+++ b/configs/da850evm_direct_nor_defconfig
@@ -44,5 +44,6 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_DAVINCI_SPI=y
diff --git a/configs/devkit3250_defconfig b/configs/devkit3250_defconfig
index a88cf1cb25..2f8be50a4d 100644
--- a/configs/devkit3250_defconfig
+++ b/configs/devkit3250_defconfig
@@ -40,6 +40,7 @@ CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_ADDR=31
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_LPC32XX_SSP=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/dfi-bt700-q7x-151_defconfig b/configs/dfi-bt700-q7x-151_defconfig
index 8827e052ec..8b1cbac069 100644
--- a/configs/dfi-bt700-q7x-151_defconfig
+++ b/configs/dfi-bt700-q7x-151_defconfig
@@ -48,6 +48,7 @@ CONFIG_CPU=y
CONFIG_DM_I2C=y
CONFIG_NUVOTON_NCT6102D=y
CONFIG_E1000=y
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_USB_ETHER_MCS7830=y
diff --git a/configs/dh_imx6_defconfig b/configs/dh_imx6_defconfig
index de1016eb70..df9fe11f03 100644
--- a/configs/dh_imx6_defconfig
+++ b/configs/dh_imx6_defconfig
@@ -45,6 +45,7 @@ CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
CONFIG_FEC_MXC=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/display5_defconfig b/configs/display5_defconfig
index a5f1cf1e92..e52f4e00af 100644
--- a/configs/display5_defconfig
+++ b/configs/display5_defconfig
@@ -62,4 +62,5 @@ CONFIG_PHY_MARVELL=y
CONFIG_NETDEVICES=y
CONFIG_FEC_MXC=y
CONFIG_MXC_UART=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
diff --git a/configs/display5_factory_defconfig b/configs/display5_factory_defconfig
index 8c07f25c5d..aa3bd4c8cf 100644
--- a/configs/display5_factory_defconfig
+++ b/configs/display5_factory_defconfig
@@ -68,6 +68,7 @@ CONFIG_PHYLIB=y
CONFIG_NETDEVICES=y
CONFIG_FEC_MXC=y
CONFIG_MXC_UART=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_GADGET=y
diff --git a/configs/dms-ba16-1g_defconfig b/configs/dms-ba16-1g_defconfig
index 8c1a55f325..d7a895165b 100644
--- a/configs/dms-ba16-1g_defconfig
+++ b/configs/dms-ba16-1g_defconfig
@@ -35,6 +35,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_PHYLIB=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/dms-ba16_defconfig b/configs/dms-ba16_defconfig
index 578cd691ab..576b92ddb1 100644
--- a/configs/dms-ba16_defconfig
+++ b/configs/dms-ba16_defconfig
@@ -34,6 +34,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_PHYLIB=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index e17135c8f6..9b81b0cc71 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -77,6 +77,7 @@ CONFIG_DM_REGULATOR_LP873X=y
CONFIG_DM_SCSI=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TI_QSPI=y
CONFIG_TIMER=y
diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig
index 606f99938c..536946eb29 100644
--- a/configs/dra7xx_hs_evm_defconfig
+++ b/configs/dra7xx_hs_evm_defconfig
@@ -76,6 +76,7 @@ CONFIG_DM_REGULATOR_LP873X=y
CONFIG_DM_SCSI=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TI_QSPI=y
CONFIG_TIMER=y
diff --git a/configs/draco_defconfig b/configs/draco_defconfig
index cb4904261a..9ddb3d278d 100644
--- a/configs/draco_defconfig
+++ b/configs/draco_defconfig
@@ -65,6 +65,7 @@ CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/dreamplug_defconfig b/configs/dreamplug_defconfig
index e633173f63..17c53a3445 100644
--- a/configs/dreamplug_defconfig
+++ b/configs/dreamplug_defconfig
@@ -25,6 +25,7 @@ CONFIG_MVSATA_IDE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/ds109_defconfig b/configs/ds109_defconfig
index ec41ab7b47..791a4acc7e 100644
--- a/configs/ds109_defconfig
+++ b/configs/ds109_defconfig
@@ -21,6 +21,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/duovero_defconfig b/configs/duovero_defconfig
index 23ca1b7f63..2466b444c7 100644
--- a/configs/duovero_defconfig
+++ b/configs/duovero_defconfig
@@ -31,6 +31,7 @@ CONFIG_SMC911X_BASE=0x2C000000
CONFIG_SMC911X_32_BIT=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/ea20_defconfig b/configs/ea20_defconfig
index 7332909547..497e5515d7 100644
--- a/configs/ea20_defconfig
+++ b/configs/ea20_defconfig
@@ -33,6 +33,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DAVINCI_SPI=y
CONFIG_VIDEO=y
# CONFIG_VIDEO_SW_CURSOR is not set
diff --git a/configs/efi-x86_defconfig b/configs/efi-x86_defconfig
index f1abde6a08..4cf55548ab 100644
--- a/configs/efi-x86_defconfig
+++ b/configs/efi-x86_defconfig
@@ -32,6 +32,7 @@ CONFIG_OF_EMBED=y
CONFIG_DEBUG_EFI_CONSOLE=y
CONFIG_DEBUG_UART_BASE=0
CONFIG_DEBUG_UART_CLOCK=0
+CONFIG_SPI=y
CONFIG_ICH_SPI=y
# CONFIG_REGEX is not set
CONFIG_EFI=y
diff --git a/configs/etamin_defconfig b/configs/etamin_defconfig
index c83370b108..6521aa8986 100644
--- a/configs/etamin_defconfig
+++ b/configs/etamin_defconfig
@@ -65,6 +65,7 @@ CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/ethernut5_defconfig b/configs/ethernut5_defconfig
index d2432e0096..904ad4fec9 100644
--- a/configs/ethernut5_defconfig
+++ b/configs/ethernut5_defconfig
@@ -57,6 +57,7 @@ CONFIG_PINCTRL=y
CONFIG_PINCTRL_AT91=y
CONFIG_DM_SERIAL=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/evb-rk3128_defconfig b/configs/evb-rk3128_defconfig
index 5407cbaf22..796d0ec92e 100644
--- a/configs/evb-rk3128_defconfig
+++ b/configs/evb-rk3128_defconfig
@@ -34,7 +34,6 @@ CONFIG_DM_RESET=y
CONFIG_DEBUG_UART_BASE=0x20068000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
index 549a16673a..710b0b4e1a 100644
--- a/configs/evb-rk3229_defconfig
+++ b/configs/evb-rk3229_defconfig
@@ -46,7 +46,6 @@ CONFIG_BAUDRATE=1500000
CONFIG_DEBUG_UART_BASE=0x11030000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_GADGET=y
diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
index d625fb1c5f..7695277daf 100644
--- a/configs/evb-rk3288_defconfig
+++ b/configs/evb-rk3288_defconfig
@@ -64,7 +64,6 @@ CONFIG_SPL_RAM=y
CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_DWC2=y
diff --git a/configs/evb-rk3328_defconfig b/configs/evb-rk3328_defconfig
index a52e37ac74..78ae24b56b 100644
--- a/configs/evb-rk3328_defconfig
+++ b/configs/evb-rk3328_defconfig
@@ -44,7 +44,6 @@ CONFIG_BAUDRATE=1500000
CONFIG_DEBUG_UART_BASE=0xFF130000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
diff --git a/configs/evb-rk3399_defconfig b/configs/evb-rk3399_defconfig
index b36f232dcb..05ad0da336 100644
--- a/configs/evb-rk3399_defconfig
+++ b/configs/evb-rk3399_defconfig
@@ -11,10 +11,13 @@ CONFIG_DEFAULT_DEVICE_TREE="rk3399-evb"
CONFIG_DEBUG_UART=y
CONFIG_FIT=y
CONFIG_SPL_LOAD_FIT=y
+CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_SPL_STACK_R=y
CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000
+CONFIG_SPL_ATF=y
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
CONFIG_CMD_BOOTZ=y
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
@@ -56,7 +59,6 @@ CONFIG_BAUDRATE=1500000
CONFIG_DEBUG_UART_BASE=0xFF1A0000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
diff --git a/configs/fennec-rk3288_defconfig b/configs/fennec-rk3288_defconfig
index d1f7f777ed..efdd583cf6 100644
--- a/configs/fennec-rk3288_defconfig
+++ b/configs/fennec-rk3288_defconfig
@@ -63,7 +63,6 @@ CONFIG_SPL_RAM=y
CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_DWC2=y
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index 0f254c0972..b252d27464 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -67,7 +67,6 @@ CONFIG_SPL_RAM=y
CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_DWC2=y
diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig
index 984c3f4ed6..19c0b11040 100644
--- a/configs/firefly-rk3399_defconfig
+++ b/configs/firefly-rk3399_defconfig
@@ -58,7 +58,6 @@ CONFIG_BAUDRATE=1500000
CONFIG_DEBUG_UART_BASE=0xFF1A0000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
diff --git a/configs/flea3_defconfig b/configs/flea3_defconfig
index 50462b44c3..6bb83a0528 100644
--- a/configs/flea3_defconfig
+++ b/configs/flea3_defconfig
@@ -27,6 +27,7 @@ CONFIG_NAND=y
CONFIG_NAND_MXC=y
CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_OF_LIBFDT=y
CONFIG_FDT_FIXUP_PARTITIONS=y
diff --git a/configs/galileo_defconfig b/configs/galileo_defconfig
index 1751ed92d8..7b6155be2f 100644
--- a/configs/galileo_defconfig
+++ b/configs/galileo_defconfig
@@ -38,5 +38,6 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CPU=y
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
diff --git a/configs/ge_b450v3_defconfig b/configs/ge_b450v3_defconfig
index 6f7424af22..1be7fe0bd1 100644
--- a/configs/ge_b450v3_defconfig
+++ b/configs/ge_b450v3_defconfig
@@ -37,6 +37,7 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_CMD_E1000=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_OF_LIBFDT=y
# CONFIG_EFI_LOADER is not set
diff --git a/configs/ge_b650v3_defconfig b/configs/ge_b650v3_defconfig
index 7919b4c3c6..ccea22503e 100644
--- a/configs/ge_b650v3_defconfig
+++ b/configs/ge_b650v3_defconfig
@@ -37,6 +37,7 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_CMD_E1000=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_OF_LIBFDT=y
# CONFIG_EFI_LOADER is not set
diff --git a/configs/ge_b850v3_defconfig b/configs/ge_b850v3_defconfig
index 7df83cf6ca..53d063fd12 100644
--- a/configs/ge_b850v3_defconfig
+++ b/configs/ge_b850v3_defconfig
@@ -37,6 +37,7 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_CMD_E1000=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_OF_LIBFDT=y
# CONFIG_EFI_LOADER is not set
diff --git a/configs/gose_defconfig b/configs/gose_defconfig
index baa8d85e48..3c6a4bd41b 100644
--- a/configs/gose_defconfig
+++ b/configs/gose_defconfig
@@ -1,17 +1,37 @@
CONFIG_ARM=y
+CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
+# CONFIG_SPL_USE_ARCH_MEMCPY is not set
+# CONFIG_SPL_USE_ARCH_MEMSET is not set
CONFIG_ARCH_RMOBILE=y
-CONFIG_SYS_TEXT_BASE=0xE6304000
-CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SYS_TEXT_BASE=0x50000000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x8000
CONFIG_R8A7793=y
CONFIG_TARGET_GOSE=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
+CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="r8a7793-gose-u-boot"
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000
+CONFIG_FIT=y
CONFIG_BOOTDELAY=3
CONFIG_VERSION_VARIABLE=y
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_SPL_RAM_SUPPORT=y
+CONFIG_SPL_RAM_DEVICE=y
+CONFIG_SPL_SPI_LOAD=y
+CONFIG_SPL_YMODEM_SUPPORT=y
+CONFIG_HUSH_PARSER=y
CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_IMI is not set
# CONFIG_CMD_XIMG is not set
+CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
+CONFIG_CMD_PCI=y
CONFIG_CMD_SDRAM=y
CONFIG_CMD_SF=y
CONFIG_CMD_SPI=y
@@ -19,21 +39,43 @@ CONFIG_CMD_USB=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_TIME=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_OF_CONTROL=y
+CONFIG_OF_EMBED=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_CLK=y
+CONFIG_CLK_RENESAS=y
+CONFIG_DM_GPIO=y
+CONFIG_RCAR_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_RCAR_IIC=y
+CONFIG_DM_MMC=y
+CONFIG_RENESAS_SDHI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_PHY_MICREL=y
-CONFIG_NETDEVICES=y
+CONFIG_DM_ETH=y
CONFIG_SH_ETHER=y
-CONFIG_BAUDRATE=38400
+CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_PCI_RCAR_GEN2=y
+CONFIG_PINCTRL=y
+CONFIG_PINCONF=y
+CONFIG_PINCTRL_PFC=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_SPI=y
CONFIG_SH_QSPI=y
CONFIG_USB=y
+CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_PCI=y
CONFIG_USB_STORAGE=y
diff --git a/configs/hsdk_defconfig b/configs/hsdk_defconfig
index 844decad2d..d23acfeb87 100644
--- a/configs/hsdk_defconfig
+++ b/configs/hsdk_defconfig
@@ -43,6 +43,7 @@ CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_DESIGNWARE_SPI=y
CONFIG_USB=y
diff --git a/configs/ids8313_defconfig b/configs/ids8313_defconfig
index b6621113e8..3df3dd6117 100644
--- a/configs/ids8313_defconfig
+++ b/configs/ids8313_defconfig
@@ -4,6 +4,7 @@ CONFIG_MPC83xx=y
CONFIG_TARGET_IDS8313=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
CONFIG_BOOTDELAY=1
@@ -39,5 +40,6 @@ CONFIG_NETDEVICES=y
CONFIG_TSEC_ENET=y
# CONFIG_PCI is not set
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_MPC8XXX_SPI=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/igep0032_defconfig b/configs/igep0032_defconfig
index 5420dcb02e..ace2f64f6f 100644
--- a/configs/igep0032_defconfig
+++ b/configs/igep0032_defconfig
@@ -39,6 +39,7 @@ CONFIG_SMC911X_BASE=0x2C000000
CONFIG_SMC911X_32_BIT=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_UDC=y
diff --git a/configs/igep00x0_defconfig b/configs/igep00x0_defconfig
index d276ea5946..5b3d24d066 100644
--- a/configs/igep00x0_defconfig
+++ b/configs/igep00x0_defconfig
@@ -40,6 +40,7 @@ CONFIG_SMC911X_BASE=0x2C000000
CONFIG_SMC911X_32_BIT=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_UDC=y
diff --git a/configs/imx6dl_icore_nand_defconfig b/configs/imx6dl_icore_nand_defconfig
index 74a534c68f..c34e3ac223 100644
--- a/configs/imx6dl_icore_nand_defconfig
+++ b/configs/imx6dl_icore_nand_defconfig
@@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6dl-icore"
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
CONFIG_BOOTDELAY=3
CONFIG_SPL_DMA_SUPPORT=y
diff --git a/configs/imx6q_icore_nand_defconfig b/configs/imx6q_icore_nand_defconfig
index 0caba804f6..f8477a98b5 100644
--- a/configs/imx6q_icore_nand_defconfig
+++ b/configs/imx6q_icore_nand_defconfig
@@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6q-icore"
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
CONFIG_BOOTDELAY=3
CONFIG_SUPPORT_RAW_INITRD=y
diff --git a/configs/imx6qdl_icore_mipi_defconfig b/configs/imx6qdl_icore_mipi_defconfig
index 4e1dad62b8..17fff72bff 100644
--- a/configs/imx6qdl_icore_mipi_defconfig
+++ b/configs/imx6qdl_icore_mipi_defconfig
@@ -17,6 +17,7 @@ CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
CONFIG_SPL_LOAD_FIT=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
CONFIG_BOOTDELAY=3
CONFIG_SUPPORT_RAW_INITRD=y
diff --git a/configs/imx6qdl_icore_mmc_defconfig b/configs/imx6qdl_icore_mmc_defconfig
index 308e11c0dd..948894e0dd 100644
--- a/configs/imx6qdl_icore_mmc_defconfig
+++ b/configs/imx6qdl_icore_mmc_defconfig
@@ -17,6 +17,7 @@ CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
CONFIG_SPL_LOAD_FIT=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
CONFIG_BOOTDELAY=3
CONFIG_SUPPORT_RAW_INITRD=y
diff --git a/configs/imx6qdl_icore_nand_defconfig b/configs/imx6qdl_icore_nand_defconfig
index 0caba804f6..f8477a98b5 100644
--- a/configs/imx6qdl_icore_nand_defconfig
+++ b/configs/imx6qdl_icore_nand_defconfig
@@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6q-icore"
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
CONFIG_BOOTDELAY=3
CONFIG_SUPPORT_RAW_INITRD=y
diff --git a/configs/imx6qdl_icore_rqs_defconfig b/configs/imx6qdl_icore_rqs_defconfig
index fb7f260278..2e49fe3446 100644
--- a/configs/imx6qdl_icore_rqs_defconfig
+++ b/configs/imx6qdl_icore_rqs_defconfig
@@ -16,6 +16,7 @@ CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
CONFIG_SPL_LOAD_FIT=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
CONFIG_BOOTDELAY=3
CONFIG_SUPPORT_RAW_INITRD=y
diff --git a/configs/imx6ul_geam_mmc_defconfig b/configs/imx6ul_geam_mmc_defconfig
index b4aa1b24b6..6530667fb8 100644
--- a/configs/imx6ul_geam_mmc_defconfig
+++ b/configs/imx6ul_geam_mmc_defconfig
@@ -15,6 +15,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6ul-geam-kit"
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
CONFIG_BOOTDELAY=3
CONFIG_SUPPORT_RAW_INITRD=y
diff --git a/configs/imx6ul_geam_nand_defconfig b/configs/imx6ul_geam_nand_defconfig
index f836c18246..243ab399c6 100644
--- a/configs/imx6ul_geam_nand_defconfig
+++ b/configs/imx6ul_geam_nand_defconfig
@@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6ul-geam-kit"
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
CONFIG_BOOTDELAY=3
CONFIG_SUPPORT_RAW_INITRD=y
diff --git a/configs/imx6ul_isiot_emmc_defconfig b/configs/imx6ul_isiot_emmc_defconfig
index 2a5dbef2fa..1fa41f6c85 100644
--- a/configs/imx6ul_isiot_emmc_defconfig
+++ b/configs/imx6ul_isiot_emmc_defconfig
@@ -15,6 +15,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6ul-isiot-emmc"
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
CONFIG_BOOTDELAY=3
CONFIG_SUPPORT_RAW_INITRD=y
diff --git a/configs/imx6ul_isiot_nand_defconfig b/configs/imx6ul_isiot_nand_defconfig
index 2c84424d38..d738c0b7d4 100644
--- a/configs/imx6ul_isiot_nand_defconfig
+++ b/configs/imx6ul_isiot_nand_defconfig
@@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6ul-isiot-nand"
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
CONFIG_BOOTDELAY=3
CONFIG_SUPPORT_RAW_INITRD=y
diff --git a/configs/inetspace_v2_defconfig b/configs/inetspace_v2_defconfig
index 405786b156..6af6b66aeb 100644
--- a/configs/inetspace_v2_defconfig
+++ b/configs/inetspace_v2_defconfig
@@ -32,6 +32,7 @@ CONFIG_MVSATA_IDE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/k2e_evm_defconfig b/configs/k2e_evm_defconfig
index b817a69bdc..bb4ab25d7d 100644
--- a/configs/k2e_evm_defconfig
+++ b/configs/k2e_evm_defconfig
@@ -43,6 +43,7 @@ CONFIG_PHYLIB=y
CONFIG_DM_ETH=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_DAVINCI_SPI=y
CONFIG_USB=y
diff --git a/configs/k2e_hs_evm_defconfig b/configs/k2e_hs_evm_defconfig
index 6224222129..5c3ecc9d54 100644
--- a/configs/k2e_hs_evm_defconfig
+++ b/configs/k2e_hs_evm_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHYLIB=y
CONFIG_DM_ETH=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_DAVINCI_SPI=y
CONFIG_USB=y
diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig
index 87b887c687..9cb4f2e64d 100644
--- a/configs/k2g_evm_defconfig
+++ b/configs/k2g_evm_defconfig
@@ -47,6 +47,7 @@ CONFIG_DM_ETH=y
CONFIG_REMOTEPROC_TI_POWER=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_DAVINCI_SPI=y
CONFIG_USB=y
diff --git a/configs/k2g_hs_evm_defconfig b/configs/k2g_hs_evm_defconfig
index 86cb5269d3..1b8fec8e75 100644
--- a/configs/k2g_hs_evm_defconfig
+++ b/configs/k2g_hs_evm_defconfig
@@ -40,6 +40,7 @@ CONFIG_DM_ETH=y
CONFIG_REMOTEPROC_TI_POWER=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_DAVINCI_SPI=y
CONFIG_USB=y
diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig
index feda22b743..20df401a09 100644
--- a/configs/k2hk_evm_defconfig
+++ b/configs/k2hk_evm_defconfig
@@ -43,6 +43,7 @@ CONFIG_PHYLIB=y
CONFIG_DM_ETH=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_DAVINCI_SPI=y
CONFIG_USB=y
diff --git a/configs/k2hk_hs_evm_defconfig b/configs/k2hk_hs_evm_defconfig
index 1cca0caef8..a279d36c4a 100644
--- a/configs/k2hk_hs_evm_defconfig
+++ b/configs/k2hk_hs_evm_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHYLIB=y
CONFIG_DM_ETH=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_DAVINCI_SPI=y
CONFIG_USB=y
diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig
index 4ff69feee7..636218dfd1 100644
--- a/configs/k2l_evm_defconfig
+++ b/configs/k2l_evm_defconfig
@@ -43,6 +43,7 @@ CONFIG_PHYLIB=y
CONFIG_DM_ETH=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_DAVINCI_SPI=y
CONFIG_USB=y
diff --git a/configs/k2l_hs_evm_defconfig b/configs/k2l_hs_evm_defconfig
index cc002d383e..b47e5955df 100644
--- a/configs/k2l_hs_evm_defconfig
+++ b/configs/k2l_hs_evm_defconfig
@@ -35,6 +35,7 @@ CONFIG_PHYLIB=y
CONFIG_DM_ETH=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_DAVINCI_SPI=y
CONFIG_USB=y
diff --git a/configs/km_kirkwood_128m16_defconfig b/configs/km_kirkwood_128m16_defconfig
index 5f378f74a8..92a10c78e9 100644
--- a/configs/km_kirkwood_128m16_defconfig
+++ b/configs/km_kirkwood_128m16_defconfig
@@ -32,6 +32,7 @@ CONFIG_BOOTCOUNT_RAM=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/km_kirkwood_defconfig b/configs/km_kirkwood_defconfig
index ae20d245b1..a6af0d3d7e 100644
--- a/configs/km_kirkwood_defconfig
+++ b/configs/km_kirkwood_defconfig
@@ -32,6 +32,7 @@ CONFIG_BOOTCOUNT_RAM=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/km_kirkwood_pci_defconfig b/configs/km_kirkwood_pci_defconfig
index 22bc6cd83f..313ef7702e 100644
--- a/configs/km_kirkwood_pci_defconfig
+++ b/configs/km_kirkwood_pci_defconfig
@@ -32,6 +32,7 @@ CONFIG_BOOTCOUNT_RAM=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/kmcoge4_defconfig b/configs/kmcoge4_defconfig
index bf92d256a4..1e1696a433 100644
--- a/configs/kmcoge4_defconfig
+++ b/configs/kmcoge4_defconfig
@@ -44,6 +44,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/kmcoge5un_defconfig b/configs/kmcoge5un_defconfig
index 5c123a4ad8..b9ce916d57 100644
--- a/configs/kmcoge5un_defconfig
+++ b/configs/kmcoge5un_defconfig
@@ -32,6 +32,7 @@ CONFIG_BOOTCOUNT_RAM=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/kmlion1_defconfig b/configs/kmlion1_defconfig
index 2298e2ae38..3e61071648 100644
--- a/configs/kmlion1_defconfig
+++ b/configs/kmlion1_defconfig
@@ -44,6 +44,7 @@ CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_FSL_ESPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/kmnusa_defconfig b/configs/kmnusa_defconfig
index 4749eadb74..074c76f3ec 100644
--- a/configs/kmnusa_defconfig
+++ b/configs/kmnusa_defconfig
@@ -32,6 +32,7 @@ CONFIG_BOOTCOUNT_RAM=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/kmsugp1_defconfig b/configs/kmsugp1_defconfig
index de68d41577..b0ef68cb17 100644
--- a/configs/kmsugp1_defconfig
+++ b/configs/kmsugp1_defconfig
@@ -32,6 +32,7 @@ CONFIG_BOOTCOUNT_RAM=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/kmsuv31_defconfig b/configs/kmsuv31_defconfig
index 892f212bfa..6c84c1398a 100644
--- a/configs/kmsuv31_defconfig
+++ b/configs/kmsuv31_defconfig
@@ -32,6 +32,7 @@ CONFIG_BOOTCOUNT_RAM=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/koelsch_defconfig b/configs/koelsch_defconfig
index 8875b59a7f..f182666356 100644
--- a/configs/koelsch_defconfig
+++ b/configs/koelsch_defconfig
@@ -72,6 +72,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_SPI=y
CONFIG_SH_QSPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/lager_defconfig b/configs/lager_defconfig
index 86fab8c014..1071da24d2 100644
--- a/configs/lager_defconfig
+++ b/configs/lager_defconfig
@@ -1,17 +1,37 @@
CONFIG_ARM=y
+CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
+# CONFIG_SPL_USE_ARCH_MEMCPY is not set
+# CONFIG_SPL_USE_ARCH_MEMSET is not set
CONFIG_ARCH_RMOBILE=y
-CONFIG_SYS_TEXT_BASE=0xE8080000
-CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SYS_TEXT_BASE=0x50000000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x8000
CONFIG_R8A7790=y
CONFIG_TARGET_LAGER=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
+CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="r8a7790-lager-u-boot"
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000
+CONFIG_FIT=y
CONFIG_BOOTDELAY=3
CONFIG_VERSION_VARIABLE=y
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_SPL_RAM_SUPPORT=y
+CONFIG_SPL_RAM_DEVICE=y
+CONFIG_SPL_SPI_LOAD=y
+CONFIG_SPL_YMODEM_SUPPORT=y
+CONFIG_HUSH_PARSER=y
CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_IMI is not set
# CONFIG_CMD_XIMG is not set
+CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
+CONFIG_CMD_PCI=y
CONFIG_CMD_SDRAM=y
CONFIG_CMD_SF=y
CONFIG_CMD_SPI=y
@@ -19,22 +39,44 @@ CONFIG_CMD_USB=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_TIME=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_OF_CONTROL=y
+CONFIG_OF_EMBED=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_CLK=y
+CONFIG_CLK_RENESAS=y
+CONFIG_DM_GPIO=y
+CONFIG_RCAR_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_RCAR_IIC=y
+CONFIG_DM_MMC=y
CONFIG_SH_MMCIF=y
+CONFIG_RENESAS_SDHI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_PHY_MICREL=y
-CONFIG_NETDEVICES=y
+CONFIG_DM_ETH=y
CONFIG_SH_ETHER=y
-CONFIG_BAUDRATE=38400
+CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_PCI_RCAR_GEN2=y
+CONFIG_PINCTRL=y
+CONFIG_PINCONF=y
+CONFIG_PINCTRL_PFC=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_SPI=y
CONFIG_SH_QSPI=y
CONFIG_USB=y
+CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_PCI=y
CONFIG_USB_STORAGE=y
diff --git a/configs/legoev3_defconfig b/configs/legoev3_defconfig
index 469af7efff..c5f54a98d3 100644
--- a/configs/legoev3_defconfig
+++ b/configs/legoev3_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_DIAG=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DAVINCI_SPI=y
CONFIG_OF_LIBFDT=y
# CONFIG_EFI_LOADER is not set
diff --git a/configs/ls1012a2g5rdb_qspi_defconfig b/configs/ls1012a2g5rdb_qspi_defconfig
index 6685a6fe30..37b63ffb4c 100644
--- a/configs/ls1012a2g5rdb_qspi_defconfig
+++ b/configs/ls1012a2g5rdb_qspi_defconfig
@@ -37,6 +37,7 @@ CONFIG_SPI_FLASH=y
CONFIG_FSL_PFE=y
CONFIG_DM_ETH=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1012afrdm_qspi_defconfig b/configs/ls1012afrdm_qspi_defconfig
index 3f26940884..2bc13beb2f 100644
--- a/configs/ls1012afrdm_qspi_defconfig
+++ b/configs/ls1012afrdm_qspi_defconfig
@@ -39,6 +39,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1012aqds_qspi_defconfig b/configs/ls1012aqds_qspi_defconfig
index 86209c2542..1f9b76ad34 100644
--- a/configs/ls1012aqds_qspi_defconfig
+++ b/configs/ls1012aqds_qspi_defconfig
@@ -48,6 +48,7 @@ CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SCSI=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
index bf94031466..7dcfaaed4a 100644
--- a/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
@@ -43,6 +43,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls1012ardb_qspi_defconfig b/configs/ls1012ardb_qspi_defconfig
index 30bab90a05..6a8485c1cd 100644
--- a/configs/ls1012ardb_qspi_defconfig
+++ b/configs/ls1012ardb_qspi_defconfig
@@ -43,6 +43,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls1021aiot_qspi_defconfig b/configs/ls1021aiot_qspi_defconfig
index e93633abc1..b39c890176 100644
--- a/configs/ls1021aiot_qspi_defconfig
+++ b/configs/ls1021aiot_qspi_defconfig
@@ -27,6 +27,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/ls1021aiot_sdcard_defconfig b/configs/ls1021aiot_sdcard_defconfig
index 59592db3a5..ed82740c19 100644
--- a/configs/ls1021aiot_sdcard_defconfig
+++ b/configs/ls1021aiot_sdcard_defconfig
@@ -1,6 +1,7 @@
CONFIG_ARM=y
CONFIG_TARGET_LS1021AIOT=y
CONFIG_SYS_TEXT_BASE=0x82000000
+CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="ls1021a-iot-duart"
CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT,SD_BOOT_QSPI"
@@ -31,6 +32,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/ls1021aqds_qspi_defconfig b/configs/ls1021aqds_qspi_defconfig
index 8ae176cd64..b9cd7e53e3 100644
--- a/configs/ls1021aqds_qspi_defconfig
+++ b/configs/ls1021aqds_qspi_defconfig
@@ -46,6 +46,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/ls1021aqds_sdcard_qspi_defconfig b/configs/ls1021aqds_sdcard_qspi_defconfig
index 2944723386..3dd33be6bb 100644
--- a/configs/ls1021aqds_sdcard_qspi_defconfig
+++ b/configs/ls1021aqds_sdcard_qspi_defconfig
@@ -57,6 +57,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/ls1021atwr_qspi_defconfig b/configs/ls1021atwr_qspi_defconfig
index d1457a6bcd..46d8dbbf20 100644
--- a/configs/ls1021atwr_qspi_defconfig
+++ b/configs/ls1021atwr_qspi_defconfig
@@ -43,6 +43,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/ls1021atwr_sdcard_qspi_defconfig b/configs/ls1021atwr_sdcard_qspi_defconfig
index d5942501ec..c58d807291 100644
--- a/configs/ls1021atwr_sdcard_qspi_defconfig
+++ b/configs/ls1021atwr_sdcard_qspi_defconfig
@@ -53,6 +53,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/ls1043aqds_defconfig b/configs/ls1043aqds_defconfig
index ce8a9f5be6..3c7e6403a6 100644
--- a/configs/ls1043aqds_defconfig
+++ b/configs/ls1043aqds_defconfig
@@ -38,6 +38,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1043aqds_lpuart_defconfig b/configs/ls1043aqds_lpuart_defconfig
index 6f296472c0..4e27e11150 100644
--- a/configs/ls1043aqds_lpuart_defconfig
+++ b/configs/ls1043aqds_lpuart_defconfig
@@ -40,6 +40,7 @@ CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1043aqds_nand_defconfig b/configs/ls1043aqds_nand_defconfig
index 305ac9356f..a4de91a206 100644
--- a/configs/ls1043aqds_nand_defconfig
+++ b/configs/ls1043aqds_nand_defconfig
@@ -53,6 +53,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1043aqds_nor_ddr3_defconfig b/configs/ls1043aqds_nor_ddr3_defconfig
index 4941db4dbc..ae4c0febd0 100644
--- a/configs/ls1043aqds_nor_ddr3_defconfig
+++ b/configs/ls1043aqds_nor_ddr3_defconfig
@@ -39,6 +39,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1043aqds_qspi_defconfig b/configs/ls1043aqds_qspi_defconfig
index 0002412829..da438d7e8e 100644
--- a/configs/ls1043aqds_qspi_defconfig
+++ b/configs/ls1043aqds_qspi_defconfig
@@ -37,6 +37,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1043aqds_sdcard_ifc_defconfig b/configs/ls1043aqds_sdcard_ifc_defconfig
index 20bf5f7920..31161269e6 100644
--- a/configs/ls1043aqds_sdcard_ifc_defconfig
+++ b/configs/ls1043aqds_sdcard_ifc_defconfig
@@ -53,6 +53,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1043aqds_sdcard_qspi_defconfig b/configs/ls1043aqds_sdcard_qspi_defconfig
index e57f2ffb32..ed1e819caa 100644
--- a/configs/ls1043aqds_sdcard_qspi_defconfig
+++ b/configs/ls1043aqds_sdcard_qspi_defconfig
@@ -50,6 +50,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1043ardb_SECURE_BOOT_defconfig b/configs/ls1043ardb_SECURE_BOOT_defconfig
index 8e355c3594..2de6ee6815 100644
--- a/configs/ls1043ardb_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_SECURE_BOOT_defconfig
@@ -33,6 +33,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig
index 603bf46e48..0416a02bf1 100644
--- a/configs/ls1043ardb_defconfig
+++ b/configs/ls1043ardb_defconfig
@@ -34,6 +34,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1043ardb_nand_SECURE_BOOT_defconfig b/configs/ls1043ardb_nand_SECURE_BOOT_defconfig
index 216a71eb6f..3be6bcc799 100644
--- a/configs/ls1043ardb_nand_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_nand_SECURE_BOOT_defconfig
@@ -51,6 +51,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1043ardb_nand_defconfig b/configs/ls1043ardb_nand_defconfig
index 7694268c62..80b0fefb98 100644
--- a/configs/ls1043ardb_nand_defconfig
+++ b/configs/ls1043ardb_nand_defconfig
@@ -51,6 +51,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig
index 9de84762cb..b9c3e28684 100644
--- a/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig
@@ -50,6 +50,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1043ardb_sdcard_defconfig b/configs/ls1043ardb_sdcard_defconfig
index 683983ade2..3a7785bcb1 100644
--- a/configs/ls1043ardb_sdcard_defconfig
+++ b/configs/ls1043ardb_sdcard_defconfig
@@ -50,6 +50,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1046aqds_SECURE_BOOT_defconfig b/configs/ls1046aqds_SECURE_BOOT_defconfig
index 6015b2e61c..270188b400 100644
--- a/configs/ls1046aqds_SECURE_BOOT_defconfig
+++ b/configs/ls1046aqds_SECURE_BOOT_defconfig
@@ -38,6 +38,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls1046aqds_defconfig b/configs/ls1046aqds_defconfig
index ca326b2456..191d2f9cc2 100644
--- a/configs/ls1046aqds_defconfig
+++ b/configs/ls1046aqds_defconfig
@@ -39,6 +39,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls1046aqds_lpuart_defconfig b/configs/ls1046aqds_lpuart_defconfig
index bb6897fc87..25e5526e84 100644
--- a/configs/ls1046aqds_lpuart_defconfig
+++ b/configs/ls1046aqds_lpuart_defconfig
@@ -41,6 +41,7 @@ CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls1046aqds_nand_defconfig b/configs/ls1046aqds_nand_defconfig
index 1d40a141cd..c5bd6bfecf 100644
--- a/configs/ls1046aqds_nand_defconfig
+++ b/configs/ls1046aqds_nand_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
CONFIG_TARGET_LS1046AQDS=y
CONFIG_SYS_TEXT_BASE=0x82000000
CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
CONFIG_DISTRO_DEFAULTS=y
@@ -45,6 +46,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls1046aqds_qspi_defconfig b/configs/ls1046aqds_qspi_defconfig
index 379908afd2..4f3290c205 100644
--- a/configs/ls1046aqds_qspi_defconfig
+++ b/configs/ls1046aqds_qspi_defconfig
@@ -37,6 +37,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/ls1046aqds_sdcard_ifc_defconfig b/configs/ls1046aqds_sdcard_ifc_defconfig
index 4d0907ce33..405df66640 100644
--- a/configs/ls1046aqds_sdcard_ifc_defconfig
+++ b/configs/ls1046aqds_sdcard_ifc_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
CONFIG_TARGET_LS1046AQDS=y
CONFIG_SYS_TEXT_BASE=0x82000000
CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
CONFIG_DISTRO_DEFAULTS=y
@@ -46,6 +47,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls1046aqds_sdcard_qspi_defconfig b/configs/ls1046aqds_sdcard_qspi_defconfig
index 8467148de7..45d80b9835 100644
--- a/configs/ls1046aqds_sdcard_qspi_defconfig
+++ b/configs/ls1046aqds_sdcard_qspi_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
CONFIG_TARGET_LS1046AQDS=y
CONFIG_SYS_TEXT_BASE=0x82000000
CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
CONFIG_DISTRO_DEFAULTS=y
@@ -43,6 +44,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/ls1046ardb_emmc_defconfig b/configs/ls1046ardb_emmc_defconfig
index 3ca8f162f1..4f74dc549e 100644
--- a/configs/ls1046ardb_emmc_defconfig
+++ b/configs/ls1046ardb_emmc_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
CONFIG_TARGET_LS1046ARDB=y
CONFIG_SYS_TEXT_BASE=0x82000000
CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-rdb"
CONFIG_DISTRO_DEFAULTS=y
@@ -41,6 +42,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_QSPI=y
CONFIG_USB=y
diff --git a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
index e84bc0d08e..adc5db342b 100644
--- a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
@@ -34,6 +34,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_QSPI=y
CONFIG_USB=y
diff --git a/configs/ls1046ardb_qspi_defconfig b/configs/ls1046ardb_qspi_defconfig
index 775f28cdc2..c87fe9785d 100644
--- a/configs/ls1046ardb_qspi_defconfig
+++ b/configs/ls1046ardb_qspi_defconfig
@@ -35,6 +35,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_QSPI=y
CONFIG_USB=y
diff --git a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
index ee6320fe91..04861b755a 100644
--- a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_LS1046ARDB=y
CONFIG_SYS_TEXT_BASE=0x82000000
CONFIG_SECURE_BOOT=y
CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-rdb"
CONFIG_DISTRO_DEFAULTS=y
@@ -41,6 +42,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_QSPI=y
CONFIG_USB=y
diff --git a/configs/ls1046ardb_sdcard_defconfig b/configs/ls1046ardb_sdcard_defconfig
index 0fa6fa4ad2..22814179e6 100644
--- a/configs/ls1046ardb_sdcard_defconfig
+++ b/configs/ls1046ardb_sdcard_defconfig
@@ -2,6 +2,7 @@ CONFIG_ARM=y
CONFIG_TARGET_LS1046ARDB=y
CONFIG_SYS_TEXT_BASE=0x82000000
CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-rdb"
CONFIG_DISTRO_DEFAULTS=y
@@ -40,6 +41,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_QSPI=y
CONFIG_USB=y
diff --git a/configs/ls1088aqds_defconfig b/configs/ls1088aqds_defconfig
index 946cad3965..f20dc3e0e5 100644
--- a/configs/ls1088aqds_defconfig
+++ b/configs/ls1088aqds_defconfig
@@ -33,6 +33,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
index 83b3ccd038..be3e0981d8 100644
--- a/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
@@ -35,6 +35,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls1088aqds_qspi_defconfig b/configs/ls1088aqds_qspi_defconfig
index 8be778725b..cea6ca987b 100644
--- a/configs/ls1088aqds_qspi_defconfig
+++ b/configs/ls1088aqds_qspi_defconfig
@@ -35,6 +35,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls1088aqds_sdcard_qspi_defconfig b/configs/ls1088aqds_sdcard_qspi_defconfig
index ed7ffe4188..ddb1e04556 100644
--- a/configs/ls1088aqds_sdcard_qspi_defconfig
+++ b/configs/ls1088aqds_sdcard_qspi_defconfig
@@ -45,6 +45,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
index 8b6fbee739..23e064b9e4 100644
--- a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
@@ -35,6 +35,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls1088ardb_qspi_defconfig b/configs/ls1088ardb_qspi_defconfig
index 45fdfb8ea0..b05d50ade6 100644
--- a/configs/ls1088ardb_qspi_defconfig
+++ b/configs/ls1088ardb_qspi_defconfig
@@ -35,6 +35,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
index 524647173d..43472ac2a1 100644
--- a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
@@ -43,6 +43,7 @@ CONFIG_SPI_FLASH_SPANSION=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_RSA=y
diff --git a/configs/ls1088ardb_sdcard_qspi_defconfig b/configs/ls1088ardb_sdcard_qspi_defconfig
index 94ea3d3326..91fae2cd6a 100644
--- a/configs/ls1088ardb_sdcard_qspi_defconfig
+++ b/configs/ls1088ardb_sdcard_qspi_defconfig
@@ -45,6 +45,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls2080a_emu_defconfig b/configs/ls2080a_emu_defconfig
index 7e7aba70c3..582486ca36 100644
--- a/configs/ls2080a_emu_defconfig
+++ b/configs/ls2080a_emu_defconfig
@@ -16,7 +16,6 @@ CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EDITENV is not set
CONFIG_CMD_GREPENV=y
-# CONFIG_CMD_ENV_EXISTS is not set
CONFIG_CMD_I2C=y
# CONFIG_CMD_LOADS is not set
# CONFIG_CMD_ITEST is not set
diff --git a/configs/ls2080a_simu_defconfig b/configs/ls2080a_simu_defconfig
index 10b1821cd3..1cf5796d42 100644
--- a/configs/ls2080a_simu_defconfig
+++ b/configs/ls2080a_simu_defconfig
@@ -16,7 +16,6 @@ CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EDITENV is not set
CONFIG_CMD_GREPENV=y
-# CONFIG_CMD_ENV_EXISTS is not set
CONFIG_CMD_I2C=y
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_MMC=y
diff --git a/configs/ls2080aqds_SECURE_BOOT_defconfig b/configs/ls2080aqds_SECURE_BOOT_defconfig
index efda6532a7..74ff331b5f 100644
--- a/configs/ls2080aqds_SECURE_BOOT_defconfig
+++ b/configs/ls2080aqds_SECURE_BOOT_defconfig
@@ -41,6 +41,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls2080aqds_defconfig b/configs/ls2080aqds_defconfig
index 8cd810715d..26548be550 100644
--- a/configs/ls2080aqds_defconfig
+++ b/configs/ls2080aqds_defconfig
@@ -42,6 +42,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls2080aqds_nand_defconfig b/configs/ls2080aqds_nand_defconfig
index dd3ad1f501..18d3610ec1 100644
--- a/configs/ls2080aqds_nand_defconfig
+++ b/configs/ls2080aqds_nand_defconfig
@@ -52,6 +52,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_QSPI=y
CONFIG_USB=y
diff --git a/configs/ls2080aqds_qspi_defconfig b/configs/ls2080aqds_qspi_defconfig
index 979d7991df..b70879076b 100644
--- a/configs/ls2080aqds_qspi_defconfig
+++ b/configs/ls2080aqds_qspi_defconfig
@@ -42,6 +42,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_QSPI=y
CONFIG_USB=y
diff --git a/configs/ls2080aqds_sdcard_defconfig b/configs/ls2080aqds_sdcard_defconfig
index 94b356830c..eef7718b11 100644
--- a/configs/ls2080aqds_sdcard_defconfig
+++ b/configs/ls2080aqds_sdcard_defconfig
@@ -49,6 +49,7 @@ CONFIG_DM_PCI=y
CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_QSPI=y
CONFIG_USB=y
diff --git a/configs/ls2080ardb_SECURE_BOOT_defconfig b/configs/ls2080ardb_SECURE_BOOT_defconfig
index 466b8b1f3b..89865a8475 100644
--- a/configs/ls2080ardb_SECURE_BOOT_defconfig
+++ b/configs/ls2080ardb_SECURE_BOOT_defconfig
@@ -41,6 +41,7 @@ CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls2080ardb_defconfig b/configs/ls2080ardb_defconfig
index 83044110b6..1bd16412f0 100644
--- a/configs/ls2080ardb_defconfig
+++ b/configs/ls2080ardb_defconfig
@@ -42,6 +42,7 @@ CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_USB=y
diff --git a/configs/ls2081ardb_defconfig b/configs/ls2081ardb_defconfig
index 3a61cb1b97..001e844eb7 100644
--- a/configs/ls2081ardb_defconfig
+++ b/configs/ls2081ardb_defconfig
@@ -41,6 +41,7 @@ CONFIG_PCIE_LAYERSCAPE=y
CONFIG_SCSI=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig b/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
index a6e89b1c72..7c50834b00 100644
--- a/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
@@ -35,6 +35,7 @@ CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/ls2088ardb_qspi_defconfig b/configs/ls2088ardb_qspi_defconfig
index f978be2146..d9ba7b7dc1 100644
--- a/configs/ls2088ardb_qspi_defconfig
+++ b/configs/ls2088ardb_qspi_defconfig
@@ -39,6 +39,7 @@ CONFIG_DM_PCI_COMPAT=y
CONFIG_PCIE_LAYERSCAPE=y
CONFIG_CONS_INDEX=2
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_DSPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index 8176123f57..f602254345 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -35,6 +35,7 @@ CONFIG_MVSATA_IDE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index ee8d20af0f..a48c106443 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -26,6 +26,7 @@ CONFIG_MVSATA_IDE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/m28evk_defconfig b/configs/m28evk_defconfig
index ce6cb0f9f9..e26d49aef6 100644
--- a/configs/m28evk_defconfig
+++ b/configs/m28evk_defconfig
@@ -48,6 +48,7 @@ CONFIG_NAND_MXS=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_CONS_INDEX=0
+CONFIG_SPI=y
CONFIG_MXS_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/marsboard_defconfig b/configs/marsboard_defconfig
index e495b620e4..860cacf45d 100644
--- a/configs/marsboard_defconfig
+++ b/configs/marsboard_defconfig
@@ -23,6 +23,7 @@ CONFIG_FSL_ESDHC=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SST=y
CONFIG_PHYLIB=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
diff --git a/configs/mccmon6_nor_defconfig b/configs/mccmon6_nor_defconfig
index 990944c148..cb5012e4de 100644
--- a/configs/mccmon6_nor_defconfig
+++ b/configs/mccmon6_nor_defconfig
@@ -35,6 +35,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
diff --git a/configs/mccmon6_sd_defconfig b/configs/mccmon6_sd_defconfig
index ff0a935b8e..b40e6f47e5 100644
--- a/configs/mccmon6_sd_defconfig
+++ b/configs/mccmon6_sd_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
diff --git a/configs/meesc_dataflash_defconfig b/configs/meesc_dataflash_defconfig
index e4dfe3e04a..928480903e 100644
--- a/configs/meesc_dataflash_defconfig
+++ b/configs/meesc_dataflash_defconfig
@@ -32,4 +32,5 @@ CONFIG_PINCTRL=y
CONFIG_PINCTRL_AT91=y
CONFIG_DM_SERIAL=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
diff --git a/configs/meesc_defconfig b/configs/meesc_defconfig
index a6b2936b47..d4987f8619 100644
--- a/configs/meesc_defconfig
+++ b/configs/meesc_defconfig
@@ -33,4 +33,5 @@ CONFIG_PINCTRL=y
CONFIG_PINCTRL_AT91=y
CONFIG_DM_SERIAL=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
diff --git a/configs/mgcoge3un_defconfig b/configs/mgcoge3un_defconfig
index 89a83fdc8b..918cc61ae0 100644
--- a/configs/mgcoge3un_defconfig
+++ b/configs/mgcoge3un_defconfig
@@ -32,6 +32,7 @@ CONFIG_BOOTCOUNT_RAM=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/minnowmax_defconfig b/configs/minnowmax_defconfig
index 37298a34f8..3fe9cb2c6e 100644
--- a/configs/minnowmax_defconfig
+++ b/configs/minnowmax_defconfig
@@ -51,6 +51,7 @@ CONFIG_CPU=y
CONFIG_RTL8169=y
CONFIG_DEBUG_UART_BASE=0x3f8
CONFIG_DEBUG_UART_CLOCK=1843200
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
index af5b9cc6a4..f44537c88f 100644
--- a/configs/miqi-rk3288_defconfig
+++ b/configs/miqi-rk3288_defconfig
@@ -63,7 +63,6 @@ CONFIG_SPL_RAM=y
CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_DWC2=y
diff --git a/configs/mx28evk_auart_console_defconfig b/configs/mx28evk_auart_console_defconfig
index b1fe8ce119..69089a5d6c 100644
--- a/configs/mx28evk_auart_console_defconfig
+++ b/configs/mx28evk_auart_console_defconfig
@@ -43,6 +43,7 @@ CONFIG_NAND_MXS=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SST=y
CONFIG_CONS_INDEX=0
+CONFIG_SPI=y
CONFIG_MXS_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/mx28evk_defconfig b/configs/mx28evk_defconfig
index 338c6e8801..aa51974e7d 100644
--- a/configs/mx28evk_defconfig
+++ b/configs/mx28evk_defconfig
@@ -43,6 +43,7 @@ CONFIG_NAND_MXS=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SST=y
CONFIG_CONS_INDEX=0
+CONFIG_SPI=y
CONFIG_MXS_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/mx28evk_nand_defconfig b/configs/mx28evk_nand_defconfig
index 2874fe0cce..e0e328589b 100644
--- a/configs/mx28evk_nand_defconfig
+++ b/configs/mx28evk_nand_defconfig
@@ -42,6 +42,7 @@ CONFIG_NAND_MXS=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SST=y
CONFIG_CONS_INDEX=0
+CONFIG_SPI=y
CONFIG_MXS_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/mx28evk_spi_defconfig b/configs/mx28evk_spi_defconfig
index 97747197c8..0b6c27f4cd 100644
--- a/configs/mx28evk_spi_defconfig
+++ b/configs/mx28evk_spi_defconfig
@@ -42,6 +42,7 @@ CONFIG_NAND_MXS=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SST=y
CONFIG_CONS_INDEX=0
+CONFIG_SPI=y
CONFIG_MXS_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/mx31pdk_defconfig b/configs/mx31pdk_defconfig
index 48c46a07d1..0f78a63762 100644
--- a/configs/mx31pdk_defconfig
+++ b/configs/mx31pdk_defconfig
@@ -25,4 +25,5 @@ CONFIG_NETDEVICES=y
CONFIG_SMC911X=y
CONFIG_SMC911X_BASE=0xB6000000
CONFIG_SMC911X_32_BIT=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
diff --git a/configs/mx35pdk_defconfig b/configs/mx35pdk_defconfig
index d101de2caa..468b540a14 100644
--- a/configs/mx35pdk_defconfig
+++ b/configs/mx35pdk_defconfig
@@ -32,6 +32,7 @@ CONFIG_NAND_MXC=y
CONFIG_NETDEVICES=y
CONFIG_SMC911X=y
CONFIG_SMC911X_BASE=0xB6000000
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/mx51evk_defconfig b/configs/mx51evk_defconfig
index b7ed3cee80..0f648bb5dd 100644
--- a/configs/mx51evk_defconfig
+++ b/configs/mx51evk_defconfig
@@ -21,6 +21,7 @@ CONFIG_CMD_DATE=y
CONFIG_CMD_FAT=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig
index 7499704058..e9d193cc78 100644
--- a/configs/mx6qsabrelite_defconfig
+++ b/configs/mx6qsabrelite_defconfig
@@ -43,6 +43,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
diff --git a/configs/mx6sabreauto_defconfig b/configs/mx6sabreauto_defconfig
index 2e4e0ff988..5ef72c8164 100644
--- a/configs/mx6sabreauto_defconfig
+++ b/configs/mx6sabreauto_defconfig
@@ -48,6 +48,7 @@ CONFIG_NAND_MXS=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_PHYLIB=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
index c2d1cd4310..ca37d8bef8 100644
--- a/configs/mx6sabresd_defconfig
+++ b/configs/mx6sabresd_defconfig
@@ -57,6 +57,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_PHYLIB=y
CONFIG_PCI=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/mx6slevk_defconfig b/configs/mx6slevk_defconfig
index abc7788e1e..4b72e0814f 100644
--- a/configs/mx6slevk_defconfig
+++ b/configs/mx6slevk_defconfig
@@ -44,6 +44,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_PFUZE100=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
diff --git a/configs/mx6slevk_spinor_defconfig b/configs/mx6slevk_spinor_defconfig
index a57e3b77af..b71908d210 100644
--- a/configs/mx6slevk_spinor_defconfig
+++ b/configs/mx6slevk_spinor_defconfig
@@ -44,6 +44,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_PFUZE100=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
diff --git a/configs/mx6slevk_spl_defconfig b/configs/mx6slevk_spl_defconfig
index e9a40c8d83..7c784ea3ad 100644
--- a/configs/mx6slevk_spl_defconfig
+++ b/configs/mx6slevk_spl_defconfig
@@ -52,6 +52,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_PFUZE100=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
diff --git a/configs/mx6sxsabreauto_defconfig b/configs/mx6sxsabreauto_defconfig
index 5ba3813f2d..be95cc0916 100644
--- a/configs/mx6sxsabreauto_defconfig
+++ b/configs/mx6sxsabreauto_defconfig
@@ -47,6 +47,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_PFUZE100=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPI=y
CONFIG_FSL_QSPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/mx6ul_14x14_evk_defconfig b/configs/mx6ul_14x14_evk_defconfig
index fd6962ef5d..ced24fe4d2 100644
--- a/configs/mx6ul_14x14_evk_defconfig
+++ b/configs/mx6ul_14x14_evk_defconfig
@@ -42,6 +42,7 @@ CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
+CONFIG_SPI=y
CONFIG_FSL_QSPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/mx6ul_9x9_evk_defconfig b/configs/mx6ul_9x9_evk_defconfig
index 86c942ca94..d6bb2a2dfb 100644
--- a/configs/mx6ul_9x9_evk_defconfig
+++ b/configs/mx6ul_9x9_evk_defconfig
@@ -42,6 +42,7 @@ CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
+CONFIG_SPI=y
CONFIG_FSL_QSPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/mx6ull_14x14_evk_defconfig b/configs/mx6ull_14x14_evk_defconfig
index 7a85397a74..1863934a8b 100644
--- a/configs/mx6ull_14x14_evk_defconfig
+++ b/configs/mx6ull_14x14_evk_defconfig
@@ -36,5 +36,6 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_DM_REGULATOR=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/mx6ull_14x14_evk_plugin_defconfig b/configs/mx6ull_14x14_evk_plugin_defconfig
index 0db69cd56d..7f71d6af8f 100644
--- a/configs/mx6ull_14x14_evk_plugin_defconfig
+++ b/configs/mx6ull_14x14_evk_plugin_defconfig
@@ -37,5 +37,6 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_DM_REGULATOR=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_FSL_QSPI=y
diff --git a/configs/mx7dsabresd_defconfig b/configs/mx7dsabresd_defconfig
index da881d9b1d..73b27b37ef 100644
--- a/configs/mx7dsabresd_defconfig
+++ b/configs/mx7dsabresd_defconfig
@@ -57,6 +57,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_PFUZE100=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_SOFT_SPI=y
CONFIG_USB=y
diff --git a/configs/mx7dsabresd_secure_defconfig b/configs/mx7dsabresd_secure_defconfig
index 58e60ed062..504c41932b 100644
--- a/configs/mx7dsabresd_secure_defconfig
+++ b/configs/mx7dsabresd_secure_defconfig
@@ -59,6 +59,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_PFUZE100=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_SOFT_SPI=y
CONFIG_USB=y
diff --git a/configs/net2big_v2_defconfig b/configs/net2big_v2_defconfig
index a1132da9e0..ad4eaf1c34 100644
--- a/configs/net2big_v2_defconfig
+++ b/configs/net2big_v2_defconfig
@@ -32,6 +32,7 @@ CONFIG_MVSATA_IDE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/netgear_cg3100d_ram_defconfig b/configs/netgear_cg3100d_ram_defconfig
index f1ceb5c2c7..90cd69eb7b 100644
--- a/configs/netgear_cg3100d_ram_defconfig
+++ b/configs/netgear_cg3100d_ram_defconfig
@@ -45,6 +45,7 @@ CONFIG_RESET_BCM6345=y
# CONFIG_SPL_SERIAL_PRESENT is not set
CONFIG_DM_SERIAL=y
CONFIG_BCM6345_SERIAL=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_BCM63XX_SPI=y
CONFIG_WDT_BCM6345=y
diff --git a/configs/netspace_lite_v2_defconfig b/configs/netspace_lite_v2_defconfig
index 5337ee1fdd..3e8fb3ab56 100644
--- a/configs/netspace_lite_v2_defconfig
+++ b/configs/netspace_lite_v2_defconfig
@@ -32,6 +32,7 @@ CONFIG_MVSATA_IDE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/netspace_max_v2_defconfig b/configs/netspace_max_v2_defconfig
index 8e2a502496..14db917c58 100644
--- a/configs/netspace_max_v2_defconfig
+++ b/configs/netspace_max_v2_defconfig
@@ -32,6 +32,7 @@ CONFIG_MVSATA_IDE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/netspace_mini_v2_defconfig b/configs/netspace_mini_v2_defconfig
index 1012beaef3..b03fce7319 100644
--- a/configs/netspace_mini_v2_defconfig
+++ b/configs/netspace_mini_v2_defconfig
@@ -30,5 +30,6 @@ CONFIG_MVSATA_IDE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/netspace_v2_defconfig b/configs/netspace_v2_defconfig
index 238271e040..71d59a99c5 100644
--- a/configs/netspace_v2_defconfig
+++ b/configs/netspace_v2_defconfig
@@ -32,6 +32,7 @@ CONFIG_MVSATA_IDE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/nitrogen6dl2g_defconfig b/configs/nitrogen6dl2g_defconfig
index 5932e88562..6ef4226db9 100644
--- a/configs/nitrogen6dl2g_defconfig
+++ b/configs/nitrogen6dl2g_defconfig
@@ -40,6 +40,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/nitrogen6dl_defconfig b/configs/nitrogen6dl_defconfig
index 3414949b38..b9784a2d23 100644
--- a/configs/nitrogen6dl_defconfig
+++ b/configs/nitrogen6dl_defconfig
@@ -40,6 +40,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/nitrogen6q2g_defconfig b/configs/nitrogen6q2g_defconfig
index 2e80523600..61688ba49e 100644
--- a/configs/nitrogen6q2g_defconfig
+++ b/configs/nitrogen6q2g_defconfig
@@ -42,6 +42,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/nitrogen6q_defconfig b/configs/nitrogen6q_defconfig
index c0cd39ab60..cfee7ba889 100644
--- a/configs/nitrogen6q_defconfig
+++ b/configs/nitrogen6q_defconfig
@@ -42,6 +42,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/nitrogen6s1g_defconfig b/configs/nitrogen6s1g_defconfig
index bbd08cdddc..0f29a56c46 100644
--- a/configs/nitrogen6s1g_defconfig
+++ b/configs/nitrogen6s1g_defconfig
@@ -40,6 +40,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/nitrogen6s_defconfig b/configs/nitrogen6s_defconfig
index 1c916d0aa5..7ad1584af2 100644
--- a/configs/nitrogen6s_defconfig
+++ b/configs/nitrogen6s_defconfig
@@ -40,6 +40,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig
index b7793d769b..ed9070d9a2 100644
--- a/configs/nokia_rx51_defconfig
+++ b/configs/nokia_rx51_defconfig
@@ -24,6 +24,7 @@ CONFIG_CMD_FAT=y
CONFIG_MMC_OMAP_HS=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HCD=y
diff --git a/configs/nx25-ae250_defconfig b/configs/nx25-ae250_defconfig
index 4f9bd58f75..42507755a6 100644
--- a/configs/nx25-ae250_defconfig
+++ b/configs/nx25-ae250_defconfig
@@ -33,6 +33,7 @@ CONFIG_FTMAC100=y
CONFIG_BAUDRATE=38400
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_ATCSPI200_SPI=y
CONFIG_TIMER=y
diff --git a/configs/omap3_beagle_defconfig b/configs/omap3_beagle_defconfig
index 89f1df438b..7b81b039c9 100644
--- a/configs/omap3_beagle_defconfig
+++ b/configs/omap3_beagle_defconfig
@@ -58,6 +58,7 @@ CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000
CONFIG_SPL_NAND_SIMPLE=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/omap3_evm_defconfig b/configs/omap3_evm_defconfig
index 4707d09219..20795c3170 100644
--- a/configs/omap3_evm_defconfig
+++ b/configs/omap3_evm_defconfig
@@ -49,6 +49,7 @@ CONFIG_SMC911X=y
CONFIG_SMC911X_BASE=0x2C000000
CONFIG_SMC911X_32_BIT=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/omap3_ha_defconfig b/configs/omap3_ha_defconfig
index d931343dbd..e4b16c6872 100644
--- a/configs/omap3_ha_defconfig
+++ b/configs/omap3_ha_defconfig
@@ -30,6 +30,7 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
CONFIG_SPL_NAND_SIMPLE=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/omap3_logic_defconfig b/configs/omap3_logic_defconfig
index 144bdaa431..5a31e46dba 100644
--- a/configs/omap3_logic_defconfig
+++ b/configs/omap3_logic_defconfig
@@ -48,6 +48,7 @@ CONFIG_SMC911X_BASE=0x08000000
CONFIG_SMC911X_32_BIT=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
diff --git a/configs/omap3_overo_defconfig b/configs/omap3_overo_defconfig
index f3b73437ce..21aaa03b34 100644
--- a/configs/omap3_overo_defconfig
+++ b/configs/omap3_overo_defconfig
@@ -40,6 +40,7 @@ CONFIG_SMC911X_BASE=0x2C000000
CONFIG_SMC911X_32_BIT=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/omap3_pandora_defconfig b/configs/omap3_pandora_defconfig
index 08d99624d7..a2cb46e6b8 100644
--- a/configs/omap3_pandora_defconfig
+++ b/configs/omap3_pandora_defconfig
@@ -29,6 +29,7 @@ CONFIG_NAND=y
CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
# CONFIG_REGEX is not set
diff --git a/configs/omap3_zoom1_defconfig b/configs/omap3_zoom1_defconfig
index e6712ce76b..4ca55cb531 100644
--- a/configs/omap3_zoom1_defconfig
+++ b/configs/omap3_zoom1_defconfig
@@ -29,6 +29,7 @@ CONFIG_SMC911X=y
CONFIG_SMC911X_BASE=0x08000000
CONFIG_SMC911X_32_BIT=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_UDC=y
diff --git a/configs/omap4_panda_defconfig b/configs/omap4_panda_defconfig
index 7e01646a59..c7a926bebb 100644
--- a/configs/omap4_panda_defconfig
+++ b/configs/omap4_panda_defconfig
@@ -30,6 +30,7 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_MMC_OMAP_HS=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/omap4_sdp4430_defconfig b/configs/omap4_sdp4430_defconfig
index f5965daebc..0d3b5426a4 100644
--- a/configs/omap4_sdp4430_defconfig
+++ b/configs/omap4_sdp4430_defconfig
@@ -28,6 +28,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_MMC_OMAP_HS=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_UDC=y
diff --git a/configs/omap5_uevm_defconfig b/configs/omap5_uevm_defconfig
index abff63dd8a..c3164fdb75 100644
--- a/configs/omap5_uevm_defconfig
+++ b/configs/omap5_uevm_defconfig
@@ -33,6 +33,7 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_SCSI=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
index 4bd2fee227..a3279b67cf 100644
--- a/configs/omapl138_lcdk_defconfig
+++ b/configs/omapl138_lcdk_defconfig
@@ -44,4 +44,5 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DAVINCI_SPI=y
diff --git a/configs/ot1200_defconfig b/configs/ot1200_defconfig
index f3ad0966b6..78e92eb1bd 100644
--- a/configs/ot1200_defconfig
+++ b/configs/ot1200_defconfig
@@ -35,6 +35,7 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_SST=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_PHYLIB=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
diff --git a/configs/ot1200_spl_defconfig b/configs/ot1200_spl_defconfig
index 7aafee50b7..01e202f170 100644
--- a/configs/ot1200_spl_defconfig
+++ b/configs/ot1200_spl_defconfig
@@ -44,6 +44,7 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_SST=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_PHYLIB=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
diff --git a/configs/pcm051_rev1_defconfig b/configs/pcm051_rev1_defconfig
index 3f06b6a9d2..a570ca99d0 100644
--- a/configs/pcm051_rev1_defconfig
+++ b/configs/pcm051_rev1_defconfig
@@ -45,6 +45,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/pcm051_rev3_defconfig b/configs/pcm051_rev3_defconfig
index 6a30fc0d43..fe0ed45452 100644
--- a/configs/pcm051_rev3_defconfig
+++ b/configs/pcm051_rev3_defconfig
@@ -45,6 +45,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/pcm058_defconfig b/configs/pcm058_defconfig
index 3ef7a8a43a..c90245a1bd 100644
--- a/configs/pcm058_defconfig
+++ b/configs/pcm058_defconfig
@@ -49,6 +49,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_DM_THERMAL=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/pengwyn_defconfig b/configs/pengwyn_defconfig
index ab88d0680f..bfaeea852f 100644
--- a/configs/pengwyn_defconfig
+++ b/configs/pengwyn_defconfig
@@ -49,6 +49,7 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/pepper_defconfig b/configs/pepper_defconfig
index 28efd9da5b..a7e1c0b2cf 100644
--- a/configs/pepper_defconfig
+++ b/configs/pepper_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_NETDEVICES=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/pfla02_defconfig b/configs/pfla02_defconfig
index eacd6b45b8..1dbb56a6ea 100644
--- a/configs/pfla02_defconfig
+++ b/configs/pfla02_defconfig
@@ -49,6 +49,7 @@ CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
CONFIG_FEC_MXC=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_DM_THERMAL=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
index 66decf0653..d78b6d57b6 100644
--- a/configs/phycore-rk3288_defconfig
+++ b/configs/phycore-rk3288_defconfig
@@ -67,7 +67,6 @@ CONFIG_SPL_RAM=y
CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_DWC2=y
diff --git a/configs/pm9261_defconfig b/configs/pm9261_defconfig
index c48975f9bf..ba413cecaf 100644
--- a/configs/pm9261_defconfig
+++ b/configs/pm9261_defconfig
@@ -43,6 +43,7 @@ CONFIG_PINCTRL=y
CONFIG_PINCTRL_AT91=y
CONFIG_DM_SERIAL=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/pm9263_defconfig b/configs/pm9263_defconfig
index 93820921c9..98b4385fc4 100644
--- a/configs/pm9263_defconfig
+++ b/configs/pm9263_defconfig
@@ -41,6 +41,7 @@ CONFIG_SPI_FLASH_ATMEL=y
CONFIG_SPI_FLASH_DATAFLASH=y
CONFIG_DM_SERIAL=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
index 8343a4ab4d..2670b4b75a 100644
--- a/configs/popmetal-rk3288_defconfig
+++ b/configs/popmetal-rk3288_defconfig
@@ -63,7 +63,6 @@ CONFIG_SPL_RAM=y
CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_DWC2=y
diff --git a/configs/porter_defconfig b/configs/porter_defconfig
index 1a922429af..64b064d1a8 100644
--- a/configs/porter_defconfig
+++ b/configs/porter_defconfig
@@ -72,6 +72,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_SPI=y
CONFIG_SH_QSPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/portl2_defconfig b/configs/portl2_defconfig
index 8a6d996f3d..09abbae576 100644
--- a/configs/portl2_defconfig
+++ b/configs/portl2_defconfig
@@ -32,6 +32,7 @@ CONFIG_BOOTCOUNT_RAM=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_KIRKWOOD_SPI=y
CONFIG_BCH=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig
index 4324a82e76..e6539a7da8 100644
--- a/configs/puma-rk3399_defconfig
+++ b/configs/puma-rk3399_defconfig
@@ -80,10 +80,11 @@ CONFIG_REGULATOR_RK8XX=y
CONFIG_PWM_ROCKCHIP=y
CONFIG_RAM=y
CONFIG_SPL_RAM=y
+CONFIG_DM_RTC=y
+CONFIG_RTC_ISL1208=y
CONFIG_DEBUG_UART_BASE=0xFF180000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_ROCKCHIP_SPI=y
CONFIG_SYSRESET=y
CONFIG_USB=y
diff --git a/configs/pxm2_defconfig b/configs/pxm2_defconfig
index 76a0d971ee..8b8e580ecd 100644
--- a/configs/pxm2_defconfig
+++ b/configs/pxm2_defconfig
@@ -67,6 +67,7 @@ CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig
index b197eff328..196c17e8b9 100644
--- a/configs/qemu-x86_64_defconfig
+++ b/configs/qemu-x86_64_defconfig
@@ -62,6 +62,7 @@ CONFIG_SPL_SYSCON=y
CONFIG_CPU=y
CONFIG_DEBUG_UART_BASE=0x3f8
CONFIG_DEBUG_UART_CLOCK=1843200
+CONFIG_SPI=y
CONFIG_SPL_TIMER=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig
index c5506c6615..f489d52b6b 100644
--- a/configs/qemu-x86_defconfig
+++ b/configs/qemu-x86_defconfig
@@ -43,6 +43,7 @@ CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CPU=y
CONFIG_NVME=y
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
diff --git a/configs/qemu-x86_efi_payload32_defconfig b/configs/qemu-x86_efi_payload32_defconfig
index 3e191b8a3a..36705db89a 100644
--- a/configs/qemu-x86_efi_payload32_defconfig
+++ b/configs/qemu-x86_efi_payload32_defconfig
@@ -37,6 +37,7 @@ CONFIG_EFI_PARTITION=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CPU=y
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
diff --git a/configs/qemu-x86_efi_payload64_defconfig b/configs/qemu-x86_efi_payload64_defconfig
index 43f368ffb9..5b0806bad9 100644
--- a/configs/qemu-x86_efi_payload64_defconfig
+++ b/configs/qemu-x86_efi_payload64_defconfig
@@ -37,6 +37,7 @@ CONFIG_EFI_PARTITION=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CPU=y
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
diff --git a/configs/r8a77965_salvator-x_defconfig b/configs/r8a77965_salvator-x_defconfig
index 986c076d51..fdce7f7c65 100644
--- a/configs/r8a77965_salvator-x_defconfig
+++ b/configs/r8a77965_salvator-x_defconfig
@@ -39,6 +39,9 @@ CONFIG_RCAR_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_RCAR_IIC=y
CONFIG_DM_MMC=y
+CONFIG_MMC_IO_VOLTAGE=y
+CONFIG_MMC_UHS_SUPPORT=y
+CONFIG_MMC_HS200_SUPPORT=y
CONFIG_RENESAS_SDHI=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
diff --git a/configs/r8a77970_eagle_defconfig b/configs/r8a77970_eagle_defconfig
index f2861924f6..e656377e3d 100644
--- a/configs/r8a77970_eagle_defconfig
+++ b/configs/r8a77970_eagle_defconfig
@@ -56,6 +56,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_RENESAS_RPC_SPI=y
CONFIG_USB=y
diff --git a/configs/rastaban_defconfig b/configs/rastaban_defconfig
index 533104f4a5..450b21a589 100644
--- a/configs/rastaban_defconfig
+++ b/configs/rastaban_defconfig
@@ -65,6 +65,7 @@ CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/riotboard_defconfig b/configs/riotboard_defconfig
index 2842b54df9..eaa03bd9fb 100644
--- a/configs/riotboard_defconfig
+++ b/configs/riotboard_defconfig
@@ -23,6 +23,7 @@ CONFIG_FSL_ESDHC=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SST=y
CONFIG_PHYLIB=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
diff --git a/configs/rock2_defconfig b/configs/rock2_defconfig
index a59599ebbc..cd9a821974 100644
--- a/configs/rock2_defconfig
+++ b/configs/rock2_defconfig
@@ -64,7 +64,6 @@ CONFIG_SPL_RAM=y
CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_DWC2=y
diff --git a/configs/rock_defconfig b/configs/rock_defconfig
index c4a236ccf6..00ce9c465a 100644
--- a/configs/rock_defconfig
+++ b/configs/rock_defconfig
@@ -47,8 +47,10 @@ CONFIG_RAM=y
CONFIG_DEBUG_UART_BASE=0x20064000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
+CONFIG_TIMER=y
+CONFIG_SPL_TIMER=y
+CONFIG_ROCKCHIP_TIMER=y
CONFIG_USB=y
CONFIG_ROCKCHIP_USB2_PHY=y
CONFIG_SPL_TINY_MEMSET=y
diff --git a/configs/rut_defconfig b/configs/rut_defconfig
index 84ff35cf19..64384c41a3 100644
--- a/configs/rut_defconfig
+++ b/configs/rut_defconfig
@@ -68,6 +68,7 @@ CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/s32v234evb_defconfig b/configs/s32v234evb_defconfig
index 19b31db5b4..f64ed8535f 100644
--- a/configs/s32v234evb_defconfig
+++ b/configs/s32v234evb_defconfig
@@ -2,7 +2,6 @@ CONFIG_ARM=y
CONFIG_TARGET_S32V234EVB=y
CONFIG_SYS_TEXT_BASE=0x3E800000
CONFIG_DISTRO_DEFAULTS=y
-CONFIG_SYS_MALLOC_F=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/s32v234evb/s32v234evb.cfg"
CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="console=ttyLF0 root=/dev/ram rw"
@@ -10,5 +9,8 @@ CONFIG_BOARD_EARLY_INIT_F=y
CONFIG_CMD_BOOTZ=y
CONFIG_CMD_MEMTEST=y
CONFIG_ENV_IS_IN_MMC=y
+CONFIG_DM=y
CONFIG_FSL_ESDHC=y
+CONFIG_DM_SERIAL=y
+CONFIG_FSL_LINFLEXUART=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/sagem_f@st1704_ram_defconfig b/configs/sagem_f@st1704_ram_defconfig
index 7b049fceaa..7c684e31e7 100644
--- a/configs/sagem_f@st1704_ram_defconfig
+++ b/configs/sagem_f@st1704_ram_defconfig
@@ -44,5 +44,6 @@ CONFIG_RESET_BCM6345=y
# CONFIG_SPL_SERIAL_PRESENT is not set
CONFIG_DM_SERIAL=y
CONFIG_BCM6345_SERIAL=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_BCM63XX_SPI=y
diff --git a/configs/sama5d27_som1_ek_mmc_defconfig b/configs/sama5d27_som1_ek_mmc_defconfig
index 1c32d50e89..0b9a47ece2 100644
--- a/configs/sama5d27_som1_ek_mmc_defconfig
+++ b/configs/sama5d27_som1_ek_mmc_defconfig
@@ -73,6 +73,7 @@ CONFIG_DEBUG_UART_CLOCK=82000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
index 9308ca76b1..066fdb36c5 100644
--- a/configs/sama5d2_xplained_mmc_defconfig
+++ b/configs/sama5d2_xplained_mmc_defconfig
@@ -71,6 +71,7 @@ CONFIG_DEBUG_UART_CLOCK=83000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig
index 185ed94eb1..87bca1f6fb 100644
--- a/configs/sama5d2_xplained_spiflash_defconfig
+++ b/configs/sama5d2_xplained_spiflash_defconfig
@@ -69,6 +69,7 @@ CONFIG_DEBUG_UART_CLOCK=83000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
diff --git a/configs/sama5d36ek_cmp_mmc_defconfig b/configs/sama5d36ek_cmp_mmc_defconfig
index 1adc6acd0d..7f8c92ea62 100644
--- a/configs/sama5d36ek_cmp_mmc_defconfig
+++ b/configs/sama5d36ek_cmp_mmc_defconfig
@@ -51,6 +51,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d36ek_cmp_nandflash_defconfig b/configs/sama5d36ek_cmp_nandflash_defconfig
index 8a2db44929..de777658eb 100644
--- a/configs/sama5d36ek_cmp_nandflash_defconfig
+++ b/configs/sama5d36ek_cmp_nandflash_defconfig
@@ -51,6 +51,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d36ek_cmp_spiflash_defconfig b/configs/sama5d36ek_cmp_spiflash_defconfig
index d7b809151b..272c370a45 100644
--- a/configs/sama5d36ek_cmp_spiflash_defconfig
+++ b/configs/sama5d36ek_cmp_spiflash_defconfig
@@ -51,6 +51,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_ATMEL_PIT_TIMER=y
diff --git a/configs/sama5d3xek_mmc_defconfig b/configs/sama5d3xek_mmc_defconfig
index 4fceabb849..827c26ae10 100644
--- a/configs/sama5d3xek_mmc_defconfig
+++ b/configs/sama5d3xek_mmc_defconfig
@@ -73,6 +73,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
diff --git a/configs/sama5d3xek_nandflash_defconfig b/configs/sama5d3xek_nandflash_defconfig
index 308bb54680..122668cb79 100644
--- a/configs/sama5d3xek_nandflash_defconfig
+++ b/configs/sama5d3xek_nandflash_defconfig
@@ -68,6 +68,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
diff --git a/configs/sama5d3xek_spiflash_defconfig b/configs/sama5d3xek_spiflash_defconfig
index 405ee4433d..b1c2f57e81 100644
--- a/configs/sama5d3xek_spiflash_defconfig
+++ b/configs/sama5d3xek_spiflash_defconfig
@@ -68,6 +68,7 @@ CONFIG_DEBUG_UART_CLOCK=132000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig
index e8d748f469..ca47a6bef1 100644
--- a/configs/sama5d4_xplained_mmc_defconfig
+++ b/configs/sama5d4_xplained_mmc_defconfig
@@ -67,6 +67,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig
index 5550891c61..478be7d720 100644
--- a/configs/sama5d4_xplained_nandflash_defconfig
+++ b/configs/sama5d4_xplained_nandflash_defconfig
@@ -64,6 +64,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig
index 1e0c419e16..96c0a3171e 100644
--- a/configs/sama5d4_xplained_spiflash_defconfig
+++ b/configs/sama5d4_xplained_spiflash_defconfig
@@ -67,6 +67,7 @@ CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig
index a9fd08f363..234939abce 100644
--- a/configs/sama5d4ek_mmc_defconfig
+++ b/configs/sama5d4ek_mmc_defconfig
@@ -67,6 +67,7 @@ CONFIG_DEBUG_UART_CLOCK=88000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig
index bdb42f129c..e1e7466b21 100644
--- a/configs/sama5d4ek_nandflash_defconfig
+++ b/configs/sama5d4ek_nandflash_defconfig
@@ -64,6 +64,7 @@ CONFIG_DEBUG_UART_CLOCK=88000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig
index df576677e5..84ed7bc47f 100644
--- a/configs/sama5d4ek_spiflash_defconfig
+++ b/configs/sama5d4ek_spiflash_defconfig
@@ -64,6 +64,7 @@ CONFIG_DEBUG_UART_CLOCK=88000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_TIMER=y
CONFIG_SPL_TIMER=y
diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig
index ff60508735..20a2ab3ffb 100644
--- a/configs/sandbox64_defconfig
+++ b/configs/sandbox64_defconfig
@@ -18,7 +18,6 @@ CONFIG_CONSOLE_RECORD_OUT_SIZE=0x1000
CONFIG_SILENT_CONSOLE=y
CONFIG_PRE_CONSOLE_BUFFER=y
CONFIG_PRE_CON_BUF_ADDR=0x100000
-CONFIG_LOG=y
CONFIG_LOG_MAX_LEVEL=6
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_CMD_CPU=y
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index fd39519bed..c1cdd59c54 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -17,7 +17,6 @@ CONFIG_CONSOLE_RECORD_OUT_SIZE=0x1000
CONFIG_SILENT_CONSOLE=y
CONFIG_PRE_CONSOLE_BUFFER=y
CONFIG_PRE_CON_BUF_ADDR=0x100000
-CONFIG_LOG=y
CONFIG_LOG_MAX_LEVEL=6
CONFIG_LOG_ERROR_RETURN=y
CONFIG_DISPLAY_BOARDINFO_LATE=y
diff --git a/configs/sh7752evb_defconfig b/configs/sh7752evb_defconfig
index ed3946b34b..21fb10d881 100644
--- a/configs/sh7752evb_defconfig
+++ b/configs/sh7752evb_defconfig
@@ -38,5 +38,6 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_NETDEVICES=y
CONFIG_SH_ETHER=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_SPI=y
CONFIG_SH_SPI=y
CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/sh7753evb_defconfig b/configs/sh7753evb_defconfig
index 96f30b3747..01cfde128b 100644
--- a/configs/sh7753evb_defconfig
+++ b/configs/sh7753evb_defconfig
@@ -37,5 +37,6 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_NETDEVICES=y
CONFIG_SH_ETHER=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_SPI=y
CONFIG_SH_SPI=y
CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/sh7757lcr_defconfig b/configs/sh7757lcr_defconfig
index b6d5f47bc8..87d0a99922 100644
--- a/configs/sh7757lcr_defconfig
+++ b/configs/sh7757lcr_defconfig
@@ -39,5 +39,6 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_NETDEVICES=y
CONFIG_SH_ETHER=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_SPI=y
CONFIG_SH_SPI=y
CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/silk_defconfig b/configs/silk_defconfig
index 309935d08e..4cb1179a68 100644
--- a/configs/silk_defconfig
+++ b/configs/silk_defconfig
@@ -73,6 +73,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_SPI=y
CONFIG_SH_QSPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/socfpga_arria10_defconfig b/configs/socfpga_arria10_defconfig
index 0717a84b68..7614f9472f 100644
--- a/configs/socfpga_arria10_defconfig
+++ b/configs/socfpga_arria10_defconfig
@@ -17,14 +17,14 @@ CONFIG_SPL_SPI_LOAD=y
CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
@@ -33,4 +33,5 @@ CONFIG_DM_GPIO=y
CONFIG_DWAPB_GPIO=y
CONFIG_DM_MMC=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_USE_TINY_PRINTF=y
diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
index 0d6d80c51b..6b2b7fe441 100644
--- a/configs/socfpga_arria5_defconfig
+++ b/configs/socfpga_arria5_defconfig
@@ -23,8 +23,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
@@ -37,6 +35,8 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:1m(u-boot),256k(env1),256k(env2),14848k(boot),16m(rootfs),-@1536k(UBI)0"
CONFIG_CMD_UBI=y
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
@@ -59,6 +59,7 @@ CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DM_RESET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_CADENCE_QSPI=y
CONFIG_DESIGNWARE_SPI=y
CONFIG_USB=y
diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index d85f3d056a..f7e93efd54 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_defconfig
@@ -23,8 +23,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
@@ -37,6 +35,8 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:1m(u-boot),256k(env1),256k(env2),14848k(boot),16m(rootfs),-@1536k(UBI)0"
CONFIG_CMD_UBI=y
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
@@ -60,6 +60,7 @@ CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DM_RESET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_CADENCE_QSPI=y
CONFIG_DESIGNWARE_SPI=y
CONFIG_USB=y
diff --git a/configs/socfpga_dbm_soc1_defconfig b/configs/socfpga_dbm_soc1_defconfig
index faafebf2c5..0f89ef7d40 100644
--- a/configs/socfpga_dbm_soc1_defconfig
+++ b/configs/socfpga_dbm_soc1_defconfig
@@ -24,8 +24,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
@@ -56,6 +54,7 @@ CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DM_RESET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_DWC2=y
diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig
index efb13748b6..352bdad68d 100644
--- a/configs/socfpga_de0_nano_soc_defconfig
+++ b/configs/socfpga_de0_nano_soc_defconfig
@@ -24,8 +24,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
@@ -38,6 +36,8 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:1m(u-boot),256k(env1),256k(env2),14848k(boot),16m(rootfs),-@1536k(UBI)0"
CONFIG_CMD_UBI=y
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SPL_DM=y
CONFIG_DFU_MMC=y
@@ -54,6 +54,7 @@ CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DM_RESET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_CADENCE_QSPI=y
CONFIG_DESIGNWARE_SPI=y
CONFIG_USB=y
diff --git a/configs/socfpga_de10_nano_defconfig b/configs/socfpga_de10_nano_defconfig
index 08b0b92615..dc051d27c1 100644
--- a/configs/socfpga_de10_nano_defconfig
+++ b/configs/socfpga_de10_nano_defconfig
@@ -23,8 +23,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
@@ -34,6 +32,8 @@ CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SPL_DM=y
CONFIG_DFU_MMC=y
@@ -50,6 +50,7 @@ CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DM_RESET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_CADENCE_QSPI=y
CONFIG_DESIGNWARE_SPI=y
CONFIG_USB=y
diff --git a/configs/socfpga_de1_soc_defconfig b/configs/socfpga_de1_soc_defconfig
index a2a8a7491b..d1af22daee 100644
--- a/configs/socfpga_de1_soc_defconfig
+++ b/configs/socfpga_de1_soc_defconfig
@@ -24,8 +24,6 @@ CONFIG_SPL_YMODEM_SUPPORT=y
CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
@@ -35,6 +33,8 @@ CONFIG_CMD_CACHE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SPL_DM=y
CONFIG_FPGA_SOCFPGA=y
@@ -50,6 +50,7 @@ CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DM_RESET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_DWC2=y
diff --git a/configs/socfpga_is1_defconfig b/configs/socfpga_is1_defconfig
index 6d5c27e8ee..5e32fedcbd 100644
--- a/configs/socfpga_is1_defconfig
+++ b/configs/socfpga_is1_defconfig
@@ -22,8 +22,6 @@ CONFIG_SPL_SPI_LOAD=y
CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_SF=y
@@ -34,6 +32,8 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:1m(u-boot),256k(env1),256k(env2),14848k(boot),16m(rootfs),-@1536k(UBI)0"
CONFIG_CMD_UBI=y
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
@@ -54,4 +54,5 @@ CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DM_RESET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_CADENCE_QSPI=y
diff --git a/configs/socfpga_mcvevk_defconfig b/configs/socfpga_mcvevk_defconfig
index 1f8871b6ed..ffc6e051c7 100644
--- a/configs/socfpga_mcvevk_defconfig
+++ b/configs/socfpga_mcvevk_defconfig
@@ -24,8 +24,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
@@ -38,6 +36,8 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:1m(u-boot),256k(env1),256k(env2),14848k(boot),16m(rootfs),-@1536k(UBI)0"
CONFIG_CMD_UBI=y
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SPL_DM=y
CONFIG_DFU_MMC=y
@@ -53,6 +53,7 @@ CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DM_RESET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_CADENCE_QSPI=y
CONFIG_DESIGNWARE_SPI=y
CONFIG_USB=y
diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig
index 49d9db8df7..6d67b3bfbe 100644
--- a/configs/socfpga_sockit_defconfig
+++ b/configs/socfpga_sockit_defconfig
@@ -23,8 +23,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
@@ -37,6 +35,8 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:1m(u-boot),256k(env1),256k(env2),14848k(boot),16m(rootfs),-@1536k(UBI)0"
CONFIG_CMD_UBI=y
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
@@ -60,6 +60,7 @@ CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DM_RESET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_CADENCE_QSPI=y
CONFIG_DESIGNWARE_SPI=y
CONFIG_USB=y
diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index b69c982a92..ed7b084ef4 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -23,8 +23,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
@@ -38,6 +36,8 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:1m(u-boot),256k(env1),256k(env2),14848k(boot),16m(rootfs),-@1536k(UBI)0"
CONFIG_CMD_UBI=y
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
@@ -60,6 +60,7 @@ CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DM_RESET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_CADENCE_QSPI=y
CONFIG_DESIGNWARE_SPI=y
CONFIG_USB=y
diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig
index 062afe16bc..b7494f0121 100644
--- a/configs/socfpga_sr1500_defconfig
+++ b/configs/socfpga_sr1500_defconfig
@@ -25,8 +25,6 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_MEMTEST=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
@@ -38,6 +36,8 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:1m(u-boot),256k(env1),256k(env2),14848k(boot),16m(rootfs),-@1536k(UBI)0"
CONFIG_CMD_UBI=y
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
@@ -59,5 +59,6 @@ CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DM_RESET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_CADENCE_QSPI=y
CONFIG_USE_TINY_PRINTF=y
diff --git a/configs/socfpga_vining_fpga_defconfig b/configs/socfpga_vining_fpga_defconfig
index 15ac595bae..9b6c456267 100644
--- a/configs/socfpga_vining_fpga_defconfig
+++ b/configs/socfpga_vining_fpga_defconfig
@@ -26,8 +26,6 @@ CONFIG_CMD_GREPENV=y
CONFIG_CMD_EEPROM=y
CONFIG_CMD_DFU=y
# CONFIG_CMD_FLASH is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
@@ -41,6 +39,8 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:1m(u-boot),64k(env1),64k(env2),256k(samtec1),256k(samtec2),-(rcvrfs);"
CONFIG_CMD_UBI=y
+# CONFIG_ISO_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
@@ -75,6 +75,7 @@ CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_DM_RESET=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_CADENCE_QSPI=y
CONFIG_DESIGNWARE_SPI=y
CONFIG_USB=y
diff --git a/configs/som-db5800-som-6867_defconfig b/configs/som-db5800-som-6867_defconfig
index a487715afb..dbf73b3ad8 100644
--- a/configs/som-db5800-som-6867_defconfig
+++ b/configs/som-db5800-som-6867_defconfig
@@ -47,6 +47,7 @@ CONFIG_CPU=y
CONFIG_E1000=y
CONFIG_DEBUG_UART_BASE=0x3f8
CONFIG_DEBUG_UART_CLOCK=1843200
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
diff --git a/configs/stm32f746-disco_defconfig b/configs/stm32f746-disco_defconfig
index 8139ab1c0a..aa7403f3c5 100644
--- a/configs/stm32f746-disco_defconfig
+++ b/configs/stm32f746-disco_defconfig
@@ -52,6 +52,7 @@ CONFIG_SPI_FLASH_STMICRO=y
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
# CONFIG_PINCTRL_FULL is not set
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_STM32_QSPI=y
CONFIG_DM_VIDEO=y
diff --git a/configs/stmark2_defconfig b/configs/stmark2_defconfig
index 5728272000..671c0aa4d9 100644
--- a/configs/stmark2_defconfig
+++ b/configs/stmark2_defconfig
@@ -23,5 +23,6 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
# CONFIG_NET is not set
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_MTD=y
+CONFIG_SPI=y
CONFIG_CF_SPI=y
CONFIG_REGEX=y
diff --git a/configs/stout_defconfig b/configs/stout_defconfig
index c933fbf214..4f5ebfa091 100644
--- a/configs/stout_defconfig
+++ b/configs/stout_defconfig
@@ -72,6 +72,7 @@ CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_SCIF_CONSOLE=y
+CONFIG_SPI=y
CONFIG_SH_QSPI=y
CONFIG_USB=y
CONFIG_DM_USB=y
diff --git a/configs/syzygy_hub_defconfig b/configs/syzygy_hub_defconfig
index 005cb9ce2e..aef21a87e2 100644
--- a/configs/syzygy_hub_defconfig
+++ b/configs/syzygy_hub_defconfig
@@ -11,6 +11,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_BOOTCOMMAND="run $modeboot || run distro_bootcmd"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_STACK_R=y
diff --git a/configs/tao3530_defconfig b/configs/tao3530_defconfig
index fc2c0d99aa..dc26f3667d 100644
--- a/configs/tao3530_defconfig
+++ b/configs/tao3530_defconfig
@@ -30,6 +30,7 @@ CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
CONFIG_SPL_NAND_SIMPLE=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
diff --git a/configs/theadorable-x86-conga-qa3-e3845-pcie-x4_defconfig b/configs/theadorable-x86-conga-qa3-e3845-pcie-x4_defconfig
index 4623d00e6c..c18edc1f0a 100644
--- a/configs/theadorable-x86-conga-qa3-e3845-pcie-x4_defconfig
+++ b/configs/theadorable-x86-conga-qa3-e3845-pcie-x4_defconfig
@@ -49,6 +49,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_INTEL=y
CONFIG_WINBOND_W83627=y
CONFIG_E1000=y
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_USB_ETHER_MCS7830=y
diff --git a/configs/theadorable-x86-conga-qa3-e3845_defconfig b/configs/theadorable-x86-conga-qa3-e3845_defconfig
index 1fda8af1ef..736d052ed7 100644
--- a/configs/theadorable-x86-conga-qa3-e3845_defconfig
+++ b/configs/theadorable-x86-conga-qa3-e3845_defconfig
@@ -48,6 +48,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_INTEL=y
CONFIG_WINBOND_W83627=y
CONFIG_E1000=y
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_USB_ETHER_MCS7830=y
diff --git a/configs/theadorable-x86-dfi-bt700_defconfig b/configs/theadorable-x86-dfi-bt700_defconfig
index 3fc14e85c7..bcbb5ccae2 100644
--- a/configs/theadorable-x86-dfi-bt700_defconfig
+++ b/configs/theadorable-x86-dfi-bt700_defconfig
@@ -46,6 +46,7 @@ CONFIG_CPU=y
CONFIG_DM_I2C=y
CONFIG_NUVOTON_NCT6102D=y
CONFIG_E1000=y
+CONFIG_SPI=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_USB_ETHER_MCS7830=y
diff --git a/configs/thuban_defconfig b/configs/thuban_defconfig
index 8891c86459..2bf0aa3542 100644
--- a/configs/thuban_defconfig
+++ b/configs/thuban_defconfig
@@ -65,6 +65,7 @@ CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_DRIVER_TI_CPSW=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/ti816x_evm_defconfig b/configs/ti816x_evm_defconfig
index 2061efbf37..0ebd8a5d5c 100644
--- a/configs/ti816x_evm_defconfig
+++ b/configs/ti816x_evm_defconfig
@@ -44,5 +44,6 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_OMAP3_SPI=y
# CONFIG_USE_PRIVATE_LIBGCC is not set
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index d5c705ae46..fb6bfa57ad 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -66,7 +66,6 @@ CONFIG_SPL_RAM=y
CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_DWC2=y
diff --git a/configs/tplink_wdr4300_defconfig b/configs/tplink_wdr4300_defconfig
index c07b64de54..09dfbe63d9 100644
--- a/configs/tplink_wdr4300_defconfig
+++ b/configs/tplink_wdr4300_defconfig
@@ -41,6 +41,7 @@ CONFIG_AG7XXX=y
CONFIG_PINCTRL=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_ATH79_SPI=y
CONFIG_USB=y
diff --git a/configs/tqma6dl_mba6_mmc_defconfig b/configs/tqma6dl_mba6_mmc_defconfig
index 8ef6ac16de..cc0d032d91 100644
--- a/configs/tqma6dl_mba6_mmc_defconfig
+++ b/configs/tqma6dl_mba6_mmc_defconfig
@@ -37,6 +37,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/tqma6dl_mba6_spi_defconfig b/configs/tqma6dl_mba6_spi_defconfig
index d82081e676..061c52cd20 100644
--- a/configs/tqma6dl_mba6_spi_defconfig
+++ b/configs/tqma6dl_mba6_spi_defconfig
@@ -38,6 +38,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/tqma6q_mba6_mmc_defconfig b/configs/tqma6q_mba6_mmc_defconfig
index ef980b3855..a2a27aa538 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -36,6 +36,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/tqma6q_mba6_spi_defconfig b/configs/tqma6q_mba6_spi_defconfig
index cadba31863..8d7181cb30 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -37,6 +37,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/tqma6s_mba6_mmc_defconfig b/configs/tqma6s_mba6_mmc_defconfig
index 6054226c29..9ee86fb966 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -37,6 +37,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/tqma6s_mba6_spi_defconfig b/configs/tqma6s_mba6_spi_defconfig
index 579e65ff88..7def5752ef 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -38,6 +38,7 @@ CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/ts4800_defconfig b/configs/ts4800_defconfig
index d91d9c1da5..d92c15c002 100644
--- a/configs/ts4800_defconfig
+++ b/configs/ts4800_defconfig
@@ -16,5 +16,6 @@ CONFIG_CMD_FAT=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_FSL_ESDHC=y
CONFIG_PHYLIB=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/usb_a9263_dataflash_defconfig b/configs/usb_a9263_dataflash_defconfig
index 2ff2c8babb..9977a0719a 100644
--- a/configs/usb_a9263_dataflash_defconfig
+++ b/configs/usb_a9263_dataflash_defconfig
@@ -38,4 +38,5 @@ CONFIG_PINCTRL=y
CONFIG_PINCTRL_AT91=y
CONFIG_DM_SERIAL=y
CONFIG_ATMEL_USART=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
diff --git a/configs/vexpress_aemv8a_dram_defconfig b/configs/vexpress_aemv8a_dram_defconfig
index 8dd475da02..48d42bb103 100644
--- a/configs/vexpress_aemv8a_dram_defconfig
+++ b/configs/vexpress_aemv8a_dram_defconfig
@@ -14,7 +14,6 @@ CONFIG_SYS_PROMPT="VExpress64# "
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EDITENV is not set
-# CONFIG_CMD_ENV_EXISTS is not set
CONFIG_CMD_MEMTEST=y
CONFIG_CMD_ARMFLASH=y
# CONFIG_CMD_LOADS is not set
diff --git a/configs/vexpress_aemv8a_juno_defconfig b/configs/vexpress_aemv8a_juno_defconfig
index 382b37986d..122960142d 100644
--- a/configs/vexpress_aemv8a_juno_defconfig
+++ b/configs/vexpress_aemv8a_juno_defconfig
@@ -14,7 +14,6 @@ CONFIG_SYS_PROMPT="VExpress64# "
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EDITENV is not set
-# CONFIG_CMD_ENV_EXISTS is not set
CONFIG_CMD_MEMTEST=y
CONFIG_CMD_ARMFLASH=y
# CONFIG_CMD_LOADS is not set
diff --git a/configs/vexpress_aemv8a_semi_defconfig b/configs/vexpress_aemv8a_semi_defconfig
index eee3034b5b..4e375e8261 100644
--- a/configs/vexpress_aemv8a_semi_defconfig
+++ b/configs/vexpress_aemv8a_semi_defconfig
@@ -14,7 +14,6 @@ CONFIG_SYS_PROMPT="VExpress64# "
# CONFIG_CMD_CONSOLE is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EDITENV is not set
-# CONFIG_CMD_ENV_EXISTS is not set
CONFIG_CMD_MEMTEST=y
CONFIG_CMD_ARMFLASH=y
# CONFIG_CMD_LOADS is not set
diff --git a/configs/vexpress_ca15_tc2_defconfig b/configs/vexpress_ca15_tc2_defconfig
index 685007439c..9aba46761a 100644
--- a/configs/vexpress_ca15_tc2_defconfig
+++ b/configs/vexpress_ca15_tc2_defconfig
@@ -10,7 +10,6 @@ CONFIG_BOOTCOMMAND="run distro_bootcmd; run bootflash"
# CONFIG_CMD_BOOTD is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EDITENV is not set
-# CONFIG_CMD_ENV_EXISTS is not set
# CONFIG_CMD_LOADB is not set
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_MMC=y
diff --git a/configs/vexpress_ca5x2_defconfig b/configs/vexpress_ca5x2_defconfig
index 9ef660eb8b..942ab12a59 100644
--- a/configs/vexpress_ca5x2_defconfig
+++ b/configs/vexpress_ca5x2_defconfig
@@ -9,7 +9,6 @@ CONFIG_BOOTCOMMAND="run distro_bootcmd; run bootflash"
# CONFIG_CMD_BOOTD is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EDITENV is not set
-# CONFIG_CMD_ENV_EXISTS is not set
# CONFIG_CMD_LOADB is not set
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_MMC=y
diff --git a/configs/vexpress_ca9x4_defconfig b/configs/vexpress_ca9x4_defconfig
index cd2255248e..1daee231ed 100644
--- a/configs/vexpress_ca9x4_defconfig
+++ b/configs/vexpress_ca9x4_defconfig
@@ -9,7 +9,6 @@ CONFIG_BOOTCOMMAND="run distro_bootcmd; run bootflash"
# CONFIG_CMD_BOOTD is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EDITENV is not set
-# CONFIG_CMD_ENV_EXISTS is not set
# CONFIG_CMD_LOADB is not set
# CONFIG_CMD_LOADS is not set
CONFIG_CMD_MMC=y
diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
index bf1de5a56e..9e4e96a4f2 100644
--- a/configs/vyasa-rk3288_defconfig
+++ b/configs/vyasa-rk3288_defconfig
@@ -63,7 +63,6 @@ CONFIG_SPL_RAM=y
CONFIG_DEBUG_UART_BASE=0xff690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_DEBUG_UART_SHIFT=2
-CONFIG_SYS_NS16550=y
CONFIG_SYSRESET=y
CONFIG_USB=y
CONFIG_USB_DWC2=y
diff --git a/configs/woodburn_defconfig b/configs/woodburn_defconfig
index 62cad079c2..a42869f867 100644
--- a/configs/woodburn_defconfig
+++ b/configs/woodburn_defconfig
@@ -32,4 +32,5 @@ CONFIG_NAND=y
CONFIG_NAND_MXC=y
CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
diff --git a/configs/woodburn_sd_defconfig b/configs/woodburn_sd_defconfig
index 21d92d99c2..bb51b611e7 100644
--- a/configs/woodburn_sd_defconfig
+++ b/configs/woodburn_sd_defconfig
@@ -43,4 +43,5 @@ CONFIG_NAND=y
CONFIG_NAND_MXC=y
CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
diff --git a/configs/work_92105_defconfig b/configs/work_92105_defconfig
index 677672d0b6..0af69acde8 100644
--- a/configs/work_92105_defconfig
+++ b/configs/work_92105_defconfig
@@ -39,4 +39,5 @@ CONFIG_PHYLIB=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
CONFIG_LPC32XX_SSP=y
diff --git a/configs/xilinx_zynqmp_zcu100_revC_defconfig b/configs/xilinx_zynqmp_zcu100_revC_defconfig
index 4024017bf8..87b7941a0e 100644
--- a/configs/xilinx_zynqmp_zcu100_revC_defconfig
+++ b/configs/xilinx_zynqmp_zcu100_revC_defconfig
@@ -66,6 +66,7 @@ CONFIG_DEBUG_UART_BASE=0xff010000
CONFIG_DEBUG_UART_CLOCK=100000000
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ZYNQ_SERIAL=y
+CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_ZYNQ_SPI=y
CONFIG_USB=y
diff --git a/configs/zc5202_defconfig b/configs/zc5202_defconfig
index c1fec76487..855fee28a5 100644
--- a/configs/zc5202_defconfig
+++ b/configs/zc5202_defconfig
@@ -35,5 +35,6 @@ CONFIG_FSL_ESDHC=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_PCI=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/zc5601_defconfig b/configs/zc5601_defconfig
index 415664fef4..01a294ab71 100644
--- a/configs/zc5601_defconfig
+++ b/configs/zc5601_defconfig
@@ -34,5 +34,6 @@ CONFIG_FSL_ESDHC=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_PHYLIB=y
+CONFIG_SPI=y
CONFIG_MXC_SPI=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/zynq_cc108_defconfig b/configs/zynq_cc108_defconfig
index 170cfbd978..f161cf816b 100644
--- a/configs/zynq_cc108_defconfig
+++ b/configs/zynq_cc108_defconfig
@@ -9,6 +9,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_BOOTCOMMAND="run $modeboot || run distro_bootcmd"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_STACK_R=y
diff --git a/configs/zynq_cse_qspi_defconfig b/configs/zynq_cse_qspi_defconfig
index 2a3d8b200d..9d4c79f862 100644
--- a/configs/zynq_cse_qspi_defconfig
+++ b/configs/zynq_cse_qspi_defconfig
@@ -29,7 +29,6 @@ CONFIG_SYS_PROMPT="Zynq> "
# CONFIG_CMD_IMPORTENV is not set
# CONFIG_CMD_EDITENV is not set
# CONFIG_CMD_SAVEENV is not set
-# CONFIG_CMD_ENV_EXISTS is not set
# CONFIG_CMD_CRC32 is not set
# CONFIG_CMD_CLK is not set
# CONFIG_CMD_DM is not set
diff --git a/configs/zynq_microzed_defconfig b/configs/zynq_microzed_defconfig
index 967c037123..34939faf1b 100644
--- a/configs/zynq_microzed_defconfig
+++ b/configs/zynq_microzed_defconfig
@@ -8,6 +8,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_BOOTCOMMAND="run $modeboot || run distro_bootcmd"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_STACK_R=y
diff --git a/configs/zynq_z_turn_defconfig b/configs/zynq_z_turn_defconfig
index 5b13edb506..c2c478dec5 100644
--- a/configs/zynq_z_turn_defconfig
+++ b/configs/zynq_z_turn_defconfig
@@ -9,6 +9,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_BOOTCOMMAND="run $modeboot || run distro_bootcmd"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_STACK_R=y
diff --git a/configs/zynq_zc702_defconfig b/configs/zynq_zc702_defconfig
index 2c9210fdea..c23dd8feab 100644
--- a/configs/zynq_zc702_defconfig
+++ b/configs/zynq_zc702_defconfig
@@ -11,6 +11,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_BOOTCOMMAND="run $modeboot || run distro_bootcmd"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_STACK_R=y
diff --git a/configs/zynq_zc706_defconfig b/configs/zynq_zc706_defconfig
index dd1b1afab2..00042c124d 100644
--- a/configs/zynq_zc706_defconfig
+++ b/configs/zynq_zc706_defconfig
@@ -11,6 +11,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_BOOTCOMMAND="run $modeboot || run distro_bootcmd"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_STACK_R=y
diff --git a/configs/zynq_zc770_xm010_defconfig b/configs/zynq_zc770_xm010_defconfig
index 214d7eb52b..7713e5adc3 100644
--- a/configs/zynq_zc770_xm010_defconfig
+++ b/configs/zynq_zc770_xm010_defconfig
@@ -10,6 +10,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_BOOTCOMMAND="run $modeboot || run distro_bootcmd"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_STACK_R=y
diff --git a/configs/zynq_zc770_xm011_defconfig b/configs/zynq_zc770_xm011_defconfig
index 8db7b99d78..3c394bf661 100644
--- a/configs/zynq_zc770_xm011_defconfig
+++ b/configs/zynq_zc770_xm011_defconfig
@@ -11,6 +11,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_BOOTCOMMAND="run $modeboot || run distro_bootcmd"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_STACK_R=y
diff --git a/configs/zynq_zc770_xm011_x16_defconfig b/configs/zynq_zc770_xm011_x16_defconfig
index b53ca3d8d4..447cc625e8 100644
--- a/configs/zynq_zc770_xm011_x16_defconfig
+++ b/configs/zynq_zc770_xm011_x16_defconfig
@@ -11,6 +11,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_BOOTCOMMAND="run $modeboot || run distro_bootcmd"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_STACK_R=y
@@ -29,11 +30,11 @@ CONFIG_CMD_CACHE=y
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_BLK=y
CONFIG_FPGA_XILINX=y
CONFIG_FPGA_ZYNQPL=y
CONFIG_DM_GPIO=y
# CONFIG_MMC is not set
-CONFIG_DM_MMC=y
CONFIG_NAND=y
CONFIG_NAND_ZYNQ=y
CONFIG_DEBUG_UART_ZYNQ=y
diff --git a/configs/zynq_zc770_xm012_defconfig b/configs/zynq_zc770_xm012_defconfig
index b3956eeda6..0a7883022e 100644
--- a/configs/zynq_zc770_xm012_defconfig
+++ b/configs/zynq_zc770_xm012_defconfig
@@ -10,6 +10,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_BOOTCOMMAND="run $modeboot || run distro_bootcmd"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_STACK_R=y
diff --git a/configs/zynq_zc770_xm013_defconfig b/configs/zynq_zc770_xm013_defconfig
index 76f881a916..6659218652 100644
--- a/configs/zynq_zc770_xm013_defconfig
+++ b/configs/zynq_zc770_xm013_defconfig
@@ -10,6 +10,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_BOOTCOMMAND="run $modeboot || run distro_bootcmd"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_STACK_R=y
diff --git a/configs/zynq_zed_defconfig b/configs/zynq_zed_defconfig
index 769c531ce6..13898b332c 100644
--- a/configs/zynq_zed_defconfig
+++ b/configs/zynq_zed_defconfig
@@ -9,6 +9,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_BOOTCOMMAND="run $modeboot || run distro_bootcmd"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_STACK_R=y
diff --git a/configs/zynq_zybo_defconfig b/configs/zynq_zybo_defconfig
index fbe22c5e10..771d8ca49f 100644
--- a/configs/zynq_zybo_defconfig
+++ b/configs/zynq_zybo_defconfig
@@ -10,6 +10,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_FIT=y
CONFIG_FIT_SIGNATURE=y
CONFIG_FIT_VERBOSE=y
+CONFIG_IMAGE_FORMAT_LEGACY=y
CONFIG_BOOTCOMMAND="run $modeboot || run distro_bootcmd"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_SPL_STACK_R=y
diff --git a/disk/Kconfig b/disk/Kconfig
index 8af2a95430..28fb81c2ee 100644
--- a/disk/Kconfig
+++ b/disk/Kconfig
@@ -4,6 +4,10 @@ menu "Partition Types"
config PARTITIONS
bool "Enable Partition Labels (disklabels) support"
default y
+ select SPL_SPRINTF if SPL
+ select TPL_SPRINTF if TPL
+ select SPL_STRTO if SPL
+ select TPL_STRTO if TPL
help
Partition Labels (disklabels) Supported:
Zero or more of the following:
diff --git a/disk/part.c b/disk/part.c
index 44ef14dc54..e31aca4877 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -24,8 +24,6 @@
/* Check all partition types */
#define PART_TYPE_ALL -1
-DECLARE_GLOBAL_DATA_PTR;
-
static struct part_driver *part_driver_lookup_type(struct blk_desc *dev_desc)
{
struct part_driver *drv =
diff --git a/doc/README.clang b/doc/README.clang
index e0491b2d7e..475bb1e2ed 100644
--- a/doc/README.clang
+++ b/doc/README.clang
@@ -10,16 +10,11 @@ used to get its value. This does lead to larger code then strictly
necessary, but at least works.
NOTE: target compilation only work for _some_ ARM boards at the moment.
-Also Aarch64 is not supported: Most notably boards which aren't using
-the generic board will fail to compile, but since those are expected
-to be converted this will solve itself. Boards which reassign gd in c
-will also fail to compile, but there is in no strict reason to do so
-in the ARM world, since crt0.S takes care of this. These assignments
-can be avoided by changing the init calls but this is not in mainline yet.
-
-NOTE: without the -mllvm -arm-use-movt=0 flags U-Boot will compile
-fine, but llvm might hardcode addresses in movw / movt pairs, which
-cannot be relocated and U-Boot will fail at runtime.
+Also AArch64 is not supported currently due to a lack of private libgcc
+support. Boards which reassign gd in c will also fail to compile, but there is
+in no strict reason to do so in the ARM world, since crt0.S takes care of this.
+These assignments can be avoided by changing the init calls but this is not in
+mainline yet.
Debian (based)
--------------
@@ -29,7 +24,8 @@ sudo apt-get install clang
Note that we still use binutils for some tools so we must continue to set
CROSS_COMPILE. To compile U-Boot with clang on linux without IAS use e.g.:
make HOSTCC=clang rpi_2_defconfig
-make HOSTCC=clang CROSS_COMPILE=arm-linux-gnueabi- CC=clang -j8
+make HOSTCC=clang CROSS_COMPILE=arm-linux-gnueabi- \
+ CC="clang -target arm-linux-gnueabi" -j8
It can also be used to compile sandbox:
make HOSTCC=clang sandbox_defconfig
diff --git a/doc/README.distro b/doc/README.distro
index 2af559009b..522deb3232 100644
--- a/doc/README.distro
+++ b/doc/README.distro
@@ -165,8 +165,7 @@ Enabling the distro options
In your board's defconfig, enable the DISTRO_DEFAULTS option by adding
a line with "CONFIG_DISTRO_DEFAULTS=y". If you want to enable this
from Kconfig itself, for e.g. all boards using a specific SoC then
-add a "default y if ARCH_FOO" to the DISTRO_DEFAULTS section of
-the Kconfig file in the root of the u-boot sources.
+add a "imply DISTRO_DEFAULTS" to your SoC CONFIG option.
In your board configuration file, include the following:
diff --git a/doc/README.uefi b/doc/README.uefi
index 7403be3614..bb89b7ac2f 100644
--- a/doc/README.uefi
+++ b/doc/README.uefi
@@ -324,6 +324,8 @@ This driver is only available if U-Boot is configured with
* persistence
* runtime support
+* support bootefi booting ARMv7 in non-secure mode (CONFIG_ARMV7_NONSEC=y)
+
## Links
* [1](http://uefi.org/specifications)
diff --git a/drivers/adc/adc-uclass.c b/drivers/adc/adc-uclass.c
index a4c20f4d35..7e9ad85c3c 100644
--- a/drivers/adc/adc-uclass.c
+++ b/drivers/adc/adc-uclass.c
@@ -14,8 +14,6 @@
#include <adc.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define ADC_UCLASS_PLATDATA_SIZE sizeof(struct adc_uclass_platdata)
#define CHECK_NUMBER true
#define CHECK_MASK (!CHECK_NUMBER)
diff --git a/drivers/ata/dwc_ahci.c b/drivers/ata/dwc_ahci.c
index 6c7371e3ed..bb45214fc2 100644
--- a/drivers/ata/dwc_ahci.c
+++ b/drivers/ata/dwc_ahci.c
@@ -18,8 +18,6 @@
#include <asm/io.h>
#include <generic-phy.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct dwc_ahci_priv {
void *base;
void *wrapper_base;
diff --git a/drivers/clk/at91/clk-plladiv.c b/drivers/clk/at91/clk-plladiv.c
index 0599d2893b..520fd13f63 100644
--- a/drivers/clk/at91/clk-plladiv.c
+++ b/drivers/clk/at91/clk-plladiv.c
@@ -12,8 +12,6 @@
#include <mach/at91_pmc.h>
#include "pmc.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static int at91_plladiv_clk_enable(struct clk *clk)
{
return 0;
diff --git a/drivers/clk/at91/clk-utmi.c b/drivers/clk/at91/clk-utmi.c
index 875bf293f9..54970b949f 100644
--- a/drivers/clk/at91/clk-utmi.c
+++ b/drivers/clk/at91/clk-utmi.c
@@ -14,8 +14,6 @@
#include <mach/sama5_sfr.h>
#include "pmc.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* The purpose of this clock is to generate a 480 MHz signal. A different
* rate can't be configured.
diff --git a/drivers/clk/at91/sckc.c b/drivers/clk/at91/sckc.c
index 0c0881237c..de8013e40a 100644
--- a/drivers/clk/at91/sckc.c
+++ b/drivers/clk/at91/sckc.c
@@ -8,8 +8,6 @@
#include <common.h>
#include <dm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct udevice_id at91_sckc_match[] = {
{ .compatible = "atmel,at91sam9x5-sckc" },
{}
diff --git a/drivers/clk/clk-hsdk-cgu.c b/drivers/clk/clk-hsdk-cgu.c
index 4362d583cb..56ef08c032 100644
--- a/drivers/clk/clk-hsdk-cgu.c
+++ b/drivers/clk/clk-hsdk-cgu.c
@@ -59,8 +59,6 @@
* |---------------------------->
*/
-DECLARE_GLOBAL_DATA_PTR;
-
#define CGU_ARC_IDIV 0x080
#define CGU_TUN_IDIV_TUN 0x380
#define CGU_TUN_IDIV_ROM 0x390
diff --git a/drivers/clk/clk_stm32h7.c b/drivers/clk/clk_stm32h7.c
index 9ee2e2e999..5516b48600 100644
--- a/drivers/clk/clk_stm32h7.c
+++ b/drivers/clk/clk_stm32h7.c
@@ -15,8 +15,6 @@
#include <dt-bindings/clock/stm32h7-clks.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* RCC CR specific definitions */
#define RCC_CR_HSION BIT(0)
#define RCC_CR_HSIRDY BIT(2)
diff --git a/drivers/clk/clk_zynqmp.c b/drivers/clk/clk_zynqmp.c
index d0d6c898bc..3f249752fb 100644
--- a/drivers/clk/clk_zynqmp.c
+++ b/drivers/clk/clk_zynqmp.c
@@ -13,8 +13,6 @@
#include <asm/arch/sys_proto.h>
#include <dm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const resource_size_t zynqmp_crf_apb_clkc_base = 0xfd1a0020;
static const resource_size_t zynqmp_crl_apb_clkc_base = 0xff5e0020;
diff --git a/drivers/clk/exynos/clk-exynos7420.c b/drivers/clk/exynos/clk-exynos7420.c
index e34945dbbc..832b2d8765 100644
--- a/drivers/clk/exynos/clk-exynos7420.c
+++ b/drivers/clk/exynos/clk-exynos7420.c
@@ -14,8 +14,6 @@
#include <dt-bindings/clock/exynos7420-clk.h>
#include "clk-pll.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define DIVIDER(reg, shift, mask) \
(((readl(reg) >> shift) & mask) + 1)
diff --git a/drivers/clk/rockchip/clk_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c
index 560222b96c..c8aab7bb7d 100644
--- a/drivers/clk/rockchip/clk_rk3036.c
+++ b/drivers/clk/rockchip/clk_rk3036.c
@@ -17,8 +17,6 @@
#include <dt-bindings/clock/rk3036-cru.h>
#include <linux/log2.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
VCO_MAX_HZ = 2400U * 1000000,
VCO_MIN_HZ = 600 * 1000000,
@@ -317,11 +315,19 @@ static struct clk_ops rk3036_clk_ops = {
.set_rate = rk3036_clk_set_rate,
};
-static int rk3036_clk_probe(struct udevice *dev)
+static int rk3036_clk_ofdata_to_platdata(struct udevice *dev)
{
struct rk3036_clk_priv *priv = dev_get_priv(dev);
priv->cru = dev_read_addr_ptr(dev);
+
+ return 0;
+}
+
+static int rk3036_clk_probe(struct udevice *dev)
+{
+ struct rk3036_clk_priv *priv = dev_get_priv(dev);
+
rkclk_init(priv->cru);
return 0;
@@ -367,6 +373,7 @@ U_BOOT_DRIVER(rockchip_rk3036_cru) = {
.id = UCLASS_CLK,
.of_match = rk3036_clk_ids,
.priv_auto_alloc_size = sizeof(struct rk3036_clk_priv),
+ .ofdata_to_platdata = rk3036_clk_ofdata_to_platdata,
.ops = &rk3036_clk_ops,
.bind = rk3036_clk_bind,
.probe = rk3036_clk_probe,
diff --git a/drivers/clk/rockchip/clk_rk3128.c b/drivers/clk/rockchip/clk_rk3128.c
index 132d50dda3..b4dd8d261a 100644
--- a/drivers/clk/rockchip/clk_rk3128.c
+++ b/drivers/clk/rockchip/clk_rk3128.c
@@ -18,8 +18,6 @@
#include <dt-bindings/clock/rk3128-cru.h>
#include <linux/log2.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
VCO_MAX_HZ = 2400U * 1000000,
VCO_MIN_HZ = 600 * 1000000,
@@ -546,11 +544,19 @@ static struct clk_ops rk3128_clk_ops = {
.set_rate = rk3128_clk_set_rate,
};
+static int rk3128_clk_ofdata_to_platdata(struct udevice *dev)
+{
+ struct rk3128_clk_priv *priv = dev_get_priv(dev);
+
+ priv->cru = dev_read_addr_ptr(dev);
+
+ return 0;
+}
+
static int rk3128_clk_probe(struct udevice *dev)
{
struct rk3128_clk_priv *priv = dev_get_priv(dev);
- priv->cru = (struct rk3128_cru *)dev_read_addr(dev);
rkclk_init(priv->cru);
return 0;
@@ -590,6 +596,7 @@ U_BOOT_DRIVER(rockchip_rk3128_cru) = {
.id = UCLASS_CLK,
.of_match = rk3128_clk_ids,
.priv_auto_alloc_size = sizeof(struct rk3128_clk_priv),
+ .ofdata_to_platdata = rk3128_clk_ofdata_to_platdata,
.ops = &rk3128_clk_ops,
.bind = rk3128_clk_bind,
.probe = rk3128_clk_probe,
diff --git a/drivers/clk/rockchip/clk_rk3188.c b/drivers/clk/rockchip/clk_rk3188.c
index cfe6abe470..e6bf044236 100644
--- a/drivers/clk/rockchip/clk_rk3188.c
+++ b/drivers/clk/rockchip/clk_rk3188.c
@@ -23,8 +23,6 @@
#include <dm/uclass-internal.h>
#include <linux/log2.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum rk3188_clk_type {
RK3188_CRU,
RK3188A_CRU,
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index ebcab73002..91f5208aa4 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -17,8 +17,6 @@
#include <dt-bindings/clock/rk3228-cru.h>
#include <linux/log2.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
VCO_MAX_HZ = 3200U * 1000000,
VCO_MIN_HZ = 800 * 1000000,
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index 3a36d04096..78ada2d2db 100644
--- a/drivers/clk/rockchip/clk_rk3288.c
+++ b/drivers/clk/rockchip/clk_rk3288.c
@@ -893,12 +893,25 @@ static int __maybe_unused rk3288_clk_set_parent(struct clk *clk, struct clk *par
return -ENOENT;
}
+static int rk3288_clk_enable(struct clk *clk)
+{
+ switch (clk->id) {
+ case HCLK_USBHOST0:
+ case HCLK_HSIC:
+ return 0;
+ }
+
+ debug("%s: unsupported clk %ld\n", __func__, clk->id);
+ return -ENOENT;
+}
+
static struct clk_ops rk3288_clk_ops = {
.get_rate = rk3288_clk_get_rate,
.set_rate = rk3288_clk_set_rate,
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.set_parent = rk3288_clk_set_parent,
#endif
+ .enable = rk3288_clk_enable,
};
static int rk3288_clk_ofdata_to_platdata(struct udevice *dev)
diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
index 046b4e4c2f..f9a1e969a8 100644
--- a/drivers/clk/rockchip/clk_rk3328.c
+++ b/drivers/clk/rockchip/clk_rk3328.c
@@ -18,8 +18,6 @@
#include <dm/lists.h>
#include <dt-bindings/clock/rk3328-cru.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct pll_div {
u32 refdiv;
u32 fbdiv;
diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c
index ea00f1fc9c..e5a14ba472 100644
--- a/drivers/clk/rockchip/clk_rk3368.c
+++ b/drivers/clk/rockchip/clk_rk3368.c
@@ -20,8 +20,6 @@
#include <dm/lists.h>
#include <dt-bindings/clock/rk3368-cru.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3368_clk_plat {
struct dtd_rockchip_rk3368_cru dtd;
diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index fb74c441ff..86d8ca55bf 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -20,8 +20,6 @@
#include <dm/lists.h>
#include <dt-bindings/clock/rk3399-cru.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3399_clk_plat {
struct dtd_rockchip_rk3399_cru dtd;
diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c
index 958fc78592..1cd8ab5d58 100644
--- a/drivers/clk/rockchip/clk_rv1108.c
+++ b/drivers/clk/rockchip/clk_rv1108.c
@@ -17,8 +17,6 @@
#include <dm/lists.h>
#include <dt-bindings/clock/rv1108-cru.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
VCO_MAX_HZ = 2400U * 1000000,
VCO_MIN_HZ = 600 * 1000000,
@@ -209,12 +207,19 @@ static void rkclk_init(struct rv1108_cru *cru)
printf("APLL: %d DPLL:%d GPLL:%d\n", apll, dpll, gpll);
}
-static int rv1108_clk_probe(struct udevice *dev)
+static int rv1108_clk_ofdata_to_platdata(struct udevice *dev)
{
struct rv1108_clk_priv *priv = dev_get_priv(dev);
priv->cru = dev_read_addr_ptr(dev);
+ return 0;
+}
+
+static int rv1108_clk_probe(struct udevice *dev)
+{
+ struct rv1108_clk_priv *priv = dev_get_priv(dev);
+
rkclk_init(priv->cru);
return 0;
@@ -260,6 +265,7 @@ U_BOOT_DRIVER(clk_rv1108) = {
.id = UCLASS_CLK,
.of_match = rv1108_clk_ids,
.priv_auto_alloc_size = sizeof(struct rv1108_clk_priv),
+ .ofdata_to_platdata = rv1108_clk_ofdata_to_platdata,
.ops = &rv1108_clk_ops,
.bind = rv1108_clk_bind,
.probe = rv1108_clk_probe,
diff --git a/drivers/clk/uniphier/Kconfig b/drivers/clk/uniphier/Kconfig
index 3666d8414c..a26ca8c1cd 100644
--- a/drivers/clk/uniphier/Kconfig
+++ b/drivers/clk/uniphier/Kconfig
@@ -2,7 +2,6 @@ config CLK_UNIPHIER
def_bool y
depends on ARCH_UNIPHIER
select CLK
- select SPL_CLK if SPL
help
Support for clock controllers on UniPhier SoCs.
Say Y if you want to control clocks provided by System Control
diff --git a/drivers/cpu/cpu-uclass.c b/drivers/cpu/cpu-uclass.c
index 73e4853939..e47377a0fe 100644
--- a/drivers/cpu/cpu-uclass.c
+++ b/drivers/cpu/cpu-uclass.c
@@ -12,8 +12,6 @@
#include <dm/lists.h>
#include <dm/root.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int cpu_get_desc(struct udevice *dev, char *buf, int size)
{
struct cpu_ops *ops = cpu_get_ops(dev);
diff --git a/drivers/ddr/altera/sdram.c b/drivers/ddr/altera/sdram.c
index e74c5b039e..0f688f9bcf 100644
--- a/drivers/ddr/altera/sdram.c
+++ b/drivers/ddr/altera/sdram.c
@@ -12,8 +12,6 @@
#include <asm/arch/system_manager.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct sdram_prot_rule {
u32 sdram_start; /* SDRAM start address */
u32 sdram_end; /* SDRAM end address */
diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c
index d0a7b3f107..61bbce92d4 100644
--- a/drivers/ddr/fsl/main.c
+++ b/drivers/ddr/fsl/main.c
@@ -15,8 +15,6 @@
#include <fsl_ddr_sdram.h>
#include <fsl_ddr.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* CONFIG_SYS_FSL_DDR_SDRAM_BASE_PHY is the physical address from the view
* of DDR controllers. It is the same as CONFIG_SYS_DDR_SDRAM_BASE for
diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
index 3d0ce22fbc..7f92d24bc1 100644
--- a/drivers/dma/dma-uclass.c
+++ b/drivers/dma/dma-uclass.c
@@ -16,8 +16,6 @@
#include <dm/device-internal.h>
#include <errno.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int dma_get_device(u32 transfer_type, struct udevice **devp)
{
struct udevice *dev;
diff --git a/drivers/fpga/socfpga.c b/drivers/fpga/socfpga.c
index 6e14ebd26d..aef796c741 100644
--- a/drivers/fpga/socfpga.c
+++ b/drivers/fpga/socfpga.c
@@ -12,8 +12,6 @@
#include <asm/arch/reset_manager.h>
#include <asm/arch/system_manager.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Timeout count */
#define FPGA_TIMEOUT_CNT 0x1000000
diff --git a/drivers/fpga/socfpga_arria10.c b/drivers/fpga/socfpga_arria10.c
index d5763965dd..ee18675f7e 100644
--- a/drivers/fpga/socfpga_arria10.c
+++ b/drivers/fpga/socfpga_arria10.c
@@ -23,8 +23,6 @@
#define FPGA_TIMEOUT_MSEC 1000 /* timeout in ms */
#define FPGA_TIMEOUT_CNT 0x1000000
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct socfpga_fpga_manager *fpga_manager_base =
(void *)SOCFPGA_FPGAMGRREGS_ADDRESS;
@@ -111,12 +109,12 @@ static int wait_for_nconfig_pin_and_nstatus_pin(void)
unsigned long mask = ALT_FPGAMGR_IMGCFG_STAT_F2S_NCONFIG_PIN_SET_MSK |
ALT_FPGAMGR_IMGCFG_STAT_F2S_NSTATUS_PIN_SET_MSK;
- /* Poll until f2s_nconfig_pin and f2s_nstatus_pin; loop until de-asserted,
- * timeout at 1000ms
+ /*
+ * Poll until f2s_nconfig_pin and f2s_nstatus_pin; loop until
+ * de-asserted, timeout at 1000ms
*/
- return wait_for_bit_le32(&fpga_manager_base->imgcfg_stat,
- mask,
- false, FPGA_TIMEOUT_MSEC, false);
+ return wait_for_bit_le32(&fpga_manager_base->imgcfg_stat, mask,
+ true, FPGA_TIMEOUT_MSEC, false);
}
static int wait_for_f2s_nstatus_pin(unsigned long value)
diff --git a/drivers/fpga/socfpga_gen5.c b/drivers/fpga/socfpga_gen5.c
index 3dfb0303d3..88ae035e29 100644
--- a/drivers/fpga/socfpga_gen5.c
+++ b/drivers/fpga/socfpga_gen5.c
@@ -12,8 +12,6 @@
#include <asm/arch/reset_manager.h>
#include <asm/arch/system_manager.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define FPGA_TIMEOUT_CNT 0x1000000
static struct socfpga_fpga_manager *fpgamgr_regs =
diff --git a/drivers/gpio/hsdk-creg-gpio.c b/drivers/gpio/hsdk-creg-gpio.c
index 8ca807a18f..084a2da652 100644
--- a/drivers/gpio/hsdk-creg-gpio.c
+++ b/drivers/gpio/hsdk-creg-gpio.c
@@ -16,8 +16,6 @@
#include <errno.h>
#include <linux/printk.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define HSDK_CREG_MAX_GPIO 8
#define GPIO_ACTIVATE 0x2
diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c
index 7825714e80..0de74cb67d 100644
--- a/drivers/gpio/imx_rgpio2p.c
+++ b/drivers/gpio/imx_rgpio2p.c
@@ -14,8 +14,6 @@
#include <asm/io.h>
#include <malloc.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum imx_rgpio2p_direction {
IMX_RGPIO2P_DIRECTION_IN,
IMX_RGPIO2P_DIRECTION_OUT,
diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c
index 85dea14c51..79942ff76a 100644
--- a/drivers/gpio/mvebu_gpio.c
+++ b/drivers/gpio/mvebu_gpio.c
@@ -10,8 +10,6 @@
#include <asm/io.h>
#include <errno.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MVEBU_GPIOS_PER_BANK 32
struct mvebu_gpio_regs {
diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index d0e365a54b..c6427d7252 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/drivers/gpio/mxc_gpio.c
@@ -158,8 +158,6 @@ int gpio_direction_output(unsigned gpio, int value)
#ifdef CONFIG_DM_GPIO
#include <fdtdec.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int mxc_gpio_is_output(struct gpio_regs *regs, int offset)
{
u32 val;
diff --git a/drivers/gpio/pm8916_gpio.c b/drivers/gpio/pm8916_gpio.c
index 42f068ecb6..3b6de9d715 100644
--- a/drivers/gpio/pm8916_gpio.c
+++ b/drivers/gpio/pm8916_gpio.c
@@ -14,8 +14,6 @@
#include <asm/gpio.h>
#include <linux/bitops.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Register offset for each gpio */
#define REG_OFFSET(x) ((x) * 0x100)
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
index 2a18f32857..02f2a245b8 100644
--- a/drivers/gpio/sandbox.c
+++ b/drivers/gpio/sandbox.c
@@ -11,8 +11,6 @@
#include <dm/of.h>
#include <dt-bindings/gpio/gpio.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Flags for each GPIO */
#define GPIOF_OUTPUT (1 << 0) /* Currently set as an output */
#define GPIOF_HIGH (1 << 1) /* Currently set high */
diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
index ea6f3593b9..706afce993 100644
--- a/drivers/gpio/sunxi_gpio.c
+++ b/drivers/gpio/sunxi_gpio.c
@@ -21,8 +21,6 @@
#include <dm/device-internal.h>
#include <dt-bindings/gpio/gpio.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define SUNXI_GPIOS_PER_BANK SUNXI_GPIO_A_NR
struct sunxi_gpio_platdata {
diff --git a/drivers/gpio/tegra186_gpio.c b/drivers/gpio/tegra186_gpio.c
index deb59e8b32..6d610ef118 100644
--- a/drivers/gpio/tegra186_gpio.c
+++ b/drivers/gpio/tegra186_gpio.c
@@ -17,8 +17,6 @@
#include <dt-bindings/gpio/gpio.h>
#include "tegra186_gpio_priv.h"
-DECLARE_GLOBAL_DATA_PTR;
-
struct tegra186_gpio_port_data {
const char *name;
uint32_t offset;
diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c
index 4965583158..faf950e2d3 100644
--- a/drivers/gpio/tegra_gpio.c
+++ b/drivers/gpio/tegra_gpio.c
@@ -23,8 +23,6 @@
#include <dm/device-internal.h>
#include <dt-bindings/gpio/gpio.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const int CONFIG_SFIO = 0;
static const int CONFIG_GPIO = 1;
static const int DIRECTION_INPUT = 0;
diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c
index 7ed0c10f72..d6329715db 100644
--- a/drivers/i2c/ast_i2c.c
+++ b/drivers/i2c/ast_i2c.c
@@ -22,8 +22,6 @@
#define HIGHSPEED_TTIMEOUT 3
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Device private data
*/
diff --git a/drivers/i2c/i2c-cdns.c b/drivers/i2c/i2c-cdns.c
index 8265ce3210..a977a7fcbd 100644
--- a/drivers/i2c/i2c-cdns.c
+++ b/drivers/i2c/i2c-cdns.c
@@ -19,8 +19,6 @@
#include <mapmem.h>
#include <wait_bit.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* i2c register set */
struct cdns_i2c_regs {
u32 control;
diff --git a/drivers/i2c/imx_lpi2c.c b/drivers/i2c/imx_lpi2c.c
index 32d7809dba..937410fa2c 100644
--- a/drivers/i2c/imx_lpi2c.c
+++ b/drivers/i2c/imx_lpi2c.c
@@ -15,7 +15,6 @@
#include <fdtdec.h>
#include <i2c.h>
-DECLARE_GLOBAL_DATA_PTR;
#define LPI2C_FIFO_SIZE 4
#define LPI2C_TIMEOUT_MS 100
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index 5d33815146..0759585c9e 100644
--- a/drivers/i2c/omap24xx_i2c.c
+++ b/drivers/i2c/omap24xx_i2c.c
@@ -47,8 +47,6 @@
#include "omap24xx_i2c.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define I2C_TIMEOUT 1000
/* Absolutely safe for status update at 100 kHz I2C: */
diff --git a/drivers/i2c/rk_i2c.c b/drivers/i2c/rk_i2c.c
index 332280c220..a09adcdc15 100644
--- a/drivers/i2c/rk_i2c.c
+++ b/drivers/i2c/rk_i2c.c
@@ -19,8 +19,6 @@
#include <dm/pinctrl.h>
#include <linux/sizes.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* i2c timerout */
#define I2C_TIMEOUT_MS 100
#define I2C_RETRY_COUNT 3
diff --git a/drivers/i2c/sandbox_i2c.c b/drivers/i2c/sandbox_i2c.c
index f5978fda29..6e02dac2ec 100644
--- a/drivers/i2c/sandbox_i2c.c
+++ b/drivers/i2c/sandbox_i2c.c
@@ -14,8 +14,6 @@
#include <dm/lists.h>
#include <dm/device-internal.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct sandbox_i2c_priv {
bool test_mode;
};
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
index 81f061aecd..5ca0b7d497 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -244,8 +244,6 @@ static struct stm32_i2c_setup stm32f7_setup = {
.analog_filter = STM32_I2C_ANALOG_FILTER_ENABLE,
};
-DECLARE_GLOBAL_DATA_PTR;
-
static int stm32_i2c_check_device_busy(struct stm32_i2c_priv *i2c_priv)
{
struct stm32_i2c_regs *regs = i2c_priv->regs;
diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index 7d23e51b69..2d6cd0286e 100644
--- a/drivers/i2c/tegra_i2c.c
+++ b/drivers/i2c/tegra_i2c.c
@@ -20,8 +20,6 @@
#include <asm/arch/gpio.h>
#include <asm/arch-tegra/tegra_i2c.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum i2c_type {
TYPE_114,
TYPE_STD,
diff --git a/drivers/input/cros_ec_keyb.c b/drivers/input/cros_ec_keyb.c
index 6fa35a63dd..f0bf139ae1 100644
--- a/drivers/input/cros_ec_keyb.c
+++ b/drivers/input/cros_ec_keyb.c
@@ -15,8 +15,6 @@
#include <key_matrix.h>
#include <stdio_dev.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
KBC_MAX_KEYS = 8, /* Maximum keys held down at once */
KBC_REPEAT_RATE_MS = 30,
diff --git a/drivers/input/tegra-kbc.c b/drivers/input/tegra-kbc.c
index cb5695784e..1c2768345a 100644
--- a/drivers/input/tegra-kbc.c
+++ b/drivers/input/tegra-kbc.c
@@ -19,8 +19,6 @@
#include <asm/arch-tegra/timer.h>
#include <linux/input.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
KBC_MAX_GPIO = 24,
KBC_MAX_KPENT = 8, /* size of keypress entry queue */
diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c
index 9976635887..5e0c524aec 100644
--- a/drivers/led/led_gpio.c
+++ b/drivers/led/led_gpio.c
@@ -12,8 +12,6 @@
#include <asm/gpio.h>
#include <dm/lists.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct led_gpio_priv {
struct gpio_desc gpio;
};
diff --git a/drivers/mailbox/mailbox-uclass.c b/drivers/mailbox/mailbox-uclass.c
index 822ae5b45e..d053db031d 100644
--- a/drivers/mailbox/mailbox-uclass.c
+++ b/drivers/mailbox/mailbox-uclass.c
@@ -9,8 +9,6 @@
#include <mailbox.h>
#include <mailbox-uclass.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static inline struct mbox_ops *mbox_dev_ops(struct udevice *dev)
{
return (struct mbox_ops *)dev->driver->ops;
diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index bd2ec411c7..8d1df20bf9 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -36,8 +36,6 @@ struct tegra_hsp {
uint32_t db_base;
};
-DECLARE_GLOBAL_DATA_PTR;
-
static uint32_t *tegra_hsp_reg(struct tegra_hsp *thsp, uint32_t db_id,
uint32_t reg)
{
diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c
index eefaaa53ad..bed80dc455 100644
--- a/drivers/misc/cros_ec.c
+++ b/drivers/misc/cros_ec.c
@@ -42,8 +42,6 @@ enum {
CROS_EC_CMD_HASH_TIMEOUT_MS = 2000,
};
-DECLARE_GLOBAL_DATA_PTR;
-
void cros_ec_dump_data(const char *name, int cmd, const uint8_t *data, int len)
{
#ifdef DEBUG
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index 5924adee40..1f1e23e6d1 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -51,8 +51,6 @@
* the EC image in with U-Boot (Vic has demonstrated a prototype for this).
*/
-DECLARE_GLOBAL_DATA_PTR;
-
#define KEYBOARD_ROWS 8
#define KEYBOARD_COLS 13
diff --git a/drivers/misc/cros_ec_spi.c b/drivers/misc/cros_ec_spi.c
index 253d91a553..51714a471c 100644
--- a/drivers/misc/cros_ec_spi.c
+++ b/drivers/misc/cros_ec_spi.c
@@ -19,8 +19,6 @@
#include <errno.h>
#include <spi.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int cros_ec_spi_packet(struct udevice *udev, int out_bytes, int in_bytes)
{
struct cros_ec_dev *dev = dev_get_uclass_priv(udev);
diff --git a/drivers/misc/i2c_eeprom_emul.c b/drivers/misc/i2c_eeprom_emul.c
index 52aa7d69e9..6f84e815e8 100644
--- a/drivers/misc/i2c_eeprom_emul.c
+++ b/drivers/misc/i2c_eeprom_emul.c
@@ -19,8 +19,6 @@
#define debug_buffer(x, ...)
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
struct sandbox_i2c_flash_plat_data {
enum sandbox_i2c_eeprom_test_mode test_mode;
const char *filename;
diff --git a/drivers/misc/spltest_sandbox.c b/drivers/misc/spltest_sandbox.c
index 1fef8252ab..24aba78882 100644
--- a/drivers/misc/spltest_sandbox.c
+++ b/drivers/misc/spltest_sandbox.c
@@ -9,8 +9,6 @@
#include <dm.h>
#include <dt-structs.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int sandbox_spl_probe(struct udevice *dev)
{
struct dtd_sandbox_spl_test *plat = dev_get_platdata(dev);
diff --git a/drivers/misc/syscon_sandbox.c b/drivers/misc/syscon_sandbox.c
index ccfab3ef98..e78b6e476e 100644
--- a/drivers/misc/syscon_sandbox.c
+++ b/drivers/misc/syscon_sandbox.c
@@ -12,8 +12,6 @@
#include <asm/test.h>
#include <dm/lists.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct udevice_id sandbox_syscon_ids[] = {
{ .compatible = "sandbox,syscon0", .data = SYSCON0 },
{ .compatible = "sandbox,syscon1", .data = SYSCON1 },
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index 89a7c19242..8664a373a1 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -25,8 +25,6 @@
#ifdef CONFIG_DM_MMC
#include <dm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MMC_CLOCK_MAX 48000000
#define MMC_CLOCK_MIN 400000
diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c
index bccd182e50..752c660ea7 100644
--- a/drivers/mmc/bcm2835_sdhost.c
+++ b/drivers/mmc/bcm2835_sdhost.c
@@ -44,8 +44,6 @@
#include <mach/gpio.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define msleep(a) udelay(a * 1000)
#define SDCMD 0x00 /* Command to SD card - 16 R/W */
diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
index 1c108b5470..186b3d7dbf 100644
--- a/drivers/mmc/gen_atmel_mci.c
+++ b/drivers/mmc/gen_atmel_mci.c
@@ -22,8 +22,6 @@
#include <asm/arch/hardware.h>
#include "atmel_mci.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_SYS_MMC_CLK_OD
# define CONFIG_SYS_MMC_CLK_OD 150000
#endif
diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c
index a2cd5d3a44..454593eec4 100644
--- a/drivers/mmc/meson_gx_mmc.c
+++ b/drivers/mmc/meson_gx_mmc.c
@@ -35,6 +35,9 @@ static void meson_mmc_config_clock(struct mmc *mmc)
uint32_t meson_mmc_clk = 0;
unsigned int clk, clk_src, clk_div;
+ if (!mmc->clock)
+ return;
+
/* 1GHz / CLK_MAX_DIV = 15,9 MHz */
if (mmc->clock > 16000000) {
clk = SD_EMMC_CLKSRC_DIV2;
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index a3536b15ae..0481e276c0 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -12,8 +12,6 @@
#include <dm/lists.h>
#include "mmc_private.h"
-DECLARE_GLOBAL_DATA_PTR;
-
int dm_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
struct mmc_data *data)
{
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index c930893300..f72b80c704 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1334,7 +1334,7 @@ static int sd_set_card_speed(struct mmc *mmc, enum bus_mode mode)
return 0;
}
-int sd_select_bus_width(struct mmc *mmc, int w)
+static int sd_select_bus_width(struct mmc *mmc, int w)
{
int err;
struct mmc_cmd cmd;
diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c
index 56a43ca7d3..8e49b2f73c 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -330,8 +330,10 @@ static const struct udevice_id renesas_sdhi_match[] = {
static int renesas_sdhi_probe(struct udevice *dev)
{
+ struct tmio_sd_priv *priv = dev_get_priv(dev);
u32 quirks = dev_get_driver_data(dev);
struct fdt_resource reg_res;
+ struct clk clk;
DECLARE_GLOBAL_DATA_PTR;
int ret;
@@ -348,6 +350,27 @@ static int renesas_sdhi_probe(struct udevice *dev)
quirks |= TMIO_SD_CAP_16BIT;
}
+ ret = clk_get_by_index(dev, 0, &clk);
+ if (ret < 0) {
+ dev_err(dev, "failed to get host clock\n");
+ return ret;
+ }
+
+ /* set to max rate */
+ priv->mclk = clk_set_rate(&clk, ULONG_MAX);
+ if (IS_ERR_VALUE(priv->mclk)) {
+ dev_err(dev, "failed to set rate for host clock\n");
+ clk_free(&clk);
+ return priv->mclk;
+ }
+
+ ret = clk_enable(&clk);
+ clk_free(&clk);
+ if (ret) {
+ dev_err(dev, "failed to enable host clock\n");
+ return ret;
+ }
+
ret = tmio_sd_probe(dev, quirks);
#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
if (!ret)
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index 807dc9e72f..4ba1436159 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -18,8 +18,6 @@
#include <asm/arch/periph.h>
#include <linux/err.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct rockchip_mmc_plat {
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct dtd_rockchip_rk3288_dw_mshc dtplat;
diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c
index ab89be4764..8868f341f3 100644
--- a/drivers/mmc/rockchip_sdhci.c
+++ b/drivers/mmc/rockchip_sdhci.c
@@ -15,7 +15,6 @@
#include <sdhci.h>
#include <clk.h>
-DECLARE_GLOBAL_DATA_PTR;
/* 400KHz is max freq for card ID etc. Use that as min */
#define EMMC_MIN_FREQ 400000
diff --git a/drivers/mmc/sandbox_mmc.c b/drivers/mmc/sandbox_mmc.c
index 8a5d256c11..0945beb368 100644
--- a/drivers/mmc/sandbox_mmc.c
+++ b/drivers/mmc/sandbox_mmc.c
@@ -12,8 +12,6 @@
#include <mmc.h>
#include <asm/test.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct sandbox_mmc_plat {
struct mmc_config cfg;
struct mmc mmc;
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index f5b21dd097..47afa263ea 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -189,8 +189,6 @@ struct stm32_sdmmc2_ctx {
#define SDMMC_CMD_TIMEOUT 0xFFFFFFFF
-DECLARE_GLOBAL_DATA_PTR;
-
static void stm32_sdmmc2_start_data(struct stm32_sdmmc2_priv *priv,
struct mmc_data *data,
struct stm32_sdmmc2_ctx *ctx)
diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
index 74745296b4..ee63166e55 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -16,8 +16,6 @@
#include <asm/io.h>
#include <asm/arch-tegra/tegra_mmc.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct tegra_mmc_plat {
struct mmc_config cfg;
struct mmc mmc;
diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c
index 5f1c9c0bd4..4ea6612142 100644
--- a/drivers/mmc/tmio-common.c
+++ b/drivers/mmc/tmio-common.c
@@ -713,7 +713,6 @@ int tmio_sd_probe(struct udevice *dev, u32 quirks)
struct tmio_sd_priv *priv = dev_get_priv(dev);
struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
fdt_addr_t base;
- struct clk clk;
int ret;
base = devfdt_get_addr(dev);
@@ -728,27 +727,6 @@ int tmio_sd_probe(struct udevice *dev, u32 quirks)
device_get_supply_regulator(dev, "vqmmc-supply", &priv->vqmmc_dev);
#endif
- ret = clk_get_by_index(dev, 0, &clk);
- if (ret < 0) {
- dev_err(dev, "failed to get host clock\n");
- return ret;
- }
-
- /* set to max rate */
- priv->mclk = clk_set_rate(&clk, ULONG_MAX);
- if (IS_ERR_VALUE(priv->mclk)) {
- dev_err(dev, "failed to set rate for host clock\n");
- clk_free(&clk);
- return priv->mclk;
- }
-
- ret = clk_enable(&clk);
- clk_free(&clk);
- if (ret) {
- dev_err(dev, "failed to enable host clock\n");
- return ret;
- }
-
ret = mmc_of_parse(dev, &plat->cfg);
if (ret < 0) {
dev_err(dev, "failed to parse host caps\n");
diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
index 47379b0328..61f8da4e41 100644
--- a/drivers/mmc/uniphier-sd.c
+++ b/drivers/mmc/uniphier-sd.c
@@ -32,6 +32,35 @@ static const struct udevice_id uniphier_sd_match[] = {
static int uniphier_sd_probe(struct udevice *dev)
{
+ struct tmio_sd_priv *priv = dev_get_priv(dev);
+#ifndef CONFIG_SPL_BUILD
+ struct clk clk;
+ int ret;
+
+ ret = clk_get_by_index(dev, 0, &clk);
+ if (ret < 0) {
+ dev_err(dev, "failed to get host clock\n");
+ return ret;
+ }
+
+ /* set to max rate */
+ priv->mclk = clk_set_rate(&clk, ULONG_MAX);
+ if (IS_ERR_VALUE(priv->mclk)) {
+ dev_err(dev, "failed to set rate for host clock\n");
+ clk_free(&clk);
+ return priv->mclk;
+ }
+
+ ret = clk_enable(&clk);
+ clk_free(&clk);
+ if (ret) {
+ dev_err(dev, "failed to enable host clock\n");
+ return ret;
+ }
+#else
+ priv->mclk = 100000000;
+#endif
+
return tmio_sd_probe(dev, 0);
}
diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c
index 6aa909fdd9..e4225852bd 100644
--- a/drivers/mtd/nand/nand.c
+++ b/drivers/mtd/nand/nand.c
@@ -15,8 +15,6 @@
#define CONFIG_SYS_NAND_BASE_LIST { CONFIG_SYS_NAND_BASE }
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
int nand_curr_device = -1;
static struct mtd_info *nand_info[CONFIG_SYS_MAX_NAND_DEVICE];
diff --git a/drivers/mtd/nand/zynq_nand.c b/drivers/mtd/nand/zynq_nand.c
index 6494196049..2d4e8b4736 100644
--- a/drivers/mtd/nand/zynq_nand.c
+++ b/drivers/mtd/nand/zynq_nand.c
@@ -1006,7 +1006,7 @@ static int zynq_nand_device_ready(struct mtd_info *mtd)
return 0;
}
-int zynq_nand_init(struct nand_chip *nand_chip, int devnum)
+static int zynq_nand_init(struct nand_chip *nand_chip, int devnum)
{
struct zynq_nand_info *xnand;
struct mtd_info *mtd;
@@ -1025,7 +1025,7 @@ int zynq_nand_init(struct nand_chip *nand_chip, int devnum)
}
xnand->nand_base = (void __iomem *)ZYNQ_NAND_BASEADDR;
- mtd = get_nand_dev_by_index(0);
+ mtd = nand_to_mtd(nand_chip);
nand_chip->priv = xnand;
mtd->priv = nand_chip;
@@ -1192,14 +1192,12 @@ fail:
return err;
}
-#ifdef CONFIG_SYS_NAND_SELF_INIT
static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE];
-void __weak board_nand_init(void)
+void board_nand_init(void)
{
struct nand_chip *nand = &nand_chip[0];
if (zynq_nand_init(nand, 0))
puts("ZYNQ NAND init failed\n");
}
-#endif
diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c
index 1ba6815232..7893efee12 100644
--- a/drivers/mtd/spi/sandbox.c
+++ b/drivers/mtd/spi/sandbox.c
@@ -24,8 +24,6 @@
#include <dm/lists.h>
#include <dm/uclass-internal.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* The different states that our SPI flash transitions between.
* We need to keep track of this across multiple xfer calls since
diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
index 839cdbe1b0..614a293234 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -87,6 +87,19 @@ enum spi_nor_option_flags {
/* SST specific */
#ifdef CONFIG_SPI_FLASH_SST
+#define SST26_CMD_READ_BPR 0x72
+#define SST26_CMD_WRITE_BPR 0x42
+
+#define SST26_BPR_8K_NUM 4
+#define SST26_MAX_BPR_REG_LEN (18 + 1)
+#define SST26_BOUND_REG_SIZE ((32 + SST26_BPR_8K_NUM * 8) * SZ_1K)
+
+enum lock_ctl {
+ SST26_CTL_LOCK,
+ SST26_CTL_UNLOCK,
+ SST26_CTL_CHECK
+};
+
# define CMD_SST_BP 0x02 /* Byte Program */
# define CMD_SST_AAI_WP 0xAD /* Auto Address Incr Word Program */
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 2e61685d3e..b78a869f58 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -16,12 +16,11 @@
#include <spi.h>
#include <spi_flash.h>
#include <linux/log2.h>
+#include <linux/sizes.h>
#include <dma.h>
#include "sf_internal.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static void spi_flash_addr(u32 addr, u8 *cmd)
{
/* cmd[0] is actual command */
@@ -541,6 +540,164 @@ int spi_flash_cmd_read_ops(struct spi_flash *flash, u32 offset,
}
#ifdef CONFIG_SPI_FLASH_SST
+static bool sst26_process_bpr(u32 bpr_size, u8 *cmd, u32 bit, enum lock_ctl ctl)
+{
+ switch (ctl) {
+ case SST26_CTL_LOCK:
+ cmd[bpr_size - (bit / 8) - 1] |= BIT(bit % 8);
+ break;
+ case SST26_CTL_UNLOCK:
+ cmd[bpr_size - (bit / 8) - 1] &= ~BIT(bit % 8);
+ break;
+ case SST26_CTL_CHECK:
+ return !!(cmd[bpr_size - (bit / 8) - 1] & BIT(bit % 8));
+ }
+
+ return false;
+}
+
+/*
+ * sst26wf016/sst26wf032/sst26wf064 have next block protection:
+ * 4x - 8 KByte blocks - read & write protection bits - upper addresses
+ * 1x - 32 KByte blocks - write protection bits
+ * rest - 64 KByte blocks - write protection bits
+ * 1x - 32 KByte blocks - write protection bits
+ * 4x - 8 KByte blocks - read & write protection bits - lower addresses
+ *
+ * We'll support only per 64k lock/unlock so lower and upper 64 KByte region
+ * will be treated as single block.
+ */
+
+/*
+ * Lock, unlock or check lock status of the flash region of the flash (depending
+ * on the lock_ctl value)
+ */
+static int sst26_lock_ctl(struct spi_flash *flash, u32 ofs, size_t len, enum lock_ctl ctl)
+{
+ u32 i, bpr_ptr, rptr_64k, lptr_64k, bpr_size;
+ bool lower_64k = false, upper_64k = false;
+ u8 cmd, bpr_buff[SST26_MAX_BPR_REG_LEN] = {};
+ int ret;
+
+ /* Check length and offset for 64k alignment */
+ if ((ofs & (SZ_64K - 1)) || (len & (SZ_64K - 1)))
+ return -EINVAL;
+
+ if (ofs + len > flash->size)
+ return -EINVAL;
+
+ /* SST26 family has only 16 Mbit, 32 Mbit and 64 Mbit IC */
+ if (flash->size != SZ_2M &&
+ flash->size != SZ_4M &&
+ flash->size != SZ_8M)
+ return -EINVAL;
+
+ bpr_size = 2 + (flash->size / SZ_64K / 8);
+
+ cmd = SST26_CMD_READ_BPR;
+ ret = spi_flash_read_common(flash, &cmd, 1, bpr_buff, bpr_size);
+ if (ret < 0) {
+ printf("SF: fail to read block-protection register\n");
+ return ret;
+ }
+
+ rptr_64k = min_t(u32, ofs + len , flash->size - SST26_BOUND_REG_SIZE);
+ lptr_64k = max_t(u32, ofs, SST26_BOUND_REG_SIZE);
+
+ upper_64k = ((ofs + len) > (flash->size - SST26_BOUND_REG_SIZE));
+ lower_64k = (ofs < SST26_BOUND_REG_SIZE);
+
+ /* Lower bits in block-protection register are about 64k region */
+ bpr_ptr = lptr_64k / SZ_64K - 1;
+
+ /* Process 64K blocks region */
+ while (lptr_64k < rptr_64k) {
+ if (sst26_process_bpr(bpr_size, bpr_buff, bpr_ptr, ctl))
+ return EACCES;
+
+ bpr_ptr++;
+ lptr_64k += SZ_64K;
+ }
+
+ /* 32K and 8K region bits in BPR are after 64k region bits */
+ bpr_ptr = (flash->size - 2 * SST26_BOUND_REG_SIZE) / SZ_64K;
+
+ /* Process lower 32K block region */
+ if (lower_64k)
+ if (sst26_process_bpr(bpr_size, bpr_buff, bpr_ptr, ctl))
+ return EACCES;
+
+ bpr_ptr++;
+
+ /* Process upper 32K block region */
+ if (upper_64k)
+ if (sst26_process_bpr(bpr_size, bpr_buff, bpr_ptr, ctl))
+ return EACCES;
+
+ bpr_ptr++;
+
+ /* Process lower 8K block regions */
+ for (i = 0; i < SST26_BPR_8K_NUM; i++) {
+ if (lower_64k)
+ if (sst26_process_bpr(bpr_size, bpr_buff, bpr_ptr, ctl))
+ return EACCES;
+
+ /* In 8K area BPR has both read and write protection bits */
+ bpr_ptr += 2;
+ }
+
+ /* Process upper 8K block regions */
+ for (i = 0; i < SST26_BPR_8K_NUM; i++) {
+ if (upper_64k)
+ if (sst26_process_bpr(bpr_size, bpr_buff, bpr_ptr, ctl))
+ return EACCES;
+
+ /* In 8K area BPR has both read and write protection bits */
+ bpr_ptr += 2;
+ }
+
+ /* If we check region status we don't need to write BPR back */
+ if (ctl == SST26_CTL_CHECK)
+ return 0;
+
+ cmd = SST26_CMD_WRITE_BPR;
+ ret = spi_flash_write_common(flash, &cmd, 1, bpr_buff, bpr_size);
+ if (ret < 0) {
+ printf("SF: fail to write block-protection register\n");
+ return ret;
+ }
+
+ return 0;
+}
+
+static int sst26_unlock(struct spi_flash *flash, u32 ofs, size_t len)
+{
+ return sst26_lock_ctl(flash, ofs, len, SST26_CTL_UNLOCK);
+}
+
+static int sst26_lock(struct spi_flash *flash, u32 ofs, size_t len)
+{
+ return sst26_lock_ctl(flash, ofs, len, SST26_CTL_LOCK);
+}
+
+/*
+ * Returns EACCES (positive value) if region is locked, 0 if region is unlocked,
+ * and negative on errors.
+ */
+static int sst26_is_locked(struct spi_flash *flash, u32 ofs, size_t len)
+{
+ /*
+ * is_locked function is used for check before reading or erasing flash
+ * region, so offset and length might be not 64k allighned, so adjust
+ * them to be 64k allighned as sst26_lock_ctl works only with 64k
+ * allighned regions.
+ */
+ ofs -= ofs & (SZ_64K - 1);
+ len = len & (SZ_64K - 1) ? (len & ~(SZ_64K - 1)) + SZ_64K : len;
+
+ return sst26_lock_ctl(flash, ofs, len, SST26_CTL_CHECK);
+}
+
static int sst_byte_write(struct spi_flash *flash, u32 offset, const void *buf)
{
struct spi_slave *spi = flash->spi;
@@ -1033,6 +1190,15 @@ int spi_flash_scan(struct spi_flash *flash)
}
#endif
+/* sst26wf series block protection implementation differs from other series */
+#if defined(CONFIG_SPI_FLASH_SST)
+ if (JEDEC_MFR(info) == SPI_FLASH_CFI_MFR_SST && info->id[1] == 0x26) {
+ flash->flash_lock = sst26_lock;
+ flash->flash_unlock = sst26_unlock;
+ flash->flash_is_locked = sst26_is_locked;
+ }
+#endif
+
/* Compute the flash size */
flash->shift = (flash->dual_flash & SF_DUAL_PARALLEL_FLASH) ? 1 : 0;
flash->page_size = info->page_size;
diff --git a/drivers/mtd/spi/spi_flash_ids.c b/drivers/mtd/spi/spi_flash_ids.c
index b789219e4e..ef55abb01d 100644
--- a/drivers/mtd/spi/spi_flash_ids.c
+++ b/drivers/mtd/spi/spi_flash_ids.c
@@ -94,6 +94,7 @@ const struct spi_flash_info spi_flash_ids[] = {
{"s25fl016a", INFO(0x010214, 0x0, 64 * 1024, 32, 0) },
{"s25fl032a", INFO(0x010215, 0x0, 64 * 1024, 64, 0) },
{"s25fl064a", INFO(0x010216, 0x0, 64 * 1024, 128, 0) },
+ {"s25fl208k", INFO(0x014014, 0x0, 64 * 1024, 16, 0) },
{"s25fl116k", INFO(0x014015, 0x0, 64 * 1024, 32, 0) },
{"s25fl164k", INFO(0x014017, 0x0140, 64 * 1024, 128, 0) },
{"s25fl128p_256k", INFO(0x012018, 0x0300, 256 * 1024, 64, RD_FULL | WR_QPP) },
@@ -151,6 +152,9 @@ const struct spi_flash_info spi_flash_ids[] = {
{"sst25wf040", INFO(0xbf2504, 0x0, 64 * 1024, 8, SECT_4K | SST_WR) },
{"sst25wf040b", INFO(0x621613, 0x0, 64 * 1024, 8, SECT_4K) },
{"sst25wf080", INFO(0xbf2505, 0x0, 64 * 1024, 16, SECT_4K | SST_WR) },
+ {"sst26wf016", INFO(0xbf2651, 0x0, 64 * 1024, 32, SECT_4K) },
+ {"sst26wf032", INFO(0xbf2622, 0x0, 64 * 1024, 64, SECT_4K) },
+ {"sst26wf064", INFO(0xbf2643, 0x0, 64 * 1024, 128, SECT_4K) },
#endif
#ifdef CONFIG_SPI_FLASH_WINBOND /* WINBOND */
{"w25p80", INFO(0xef2014, 0x0, 64 * 1024, 16, 0) },
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 43670a7d0c..765e356645 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -23,8 +23,6 @@
#include <power/regulator.h>
#include "designware.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static int dw_mdio_read(struct mii_dev *bus, int addr, int devad, int reg)
{
#ifdef CONFIG_DM_ETH
diff --git a/drivers/net/e1000_spi.c b/drivers/net/e1000_spi.c
index cb5f93d652..b38f4df9f3 100644
--- a/drivers/net/e1000_spi.c
+++ b/drivers/net/e1000_spi.c
@@ -78,8 +78,6 @@ static inline struct e1000_hw *e1000_hw_from_spi(struct spi_slave *spi)
}
/* Not sure why all of these are necessary */
-void spi_init_r(void) { /* Nothing to do */ }
-void spi_init_f(void) { /* Nothing to do */ }
void spi_init(void) { /* Nothing to do */ }
struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 00d905c299..ad7e051722 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -38,8 +38,6 @@
#include "MCD_dma.h"
-DECLARE_GLOBAL_DATA_PTR;
-
struct fec_info_dma fec_info[] = {
#ifdef CONFIG_SYS_FEC0_IOBASE
{
diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
index 683e820108..5ed3049fa6 100644
--- a/drivers/net/gmac_rockchip.c
+++ b/drivers/net/gmac_rockchip.c
@@ -25,8 +25,6 @@
#include <dt-bindings/clock/rk3288-cru.h>
#include "designware.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Platform data for the gmac
*
diff --git a/drivers/net/lpc32xx_eth.c b/drivers/net/lpc32xx_eth.c
index cbef3359ab..1efe625c5f 100644
--- a/drivers/net/lpc32xx_eth.c
+++ b/drivers/net/lpc32xx_eth.c
@@ -218,8 +218,6 @@ struct lpc32xx_eth_device {
#define MII_MAX_PHY (MADR_PHY_MASK >> MADR_PHY_OFFSET)
-DECLARE_GLOBAL_DATA_PTR;
-
#if defined(CONFIG_PHYLIB) || defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
/*
* mii_reg_read - miiphy_read callback function.
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 505a2d1bee..82838c62f2 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -33,8 +33,6 @@
#define BD_ENET_RX_W_E (BD_ENET_RX_WRAP | BD_ENET_RX_EMPTY)
#define BD_ENET_TX_RDY_LST (BD_ENET_TX_READY | BD_ENET_TX_LAST)
-DECLARE_GLOBAL_DATA_PTR;
-
struct fec_info_s fec_info[] = {
#ifdef CONFIG_SYS_FEC0_IOBASE
{
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 028fca9663..11dbf5375b 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -10,8 +10,6 @@
#include <stdio_dev.h>
#include <net.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_NETCONSOLE_BUFFER_SIZE
#define CONFIG_NETCONSOLE_BUFFER_SIZE 512
#endif
diff --git a/drivers/net/phy/micrel_ksz8xxx.c b/drivers/net/phy/micrel_ksz8xxx.c
index ec628bb27a..62a4431175 100644
--- a/drivers/net/phy/micrel_ksz8xxx.c
+++ b/drivers/net/phy/micrel_ksz8xxx.c
@@ -15,8 +15,6 @@
#include <micrel.h>
#include <phy.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static struct phy_driver KSZ804_driver = {
.name = "Micrel KSZ804",
.uid = 0x221510,
diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c
index b350a61aa6..eb83cebbac 100644
--- a/drivers/net/phy/micrel_ksz90x1.c
+++ b/drivers/net/phy/micrel_ksz90x1.c
@@ -17,8 +17,6 @@
#include <micrel.h>
#include <phy.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* KSZ9021 - KSZ9031 common
*/
diff --git a/drivers/pch/pch-uclass.c b/drivers/pch/pch-uclass.c
index af794eb5a1..0d3ce7f77c 100644
--- a/drivers/pch/pch-uclass.c
+++ b/drivers/pch/pch-uclass.c
@@ -9,8 +9,6 @@
#include <dm.h>
#include <pch.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int pch_get_spi_base(struct udevice *dev, ulong *sbasep)
{
struct pch_ops *ops = pch_get_ops(dev);
diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index 69a4d81c2e..864ac16f57 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -131,8 +131,6 @@
#define CFG_RD_UR_VAL 0xFFFFFFFF
#define CFG_RD_CRS_VAL 0xFFFF0001
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* struct pcie_advk - Advk PCIe controller state
*
diff --git a/drivers/pci/pci-emul-uclass.c b/drivers/pci/pci-emul-uclass.c
index dcea192418..f89acd41dc 100644
--- a/drivers/pci/pci-emul-uclass.c
+++ b/drivers/pci/pci-emul-uclass.c
@@ -12,8 +12,6 @@
#include <pci.h>
#include <dm/lists.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct sandbox_pci_priv {
int dev_count;
};
diff --git a/drivers/pci/pci_sandbox.c b/drivers/pci/pci_sandbox.c
index 6a84ee386d..cd7ed0069a 100644
--- a/drivers/pci/pci_sandbox.c
+++ b/drivers/pci/pci_sandbox.c
@@ -11,8 +11,6 @@
#include <inttypes.h>
#include <pci.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int sandbox_pci_write_config(struct udevice *bus, pci_dev_t devfn,
uint offset, ulong value,
enum pci_size_t size)
diff --git a/drivers/pci/pci_tegra.c b/drivers/pci/pci_tegra.c
index b5bd25ec56..2829b963b0 100644
--- a/drivers/pci/pci_tegra.c
+++ b/drivers/pci/pci_tegra.c
@@ -43,8 +43,6 @@
* use the new standard APIs, with no ifdefs.
*/
-DECLARE_GLOBAL_DATA_PTR;
-
#define AFI_AXI_BAR0_SZ 0x00
#define AFI_AXI_BAR1_SZ 0x04
#define AFI_AXI_BAR2_SZ 0x08
diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c
index 15c9c89fd9..de5a6ee82a 100644
--- a/drivers/phy/meson-gxl-usb2.c
+++ b/drivers/phy/meson-gxl-usb2.c
@@ -21,8 +21,6 @@
#include <linux/bitops.h>
#include <linux/compat.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* bits [31:27] are read-only */
#define U2P_R0 0x0
#define U2P_R0_BYPASS_SEL BIT(0)
diff --git a/drivers/phy/meson-gxl-usb3.c b/drivers/phy/meson-gxl-usb3.c
index a385fbdf12..a85d747eed 100644
--- a/drivers/phy/meson-gxl-usb3.c
+++ b/drivers/phy/meson-gxl-usb3.c
@@ -21,8 +21,6 @@
#include <linux/compat.h>
#include <linux/bitfield.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define USB_R0 0x00
#define USB_R0_P30_FSEL_MASK GENMASK(5, 0)
#define USB_R0_P30_PHY_RESET BIT(6)
diff --git a/drivers/phy/phy-uclass.c b/drivers/phy/phy-uclass.c
index 68e518fc79..bdca4c0238 100644
--- a/drivers/phy/phy-uclass.c
+++ b/drivers/phy/phy-uclass.c
@@ -9,8 +9,6 @@
#include <dm.h>
#include <generic-phy.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static inline struct phy_ops *phy_dev_ops(struct udevice *dev)
{
return (struct phy_ops *)dev->driver->ops;
diff --git a/drivers/phy/sandbox-phy.c b/drivers/phy/sandbox-phy.c
index 867c6fe704..3ed6837e64 100644
--- a/drivers/phy/sandbox-phy.c
+++ b/drivers/phy/sandbox-phy.c
@@ -9,8 +9,6 @@
#include <dm.h>
#include <generic-phy.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct sandbox_phy_priv {
bool initialized;
bool on;
diff --git a/drivers/pinctrl/aspeed/pinctrl_ast2500.c b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
index 01f97c1b48..877f24b63f 100644
--- a/drivers/pinctrl/aspeed/pinctrl_ast2500.c
+++ b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
@@ -12,8 +12,6 @@
#include <asm/arch/scu_ast2500.h>
#include <dm/pinctrl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* This driver works with very simple configuration that has the same name
* for group and function. This way it is compatible with the Linux Kernel
diff --git a/drivers/pinctrl/exynos/pinctrl-exynos7420.c b/drivers/pinctrl/exynos/pinctrl-exynos7420.c
index 8ae5ce776a..bcbe1a0529 100644
--- a/drivers/pinctrl/exynos/pinctrl-exynos7420.c
+++ b/drivers/pinctrl/exynos/pinctrl-exynos7420.c
@@ -16,8 +16,6 @@
#include <asm/arch/pinmux.h>
#include "pinctrl-exynos.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define GPD1_OFFSET 0xc0
static struct exynos_pinctrl_config_data serial2_conf[] = {
diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c
index 6194e6522e..7d2e326148 100644
--- a/drivers/pinctrl/renesas/pfc.c
+++ b/drivers/pinctrl/renesas/pfc.c
@@ -21,8 +21,6 @@
#include "sh_pfc.h"
-DECLARE_GLOBAL_DATA_PTR;
-
enum sh_pfc_model {
SH_PFC_R8A7790 = 0,
SH_PFC_R8A7791,
diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3036.c b/drivers/pinctrl/rockchip/pinctrl_rk3036.c
index 7e93d85dbb..e66ee9902a 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rk3036.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rk3036.c
@@ -16,8 +16,6 @@
#include <asm/arch/periph.h>
#include <dm/pinctrl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* GRF_GPIO0A_IOMUX */
enum {
GPIO0A3_SHIFT = 6,
diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3328.c b/drivers/pinctrl/rockchip/pinctrl_rk3328.c
index fa2356a7a1..0a478a8a99 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rk3328.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rk3328.c
@@ -15,8 +15,6 @@
#include <asm/io.h>
#include <dm/pinctrl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
/* GPIO0A_IOMUX */
GPIO0A5_SEL_SHIFT = 10,
diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3368.c b/drivers/pinctrl/rockchip/pinctrl_rk3368.c
index 25249e377a..a03827af2c 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rk3368.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rk3368.c
@@ -17,8 +17,6 @@
#include <asm/arch/periph.h>
#include <dm/pinctrl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* PMUGRF_GPIO0B_IOMUX */
enum {
GPIO0B5_SHIFT = 10,
diff --git a/drivers/pinctrl/rockchip/pinctrl_rk3399.c b/drivers/pinctrl/rockchip/pinctrl_rk3399.c
index c7052257aa..929035e675 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rk3399.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rk3399.c
@@ -15,8 +15,6 @@
#include <asm/arch/clock.h>
#include <dm/pinctrl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct rk3399_pinctrl_priv {
struct rk3399_grf_regs *grf;
struct rk3399_pmugrf_regs *pmugrf;
diff --git a/drivers/pinctrl/rockchip/pinctrl_rv1108.c b/drivers/pinctrl/rockchip/pinctrl_rv1108.c
index 035f01a61c..4c81bec15b 100644
--- a/drivers/pinctrl/rockchip/pinctrl_rv1108.c
+++ b/drivers/pinctrl/rockchip/pinctrl_rv1108.c
@@ -14,8 +14,6 @@
#include <asm/arch/periph.h>
#include <dm/pinctrl.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct rv1108_pinctrl_priv {
struct rv1108_grf *grf;
};
diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c
index 1847a492a3..36a374a1b6 100644
--- a/drivers/power/domain/power-domain-uclass.c
+++ b/drivers/power/domain/power-domain-uclass.c
@@ -9,8 +9,6 @@
#include <power-domain.h>
#include <power-domain-uclass.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static inline struct power_domain_ops *power_domain_dev_ops(struct udevice *dev)
{
return (struct power_domain_ops *)dev->driver->ops;
diff --git a/drivers/power/pmic/act8846.c b/drivers/power/pmic/act8846.c
index 7d107f4427..c233ac08b1 100644
--- a/drivers/power/pmic/act8846.c
+++ b/drivers/power/pmic/act8846.c
@@ -13,8 +13,6 @@
#include <power/act8846_pmic.h>
#include <power/pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "REG", .driver = "act8846_reg"},
{ },
diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c
index 38a2a04f17..c58ebb8825 100644
--- a/drivers/power/pmic/i2c_pmic_emul.c
+++ b/drivers/power/pmic/i2c_pmic_emul.c
@@ -12,8 +12,6 @@
#include <power/pmic.h>
#include <power/sandbox_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* struct sandbox_i2c_pmic_plat_data - platform data for the PMIC
*
diff --git a/drivers/power/pmic/lp873x.c b/drivers/power/pmic/lp873x.c
index 95c2b7e8c7..ec7b9bf29f 100644
--- a/drivers/power/pmic/lp873x.c
+++ b/drivers/power/pmic/lp873x.c
@@ -15,8 +15,6 @@
#include <power/lp873x.h>
#include <dm/device.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "ldo", .driver = LP873X_LDO_DRIVER },
{ .prefix = "buck", .driver = LP873X_BUCK_DRIVER },
diff --git a/drivers/power/pmic/lp87565.c b/drivers/power/pmic/lp87565.c
index 506769e362..7c02f38ed8 100644
--- a/drivers/power/pmic/lp87565.c
+++ b/drivers/power/pmic/lp87565.c
@@ -15,8 +15,6 @@
#include <power/lp87565.h>
#include <dm/device.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "buck", .driver = LP87565_BUCK_DRIVER },
{ },
diff --git a/drivers/power/pmic/max77686.c b/drivers/power/pmic/max77686.c
index b3ed84992f..f4e0f7034d 100644
--- a/drivers/power/pmic/max77686.c
+++ b/drivers/power/pmic/max77686.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/max77686_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "LDO", .driver = MAX77686_LDO_DRIVER },
{ .prefix = "BUCK", .driver = MAX77686_BUCK_DRIVER },
diff --git a/drivers/power/pmic/max8997.c b/drivers/power/pmic/max8997.c
index 5ebeb8a316..66c1c15a2d 100644
--- a/drivers/power/pmic/max8997.c
+++ b/drivers/power/pmic/max8997.c
@@ -12,8 +12,6 @@
#include <power/max8997_pmic.h>
#include <errno.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int max8997_reg_count(struct udevice *dev)
{
return PMIC_NUM_OF_REGS;
diff --git a/drivers/power/pmic/max8998.c b/drivers/power/pmic/max8998.c
index a7e04699e8..8dd7e4886a 100644
--- a/drivers/power/pmic/max8998.c
+++ b/drivers/power/pmic/max8998.c
@@ -12,8 +12,6 @@
#include <power/pmic.h>
#include <power/max8998_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int max8998_reg_count(struct udevice *dev)
{
return PMIC_NUM_OF_REGS;
diff --git a/drivers/power/pmic/palmas.c b/drivers/power/pmic/palmas.c
index 1e1ecb382e..7e3b25d2c7 100644
--- a/drivers/power/pmic/palmas.c
+++ b/drivers/power/pmic/palmas.c
@@ -15,8 +15,6 @@
#include <power/palmas.h>
#include <dm/device.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "ldo", .driver = PALMAS_LDO_DRIVER },
{ .prefix = "smps", .driver = PALMAS_SMPS_DRIVER },
diff --git a/drivers/power/pmic/pfuze100.c b/drivers/power/pmic/pfuze100.c
index a06cbc07d4..32b8f71c3e 100644
--- a/drivers/power/pmic/pfuze100.c
+++ b/drivers/power/pmic/pfuze100.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/pfuze100_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
/* sw[x], swbst */
{ .prefix = "s", .driver = PFUZE100_REGULATOR_DRIVER },
diff --git a/drivers/power/pmic/pm8916.c b/drivers/power/pmic/pm8916.c
index a048bbe7ce..cd7c906148 100644
--- a/drivers/power/pmic/pm8916.c
+++ b/drivers/power/pmic/pm8916.c
@@ -10,8 +10,6 @@
#include <power/pmic.h>
#include <spmi/spmi.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define PID_SHIFT 8
#define PID_MASK (0xFF << PID_SHIFT)
#define REG_MASK 0xFF
diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c
index 9347b40688..5e8f6d6190 100644
--- a/drivers/power/pmic/pmic-uclass.c
+++ b/drivers/power/pmic/pmic-uclass.c
@@ -16,8 +16,6 @@
#include <power/pmic.h>
#include <linux/ctype.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#if CONFIG_IS_ENABLED(PMIC_CHILDREN)
int pmic_bind_children(struct udevice *pmic, ofnode parent,
const struct pmic_child_info *child_info)
diff --git a/drivers/power/pmic/pmic_tps65910_dm.c b/drivers/power/pmic/pmic_tps65910_dm.c
index c65f38f107..b0d0c5e944 100644
--- a/drivers/power/pmic/pmic_tps65910_dm.c
+++ b/drivers/power/pmic/pmic_tps65910_dm.c
@@ -11,8 +11,6 @@
#include <power/regulator.h>
#include <power/tps65910_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "ldo_", .driver = TPS65910_LDO_DRIVER },
{ .prefix = "buck_", .driver = TPS65910_BUCK_DRIVER },
diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c
index 735046dc43..c83c8cf7bb 100644
--- a/drivers/power/pmic/rk8xx.c
+++ b/drivers/power/pmic/rk8xx.c
@@ -11,8 +11,6 @@
#include <power/rk8xx_pmic.h>
#include <power/pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "DCDC_REG", .driver = "rk8xx_buck"},
{ .prefix = "LDO_REG", .driver = "rk8xx_ldo"},
diff --git a/drivers/power/pmic/s2mps11.c b/drivers/power/pmic/s2mps11.c
index 3f9525b67d..13b3f908a4 100644
--- a/drivers/power/pmic/s2mps11.c
+++ b/drivers/power/pmic/s2mps11.c
@@ -13,8 +13,6 @@
#include <power/pmic.h>
#include <power/s2mps11.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = S2MPS11_OF_LDO_PREFIX, .driver = S2MPS11_LDO_DRIVER },
{ .prefix = S2MPS11_OF_BUCK_PREFIX, .driver = S2MPS11_BUCK_DRIVER },
diff --git a/drivers/power/pmic/s5m8767.c b/drivers/power/pmic/s5m8767.c
index 3812e240ab..e3bf3a638f 100644
--- a/drivers/power/pmic/s5m8767.c
+++ b/drivers/power/pmic/s5m8767.c
@@ -13,8 +13,6 @@
#include <power/regulator.h>
#include <power/s5m8767.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "LDO", .driver = S5M8767_LDO_DRIVER },
{ .prefix = "BUCK", .driver = S5M8767_BUCK_DRIVER },
diff --git a/drivers/power/pmic/sandbox.c b/drivers/power/pmic/sandbox.c
index e8d6faca16..80209d3d91 100644
--- a/drivers/power/pmic/sandbox.c
+++ b/drivers/power/pmic/sandbox.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/sandbox_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = SANDBOX_OF_LDO_PREFIX, .driver = SANDBOX_LDO_DRIVER },
{ .prefix = SANDBOX_OF_BUCK_PREFIX, .driver = SANDBOX_BUCK_DRIVER },
diff --git a/drivers/power/pmic/tps65090.c b/drivers/power/pmic/tps65090.c
index ee5358bced..1b0fd991fa 100644
--- a/drivers/power/pmic/tps65090.c
+++ b/drivers/power/pmic/tps65090.c
@@ -13,8 +13,6 @@
#include <power/pmic.h>
#include <power/tps65090.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct pmic_child_info pmic_children_info[] = {
{ .prefix = "fet", .driver = TPS65090_FET_DRIVER },
{ },
diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c
index 97b4a98bf0..eec1914c1d 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -14,8 +14,6 @@
#include <power/pmic.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct fixed_regulator_platdata {
struct gpio_desc gpio; /* GPIO for regulator enable control */
unsigned int startup_delay_us;
diff --git a/drivers/power/regulator/lp873x_regulator.c b/drivers/power/regulator/lp873x_regulator.c
index 11371a7b8b..ba2dbd71d1 100644
--- a/drivers/power/regulator/lp873x_regulator.c
+++ b/drivers/power/regulator/lp873x_regulator.c
@@ -16,8 +16,6 @@
#include <power/regulator.h>
#include <power/lp873x.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const char lp873x_buck_ctrl[LP873X_BUCK_NUM] = {0x2, 0x4};
static const char lp873x_buck_volt[LP873X_BUCK_NUM] = {0x6, 0x7};
static const char lp873x_ldo_ctrl[LP873X_LDO_NUM] = {0x8, 0x9};
diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c
index d908f6d1fb..94f09f5994 100644
--- a/drivers/power/regulator/lp87565_regulator.c
+++ b/drivers/power/regulator/lp87565_regulator.c
@@ -16,8 +16,6 @@
#include <power/regulator.h>
#include <power/lp87565.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const char lp87565_buck_ctrl1[LP87565_BUCK_NUM] = {0x2, 0x4, 0x6, 0x8, 0x2, 0x6};
static const char lp87565_buck_vout[LP87565_BUCK_NUM] = {0xA, 0xC, 0xE, 0x10, 0xA, 0xE };
diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c
index 2212d36ed6..6e4ac02036 100644
--- a/drivers/power/regulator/max77686.c
+++ b/drivers/power/regulator/max77686.c
@@ -16,8 +16,6 @@
#include <power/regulator.h>
#include <power/max77686_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MODE(_id, _val, _name) { \
.id = _id, \
.register_value = _val, \
diff --git a/drivers/power/regulator/palmas_regulator.c b/drivers/power/regulator/palmas_regulator.c
index 24a7977236..45c006c5b7 100644
--- a/drivers/power/regulator/palmas_regulator.c
+++ b/drivers/power/regulator/palmas_regulator.c
@@ -16,8 +16,6 @@
#include <power/regulator.h>
#include <power/palmas.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define REGULATOR_ON 0x1
#define REGULATOR_OFF 0x0
diff --git a/drivers/power/regulator/pbias_regulator.c b/drivers/power/regulator/pbias_regulator.c
index adf589b224..1e042ad712 100644
--- a/drivers/power/regulator/pbias_regulator.c
+++ b/drivers/power/regulator/pbias_regulator.c
@@ -16,8 +16,6 @@
#include <linux/ioport.h>
#include <dm/read.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct pbias_reg_info {
u32 enable;
u32 enable_mask;
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index 426a933d66..b9e2d20e32 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -12,8 +12,6 @@
#include <power/pmic.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int regulator_mode(struct udevice *dev, struct dm_regulator_mode **modep)
{
struct dm_regulator_uclass_platdata *uc_pdata;
diff --git a/drivers/power/regulator/s2mps11_regulator.c b/drivers/power/regulator/s2mps11_regulator.c
index 3af20e60dd..477f0f6225 100644
--- a/drivers/power/regulator/s2mps11_regulator.c
+++ b/drivers/power/regulator/s2mps11_regulator.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/s2mps11.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MODE(_id, _val, _name) { \
.id = _id, \
.register_value = _val, \
diff --git a/drivers/power/regulator/s5m8767.c b/drivers/power/regulator/s5m8767.c
index 871da122b4..89ad587610 100644
--- a/drivers/power/regulator/s5m8767.c
+++ b/drivers/power/regulator/s5m8767.c
@@ -13,8 +13,6 @@
#include <power/regulator.h>
#include <power/s5m8767.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const struct sec_voltage_desc buck_v1 = {
.max = 2225000,
.min = 650000,
diff --git a/drivers/power/regulator/sandbox.c b/drivers/power/regulator/sandbox.c
index f980a17389..ab30c50fcc 100644
--- a/drivers/power/regulator/sandbox.c
+++ b/drivers/power/regulator/sandbox.c
@@ -14,8 +14,6 @@
#include <power/regulator.h>
#include <power/sandbox_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MODE(_id, _val, _name) [_id] = { \
.id = _id, \
.register_value = _val, \
diff --git a/drivers/pwm/exynos_pwm.c b/drivers/pwm/exynos_pwm.c
index 9520a14387..127575263a 100644
--- a/drivers/pwm/exynos_pwm.c
+++ b/drivers/pwm/exynos_pwm.c
@@ -12,8 +12,6 @@
#include <asm/arch/clock.h>
#include <asm/arch/pwm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct exynos_pwm_priv {
struct s5p_timer *regs;
};
diff --git a/drivers/pwm/rk_pwm.c b/drivers/pwm/rk_pwm.c
index 7d3e11d667..4c1ee6739e 100644
--- a/drivers/pwm/rk_pwm.c
+++ b/drivers/pwm/rk_pwm.c
@@ -16,8 +16,6 @@
#include <asm/arch/pwm.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct rk_pwm_priv {
struct rk3288_pwm *regs;
ulong freq;
diff --git a/drivers/pwm/sandbox_pwm.c b/drivers/pwm/sandbox_pwm.c
index fcb1084551..48f169842b 100644
--- a/drivers/pwm/sandbox_pwm.c
+++ b/drivers/pwm/sandbox_pwm.c
@@ -11,8 +11,6 @@
#include <pwm.h>
#include <asm/test.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
NUM_CHANNELS = 3,
};
diff --git a/drivers/pwm/tegra_pwm.c b/drivers/pwm/tegra_pwm.c
index b8acc1583f..2119e1d568 100644
--- a/drivers/pwm/tegra_pwm.c
+++ b/drivers/pwm/tegra_pwm.c
@@ -11,8 +11,6 @@
#include <asm/arch/clock.h>
#include <asm/arch/pwm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct tegra_pwm_priv {
struct pwm_ctlr *regs;
};
diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c
index bfcb1ddefe..6cd2f16cf2 100644
--- a/drivers/ram/rockchip/dmc-rk3368.c
+++ b/drivers/ram/rockchip/dmc-rk3368.c
@@ -20,8 +20,6 @@
#include <asm/arch/sdram.h>
#include <asm/arch/sdram_common.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct dram_info {
struct ram_info info;
struct clk ddr_clk;
diff --git a/drivers/ram/rockchip/sdram_rk3128.c b/drivers/ram/rockchip/sdram_rk3128.c
index a33127f4b0..eec1ebaabe 100644
--- a/drivers/ram/rockchip/sdram_rk3128.c
+++ b/drivers/ram/rockchip/sdram_rk3128.c
@@ -12,7 +12,6 @@
#include <asm/arch/grf_rk3128.h>
#include <asm/arch/sdram_common.h>
-DECLARE_GLOBAL_DATA_PTR;
struct dram_info {
struct ram_info info;
struct rk3128_grf *grf;
diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
index 365d00ef54..0bc05ba9dc 100644
--- a/drivers/ram/rockchip/sdram_rk3188.c
+++ b/drivers/ram/rockchip/sdram_rk3188.c
@@ -25,8 +25,6 @@
#include <asm/arch/sdram_common.h>
#include <linux/err.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct chan_info {
struct rk3288_ddr_pctl *pctl;
struct rk3288_ddr_publ *publ;
diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c
index 95efb117fc..d99bf12476 100644
--- a/drivers/ram/rockchip/sdram_rk3288.c
+++ b/drivers/ram/rockchip/sdram_rk3288.c
@@ -27,8 +27,6 @@
#include <power/regulator.h>
#include <power/rk8xx_pmic.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct chan_info {
struct rk3288_ddr_pctl *pctl;
struct rk3288_ddr_publ *publ;
diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c
index 9637a35e23..292903ae1f 100644
--- a/drivers/ram/rockchip/sdram_rk3328.c
+++ b/drivers/ram/rockchip/sdram_rk3328.c
@@ -12,7 +12,6 @@
#include <asm/arch/grf_rk3328.h>
#include <asm/arch/sdram_common.h>
-DECLARE_GLOBAL_DATA_PTR;
struct dram_info {
struct ram_info info;
struct rk3328_grf_regs *grf;
diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index 5cb470c209..65191c69b8 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -23,7 +23,6 @@
#include <linux/err.h>
#include <time.h>
-DECLARE_GLOBAL_DATA_PTR;
struct chan_info {
struct rk3399_ddr_pctl_regs *pctl;
struct rk3399_ddr_pi_regs *pi;
diff --git a/drivers/ram/stm32_sdram.c b/drivers/ram/stm32_sdram.c
index ec2edd67dd..62282c6138 100644
--- a/drivers/ram/stm32_sdram.c
+++ b/drivers/ram/stm32_sdram.c
@@ -14,8 +14,6 @@
#define MEM_MODE_MASK GENMASK(2, 0)
#define NOT_FOUND 0xff
-DECLARE_GLOBAL_DATA_PTR;
-
struct stm32_fmc_regs {
/* 0x0 */
u32 bcr1; /* NOR/PSRAM Chip select control register 1 */
diff --git a/drivers/ram/stm32mp1/stm32mp1_ram.c b/drivers/ram/stm32mp1/stm32mp1_ram.c
index 9599444650..4dc84d0e29 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ram.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ram.c
@@ -13,8 +13,6 @@
#include <asm/io.h>
#include "stm32mp1_ddr.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static const char *const clkname[] = {
"ddrc1",
"ddrc2",
diff --git a/drivers/reset/ast2500-reset.c b/drivers/reset/ast2500-reset.c
index b2c89e1f1e..36d32469ad 100644
--- a/drivers/reset/ast2500-reset.c
+++ b/drivers/reset/ast2500-reset.c
@@ -14,8 +14,6 @@
#include <asm/arch/scu_ast2500.h>
#include <asm/arch/wdt.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct ast2500_reset_priv {
/* WDT used to perform resets. */
struct udevice *wdt;
diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c
index fa4f6538ed..05879c6ada 100644
--- a/drivers/reset/reset-uclass.c
+++ b/drivers/reset/reset-uclass.c
@@ -10,8 +10,6 @@
#include <reset.h>
#include <reset-uclass.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static inline struct reset_ops *reset_dev_ops(struct udevice *dev)
{
return (struct reset_ops *)dev->driver->ops;
diff --git a/drivers/rtc/i2c_rtc_emul.c b/drivers/rtc/i2c_rtc_emul.c
index 0e06c97367..2e69a5b957 100644
--- a/drivers/rtc/i2c_rtc_emul.c
+++ b/drivers/rtc/i2c_rtc_emul.c
@@ -28,8 +28,6 @@
#define debug_buffer(x, ...)
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* struct sandbox_i2c_rtc_plat_data - platform data for the RTC
*
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 3d5b2bf15f..4be8868536 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -454,6 +454,13 @@ config BCM6345_SERIAL
help
Select this to enable UART on BCM6345 SoCs.
+config FSL_LINFLEXUART
+ bool "Freescale Linflex UART support"
+ depends on DM_SERIAL
+ help
+ Select this to enable the Linflex serial module found on some
+ NXP SoCs like S32V234.
+
config FSL_LPUART
bool "Freescale LPUART support"
help
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index 4a6e60f87e..b18300e616 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -11,8 +11,6 @@
#include <serial.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* data register */
#define ALTERA_JTAG_RVALID BIT(15) /* Read valid */
diff --git a/drivers/serial/lpc32xx_hsuart.c b/drivers/serial/lpc32xx_hsuart.c
index b42537529d..1d3e928bb1 100644
--- a/drivers/serial/lpc32xx_hsuart.c
+++ b/drivers/serial/lpc32xx_hsuart.c
@@ -12,8 +12,6 @@
#include <asm/arch/uart.h>
#include <linux/compiler.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct lpc32xx_hsuart_priv {
struct hsuart_regs *hsuart;
};
diff --git a/drivers/serial/serial_linflexuart.c b/drivers/serial/serial_linflexuart.c
index fbb39592d6..b706fdb398 100644
--- a/drivers/serial/serial_linflexuart.c
+++ b/drivers/serial/serial_linflexuart.c
@@ -35,10 +35,6 @@
DECLARE_GLOBAL_DATA_PTR;
-#ifndef CONFIG_DM_SERIAL
-#error "The linflex serial driver does not have non-DM support."
-#endif
-
static void _linflex_serial_setbrg(struct linflex_fsl *base, int baudrate)
{
u32 clk = mxc_get_clock(MXC_UART_CLK);
diff --git a/drivers/serial/serial_meson.c b/drivers/serial/serial_meson.c
index 6412ca6496..a363cd9a1f 100644
--- a/drivers/serial/serial_meson.c
+++ b/drivers/serial/serial_meson.c
@@ -11,8 +11,6 @@
#include <linux/compiler.h>
#include <serial.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct meson_uart {
u32 wfifo;
u32 rfifo;
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index 286b954fdd..216a803a6e 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -13,8 +13,6 @@
#include <asm/arch/stm32.h>
#include "serial_stm32.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static int stm32_serial_setbrg(struct udevice *dev, int baudrate)
{
struct stm32x7_serial_platdata *plat = dev_get_platdata(dev);
@@ -45,10 +43,19 @@ static int stm32_serial_getc(struct udevice *dev)
struct stm32x7_serial_platdata *plat = dev_get_platdata(dev);
bool stm32f4 = plat->uart_info->stm32f4;
fdt_addr_t base = plat->base;
+ u32 isr = readl(base + ISR_OFFSET(stm32f4));
- if ((readl(base + ISR_OFFSET(stm32f4)) & USART_SR_FLAG_RXNE) == 0)
+ if ((isr & USART_ISR_FLAG_RXNE) == 0)
return -EAGAIN;
+ if (isr & USART_ISR_FLAG_ORE) {
+ if (!stm32f4)
+ setbits_le32(base + ICR_OFFSET, USART_ICR_OREF);
+ else
+ readl(base + RDR_OFFSET(stm32f4));
+ return -EIO;
+ }
+
return readl(base + RDR_OFFSET(stm32f4));
}
@@ -58,7 +65,7 @@ static int stm32_serial_putc(struct udevice *dev, const char c)
bool stm32f4 = plat->uart_info->stm32f4;
fdt_addr_t base = plat->base;
- if ((readl(base + ISR_OFFSET(stm32f4)) & USART_SR_FLAG_TXE) == 0)
+ if ((readl(base + ISR_OFFSET(stm32f4)) & USART_ISR_FLAG_TXE) == 0)
return -EAGAIN;
writel(c, base + TDR_OFFSET(stm32f4));
@@ -74,10 +81,10 @@ static int stm32_serial_pending(struct udevice *dev, bool input)
if (input)
return readl(base + ISR_OFFSET(stm32f4)) &
- USART_SR_FLAG_RXNE ? 1 : 0;
+ USART_ISR_FLAG_RXNE ? 1 : 0;
else
return readl(base + ISR_OFFSET(stm32f4)) &
- USART_SR_FLAG_TXE ? 0 : 1;
+ USART_ISR_FLAG_TXE ? 0 : 1;
}
static int stm32_serial_probe(struct udevice *dev)
@@ -109,11 +116,9 @@ static int stm32_serial_probe(struct udevice *dev)
return plat->clock_rate;
};
- /* Disable uart-> disable overrun-> enable uart */
+ /* Disable uart-> enable fifo-> enable uart */
clrbits_le32(base + CR1_OFFSET(stm32f4), USART_CR1_RE | USART_CR1_TE |
BIT(uart_enable_bit));
- if (plat->uart_info->has_overrun_disable)
- setbits_le32(base + CR3_OFFSET(stm32f4), USART_CR3_OVRDIS);
if (plat->uart_info->has_fifo)
setbits_le32(base + CR1_OFFSET(stm32f4), USART_CR1_FIFOEN);
setbits_le32(base + CR1_OFFSET(stm32f4), USART_CR1_RE | USART_CR1_TE |
diff --git a/drivers/serial/serial_stm32.h b/drivers/serial/serial_stm32.h
index d08ba1f55f..6ebec0acac 100644
--- a/drivers/serial/serial_stm32.h
+++ b/drivers/serial/serial_stm32.h
@@ -12,6 +12,8 @@
#define CR3_OFFSET(x) (x ? 0x14 : 0x08)
#define BRR_OFFSET(x) (x ? 0x08 : 0x0c)
#define ISR_OFFSET(x) (x ? 0x00 : 0x1c)
+
+#define ICR_OFFSET 0x20
/*
* STM32F4 has one Data Register (DR) for received or transmitted
* data, so map Receive Data Register (RDR) and Transmit Data
@@ -23,28 +25,24 @@
struct stm32_uart_info {
u8 uart_enable_bit; /* UART_CR1_UE */
bool stm32f4; /* true for STM32F4, false otherwise */
- bool has_overrun_disable;
bool has_fifo;
};
struct stm32_uart_info stm32f4_info = {
.stm32f4 = true,
.uart_enable_bit = 13,
- .has_overrun_disable = false,
.has_fifo = false,
};
struct stm32_uart_info stm32f7_info = {
.uart_enable_bit = 0,
.stm32f4 = false,
- .has_overrun_disable = true,
.has_fifo = false,
};
struct stm32_uart_info stm32h7_info = {
.uart_enable_bit = 0,
.stm32f4 = false,
- .has_overrun_disable = true,
.has_fifo = true,
};
@@ -62,11 +60,13 @@ struct stm32x7_serial_platdata {
#define USART_CR3_OVRDIS BIT(12)
-#define USART_SR_FLAG_RXNE BIT(5)
-#define USART_SR_FLAG_TXE BIT(7)
+#define USART_ISR_FLAG_ORE BIT(3)
+#define USART_ISR_FLAG_RXNE BIT(5)
+#define USART_ISR_FLAG_TXE BIT(7)
#define USART_BRR_F_MASK GENMASK(7, 0)
#define USART_BRR_M_SHIFT 4
#define USART_BRR_M_MASK GENMASK(15, 4)
+#define USART_ICR_OREF BIT(3)
#endif
diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index fedd2a9df5..ec828e6784 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -15,8 +15,6 @@
#include <linux/compiler.h>
#include <serial.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define SR_TX_FIFO_FULL BIT(3) /* transmit FIFO full */
#define SR_TX_FIFO_EMPTY BIT(2) /* transmit FIFO empty */
#define SR_RX_FIFO_VALID_DATA BIT(0) /* data in receive FIFO */
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
index 4e86e5c2a1..68c5c8541d 100644
--- a/drivers/serial/serial_zynq.c
+++ b/drivers/serial/serial_zynq.c
@@ -17,8 +17,6 @@
#include <serial.h>
#include <asm/arch/hardware.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define ZYNQ_UART_SR_TXEMPTY (1 << 3) /* TX FIFO empty */
#define ZYNQ_UART_SR_TXACTIVE (1 << 11) /* TX active */
#define ZYNQ_UART_SR_RXEMPTY 0x00000002 /* RX FIFO empty */
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index ec92b84ed2..6667f7321f 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -1,4 +1,7 @@
-menu "SPI Support"
+menuconfig SPI
+ bool "SPI Support"
+
+if SPI
config DM_SPI
bool "Enable Driver Model for SPI drivers"
@@ -312,4 +315,4 @@ config OMAP3_SPI
(McSPI). This driver be used to access SPI chips on platforms
embedding this OMAP3 McSPI IP core.
-endmenu # menu "SPI Support"
+endif # menu "SPI Support"
diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c
index c8dcb82150..f729347ee2 100644
--- a/drivers/spi/altera_spi.c
+++ b/drivers/spi/altera_spi.c
@@ -15,8 +15,6 @@
#include <spi.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define ALTERA_SPI_STATUS_RRDY_MSK BIT(7)
#define ALTERA_SPI_CONTROL_SSO_MSK BIT(10)
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 3cdfd366ab..445d8652f9 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -24,8 +24,6 @@
#include "atmel_spi.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_DM_SPI
static int spi_has_wdrbt(struct atmel_spi_slave *slave)
diff --git a/drivers/spi/cf_spi.c b/drivers/spi/cf_spi.c
index 7be9427781..68317ed633 100644
--- a/drivers/spi/cf_spi.c
+++ b/drivers/spi/cf_spi.c
@@ -288,14 +288,6 @@ int spi_cs_is_valid(unsigned int bus, unsigned int cs)
return 0;
}
-void spi_init_f(void)
-{
-}
-
-void spi_init_r(void)
-{
-}
-
void spi_init(void)
{
cfspi_init();
diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c
index 0e93b62eee..5e2d290ddc 100644
--- a/drivers/spi/designware_spi.c
+++ b/drivers/spi/designware_spi.c
@@ -425,7 +425,7 @@ static int dw_spi_xfer(struct udevice *dev, unsigned int bitlen,
* in the beginning of new transfer.
*/
if (readl_poll_timeout(priv->regs + DW_SPI_SR, val,
- !(val & SR_TF_EMPT) || (val & SR_BUSY),
+ (val & SR_TF_EMPT) && !(val & SR_BUSY),
RX_TIMEOUT * 1000)) {
ret = -ETIMEDOUT;
}
diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c
index 42086197d9..41d1ba2fa5 100644
--- a/drivers/spi/fsl_dspi.c
+++ b/drivers/spi/fsl_dspi.c
@@ -396,16 +396,6 @@ void spi_init(void)
/* Nothing to do */
}
-void spi_init_f(void)
-{
- /* Nothing to do */
-}
-
-void spi_init_r(void)
-{
- /* Nothing to do */
-}
-
int spi_cs_is_valid(unsigned int bus, unsigned int cs)
{
if (((cs >= 0) && (cs < 8)) && ((bus >= 0) && (bus < 8)))
diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c
index 03d3fa6763..71a665ecd4 100644
--- a/drivers/spi/rk_spi.c
+++ b/drivers/spi/rk_spi.c
@@ -22,8 +22,6 @@
#include <dm/pinctrl.h>
#include "rk_spi.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/* Change to 1 to output registers at the start of each transaction */
#define DEBUG_RK_SPI 0
diff --git a/drivers/spi/sandbox_spi.c b/drivers/spi/sandbox_spi.c
index 092b13b00b..75ba6a1ed7 100644
--- a/drivers/spi/sandbox_spi.c
+++ b/drivers/spi/sandbox_spi.c
@@ -20,8 +20,6 @@
#include <asm/state.h>
#include <dm/device-internal.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_SPI_IDLE_VAL
# define CONFIG_SPI_IDLE_VAL 0xFF
#endif
diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra114_spi.c
index 04b4fce061..faf609bba5 100644
--- a/drivers/spi/tegra114_spi.c
+++ b/drivers/spi/tegra114_spi.c
@@ -14,8 +14,6 @@
#include <spi.h>
#include "tegra_spi.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/* COMMAND1 */
#define SPI_CMD1_GO BIT(31)
#define SPI_CMD1_M_S BIT(30)
diff --git a/drivers/spmi/spmi-sandbox.c b/drivers/spmi/spmi-sandbox.c
index 980aff2063..a938e50d22 100644
--- a/drivers/spmi/spmi-sandbox.c
+++ b/drivers/spmi/spmi-sandbox.c
@@ -15,8 +15,6 @@
#include <asm/gpio.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define EMUL_GPIO_PID_START 0xC0
#define EMUL_GPIO_PID_END 0xC3
diff --git a/drivers/spmi/spmi-uclass.c b/drivers/spmi/spmi-uclass.c
index 6edece23d8..e74cd79961 100644
--- a/drivers/spmi/spmi-uclass.c
+++ b/drivers/spmi/spmi-uclass.c
@@ -12,8 +12,6 @@
#include <spmi/spmi.h>
#include <linux/ctype.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int spmi_reg_read(struct udevice *dev, int usid, int pid, int reg)
{
const struct dm_spmi_ops *ops = dev_get_driver_ops(dev);
diff --git a/drivers/sysreset/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c
index 12b3e5f86e..207cc282f1 100644
--- a/drivers/sysreset/sysreset_sandbox.c
+++ b/drivers/sysreset/sysreset_sandbox.c
@@ -12,8 +12,6 @@
#include <asm/state.h>
#include <asm/test.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int sandbox_warm_sysreset_request(struct udevice *dev,
enum sysreset_t type)
{
diff --git a/drivers/timer/ag101p_timer.c b/drivers/timer/ag101p_timer.c
index 8dc85c4183..f9ff5c15b4 100644
--- a/drivers/timer/ag101p_timer.c
+++ b/drivers/timer/ag101p_timer.c
@@ -12,8 +12,6 @@
#include <timer.h>
#include <linux/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Timer Control Register
*/
diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c
index 1ba85c4399..f80debb2d7 100644
--- a/drivers/timer/altera_timer.c
+++ b/drivers/timer/altera_timer.c
@@ -14,8 +14,6 @@
#include <timer.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* control register */
#define ALTERA_TIMER_CONT BIT(1) /* Continuous mode */
#define ALTERA_TIMER_START BIT(2) /* Start timer */
diff --git a/drivers/timer/ast_timer.c b/drivers/timer/ast_timer.c
index e194c50f4a..ab1e4af79f 100644
--- a/drivers/timer/ast_timer.c
+++ b/drivers/timer/ast_timer.c
@@ -11,8 +11,6 @@
#include <asm/io.h>
#include <asm/arch/timer.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define AST_TICK_TIMER 1
#define AST_TMC_RELOAD_VAL 0xffffffff
diff --git a/drivers/timer/atcpit100_timer.c b/drivers/timer/atcpit100_timer.c
index 963f978d20..4322921b71 100644
--- a/drivers/timer/atcpit100_timer.c
+++ b/drivers/timer/atcpit100_timer.c
@@ -12,8 +12,6 @@
#include <timer.h>
#include <linux/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define REG32_TMR(x) (*(u32 *) ((plat->regs) + (x>>2)))
/*
diff --git a/drivers/timer/omap-timer.c b/drivers/timer/omap-timer.c
index 4cc6105505..051c69081e 100644
--- a/drivers/timer/omap-timer.c
+++ b/drivers/timer/omap-timer.c
@@ -13,8 +13,6 @@
#include <asm/io.h>
#include <asm/arch/clock.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Timer register bits */
#define TCLR_START BIT(0) /* Start=1 */
#define TCLR_AUTO_RELOAD BIT(1) /* Auto reload */
diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c
index 07d14482d6..b847bc40c4 100644
--- a/drivers/timer/rockchip_timer.c
+++ b/drivers/timer/rockchip_timer.c
@@ -152,6 +152,8 @@ static const struct timer_ops rockchip_timer_ops = {
};
static const struct udevice_id rockchip_timer_ids[] = {
+ { .compatible = "rockchip,rk3188-timer" },
+ { .compatible = "rockchip,rk3288-timer" },
{ .compatible = "rockchip,rk3368-timer" },
{}
};
diff --git a/drivers/tpm/tpm_tis_infineon.c b/drivers/tpm/tpm_tis_infineon.c
index 41b748e7a2..f740c78052 100644
--- a/drivers/tpm/tpm_tis_infineon.c
+++ b/drivers/tpm/tpm_tis_infineon.c
@@ -33,8 +33,6 @@
#include "tpm_tis.h"
#include "tpm_internal.h"
-DECLARE_GLOBAL_DATA_PTR;
-
enum i2c_chip_type {
SLB9635,
SLB9645,
diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c
index 2f84b360ec..dbece6ecf2 100644
--- a/drivers/usb/emul/sandbox_flash.c
+++ b/drivers/usb/emul/sandbox_flash.c
@@ -11,8 +11,6 @@
#include <scsi.h>
#include <usb.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* This driver emulates a flash stick using the UFI command specification and
* the BBB (bulk/bulk/bulk) protocol. It supports only a single logical unit
diff --git a/drivers/usb/emul/sandbox_hub.c b/drivers/usb/emul/sandbox_hub.c
index 9a0f47b81c..f5dda8123f 100644
--- a/drivers/usb/emul/sandbox_hub.c
+++ b/drivers/usb/emul/sandbox_hub.c
@@ -10,8 +10,6 @@
#include <usb.h>
#include <dm/device-internal.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* We only support up to 8 */
#define SANDBOX_NUM_PORTS 4
diff --git a/drivers/usb/emul/sandbox_keyb.c b/drivers/usb/emul/sandbox_keyb.c
index cff017668f..2fb67e7611 100644
--- a/drivers/usb/emul/sandbox_keyb.c
+++ b/drivers/usb/emul/sandbox_keyb.c
@@ -11,8 +11,6 @@
#include <scsi.h>
#include <usb.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* This driver emulates a USB keyboard using the USB HID specification (boot
* protocol)
diff --git a/drivers/usb/emul/usb-emul-uclass.c b/drivers/usb/emul/usb-emul-uclass.c
index fbe11f3135..01ae6dfce7 100644
--- a/drivers/usb/emul/usb-emul-uclass.c
+++ b/drivers/usb/emul/usb-emul-uclass.c
@@ -10,8 +10,6 @@
#include <usb.h>
#include <dm/device-internal.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int copy_to_unicode(char *buff, int length, const char *str)
{
int ptr;
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index d0ee7847b9..a87639def9 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -838,6 +838,9 @@ unknown:
ctrl->bRequestType, ctrl->bRequest,
w_value, w_index, w_length);
+ if (!cdev->config)
+ goto done;
+
/*
* functions always handle their interfaces and endpoints...
* punt other recipients (other, WUSB, ...) to the current
@@ -882,7 +885,7 @@ unknown:
value = f->setup(f, ctrl);
else {
c = cdev->config;
- if (c && c->setup)
+ if (c->setup)
value = c->setup(c, ctrl);
}
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index 4862ab0e7d..b63a630d37 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -19,8 +19,6 @@
#include "dwc2.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/* Use only HC channel 0. */
#define DWC2_HC_CHANNEL 0
diff --git a/drivers/usb/host/dwc3-of-simple.c b/drivers/usb/host/dwc3-of-simple.c
index 440dd1027d..9b122b18bc 100644
--- a/drivers/usb/host/dwc3-of-simple.c
+++ b/drivers/usb/host/dwc3-of-simple.c
@@ -17,8 +17,6 @@
#include <reset.h>
#include <clk.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct dwc3_of_simple {
struct clk_bulk clks;
struct reset_ctl_bulk resets;
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index f6c6b019ca..f912510a21 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -15,8 +15,6 @@
#include "ehci.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_DM_USB
int ehci_hcd_init(int index, enum usb_init_type init,
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index f317cf00ea..f07a287dd4 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -20,8 +20,6 @@
#include "ehci.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define USB1_ADDR_MASK 0xFFFF0000
#define HOSTPC1_DEVLC 0x84
diff --git a/drivers/usb/host/usb-sandbox.c b/drivers/usb/host/usb-sandbox.c
index 15055b351a..1a35a00bff 100644
--- a/drivers/usb/host/usb-sandbox.c
+++ b/drivers/usb/host/usb-sandbox.c
@@ -10,8 +10,6 @@
#include <usb.h>
#include <dm/root.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct sandbox_usb_ctrl {
int rootdev;
};
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 4e40f4bc3d..fa7a4397e4 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -16,8 +16,6 @@
#include <dm/lists.h>
#include <dm/uclass-internal.h>
-DECLARE_GLOBAL_DATA_PTR;
-
extern bool usb_started; /* flag for the started/stopped USB status */
static bool asynch_allowed;
diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index c1007350b7..912190b8bc 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -19,8 +19,6 @@
#include <linux/usb/dwc3.h>
#include <linux/usb/otg.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct xhci_dwc3_platdata {
struct phy *usb_phys;
int num_phys;
@@ -113,16 +111,21 @@ void dwc3_set_fladj(struct dwc3 *dwc3_reg, u32 val)
}
#ifdef CONFIG_DM_USB
-static int xhci_dwc3_setup_phy(struct udevice *dev, int count)
+static int xhci_dwc3_setup_phy(struct udevice *dev)
{
struct xhci_dwc3_platdata *plat = dev_get_platdata(dev);
- int i, ret;
+ int i, ret, count;
- if (!count)
+ /* Return if no phy declared */
+ if (!dev_read_prop(dev, "phys", NULL))
return 0;
+ count = dev_count_phandle_with_args(dev, "phys", "#phy-cells");
+ if (count <= 0)
+ return count;
+
plat->usb_phys = devm_kcalloc(dev, count, sizeof(struct phy),
- GFP_KERNEL);
+ GFP_KERNEL);
if (!plat->usb_phys)
return -ENOMEM;
@@ -136,7 +139,7 @@ static int xhci_dwc3_setup_phy(struct udevice *dev, int count)
++plat->num_phys;
}
-
+
for (i = 0; i < plat->num_phys; i++) {
ret = generic_phy_init(&plat->usb_phys[i]);
if (ret) {
@@ -145,7 +148,7 @@ static int xhci_dwc3_setup_phy(struct udevice *dev, int count)
goto phys_init_err;
}
}
-
+
for (i = 0; i < plat->num_phys; i++) {
ret = generic_phy_power_on(&plat->usb_phys[i]);
if (ret) {
@@ -157,7 +160,6 @@ static int xhci_dwc3_setup_phy(struct udevice *dev, int count)
return 0;
-
phys_poweron_err:
for (; i >= 0; i--)
generic_phy_power_off(&plat->usb_phys[i]);
@@ -187,7 +189,7 @@ static int xhci_dwc3_shutdown_phy(struct udevice *dev)
ret |= generic_phy_exit(&plat->usb_phys[i]);
if (ret) {
pr_err("Can't shutdown USB PHY%d for %s\n",
- i, dev->name);
+ i, dev->name);
}
}
@@ -206,8 +208,7 @@ static int xhci_dwc3_probe(struct udevice *dev)
hcor = (struct xhci_hcor *)((uintptr_t)hccr +
HC_LENGTH(xhci_readl(&(hccr)->cr_capbase)));
- ret = xhci_dwc3_setup_phy(dev, dev_count_phandle_with_args(
- dev, "phys", "#phy-cells"));
+ ret = xhci_dwc3_setup_phy(dev);
if (ret)
return ret;
diff --git a/drivers/usb/host/xhci-fsl.c b/drivers/usb/host/xhci-fsl.c
index f77c78d422..25b14a9a8d 100644
--- a/drivers/usb/host/xhci-fsl.c
+++ b/drivers/usb/host/xhci-fsl.c
@@ -20,8 +20,6 @@
#include <dm.h>
/* Declare global data pointer */
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_DM_USB
static struct fsl_xhci fsl_xhci;
unsigned long ctr_addr[] = FSL_USB_XHCI_ADDR;
diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c
index dbdfce38da..f51e677386 100644
--- a/drivers/usb/host/xhci-mvebu.c
+++ b/drivers/usb/host/xhci-mvebu.c
@@ -15,8 +15,6 @@
#include "xhci.h"
-DECLARE_GLOBAL_DATA_PTR;
-
struct mvebu_xhci_platdata {
fdt_addr_t hcd_base;
};
diff --git a/drivers/usb/host/xhci-omap.c b/drivers/usb/host/xhci-omap.c
index b814500bdb..d05b302807 100644
--- a/drivers/usb/host/xhci-omap.c
+++ b/drivers/usb/host/xhci-omap.c
@@ -23,8 +23,6 @@
#include "xhci.h"
/* Declare global data pointer */
-DECLARE_GLOBAL_DATA_PTR;
-
static struct omap_xhci omap;
static int omap_xhci_core_init(struct omap_xhci *omap)
diff --git a/drivers/usb/host/xhci-rockchip.c b/drivers/usb/host/xhci-rockchip.c
index b1f9884273..7f637d9237 100644
--- a/drivers/usb/host/xhci-rockchip.c
+++ b/drivers/usb/host/xhci-rockchip.c
@@ -16,8 +16,6 @@
#include "xhci.h"
-DECLARE_GLOBAL_DATA_PTR;
-
struct rockchip_xhci_platdata {
fdt_addr_t hcd_base;
fdt_addr_t phy_base;
diff --git a/drivers/usb/host/xhci-zynqmp.c b/drivers/usb/host/xhci-zynqmp.c
index cec1bc46d0..c57e9abbaf 100644
--- a/drivers/usb/host/xhci-zynqmp.c
+++ b/drivers/usb/host/xhci-zynqmp.c
@@ -19,8 +19,6 @@
#include "xhci.h"
/* Declare global data pointer */
-DECLARE_GLOBAL_DATA_PTR;
-
/* Default to the ZYNQMP XHCI defines */
#define USB3_PWRCTL_CLK_CMD_MASK 0x3FE000
#define USB3_PWRCTL_CLK_FREQ_MASK 0xFFC
diff --git a/drivers/usb/musb-new/Kconfig b/drivers/usb/musb-new/Kconfig
index ea5bae260e..f8f2205a62 100644
--- a/drivers/usb/musb-new/Kconfig
+++ b/drivers/usb/musb-new/Kconfig
@@ -5,12 +5,16 @@ comment "MUSB Controller Driver"
config USB_MUSB_HOST
bool "MUSB host mode support"
+ select SPL_SPRINTF if SPL
+ select TPL_SPRINTF if TPL
help
Enables the MUSB USB dual-role controller in host mode.
config USB_MUSB_GADGET
bool "MUSB gadget mode support"
select USB_GADGET_DUALSPEED
+ select SPL_SPRINTF if SPL
+ select TPL_SPRINTF if TPL
help
Enables the MUSB USB dual-role controller in gadget mode.
diff --git a/drivers/video/anx9804.c b/drivers/video/anx9804.c
index 3910458bf1..3910458bf1 100755..100644
--- a/drivers/video/anx9804.c
+++ b/drivers/video/anx9804.c
diff --git a/drivers/video/backlight_gpio.c b/drivers/video/backlight_gpio.c
index 772df5d302..acb6f1c1b8 100644
--- a/drivers/video/backlight_gpio.c
+++ b/drivers/video/backlight_gpio.c
@@ -10,8 +10,6 @@
#include <backlight.h>
#include <asm/gpio.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct gpio_backlight_priv {
struct gpio_desc gpio;
bool def_value;
diff --git a/drivers/video/bridge/anx6345.c b/drivers/video/bridge/anx6345.c
index 0a94affb9f..6f52d2f041 100644
--- a/drivers/video/bridge/anx6345.c
+++ b/drivers/video/bridge/anx6345.c
@@ -16,8 +16,6 @@
#define DP_MAX_LANE_COUNT 0x002
#define DP_MAX_LANE_COUNT_MASK 0x1f
-DECLARE_GLOBAL_DATA_PTR;
-
struct anx6345_priv {
u8 edid[EDID_SIZE];
};
diff --git a/drivers/video/exynos/exynos_dp_lowlevel.c b/drivers/video/exynos/exynos_dp_lowlevel.c
index f84dd7097f..3f9a0e12fc 100644
--- a/drivers/video/exynos/exynos_dp_lowlevel.c
+++ b/drivers/video/exynos/exynos_dp_lowlevel.c
@@ -17,8 +17,6 @@
#include "exynos_dp_lowlevel.h"
/* Declare global data pointer */
-DECLARE_GLOBAL_DATA_PTR;
-
static void exynos_dp_enable_video_input(struct exynos_dp *dp_regs,
unsigned int enable)
{
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index 78e595ea4a..fad027f064 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -344,8 +344,6 @@ union chan_param_mem {
struct chan_param_mem_interleaved ip;
};
-DECLARE_GLOBAL_DATA_PTR;
-
/* graphics setup */
static GraphicDevice panel;
static struct ctfb_res_modes *mode;
diff --git a/drivers/video/pwm_backlight.c b/drivers/video/pwm_backlight.c
index f40e57bb8e..28565a1e2c 100644
--- a/drivers/video/pwm_backlight.c
+++ b/drivers/video/pwm_backlight.c
@@ -12,8 +12,6 @@
#include <asm/gpio.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct pwm_backlight_priv {
struct udevice *reg;
struct gpio_desc enable;
diff --git a/drivers/video/rockchip/rk3288_mipi.c b/drivers/video/rockchip/rk3288_mipi.c
index a7fa9c5110..0a6f7e6b6d 100644
--- a/drivers/video/rockchip/rk3288_mipi.c
+++ b/drivers/video/rockchip/rk3288_mipi.c
@@ -24,8 +24,6 @@
#include <asm/arch/grf_rk3288.h>
#include <asm/arch/rockchip_mipi_dsi.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MHz 1000000
/* Select mipi dsi source, big or little vop */
diff --git a/drivers/video/rockchip/rk3399_mipi.c b/drivers/video/rockchip/rk3399_mipi.c
index b936fcec9b..c085d8b6a5 100644
--- a/drivers/video/rockchip/rk3399_mipi.c
+++ b/drivers/video/rockchip/rk3399_mipi.c
@@ -24,8 +24,6 @@
#include <asm/arch/grf_rk3399.h>
#include <asm/arch/rockchip_mipi_dsi.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Select mipi dsi source, big or little vop */
static int rk_mipi_dsi_source_select(struct udevice *dev)
{
diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c
index 1527f96eca..2ea7340e7f 100644
--- a/drivers/video/rockchip/rk_edp.c
+++ b/drivers/video/rockchip/rk_edp.c
@@ -20,8 +20,6 @@
#include <asm/arch/grf_rk3288.h>
#include <dt-bindings/clock/rk3288-cru.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MAX_CR_LOOP 5
#define MAX_EQ_LOOP 5
#define DP_LINK_STATUS_SIZE 6
diff --git a/drivers/video/simple_panel.c b/drivers/video/simple_panel.c
index c0ce199c6a..8824f47e2e 100644
--- a/drivers/video/simple_panel.c
+++ b/drivers/video/simple_panel.c
@@ -12,8 +12,6 @@
#include <asm/gpio.h>
#include <power/regulator.h>
-DECLARE_GLOBAL_DATA_PTR;
-
struct simple_panel_priv {
struct udevice *reg;
struct udevice *backlight;
diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c
index 4164fa1bd9..0c6882cc51 100644
--- a/drivers/video/tegra124/display.c
+++ b/drivers/video/tegra124/display.c
@@ -22,8 +22,6 @@
#include <dm/uclass-internal.h>
#include "displayport.h"
-DECLARE_GLOBAL_DATA_PTR;
-
/* return in 1000ths of a Hertz */
static int tegra_dc_calc_refresh(const struct display_timing *timing)
{
diff --git a/drivers/video/tegra124/dp.c b/drivers/video/tegra124/dp.c
index 95d743d0f4..09e5aa75a2 100644
--- a/drivers/video/tegra124/dp.c
+++ b/drivers/video/tegra124/dp.c
@@ -18,8 +18,6 @@
#include "sor.h"
#include "displayport.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define DO_FAST_LINK_TRAINING 1
struct tegra_dp_plat {
diff --git a/drivers/video/tegra124/sor.c b/drivers/video/tegra124/sor.c
index 700ab25d46..a91643a21a 100644
--- a/drivers/video/tegra124/sor.c
+++ b/drivers/video/tegra124/sor.c
@@ -17,8 +17,6 @@
#include "displayport.h"
#include "sor.h"
-DECLARE_GLOBAL_DATA_PTR;
-
#define DEBUG_SOR 0
#define APBDEV_PMC_DPD_SAMPLE 0x20
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index b5bb8e0efd..93fdc6828b 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -272,7 +272,7 @@ static int video_post_bind(struct udevice *dev)
ulong size;
/* Before relocation there is nothing to do here */
- if ((!gd->flags & GD_FLG_RELOC))
+ if (!(gd->flags & GD_FLG_RELOC))
return 0;
size = alloc_fb(dev, &addr);
if (addr < gd->video_bottom) {
diff --git a/drivers/watchdog/ast_wdt.c b/drivers/watchdog/ast_wdt.c
index aab077e3d1..3539844840 100644
--- a/drivers/watchdog/ast_wdt.c
+++ b/drivers/watchdog/ast_wdt.c
@@ -14,8 +14,6 @@
#define WDT_AST2500 2500
#define WDT_AST2400 2400
-DECLARE_GLOBAL_DATA_PTR;
-
struct ast_wdt_priv {
struct ast_wdt *regs;
};
diff --git a/drivers/watchdog/cdns_wdt.c b/drivers/watchdog/cdns_wdt.c
index 71733cf8ba..c43f7e8096 100644
--- a/drivers/watchdog/cdns_wdt.c
+++ b/drivers/watchdog/cdns_wdt.c
@@ -25,7 +25,6 @@ struct cdns_regs {
struct cdns_wdt_priv {
bool rst;
u32 timeout;
- void __iomem *reg;
struct cdns_regs *regs;
};
@@ -224,12 +223,8 @@ static int cdns_wdt_stop(struct udevice *dev)
*/
static int cdns_wdt_probe(struct udevice *dev)
{
- struct cdns_wdt_priv *priv = dev_get_priv(dev);
-
debug("%s: Probing wdt%u\n", __func__, dev->seq);
- priv->reg = ioremap((u32)priv->regs, sizeof(struct cdns_regs));
-
cdns_wdt_stop(dev);
return 0;
diff --git a/drivers/watchdog/mpc8xx_wdt.c b/drivers/watchdog/mpc8xx_wdt.c
index ded80c4d6a..5d2b624e00 100644
--- a/drivers/watchdog/mpc8xx_wdt.c
+++ b/drivers/watchdog/mpc8xx_wdt.c
@@ -9,8 +9,6 @@
#include <asm/cpm_8xx.h>
#include <asm/io.h>
-DECLARE_GLOBAL_DATA_PTR;
-
void hw_watchdog_reset(void)
{
immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
diff --git a/drivers/watchdog/sandbox_wdt.c b/drivers/watchdog/sandbox_wdt.c
index 02b57f3986..5ec32b25d6 100644
--- a/drivers/watchdog/sandbox_wdt.c
+++ b/drivers/watchdog/sandbox_wdt.c
@@ -9,8 +9,6 @@
#include <wdt.h>
#include <asm/state.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int sandbox_wdt_start(struct udevice *dev, u64 timeout, ulong flags)
{
struct sandbox_state *state = state_get_current();
diff --git a/drivers/watchdog/ulp_wdog.c b/drivers/watchdog/ulp_wdog.c
index 72ec694cdd..17fe670ce4 100644
--- a/drivers/watchdog/ulp_wdog.c
+++ b/drivers/watchdog/ulp_wdog.c
@@ -40,8 +40,6 @@ struct wdog_regs {
#define WDG_32KHZ_CLK (0x2)
#define WDG_EXT_CLK (0x3)
-DECLARE_GLOBAL_DATA_PTR;
-
void hw_watchdog_set_timeout(u16 val)
{
/* setting timeout value */
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c
index 8a30f024fd..1eb5721d1a 100644
--- a/drivers/watchdog/wdt-uclass.c
+++ b/drivers/watchdog/wdt-uclass.c
@@ -11,8 +11,6 @@
#include <dm/device-internal.h>
#include <dm/lists.h>
-DECLARE_GLOBAL_DATA_PTR;
-
int wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags)
{
const struct wdt_ops *ops = device_get_ops(dev);
diff --git a/env/ext4.c b/env/ext4.c
index a2d32b9c8d..f4cb28570c 100644
--- a/env/ext4.c
+++ b/env/ext4.c
@@ -31,8 +31,6 @@
#include <ext4fs.h>
#include <mmc.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_CMD_SAVEENV
static int env_ext4_save(void)
{
diff --git a/env/fat.c b/env/fat.c
index 884eeb8c5f..befbc1efdd 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -31,8 +31,6 @@
# endif
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CMD_SAVEENV
static int env_fat_save(void)
{
diff --git a/env/sata.c b/env/sata.c
index 4bfe0119df..c3e530eb31 100644
--- a/env/sata.c
+++ b/env/sata.c
@@ -24,8 +24,6 @@
#error CONFIG_ENV_OFFSET or CONFIG_ENV_SIZE not defined
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
__weak int sata_get_env_dev(void)
{
return CONFIG_SYS_SATA_ENV_DEV;
diff --git a/include/common.h b/include/common.h
index 3087505270..795206aa0b 100644
--- a/include/common.h
+++ b/include/common.h
@@ -279,19 +279,11 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned c
#define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
#endif
-/*
- * Set this up regardless of board
- * type, to prevent errors.
- */
-#if defined(CONFIG_SPI) || !defined(CONFIG_SYS_I2C_EEPROM_ADDR)
-# define CONFIG_SYS_DEF_EEPROM_ADDR 0
-#else
-#if !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
+#if !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) && defined(CONFIG_SYS_I2C_EEPROM_ADDR)
# define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR
#endif
-#endif /* CONFIG_SPI || !defined(CONFIG_SYS_I2C_EEPROM_ADDR) */
-#if defined(CONFIG_SPI)
+#if defined(CONFIG_MPC8XX_SPI)
extern void spi_init_f (void);
extern void spi_init_r (void);
extern ssize_t spi_read (uchar *, int, uchar *, int);
diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h
index 23a4cfbac7..c18f19a550 100644
--- a/include/config_fallbacks.h
+++ b/include/config_fallbacks.h
@@ -46,14 +46,6 @@
#define CONFIG_SYS_MAXARGS 16
#endif
-#ifndef CONFIG_FIT_SIGNATURE
-#define CONFIG_IMAGE_FORMAT_LEGACY
-#endif
-
-#ifdef CONFIG_DISABLE_IMAGE_LEGACY
-#undef CONFIG_IMAGE_FORMAT_LEGACY
-#endif
-
#ifdef CONFIG_DM_I2C
# ifdef CONFIG_SYS_I2C
# error "Cannot define CONFIG_SYS_I2C when CONFIG_DM_I2C is used"
diff --git a/include/configs/alt.h b/include/configs/alt.h
index d6236870b9..46d7ba9a18 100644
--- a/include/configs/alt.h
+++ b/include/configs/alt.h
@@ -15,12 +15,8 @@
#include "rcar-gen2-common.h"
-#if defined(CONFIG_ARCH_RMOBILE_EXTRAM_BOOT)
-#define CONFIG_SYS_INIT_SP_ADDR 0x7003FFFC
-#else
-#define CONFIG_SYS_INIT_SP_ADDR 0xE633FFFC
-#endif
-#define STACK_AREA_SIZE 0xC000
+#define CONFIG_SYS_INIT_SP_ADDR 0x4f000000
+#define STACK_AREA_SIZE 0x00100000
#define LOW_LEVEL_MERAM_STACK \
(CONFIG_SYS_INIT_SP_ADDR + STACK_AREA_SIZE - 4)
@@ -29,10 +25,7 @@
#define RCAR_GEN2_SDRAM_SIZE (1024u * 1024 * 1024)
#define RCAR_GEN2_UBOOT_SDRAM_SIZE (512 * 1024 * 1024)
-/* SCIF */
-
/* FLASH */
-#define CONFIG_SPI
#define CONFIG_SPI_FLASH_QUAD
/* SH Ether */
@@ -41,52 +34,29 @@
#define CONFIG_SH_ETHER_PHY_MODE PHY_INTERFACE_MODE_RMII
#define CONFIG_SH_ETHER_CACHE_WRITEBACK
#define CONFIG_SH_ETHER_CACHE_INVALIDATE
-#define CONFIG_SH_ETHER_ALIGNE_SIZE 64
+#define CONFIG_SH_ETHER_ALIGNE_SIZE 64
#define CONFIG_BITBANGMII
#define CONFIG_BITBANGMII_MULTI
/* Board Clock */
-#define RMOBILE_XTAL_CLK 20000000u
-#define CONFIG_SYS_CLK_FREQ RMOBILE_XTAL_CLK
-#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2) /* EXT / 2 */
-#define CONFIG_PLL1_CLK_FREQ (CONFIG_SYS_CLK_FREQ * 156 / 2)
-#define CONFIG_P_CLK_FREQ (CONFIG_PLL1_CLK_FREQ / 24)
-
-#define CONFIG_SYS_TMU_CLK_DIV 4
-
-/* i2c */
-#define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_SH
-#define CONFIG_SYS_I2C_SLAVE 0x7F
-#define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 3
-#define CONFIG_SYS_I2C_SH_SPEED0 400000
-#define CONFIG_SYS_I2C_SH_SPEED1 400000
-#define CONFIG_SYS_I2C_SH_SPEED2 400000
-#define CONFIG_SH_I2C_DATA_HIGH 4
-#define CONFIG_SH_I2C_DATA_LOW 5
-#define CONFIG_SH_I2C_CLOCK 10000000
-
-#define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */
-
-/* USB */
-#define CONFIG_USB_EHCI_RMOBILE
-#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
-
-/* MMCIF */
-#define CONFIG_SH_MMCIF_ADDR 0xee200000
-#define CONFIG_SH_MMCIF_CLK 48000000
-
-/* Module stop status bits */
-/* INTC-RT */
-#define CONFIG_SMSTP0_ENA 0x00400000
-/* MSIF */
-#define CONFIG_SMSTP2_ENA 0x00002000
-/* INTC-SYS, IRQC */
-#define CONFIG_SMSTP4_ENA 0x00000180
-/* SCIF2 */
-#define CONFIG_SMSTP7_ENA 0x00080000
-
-/* SDHI */
-#define CONFIG_SH_SDHI_FREQ 97500000
+#define RMOBILE_XTAL_CLK 20000000u
+#define CONFIG_SYS_CLK_FREQ RMOBILE_XTAL_CLK
+#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2)
+
+#define CONFIG_SYS_TMU_CLK_DIV 4
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "fdt_high=0xffffffff\0" \
+ "initrd_high=0xffffffff\0"
+
+/* SPL support */
+#define CONFIG_SPL_TEXT_BASE 0xe6300000
+#define CONFIG_SPL_STACK 0xe6340000
+#define CONFIG_SPL_MAX_SIZE 0x4000
+#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x140000
+#ifdef CONFIG_SPL_BUILD
+#define CONFIG_CONS_SCIF2
+#define CONFIG_SH_SCIF_CLK_FREQ 65000000
+#endif
#endif /* __ALT_H */
diff --git a/include/configs/blanche.h b/include/configs/blanche.h
index 8c1959d264..ae3213f959 100755..100644
--- a/include/configs/blanche.h
+++ b/include/configs/blanche.h
@@ -37,7 +37,6 @@
/* FLASH */
#if !defined(CONFIG_MTD_NOR_FLASH)
-#define CONFIG_SPI
#define CONFIG_SH_QSPI_BASE 0xE6B10000
#else
#define CONFIG_SYS_FLASH_CFI
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index 457f55b8a8..2a3a1f99d4 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -213,7 +213,6 @@ MMCARGS
#if defined(CONFIG_SPI_BOOT)
/* McSPI IP block */
-#define CONFIG_SPI
#define CONFIG_SF_DEFAULT_SPEED 24000000
#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000
diff --git a/include/configs/cl-som-imx7.h b/include/configs/cl-som-imx7.h
index 36cf5769e9..73a701a383 100644
--- a/include/configs/cl-som-imx7.h
+++ b/include/configs/cl-som-imx7.h
@@ -147,7 +147,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* SPI Flash support */
-#define CONFIG_SPI
#define CONFIG_SF_DEFAULT_BUS 0
#define CONFIG_SF_DEFAULT_CS 0
#define CONFIG_SF_DEFAULT_SPEED 20000000
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index 35328b1646..787025bfa8 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -168,9 +168,6 @@
#define CONFIG_EXTRA_ENV_SETTINGS
#endif
-/* SPI */
-#define CONFIG_SPI
-
/* NAND */
#ifndef CONFIG_SPL_BUILD
#define CONFIG_SYS_NAND_BASE 0x40000000
diff --git a/include/configs/cm_t335.h b/include/configs/cm_t335.h
index 0609ccacfe..aa54e55352 100644
--- a/include/configs/cm_t335.h
+++ b/include/configs/cm_t335.h
@@ -15,8 +15,6 @@
#include <configs/ti_am335x_common.h>
-#undef CONFIG_SPI
-
#undef CONFIG_MAX_RAM_BANK_SIZE
#define CONFIG_MAX_RAM_BANK_SIZE (512 << 20) /* 512MB */
diff --git a/include/configs/controlcenterdc.h b/include/configs/controlcenterdc.h
index b6d15f684f..89e5730191 100644
--- a/include/configs/controlcenterdc.h
+++ b/include/configs/controlcenterdc.h
@@ -112,7 +112,6 @@
#define CONFIG_SPL_LIBCOMMON_SUPPORT
#define CONFIG_SPL_LIBGENERIC_SUPPORT
-#define CONFIG_SPL_SERIAL_SUPPORT
#define CONFIG_SPL_I2C_SUPPORT
#if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SPI_NOR_FLASH
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index a914564c63..ce27a88642 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -127,7 +127,6 @@
#endif
#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID)
-#define CONFIG_SPI
#define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI1_CLKID)
#ifdef CONFIG_SPL_BUILD
#define CONFIG_SYS_SPI_BASE DAVINCI_SPI1_BASE
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index dfbbb21a04..4edef66be6 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -57,11 +57,6 @@
#define CONFIG_DM9000_NO_SROM 1
#undef CONFIG_DM9000_DEBUG
-/* SPI */
-#undef CONFIG_SPI
-
-/* I2C */
-
/* TWL4030 */
#define CONFIG_TWL4030_LED 1
diff --git a/include/configs/draak.h b/include/configs/draak.h
index 392ba4a6ba..fef5e2e011 100644
--- a/include/configs/draak.h
+++ b/include/configs/draak.h
@@ -15,7 +15,6 @@
#include "rcar-gen3-common.h"
/* Ethernet RAVB */
-#define CONFIG_NET_MULTI
#define CONFIG_BITBANGMII
#define CONFIG_BITBANGMII_MULTI
diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index ce1ed5b275..7d8dd09eb7 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -55,7 +55,6 @@
#define CONFIG_SYS_NS16550_COM1 DAVINCI_UART0_BASE /* Base address of UART0 */
#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID)
-#define CONFIG_SPI
#define CONFIG_SYS_SPI_BASE DAVINCI_SPI1_BASE
#define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI1_CLKID)
#define CONFIG_SF_DEFAULT_SPEED 30000000
diff --git a/include/configs/eagle.h b/include/configs/eagle.h
index d2edd56130..d2d46f0425 100644
--- a/include/configs/eagle.h
+++ b/include/configs/eagle.h
@@ -15,7 +15,6 @@
#include "rcar-gen3-common.h"
/* Ethernet RAVB */
-#define CONFIG_NET_MULTI
#define CONFIG_BITBANGMII
#define CONFIG_BITBANGMII_MULTI
diff --git a/include/configs/firefly-rk3288.h b/include/configs/firefly-rk3288.h
index d6bb9f6fb4..2b0ac9ec5f 100644
--- a/include/configs/firefly-rk3288.h
+++ b/include/configs/firefly-rk3288.h
@@ -10,8 +10,7 @@
#define ROCKCHIP_DEVICE_SETTINGS \
"stdin=serial,usbkbd\0" \
"stdout=serial,vidconsole\0" \
- "stderr=serial,vidconsole\0" \
- "preboot=usb start\0"
+ "stderr=serial,vidconsole\0"
#include <configs/rk3288_common.h>
diff --git a/include/configs/gose.h b/include/configs/gose.h
index 3531621910..1f814bfe7a 100644
--- a/include/configs/gose.h
+++ b/include/configs/gose.h
@@ -14,26 +14,15 @@
#include "rcar-gen2-common.h"
-/* STACK */
-#if defined(CONFIG_ARCH_RMOBILE_EXTRAM_BOOT)
-#define CONFIG_SYS_INIT_SP_ADDR 0x7003FFFC
-#else
-#define CONFIG_SYS_INIT_SP_ADDR 0xE633FFFC
-#endif
-
-#define STACK_AREA_SIZE 0xC000
-#define LOW_LEVEL_MERAM_STACK \
- (CONFIG_SYS_INIT_SP_ADDR + STACK_AREA_SIZE - 4)
+#define CONFIG_SYS_INIT_SP_ADDR 0x4f000000
+#define STACK_AREA_SIZE 0x00100000
+#define LOW_LEVEL_MERAM_STACK \
+ (CONFIG_SYS_INIT_SP_ADDR + STACK_AREA_SIZE - 4)
/* MEMORY */
#define RCAR_GEN2_SDRAM_BASE 0x40000000
-#define RCAR_GEN2_SDRAM_SIZE 0x40000000
-#define RCAR_GEN2_UBOOT_SDRAM_SIZE 0x20000000
-
-/* SCIF */
-
-/* FLASH */
-#define CONFIG_SPI
+#define RCAR_GEN2_SDRAM_SIZE (1048u * 1024 * 1024)
+#define RCAR_GEN2_UBOOT_SDRAM_SIZE (512u * 1024 * 1024)
/* SH Ether */
#define CONFIG_SH_ETHER_USE_PORT 0
@@ -41,45 +30,29 @@
#define CONFIG_SH_ETHER_PHY_MODE PHY_INTERFACE_MODE_RMII
#define CONFIG_SH_ETHER_CACHE_WRITEBACK
#define CONFIG_SH_ETHER_CACHE_INVALIDATE
+#define CONFIG_SH_ETHER_ALIGNE_SIZE 64
#define CONFIG_BITBANGMII
#define CONFIG_BITBANGMII_MULTI
-#define CONFIG_SH_ETHER_ALIGNE_SIZE 64
/* Board Clock */
#define RMOBILE_XTAL_CLK 20000000u
#define CONFIG_SYS_CLK_FREQ RMOBILE_XTAL_CLK
#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2)
-#define CONFIG_SYS_TMU_CLK_DIV 4
-
-/* I2C */
-#define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_SH
-#define CONFIG_SYS_I2C_SLAVE 0x7F
-#define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 3
-#define CONFIG_SYS_I2C_SH_SPEED0 400000
-#define CONFIG_SYS_I2C_SH_SPEED1 400000
-#define CONFIG_SYS_I2C_SH_SPEED2 400000
-#define CONFIG_SH_I2C_DATA_HIGH 4
-#define CONFIG_SH_I2C_DATA_LOW 5
-#define CONFIG_SH_I2C_CLOCK 10000000
-
-#define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */
-/* USB */
-#define CONFIG_USB_EHCI_RMOBILE
-#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
-
-/* Module stop status bits */
-/* INTC-RT */
-#define CONFIG_SMSTP0_ENA 0x00400000
-/* MSIF */
-#define CONFIG_SMSTP2_ENA 0x00002000
-/* INTC-SYS, IRQC */
-#define CONFIG_SMSTP4_ENA 0x00000180
-/* SCIF0 */
-#define CONFIG_SMSTP7_ENA 0x00200000
+#define CONFIG_SYS_TMU_CLK_DIV 4
-/* SDHI */
-#define CONFIG_SH_SDHI_FREQ 97500000
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "fdt_high=0xffffffff\0" \
+ "initrd_high=0xffffffff\0"
+
+/* SPL support */
+#define CONFIG_SPL_TEXT_BASE 0xe6300000
+#define CONFIG_SPL_STACK 0xe6340000
+#define CONFIG_SPL_MAX_SIZE 0x4000
+#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x140000
+#ifdef CONFIG_SPL_BUILD
+#define CONFIG_CONS_SCIF0
+#define CONFIG_SH_SCIF_CLK_FREQ 65000000
+#endif
#endif /* __GOSE_H */
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index a10dc123f2..835789528d 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -506,6 +506,4 @@
/* UBI Support */
#define CONFIG_MTD_PARTITIONS
-#define CONFIG_IMAGE_FORMAT_LEGACY
-
#endif /* __CONFIG_H */
diff --git a/include/configs/imx6-engicam.h b/include/configs/imx6-engicam.h
index 246a636ef0..86604d6706 100644
--- a/include/configs/imx6-engicam.h
+++ b/include/configs/imx6-engicam.h
@@ -130,11 +130,6 @@
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
CONFIG_SYS_INIT_SP_OFFSET)
-/* FIT */
-#ifdef CONFIG_FIT
-# define CONFIG_IMAGE_FORMAT_LEGACY
-#endif
-
/* UART */
#ifdef CONFIG_MXC_UART
# ifdef CONFIG_MX6UL
diff --git a/include/configs/koelsch.h b/include/configs/koelsch.h
index 6b2af7a858..ec2162cb80 100644
--- a/include/configs/koelsch.h
+++ b/include/configs/koelsch.h
@@ -24,11 +24,6 @@
#define RCAR_GEN2_SDRAM_SIZE (2048u * 1024 * 1024)
#define RCAR_GEN2_UBOOT_SDRAM_SIZE (512 * 1024 * 1024)
-/* SCIF */
-
-/* FLASH */
-#define CONFIG_SPI
-
/* SH Ether */
#define CONFIG_SH_ETHER_USE_PORT 0
#define CONFIG_SH_ETHER_PHY_ADDR 0x1
diff --git a/include/configs/lager.h b/include/configs/lager.h
index 97f7b2c7e7..0d9272cfa3 100644
--- a/include/configs/lager.h
+++ b/include/configs/lager.h
@@ -15,14 +15,9 @@
#include "rcar-gen2-common.h"
-/* STACK */
-#if defined(CONFIGF_RMOBILE_EXTRAM_BOOT)
-#define CONFIG_SYS_INIT_SP_ADDR 0xB003FFFC
-#else
-#define CONFIG_SYS_INIT_SP_ADDR 0xE827FFFC
-#endif
-#define STACK_AREA_SIZE 0xC000
-#define LOW_LEVEL_MERAM_STACK \
+#define CONFIG_SYS_INIT_SP_ADDR 0x4f000000
+#define STACK_AREA_SIZE 0x00100000
+#define LOW_LEVEL_MERAM_STACK \
(CONFIG_SYS_INIT_SP_ADDR + STACK_AREA_SIZE - 4)
/* MEMORY */
@@ -30,62 +25,35 @@
#define RCAR_GEN2_SDRAM_SIZE (2048u * 1024 * 1024)
#define RCAR_GEN2_UBOOT_SDRAM_SIZE (512 * 1024 * 1024)
-/* SCIF */
-
-/* SPI */
-#define CONFIG_SPI
-
/* SH Ether */
#define CONFIG_SH_ETHER_USE_PORT 0
#define CONFIG_SH_ETHER_PHY_ADDR 0x1
#define CONFIG_SH_ETHER_PHY_MODE PHY_INTERFACE_MODE_RMII
-#define CONFIG_SH_ETHER_ALIGNE_SIZE 64
#define CONFIG_SH_ETHER_CACHE_WRITEBACK
#define CONFIG_SH_ETHER_CACHE_INVALIDATE
+#define CONFIG_SH_ETHER_ALIGNE_SIZE 64
#define CONFIG_BITBANGMII
#define CONFIG_BITBANGMII_MULTI
-/* I2C */
-#define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_RCAR
-#define CONFIG_SYS_RCAR_I2C0_SPEED 400000
-#define CONFIG_SYS_RCAR_I2C1_SPEED 400000
-#define CONFIG_SYS_RCAR_I2C2_SPEED 400000
-#define CONFIG_SYS_RCAR_I2C3_SPEED 400000
-#define CONFIF_SYS_RCAR_I2C_NUM_CONTROLLERS 4
-
-#define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */
-
/* Board Clock */
#define RMOBILE_XTAL_CLK 20000000u
#define CONFIG_SYS_CLK_FREQ RMOBILE_XTAL_CLK
-#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2) /* EXT / 2 */
-#define CONFIG_PLL1_CLK_FREQ (CONFIG_SYS_CLK_FREQ * 156 / 2)
-#define CONFIG_PLL1_DIV2_CLK_FREQ (CONFIG_PLL1_CLK_FREQ / 2)
-#define CONFIG_MP_CLK_FREQ (CONFIG_PLL1_DIV2_CLK_FREQ / 15)
-#define CONFIG_HP_CLK_FREQ (CONFIG_PLL1_CLK_FREQ / 12)
+#define CONFIG_SH_TMU_CLK_FREQ (CONFIG_SYS_CLK_FREQ / 2)
#define CONFIG_SYS_TMU_CLK_DIV 4
-/* USB */
-#define CONFIG_USB_EHCI_RMOBILE
-#define CONFIG_USB_MAX_CONTROLLER_COUNT 3
-
-/* MMC */
-#define CONFIG_SH_MMCIF_ADDR 0xEE220000
-#define CONFIG_SH_MMCIF_CLK 97500000
-
-/* Module stop status bits */
-/* INTC-RT */
-#define CONFIG_SMSTP0_ENA 0x00400000
-/* MSIF */
-#define CONFIG_SMSTP2_ENA 0x00002000
-/* INTC-SYS, IRQC */
-#define CONFIG_SMSTP4_ENA 0x00000180
-/* SCIF0 */
-#define CONFIG_SMSTP7_ENA 0x00200000
-
-/* SDHI */
-#define CONFIG_SH_SDHI_FREQ 97500000
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "fdt_high=0xffffffff\0" \
+ "initrd_high=0xffffffff\0"
+
+/* SPL support */
+#define CONFIG_SPL_TEXT_BASE 0xe6300000
+#define CONFIG_SPL_STACK 0xe6340000
+#define CONFIG_SPL_MAX_SIZE 0x4000
+#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x140000
+#ifdef CONFIG_SPL_BUILD
+#define CONFIG_CONS_SCIF0
+#define CONFIG_SH_SCIF_CLK_FREQ 65000000
+#endif
#endif /* __LAGER_H */
diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h
index 3e5689ac87..0431d05a4b 100644
--- a/include/configs/legoev3.h
+++ b/include/configs/legoev3.h
@@ -103,7 +103,6 @@
#define CONFIG_SYS_NS16550_COM1 DAVINCI_UART1_BASE /* Base address of UART1 */
#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID)
-#define CONFIG_SPI
#define CONFIG_SYS_SPI_BASE DAVINCI_SPI0_BASE
#define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI0_CLKID)
#define CONFIG_SF_DEFAULT_SPEED 50000000
diff --git a/include/configs/ls1012a2g5rdb.h b/include/configs/ls1012a2g5rdb.h
index 7664b96ec2..9a28fd27eb 100644
--- a/include/configs/ls1012a2g5rdb.h
+++ b/include/configs/ls1012a2g5rdb.h
@@ -34,8 +34,6 @@
#define CONFIG_SYS_SCSI_MAX_LUN 1
#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
CONFIG_SYS_SCSI_MAX_LUN)
-#define CONFIG_NET_MULTI
-
#define CONFIG_CMD_MEMINFO
#define CONFIG_SYS_MEMTEST_START 0x80000000
#define CONFIG_SYS_MEMTEST_END 0x9fffffff
diff --git a/include/configs/ls1021aiot.h b/include/configs/ls1021aiot.h
index f2a6837324..dc1206f012 100644
--- a/include/configs/ls1021aiot.h
+++ b/include/configs/ls1021aiot.h
@@ -67,7 +67,6 @@
#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
#define CONFIG_SPL_I2C_SUPPORT
#define CONFIG_SPL_WATCHDOG_SUPPORT
-#define CONFIG_SPL_SERIAL_SUPPORT
#define CONFIG_SPL_MMC_SUPPORT
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0xe8
diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
index b9424e666d..2851c84b02 100644
--- a/include/configs/ls1046a_common.h
+++ b/include/configs/ls1046a_common.h
@@ -67,7 +67,6 @@
#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
#define CONFIG_SPL_WATCHDOG_SUPPORT
#define CONFIG_SPL_I2C_SUPPORT
-#define CONFIG_SPL_SERIAL_SUPPORT
#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
#define CONFIG_SPL_MMC_SUPPORT
@@ -104,7 +103,6 @@
#define CONFIG_SPL_ENV_SUPPORT
#define CONFIG_SPL_WATCHDOG_SUPPORT
#define CONFIG_SPL_I2C_SUPPORT
-#define CONFIG_SPL_SERIAL_SUPPORT
#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
#define CONFIG_SPL_NAND_SUPPORT
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 1a02ff5e09..fbf09025f3 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -108,7 +108,6 @@
#ifdef SPIFLASH
# define CONFIG_SYS_SPI_BASE XILINX_SPI_FLASH_BASEADDR
-# define CONFIG_SPI 1
# define CONFIG_SF_DEFAULT_MODE SPI_MODE_3
# define CONFIG_SF_DEFAULT_SPEED XILINX_SPI_FLASH_MAX_FREQ
# define CONFIG_SF_DEFAULT_CS XILINX_SPI_FLASH_CS
diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h
index c2223bd858..3dcda9ea77 100644
--- a/include/configs/mx7ulp_evk.h
+++ b/include/configs/mx7ulp_evk.h
@@ -46,7 +46,6 @@
/* Using ULP WDOG for reset */
#define WDOG_BASE_ADDR WDG1_RBASE
-#define CONFIG_SYS_ARCH_TIMER
#define CONFIG_SYS_HZ_CLOCK 1000000 /* Fixed at 1Mhz from TSTMR */
#define CONFIG_INITRD_TAG
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index d67a619a8c..7bdc33df62 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -122,7 +122,6 @@
#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
#endif
-#define CONFIG_SPI
#define CONFIG_SYS_SPI_BASE DAVINCI_SPI1_BASE
#define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI1_CLKID)
#define CONFIG_SF_DEFAULT_SPEED 30000000
diff --git a/include/configs/ot1200.h b/include/configs/ot1200.h
index 62b48bc258..ffd5bcd611 100644
--- a/include/configs/ot1200.h
+++ b/include/configs/ot1200.h
@@ -20,7 +20,6 @@
#define CONFIG_MXC_UART_BASE UART1_BASE
/* SF Configs */
-#define CONFIG_SPI
#define CONFIG_SF_DEFAULT_BUS 2
#define CONFIG_SF_DEFAULT_CS 0
#define CONFIG_SF_DEFAULT_SPEED 25000000
diff --git a/include/configs/porter.h b/include/configs/porter.h
index b1a4c2576e..ba444762f1 100644
--- a/include/configs/porter.h
+++ b/include/configs/porter.h
@@ -26,10 +26,7 @@
#define RCAR_GEN2_SDRAM_SIZE (2048u * 1024 * 1024)
#define RCAR_GEN2_UBOOT_SDRAM_SIZE (1024u * 1024 * 1024)
-/* SCIF */
-
/* FLASH */
-#define CONFIG_SPI
#define CONFIG_SPI_FLASH_QUAD
/* SH Ether */
diff --git a/include/configs/qemu-arm.h b/include/configs/qemu-arm.h
index 839bc10a18..f306b41635 100644
--- a/include/configs/qemu-arm.h
+++ b/include/configs/qemu-arm.h
@@ -19,11 +19,8 @@
#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + SZ_2M)
#define CONFIG_SYS_MALLOC_LEN SZ_16M
-/* QEMU implements a 62.5MHz architected timer */
-/* FIXME: can we rely on CNTFREQ instead of hardcoding this fact here? */
-#define CONFIG_SYS_ARCH_TIMER
+/* For timer, QEMU emulates an ARMv7/ARMv8 architected timer */
#define CONFIG_SYS_HZ 1000
-#define CONFIG_SYS_HZ_CLOCK 62500000
/* For block devices, QEMU emulates an ICH9 AHCI controller over PCI */
#define CONFIG_SYS_SCSI_MAX_SCSI_ID 6
diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h
index f39a272e6d..ec4b88adb5 100644
--- a/include/configs/rk3036_common.h
+++ b/include/configs/rk3036_common.h
@@ -18,9 +18,6 @@
#define CONFIG_SYS_TIMER_BASE 0x200440a0 /* TIMER5 */
#define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMER_BASE + 8)
-#define CONFIG_SYS_NS16550
-#define CONFIG_SYS_NS16550_MEM32
-
#define CONFIG_SYS_INIT_SP_ADDR 0x60100000
#define CONFIG_SYS_LOAD_ADDR 0x60800800
#define CONFIG_SPL_STACK 0x10081fff
@@ -38,7 +35,6 @@
#define SDRAM_MAX_SIZE (CONFIG_NR_DRAM_BANKS * SDRAM_BANK_SIZE)
#define CONFIG_SPI_FLASH
-#define CONFIG_SPI
#define CONFIG_SPI_FLASH_GIGADEVICE
#define CONFIG_SF_DEFAULT_SPEED 20000000
diff --git a/include/configs/rk3128_common.h b/include/configs/rk3128_common.h
index bd8019c6a5..a71c6c0bcc 100644
--- a/include/configs/rk3128_common.h
+++ b/include/configs/rk3128_common.h
@@ -19,8 +19,6 @@
#define CONFIG_SYS_TIMER_BASE 0x200440a0 /* TIMER5 */
#define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMER_BASE + 8)
-#define CONFIG_SYS_NS16550_MEM32
-
#define CONFIG_SYS_INIT_SP_ADDR 0x60100000
#define CONFIG_SYS_LOAD_ADDR 0x60800800
@@ -38,7 +36,6 @@
#define SDRAM_MAX_SIZE 0x80000000
#define CONFIG_SPI_FLASH
-#define CONFIG_SPI
#define CONFIG_SF_DEFAULT_SPEED 20000000
#define CONFIG_USB_OHCI_NEW
#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
diff --git a/include/configs/rk3188_common.h b/include/configs/rk3188_common.h
index 94f8cda853..ff6dfd5a44 100644
--- a/include/configs/rk3188_common.h
+++ b/include/configs/rk3188_common.h
@@ -17,11 +17,6 @@
#define CONFIG_SYS_MALLOC_LEN (32 << 20)
#define CONFIG_SYS_CBSIZE 1024
-#define CONFIG_SYS_TIMER_RATE (24 * 1000 * 1000)
-#define CONFIG_SYS_TIMER_BASE 0x2000e000 /* TIMER3 */
-#define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMER_BASE + 8)
-#define CONFIG_SYS_TIMER_COUNTS_DOWN
-
#define CONFIG_SYS_NS16550_MEM32
#ifdef CONFIG_SPL_ROCKCHIP_BACK_TO_BROM
@@ -49,7 +44,6 @@
#define SDRAM_MAX_SIZE 0x80000000
#define CONFIG_SPI_FLASH
-#define CONFIG_SPI
#define CONFIG_SF_DEFAULT_SPEED 20000000
#ifndef CONFIG_SPL_BUILD
diff --git a/include/configs/rk322x_common.h b/include/configs/rk322x_common.h
index 7f9c7fbfd5..0fb72214f4 100644
--- a/include/configs/rk322x_common.h
+++ b/include/configs/rk322x_common.h
@@ -18,11 +18,10 @@
#define CONFIG_SYS_TIMER_BASE 0x110c00a0 /* TIMER5 */
#define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMER_BASE + 8)
-#define CONFIG_SYS_NS16550_MEM32
#define CONFIG_SYS_INIT_SP_ADDR 0x60100000
#define CONFIG_SYS_LOAD_ADDR 0x60800800
#define CONFIG_SPL_STACK 0x10088000
-#define CONFIG_SPL_TEXT_BASE 0x10081004
+#define CONFIG_SPL_TEXT_BASE 0x10081000
#define CONFIG_ROCKCHIP_MAX_INIT_SIZE (28 << 10)
#define CONFIG_ROCKCHIP_CHIP_TAG "RK32"
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index 78595b86ec..d95254b25d 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -19,8 +19,6 @@
#define CONFIG_SYS_TIMER_BASE 0xff810020 /* TIMER7 */
#define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMER_BASE + 8)
-#define CONFIG_SYS_NS16550_MEM32
-
#ifdef CONFIG_SPL_ROCKCHIP_BACK_TO_BROM
/* Bootrom will load u-boot binary to 0x0 once return from SPL */
#endif
@@ -49,7 +47,6 @@
#define SDRAM_MAX_SIZE 0xfe000000
#define CONFIG_SPI_FLASH
-#define CONFIG_SPI
#define CONFIG_SF_DEFAULT_SPEED 20000000
#ifndef CONFIG_SPL_BUILD
@@ -73,6 +70,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
"fdt_high=0x0fffffff\0" \
"initrd_high=0x0fffffff\0" \
+ "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
"partitions=" PARTS_DEFAULT \
ENV_MEM_LAYOUT_SETTINGS \
ROCKCHIP_DEVICE_SETTINGS \
diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h
index 517d058a11..09b50368bd 100644
--- a/include/configs/rk3328_common.h
+++ b/include/configs/rk3328_common.h
@@ -33,7 +33,6 @@
#define SDRAM_MAX_SIZE 0xff000000
#define CONFIG_SPI_FLASH
-#define CONFIG_SPI
#define CONFIG_SF_DEFAULT_SPEED 20000000
#ifndef CONFIG_SPL_BUILD
diff --git a/include/configs/rut.h b/include/configs/rut.h
index 46f48009dd..a608214c0f 100644
--- a/include/configs/rut.h
+++ b/include/configs/rut.h
@@ -117,8 +117,6 @@
#define CONFIG_VIDEO_BMP_LOGO
#define DA8XX_LCD_CNTL_BASE LCD_CNTL_BASE
-#define CONFIG_SPI
-
#define BOARD_LCD_RESET 115 /* Bank 3 pin 19 */
#define CONFIG_FORMIKE
#define DISPL_PLL_SPREAD_SPECTRUM
diff --git a/include/configs/rv1108_common.h b/include/configs/rv1108_common.h
index 349c53c289..cd204e9718 100644
--- a/include/configs/rv1108_common.h
+++ b/include/configs/rv1108_common.h
@@ -18,9 +18,6 @@
#define CONFIG_SYS_TIMER_BASE 0x10350020
#define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMER_BASE + 8)
-#define CONFIG_SYS_NS16550
-#define CONFIG_SYS_NS16550_MEM32
-
#define CONFIG_SYS_SDRAM_BASE 0x60000000
#define CONFIG_NR_DRAM_BANKS 1
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + 0x100000)
diff --git a/include/configs/s32v234evb.h b/include/configs/s32v234evb.h
index 34e8441ea0..127443f882 100644
--- a/include/configs/s32v234evb.h
+++ b/include/configs/s32v234evb.h
@@ -12,7 +12,6 @@
#include <asm/arch/imx-regs.h>
#define CONFIG_S32V234
-#define CONFIG_DM
/* Config GIC */
#define CONFIG_GICV2
@@ -58,8 +57,6 @@
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * 1024 * 1024)
#endif
-#define CONFIG_DM_SERIAL
-#define CONFIG_FSL_LINFLEXUART
#define LINFLEXUART_BASE LINFLEXD0_BASE_ADDR
#define CONFIG_DEBUG_UART_LINFLEXUART
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 13c3dc8b23..2062647f7e 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -62,7 +62,6 @@
#define CONFIG_SYS_LOAD_ADDR 0x81000000 /* Default load address */
-#define CONFIG_SPI
#define CONFIG_MTD_DEVICE
#define CONFIG_SF_DEFAULT_SPEED (75000000)
diff --git a/include/configs/silk.h b/include/configs/silk.h
index 5f351b5c4b..465291fffd 100644
--- a/include/configs/silk.h
+++ b/include/configs/silk.h
@@ -26,10 +26,7 @@
#define RCAR_GEN2_SDRAM_SIZE (1024u * 1024 * 1024)
#define RCAR_GEN2_UBOOT_SDRAM_SIZE (512 * 1024 * 1024)
-/* SCIF */
-
/* FLASH */
-#define CONFIG_SPI
#define CONFIG_SPI_FLASH_QUAD
/* SH Ether */
diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h
index da0e259736..b2b654ca7a 100644
--- a/include/configs/stm32mp1.h
+++ b/include/configs/stm32mp1.h
@@ -17,7 +17,6 @@
* Number of clock ticks in 1 sec
*/
#define CONFIG_SYS_HZ 1000
-#define CONFIG_SYS_ARCH_TIMER
/*
* malloc() pool size
diff --git a/include/configs/stout.h b/include/configs/stout.h
index 228cb552cb..22e23eb182 100644
--- a/include/configs/stout.h
+++ b/include/configs/stout.h
@@ -31,7 +31,6 @@
#define CONFIG_SCIF_A
/* SPI */
-#define CONFIG_SPI
#define CONFIG_SPI_FLASH_QUAD
/* SH Ether */
diff --git a/include/configs/taurus.h b/include/configs/taurus.h
index 2fa0ded439..3112231b0b 100644
--- a/include/configs/taurus.h
+++ b/include/configs/taurus.h
@@ -117,7 +117,6 @@
#endif
/* SPI EEPROM */
-#define CONFIG_SPI
#define TAURUS_SPI_MASK (1 << 4)
#define TAURUS_SPI_CS_PIN AT91_PIN_PA3
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 4771e74940..18cd6afa91 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -98,11 +98,6 @@
#define CONFIG_DM_I2C_COMPAT
#endif
-/* McSPI IP block */
-#define CONFIG_SPI
-
-/* GPIO block */
-
/*
* The following are general good-enough settings for U-Boot. We set a
* large malloc pool as we generally have a lot of DDR, and we opt for
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index e87acca650..6f2a33e187 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -17,7 +17,6 @@
/* SoC Configuration */
#define CONFIG_ARCH_CPU_INIT
-#define CONFIG_SYS_ARCH_TIMER
#define CONFIG_SPL_TARGET "u-boot-spi.gph"
#define CONFIG_SYS_DCACHE_OFF
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index 1b4140de06..c39f13bf6b 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -33,7 +33,7 @@
#define CONFIG_SYS_MAX_FLASH_SECT 256
#define CONFIG_SYS_MONITOR_BASE 0
-#define CONFIG_SYS_MONITOR_LEN 0x00080000 /* 512KB */
+#define CONFIG_SYS_MONITOR_LEN 0x00090000 /* 576KB */
#define CONFIG_SYS_FLASH_BASE 0
/*
@@ -186,6 +186,7 @@
"setexpr tmp_addr $nor_base + 0x70000 && " \
"tftpboot $tmp_addr $third_image\0" \
"emmcupdate=mmcsetn &&" \
+ "mmc dev $mmc_first_dev &&" \
"mmc partconf $mmc_first_dev 0 1 1 &&" \
"tftpboot $second_image && " \
"mmc write $loadaddr 0 100 && " \
@@ -219,7 +220,7 @@
#define CONFIG_SPL_TEXT_BASE 0x00100000
#endif
-#define CONFIG_SPL_STACK (0x00100000)
+#define CONFIG_SPL_STACK (0x00200000)
#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x20000
diff --git a/include/configs/wb50n.h b/include/configs/wb50n.h
index 028e3ff937..093cc32a6e 100644
--- a/include/configs/wb50n.h
+++ b/include/configs/wb50n.h
@@ -23,8 +23,6 @@
#define CONFIG_SKIP_LOWLEVEL_INIT
#endif
-#define CONFIG_IMAGE_FORMAT_LEGACY
-
/* general purpose I/O */
#define CONFIG_AT91_GPIO
diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
index 6d650b79da..5c71168279 100644
--- a/include/configs/x86-common.h
+++ b/include/configs/x86-common.h
@@ -87,11 +87,6 @@
#define CONFIG_ENV_OVERWRITE
/*-----------------------------------------------------------------------
- * FLASH configuration
- */
-#define CONFIG_SPI
-
-/*-----------------------------------------------------------------------
* Environment configuration
*/
#define CONFIG_ENV_SIZE 0x01000
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index ae82a7aa96..e503617178 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -127,7 +127,9 @@
#endif
/* Total Size of Environment Sector */
-#define CONFIG_ENV_SIZE (128 << 10)
+#ifndef CONFIG_ENV_SIZE
+# define CONFIG_ENV_SIZE (128 << 10)
+#endif
/* Allow to overwrite serial and ethaddr */
#define CONFIG_ENV_OVERWRITE
@@ -135,7 +137,9 @@
/* Environment */
#ifndef CONFIG_ENV_IS_NOWHERE
# define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE
-# define CONFIG_ENV_OFFSET 0xE0000
+# ifndef CONFIG_ENV_OFFSET
+# define CONFIG_ENV_OFFSET 0xE0000
+# endif
#endif
/* enable preboot to be loaded before CONFIG_BOOTDELAY */
@@ -259,9 +263,6 @@
GENERATED_GBL_DATA_SIZE)
-/* FIT support */
-#define CONFIG_IMAGE_FORMAT_LEGACY /* enable also legacy image format */
-
/* Extend size of kernel image for uncompression */
#define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024)
diff --git a/include/efi_api.h b/include/efi_api.h
index ae93061160..64c27e494b 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -343,6 +343,7 @@ struct efi_loaded_image {
0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b )
#define DEVICE_PATH_TYPE_END 0x7f
+# define DEVICE_PATH_SUB_TYPE_INSTANCE_END 0x01
# define DEVICE_PATH_SUB_TYPE_END 0xff
struct efi_device_path {
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 17f9d3d1ef..8d21ba74b1 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -324,13 +324,28 @@ int efi_dp_match(const struct efi_device_path *a,
const struct efi_device_path *b);
struct efi_object *efi_dp_find_obj(struct efi_device_path *dp,
struct efi_device_path **rem);
-unsigned efi_dp_size(const struct efi_device_path *dp);
+/* get size of the first device path instance excluding end node */
+efi_uintn_t efi_dp_instance_size(const struct efi_device_path *dp);
+/* size of multi-instance device path excluding end node */
+efi_uintn_t efi_dp_size(const struct efi_device_path *dp);
struct efi_device_path *efi_dp_dup(const struct efi_device_path *dp);
struct efi_device_path *efi_dp_append(const struct efi_device_path *dp1,
const struct efi_device_path *dp2);
struct efi_device_path *efi_dp_append_node(const struct efi_device_path *dp,
const struct efi_device_path *node);
-
+/* Create a device path node of given type, sub-type, length */
+struct efi_device_path *efi_dp_create_device_node(const u8 type,
+ const u8 sub_type,
+ const u16 length);
+/* Append device path instance */
+struct efi_device_path *efi_dp_append_instance(
+ const struct efi_device_path *dp,
+ const struct efi_device_path *dpi);
+/* Get next device path instance */
+struct efi_device_path *efi_dp_get_next_instance(struct efi_device_path **dp,
+ efi_uintn_t *size);
+/* Check if a device path contains muliple instances */
+bool efi_dp_is_multi_instance(const struct efi_device_path *dp);
struct efi_device_path *efi_dp_from_dev(struct udevice *dev);
struct efi_device_path *efi_dp_from_part(struct blk_desc *desc, int part);
diff --git a/include/efi_selftest.h b/include/efi_selftest.h
index 08dd8e43ad..c23bc24bed 100644
--- a/include/efi_selftest.h
+++ b/include/efi_selftest.h
@@ -114,6 +114,7 @@ u16 efi_st_get_key(void);
* @setup: set up the unit test
* @teardown: tear down the unit test
* @execute: execute the unit test
+ * @setup_ok: setup was successful (set at runtime)
* @on_request: test is only executed on request
*/
struct efi_unit_test {
@@ -123,6 +124,7 @@ struct efi_unit_test {
const struct efi_system_table *systable);
int (*execute)(void);
int (*teardown)(void);
+ int setup_ok;
bool on_request;
};
diff --git a/include/log.h b/include/log.h
index 20dc5289c7..3cf08de6d0 100644
--- a/include/log.h
+++ b/include/log.h
@@ -46,7 +46,7 @@ enum log_category_t {
LOGC_CORE,
LOGC_DM, /* Core driver-model */
LOGC_DT, /* Device-tree */
- LOGL_EFI, /* EFI implementation */
+ LOGC_EFI, /* EFI implementation */
LOGC_COUNT,
LOGC_END,
diff --git a/lib/Kconfig b/lib/Kconfig
index 436b90fa85..33fb06712f 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -27,6 +27,40 @@ config HAVE_PRIVATE_LIBGCC
config LIB_UUID
bool
+config PRINTF
+ bool
+ default y
+
+config SPL_PRINTF
+ bool
+ select SPL_SPRINTF
+ select SPL_STRTO if !USE_TINY_PRINTF
+
+config TPL_PRINTF
+ bool
+ select TPL_SPRINTF
+ select TPL_STRTO if !USE_TINY_PRINTF
+
+config SPRINTF
+ bool
+ default y
+
+config SPL_SPRINTF
+ bool
+
+config TPL_SPRINTF
+ bool
+
+config STRTO
+ bool
+ default y
+
+config SPL_STRTO
+ bool
+
+config TPL_STRTO
+ bool
+
config USE_PRIVATE_LIBGCC
bool "Use private libgcc"
depends on HAVE_PRIVATE_LIBGCC
diff --git a/lib/Makefile b/lib/Makefile
index 35da5705a4..13be8f4cfc 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -88,22 +88,19 @@ obj-y += time.o
obj-$(CONFIG_TRACE) += trace.o
obj-$(CONFIG_LIB_UUID) += uuid.o
obj-$(CONFIG_LIB_RAND) += rand.o
+obj-y += panic.o
-ifdef CONFIG_SPL_BUILD
-ifdef CONFIG_TPL_BUILD
-SERIAL_SUPPORT := $(CONFIG_TPL_SERIAL_SUPPORT)
-else
-SERIAL_SUPPORT := $(CONFIG_SPL_SERIAL_SUPPORT)
-endif
+ifeq ($(CONFIG_$(SPL_TPL_)BUILD),y)
# SPL U-Boot may use full-printf, tiny-printf or none at all
ifdef CONFIG_USE_TINY_PRINTF
-obj-$(SERIAL_SUPPORT) += tiny-printf.o panic.o strto.o
+obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += tiny-printf.o
else
-obj-$(SERIAL_SUPPORT) += vsprintf.o panic.o strto.o strmhz.o
+obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += vsprintf.o strmhz.o
endif
+obj-$(CONFIG_$(SPL_TPL_)STRTO) += strto.o
else
# Main U-Boot always uses the full printf support
-obj-y += vsprintf.o panic.o strto.o strmhz.o
+obj-y += vsprintf.o strto.o strmhz.o
endif
subdir-ccflags-$(CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED) += -O2
diff --git a/lib/efi/efi.c b/lib/efi/efi.c
index 81af27caab..b1c7360ddc 100644
--- a/lib/efi/efi.c
+++ b/lib/efi/efi.c
@@ -17,8 +17,6 @@
#include <efi.h>
#include <efi_api.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Unfortunately we cannot access any code outside what is built especially
* for the stub. lib/string.c is already being built for the U-Boot payload
diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c
index 205aa19947..acf60beb4e 100644
--- a/lib/efi/efi_stub.c
+++ b/lib/efi/efi_stub.c
@@ -21,8 +21,6 @@
#include <linux/err.h>
#include <linux/types.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#ifndef CONFIG_X86
/*
* Problem areas:
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
index 83d75c4fdc..d38780b604 100644
--- a/lib/efi_loader/Kconfig
+++ b/lib/efi_loader/Kconfig
@@ -1,6 +1,8 @@
config EFI_LOADER
bool "Support running EFI Applications in U-Boot"
depends on (ARM || X86) && OF_LIBFDT
+ # We do not support bootefi booting ARMv7 in non-secure mode
+ depends on !ARMV7_NONSEC
# We need EFI_STUB_64BIT to be set on x86_64 with EFI_STUB
depends on !EFI_STUB || !X86_64 || EFI_STUB_64BIT
# We need EFI_STUB_32BIT to be set on x86_32 with EFI_STUB
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 7a9449f59c..1cfdabf6eb 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -2219,7 +2219,7 @@ static efi_status_t EFIAPI efi_locate_device_path(
}
/* Find end of device path */
- len = efi_dp_size(*device_path);
+ len = efi_dp_instance_size(*device_path);
/* Get all handles implementing the protocol */
ret = EFI_CALL(efi_locate_handle_buffer(BY_PROTOCOL, protocol, NULL,
@@ -2234,7 +2234,7 @@ static efi_status_t EFIAPI efi_locate_device_path(
if (ret != EFI_SUCCESS)
continue;
dp = (struct efi_device_path *)handler->protocol_interface;
- len_dp = efi_dp_size(dp);
+ len_dp = efi_dp_instance_size(dp);
/*
* This handle can only be a better fit
* if its device path length is longer than the best fit and
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index e965f1d88e..634dacf41b 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -149,7 +149,7 @@ static struct efi_object *find_obj(struct efi_device_path *dp, bool short_path,
struct efi_device_path **rem)
{
struct efi_object *efiobj;
- unsigned int dp_size = efi_dp_size(dp);
+ efi_uintn_t dp_size = efi_dp_instance_size(dp);
list_for_each_entry(efiobj, &efi_obj_list, link) {
struct efi_handler *handler;
@@ -170,11 +170,12 @@ static struct efi_object *find_obj(struct efi_device_path *dp, bool short_path,
* the caller.
*/
*rem = ((void *)dp) +
- efi_dp_size(obj_dp);
+ efi_dp_instance_size(obj_dp);
return efiobj;
} else {
/* Only return on exact matches */
- if (efi_dp_size(obj_dp) == dp_size)
+ if (efi_dp_instance_size(obj_dp) ==
+ dp_size)
return efiobj;
}
}
@@ -229,11 +230,13 @@ const struct efi_device_path *efi_dp_last_node(const struct efi_device_path *dp)
return ret;
}
-/* return size not including End node: */
-unsigned efi_dp_size(const struct efi_device_path *dp)
+/* get size of the first device path instance excluding end node */
+efi_uintn_t efi_dp_instance_size(const struct efi_device_path *dp)
{
- unsigned sz = 0;
+ efi_uintn_t sz = 0;
+ if (!dp || dp->type == DEVICE_PATH_TYPE_END)
+ return 0;
while (dp) {
sz += dp->length;
dp = efi_dp_next(dp);
@@ -242,10 +245,25 @@ unsigned efi_dp_size(const struct efi_device_path *dp)
return sz;
}
+/* get size of multi-instance device path excluding end node */
+efi_uintn_t efi_dp_size(const struct efi_device_path *dp)
+{
+ const struct efi_device_path *p = dp;
+
+ if (!p)
+ return 0;
+ while (p->type != DEVICE_PATH_TYPE_END ||
+ p->sub_type != DEVICE_PATH_SUB_TYPE_END)
+ p = (void *)p + p->length;
+
+ return (void *)p - (void *)dp;
+}
+
+/* copy multi-instance device path */
struct efi_device_path *efi_dp_dup(const struct efi_device_path *dp)
{
struct efi_device_path *ndp;
- unsigned sz = efi_dp_size(dp) + sizeof(END);
+ size_t sz = efi_dp_size(dp) + sizeof(END);
if (!dp)
return NULL;
@@ -263,7 +281,10 @@ struct efi_device_path *efi_dp_append(const struct efi_device_path *dp1,
{
struct efi_device_path *ret;
- if (!dp1) {
+ if (!dp1 && !dp2) {
+ /* return an end node */
+ ret = efi_dp_dup(&END);
+ } else if (!dp1) {
ret = efi_dp_dup(dp2);
} else if (!dp2) {
ret = efi_dp_dup(dp1);
@@ -275,8 +296,8 @@ struct efi_device_path *efi_dp_append(const struct efi_device_path *dp1,
if (!p)
return NULL;
memcpy(p, dp1, sz1);
- memcpy(p + sz1, dp2, sz2);
- memcpy(p + sz1 + sz2, &END, sizeof(END));
+ /* the end node of the second device path has to be retained */
+ memcpy(p + sz1, dp2, sz2 + sizeof(END));
ret = p;
}
@@ -293,7 +314,7 @@ struct efi_device_path *efi_dp_append_node(const struct efi_device_path *dp,
} else if (!node) {
ret = efi_dp_dup(dp);
} else if (!dp) {
- unsigned sz = node->length;
+ size_t sz = node->length;
void *p = dp_alloc(sz + sizeof(END));
if (!p)
return NULL;
@@ -302,7 +323,7 @@ struct efi_device_path *efi_dp_append_node(const struct efi_device_path *dp,
ret = p;
} else {
/* both dp and node are non-null */
- unsigned sz = efi_dp_size(dp);
+ size_t sz = efi_dp_size(dp);
void *p = dp_alloc(sz + node->length + sizeof(END));
if (!p)
return NULL;
@@ -315,6 +336,85 @@ struct efi_device_path *efi_dp_append_node(const struct efi_device_path *dp,
return ret;
}
+struct efi_device_path *efi_dp_create_device_node(const u8 type,
+ const u8 sub_type,
+ const u16 length)
+{
+ struct efi_device_path *ret;
+
+ ret = dp_alloc(length);
+ if (!ret)
+ return ret;
+ ret->type = type;
+ ret->sub_type = sub_type;
+ ret->length = length;
+ return ret;
+}
+
+struct efi_device_path *efi_dp_append_instance(
+ const struct efi_device_path *dp,
+ const struct efi_device_path *dpi)
+{
+ size_t sz, szi;
+ struct efi_device_path *p, *ret;
+
+ if (!dpi)
+ return NULL;
+ if (!dp)
+ return efi_dp_dup(dpi);
+ sz = efi_dp_size(dp);
+ szi = efi_dp_instance_size(dpi);
+ p = dp_alloc(sz + szi + 2 * sizeof(END));
+ if (!p)
+ return NULL;
+ ret = p;
+ memcpy(p, dp, sz + sizeof(END));
+ p = (void *)p + sz;
+ p->sub_type = DEVICE_PATH_SUB_TYPE_INSTANCE_END;
+ p = (void *)p + sizeof(END);
+ memcpy(p, dpi, szi);
+ p = (void *)p + szi;
+ memcpy(p, &END, sizeof(END));
+ return ret;
+}
+
+struct efi_device_path *efi_dp_get_next_instance(struct efi_device_path **dp,
+ efi_uintn_t *size)
+{
+ size_t sz;
+ struct efi_device_path *p;
+
+ if (size)
+ *size = 0;
+ if (!dp || !*dp)
+ return NULL;
+ p = *dp;
+ sz = efi_dp_instance_size(*dp);
+ p = dp_alloc(sz + sizeof(END));
+ if (!p)
+ return NULL;
+ memcpy(p, *dp, sz + sizeof(END));
+ *dp = (void *)*dp + sz;
+ if ((*dp)->sub_type == DEVICE_PATH_SUB_TYPE_INSTANCE_END)
+ *dp = (void *)*dp + sizeof(END);
+ else
+ *dp = NULL;
+ if (size)
+ *size = sz + sizeof(END);
+ return p;
+}
+
+bool efi_dp_is_multi_instance(const struct efi_device_path *dp)
+{
+ const struct efi_device_path *p = dp;
+
+ if (!p)
+ return false;
+ while (p->type != DEVICE_PATH_TYPE_END)
+ p = (void *)p + p->length;
+ return p->sub_type == DEVICE_PATH_SUB_TYPE_INSTANCE_END;
+}
+
#ifdef CONFIG_DM
/* size of device-path not including END node for device and all parents
* up to the root device.
diff --git a/lib/efi_loader/efi_device_path_utilities.c b/lib/efi_loader/efi_device_path_utilities.c
index bc97eeee31..0ada2111db 100644
--- a/lib/efi_loader/efi_device_path_utilities.c
+++ b/lib/efi_loader/efi_device_path_utilities.c
@@ -12,69 +12,180 @@
const efi_guid_t efi_guid_device_path_utilities_protocol =
EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID;
+/*
+ * Get size of a device path.
+ *
+ * This function implements the GetDevicePathSize service of the device path
+ * utilities protocol. The device path length includes the end of path tag
+ * which may be an instance end.
+ *
+ * See the Unified Extensible Firmware Interface (UEFI) specification
+ * for details.
+ *
+ * @device_path device path
+ * @return size in bytes
+ */
static efi_uintn_t EFIAPI get_device_path_size(
const struct efi_device_path *device_path)
{
efi_uintn_t sz = 0;
- EFI_ENTRY("%p", device_path);
+ EFI_ENTRY("%pD", device_path);
/* size includes the END node: */
if (device_path)
sz = efi_dp_size(device_path) + sizeof(struct efi_device_path);
return EFI_EXIT(sz);
}
+/*
+ * Duplicate a device path.
+ *
+ * This function implements the DuplicateDevicePath service of the device path
+ * utilities protocol.
+ *
+ * The UEFI spec does not indicate what happens to the end tag. We follow the
+ * EDK2 logic: In case the device path ends with an end of instance tag, the
+ * copy will also end with an end of instance tag.
+ *
+ * See the Unified Extensible Firmware Interface (UEFI) specification
+ * for details.
+ *
+ * @device_path device path
+ * @return copy of the device path
+ */
static struct efi_device_path * EFIAPI duplicate_device_path(
const struct efi_device_path *device_path)
{
- EFI_ENTRY("%p", device_path);
+ EFI_ENTRY("%pD", device_path);
return EFI_EXIT(efi_dp_dup(device_path));
}
+/*
+ * Append device path.
+ *
+ * This function implements the AppendDevicePath service of the device path
+ * utilities protocol.
+ *
+ * See the Unified Extensible Firmware Interface (UEFI) specification
+ * for details.
+ *
+ * @src1 1st device path
+ * @src2 2nd device path
+ * @return concatenated device path
+ */
static struct efi_device_path * EFIAPI append_device_path(
const struct efi_device_path *src1,
const struct efi_device_path *src2)
{
- EFI_ENTRY("%p, %p", src1, src2);
+ EFI_ENTRY("%pD, %pD", src1, src2);
return EFI_EXIT(efi_dp_append(src1, src2));
}
+/*
+ * Append device path node.
+ *
+ * This function implements the AppendDeviceNode service of the device path
+ * utilities protocol.
+ *
+ * See the Unified Extensible Firmware Interface (UEFI) specification
+ * for details.
+ *
+ * @device_path device path
+ * @device_node device node
+ * @return concatenated device path
+ */
static struct efi_device_path * EFIAPI append_device_node(
const struct efi_device_path *device_path,
const struct efi_device_path *device_node)
{
- EFI_ENTRY("%p, %p", device_path, device_node);
+ EFI_ENTRY("%pD, %p", device_path, device_node);
return EFI_EXIT(efi_dp_append_node(device_path, device_node));
}
+/*
+ * Append device path instance.
+ *
+ * This function implements the AppendDevicePathInstance service of the device
+ * path utilities protocol.
+ *
+ * See the Unified Extensible Firmware Interface (UEFI) specification
+ * for details.
+ *
+ * @device_path 1st device path
+ * @device_path_instance 2nd device path
+ * @return concatenated device path
+ */
static struct efi_device_path * EFIAPI append_device_path_instance(
const struct efi_device_path *device_path,
const struct efi_device_path *device_path_instance)
{
- EFI_ENTRY("%p, %p", device_path, device_path_instance);
- return EFI_EXIT(NULL);
+ EFI_ENTRY("%pD, %pD", device_path, device_path_instance);
+ return EFI_EXIT(efi_dp_append_instance(device_path,
+ device_path_instance));
}
+/*
+ * Get next device path instance.
+ *
+ * This function implements the GetNextDevicePathInstance service of the device
+ * path utilities protocol.
+ *
+ * See the Unified Extensible Firmware Interface (UEFI) specification
+ * for details.
+ *
+ * @device_path_instance next device path instance
+ * @device_path_instance_size size of the device path instance
+ * @return concatenated device path
+ */
static struct efi_device_path * EFIAPI get_next_device_path_instance(
struct efi_device_path **device_path_instance,
efi_uintn_t *device_path_instance_size)
{
- EFI_ENTRY("%p, %p", device_path_instance, device_path_instance_size);
- return EFI_EXIT(NULL);
+ EFI_ENTRY("%pD, %p", device_path_instance, device_path_instance_size);
+ return EFI_EXIT(efi_dp_get_next_instance(device_path_instance,
+ device_path_instance_size));
}
+/*
+ * Check if a device path contains more than one instance.
+ *
+ * This function implements the AppendDeviceNode service of the device path
+ * utilities protocol.
+ *
+ * See the Unified Extensible Firmware Interface (UEFI) specification
+ * for details.
+ *
+ * @device_path device path
+ * @device_node device node
+ * @return concatenated device path
+ */
static bool EFIAPI is_device_path_multi_instance(
const struct efi_device_path *device_path)
{
- EFI_ENTRY("%p", device_path);
- return EFI_EXIT(false);
+ EFI_ENTRY("%pD", device_path);
+ return EFI_EXIT(efi_dp_is_multi_instance(device_path));
}
+/*
+ * Create device node.
+ *
+ * This function implements the CreateDeviceNode service of the device path
+ * utilities protocol.
+ *
+ * See the Unified Extensible Firmware Interface (UEFI) specification
+ * for details.
+ *
+ * @node_type node type
+ * @node_sub_type node sub type
+ * @node_length node length
+ * @return device path node
+ */
static struct efi_device_path * EFIAPI create_device_node(
uint8_t node_type, uint8_t node_sub_type, uint16_t node_length)
{
EFI_ENTRY("%u, %u, %u", node_type, node_sub_type, node_length);
- return EFI_EXIT(NULL);
+ return EFI_EXIT(efi_dp_create_device_node(node_type, node_sub_type,
+ node_length));
}
const struct efi_device_path_utilities_protocol efi_device_path_utilities = {
diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c
index d5fbba3138..2ccd476e57 100644
--- a/lib/efi_loader/efi_image_loader.c
+++ b/lib/efi_loader/efi_image_loader.c
@@ -13,8 +13,6 @@
#include <pe.h>
#include <asm/global_data.h>
-DECLARE_GLOBAL_DATA_PTR;
-
const efi_guid_t efi_global_variable_guid = EFI_GLOBAL_VARIABLE_GUID;
const efi_guid_t efi_guid_device_path = DEVICE_PATH_GUID;
const efi_guid_t efi_guid_loaded_image = LOADED_IMAGE_GUID;
diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c
index 9afe76cdb3..e3132e6c17 100644
--- a/lib/efi_loader/efi_net.c
+++ b/lib/efi_loader/efi_net.c
@@ -12,8 +12,6 @@
#include <lcd.h>
#include <malloc.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static const efi_guid_t efi_net_guid = EFI_SIMPLE_NETWORK_GUID;
static const efi_guid_t efi_pxe_guid = EFI_PXE_GUID;
static struct efi_pxe_packet *dhcp_ack;
diff --git a/lib/efi_selftest/Makefile b/lib/efi_selftest/Makefile
index 31b444fc8b..0e4980c8a0 100644
--- a/lib/efi_selftest/Makefile
+++ b/lib/efi_selftest/Makefile
@@ -18,6 +18,7 @@ efi_selftest_bitblt.o \
efi_selftest_controllers.o \
efi_selftest_console.o \
efi_selftest_devicepath.o \
+efi_selftest_devicepath_util.o \
efi_selftest_events.o \
efi_selftest_event_groups.o \
efi_selftest_exitbootservices.o \
diff --git a/lib/efi_selftest/efi_selftest.c b/lib/efi_selftest/efi_selftest.c
index fc5ef254a1..fd4fee726f 100644
--- a/lib/efi_selftest/efi_selftest.c
+++ b/lib/efi_selftest/efi_selftest.c
@@ -77,20 +77,20 @@ void efi_st_exit_boot_services(void)
*/
static int setup(struct efi_unit_test *test, unsigned int *failures)
{
- int ret;
-
- if (!test->setup)
+ if (!test->setup) {
+ test->setup_ok = EFI_ST_SUCCESS;
return EFI_ST_SUCCESS;
+ }
efi_st_printc(EFI_LIGHTBLUE, "\nSetting up '%s'\n", test->name);
- ret = test->setup(handle, systable);
- if (ret != EFI_ST_SUCCESS) {
+ test->setup_ok = test->setup(handle, systable);
+ if (test->setup_ok != EFI_ST_SUCCESS) {
efi_st_error("Setting up '%s' failed\n", test->name);
++*failures;
} else {
efi_st_printc(EFI_LIGHTGREEN,
"Setting up '%s' succeeded\n", test->name);
}
- return ret;
+ return test->setup_ok;
}
/*
@@ -200,7 +200,7 @@ void efi_st_do_tests(const u16 *testname, unsigned int phase,
continue;
if (steps & EFI_ST_SETUP)
setup(test, failures);
- if (steps & EFI_ST_EXECUTE)
+ if (steps & EFI_ST_EXECUTE && test->setup_ok == EFI_ST_SUCCESS)
execute(test, failures);
if (steps & EFI_ST_TEARDOWN)
teardown(test, failures);
diff --git a/lib/efi_selftest/efi_selftest_devicepath.c b/lib/efi_selftest/efi_selftest_devicepath.c
index 92940c7ab6..da68102eb2 100644
--- a/lib/efi_selftest/efi_selftest_devicepath.c
+++ b/lib/efi_selftest/efi_selftest_devicepath.c
@@ -52,7 +52,7 @@ struct efi_device_path_to_text_protocol *device_path_to_text;
* Setup unit test.
*
* Create three handles. Install a new protocol on two of them and
- * provice device paths.
+ * provide device paths.
*
* handle1
* guid interface
diff --git a/lib/efi_selftest/efi_selftest_devicepath_util.c b/lib/efi_selftest/efi_selftest_devicepath_util.c
new file mode 100644
index 0000000000..2b5384f21b
--- /dev/null
+++ b/lib/efi_selftest/efi_selftest_devicepath_util.c
@@ -0,0 +1,286 @@
+/*
+ * efi_selftest_devicepath_util
+ *
+ * Copyright (c) 2018 Heinrich Schuchardt <xypron.glpk@gmx.de>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ * This unit test checks the device path utilities protocol.
+ */
+
+#include <efi_selftest.h>
+
+static struct efi_boot_services *boottime;
+
+static efi_guid_t guid_device_path_utilities_protocol =
+ EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID;
+
+struct efi_device_path_utilities_protocol *dpu;
+
+/*
+ * Setup unit test.
+ *
+ * Locate the device path utilities protocol.
+ *
+ * @handle: handle of the loaded image
+ * @systable: system table
+ */
+static int setup(const efi_handle_t img_handle,
+ const struct efi_system_table *systable)
+{
+ int ret;
+
+ boottime = systable->boottime;
+
+ ret = boottime->locate_protocol(&guid_device_path_utilities_protocol,
+ NULL, (void **)&dpu);
+ if (ret != EFI_SUCCESS) {
+ dpu = NULL;
+ efi_st_error(
+ "Device path to text protocol is not available.\n");
+ return EFI_ST_FAILURE;
+ }
+
+ return EFI_ST_SUCCESS;
+}
+
+/*
+ * Create a device path consisting of a single media device node followed by an
+ * end node.
+ *
+ * @length: length of the media device node
+ * @dp: device path
+ * @return: status code
+ */
+static int create_single_node_device_path(unsigned int length,
+ struct efi_device_path **dp)
+{
+ struct efi_device_path *node;
+ efi_uintn_t len;
+ int ret;
+
+ node = dpu->create_device_node(DEVICE_PATH_TYPE_MEDIA_DEVICE,
+ DEVICE_PATH_SUB_TYPE_FILE_PATH, length);
+ if (!node) {
+ efi_st_error("CreateDeviceNode failed\n");
+ return EFI_ST_FAILURE;
+ }
+ *dp = dpu->append_device_node(NULL, node);
+ if (!*dp) {
+ efi_st_error("AppendDeviceNode failed\n");
+ return EFI_ST_FAILURE;
+ }
+ ret = boottime->free_pool(node);
+ if (ret != EFI_ST_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
+ len = dpu->get_device_path_size(*dp);
+ if (len != length + 4) {
+ efi_st_error("Wrong device path length %u, expected %u\n",
+ (unsigned int)len, length);
+ return EFI_ST_FAILURE;
+ }
+ return EFI_ST_SUCCESS;
+}
+
+/*
+ * Execute unit test.
+ *
+ * In the test device paths are created, copied, and concatenated. The device
+ * path length is used as a measure of success.
+ */
+static int execute(void)
+{
+ struct efi_device_path *dp1;
+ struct efi_device_path *dp2;
+ struct efi_device_path *dp3;
+
+ efi_uintn_t len;
+ int ret;
+
+ /* IsDevicePathMultiInstance(NULL) */
+ if (dpu->is_device_path_multi_instance(NULL)) {
+ efi_st_error("IsDevicePathMultiInstance(NULL) returned true\n");
+ return EFI_ST_FAILURE;
+ }
+ /* GetDevicePathSize(NULL) */
+ len = dpu->get_device_path_size(NULL);
+ if (len) {
+ efi_st_error("Wrong device path length %u, expected 0\n",
+ (unsigned int)len);
+ return EFI_ST_FAILURE;
+ }
+ /* DuplicateDevicePath(NULL) */
+ dp1 = dpu->duplicate_device_path(NULL);
+ if (dp1) {
+ efi_st_error("DuplicateDevicePath(NULL) failed\n");
+ return EFI_ST_FAILURE;
+ }
+ /* AppendDevicePath(NULL, NULL) */
+ dp1 = dpu->append_device_path(NULL, NULL);
+ if (!dp1) {
+ efi_st_error("AppendDevicePath(NULL, NULL) failed\n");
+ return EFI_ST_FAILURE;
+ }
+ len = dpu->get_device_path_size(dp1);
+ if (len != 4) {
+ efi_st_error("Wrong device path length %u, expected 4\n",
+ (unsigned int)len);
+ return EFI_ST_FAILURE;
+ }
+ ret = boottime->free_pool(dp1);
+ if (ret != EFI_ST_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
+ /* CreateDeviceNode */
+ ret = create_single_node_device_path(21, &dp1);
+ if (ret != EFI_ST_SUCCESS)
+ return ret;
+ ret = create_single_node_device_path(17, &dp2);
+ if (ret != EFI_ST_SUCCESS)
+ return ret;
+ /* AppendDevicePath */
+ dp3 = dpu->append_device_path(dp1, dp2);
+ if (!dp3) {
+ efi_st_error("AppendDevicePath failed\n");
+ return EFI_ST_FAILURE;
+ }
+ if (dp3 == dp1 || dp3 == dp2) {
+ efi_st_error("AppendDevicePath reused buffer\n");
+ return EFI_ST_FAILURE;
+ }
+ len = dpu->get_device_path_size(dp3);
+ /* 21 + 17 + 4 */
+ if (len != 42) {
+ efi_st_error("Wrong device path length %u, expected 42\n",
+ (unsigned int)len);
+ return EFI_ST_FAILURE;
+ }
+ ret = boottime->free_pool(dp2);
+ if (ret != EFI_ST_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
+ /* AppendDeviceNode */
+ dp2 = dpu->append_device_node(dp1, dp3);
+ if (!dp2) {
+ efi_st_error("AppendDevicePath failed\n");
+ return EFI_ST_FAILURE;
+ }
+ len = dpu->get_device_path_size(dp2);
+ /* 21 + 21 + 4 */
+ if (len != 46) {
+ printf("%s(%d) %s\n", __FILE__, __LINE__, __func__);
+ efi_st_error("Wrong device path length %u, expected 46\n",
+ (unsigned int)len);
+ return EFI_ST_FAILURE;
+ }
+ ret = boottime->free_pool(dp1);
+ if (ret != EFI_ST_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
+ /* IsDevicePathMultiInstance */
+ if (dpu->is_device_path_multi_instance(dp2)) {
+ printf("%s(%d) %s\n", __FILE__, __LINE__, __func__);
+ efi_st_error("IsDevicePathMultiInstance returned true\n");
+ return EFI_ST_FAILURE;
+ }
+ /* AppendDevicePathInstance */
+ dp1 = dpu->append_device_path_instance(dp2, dp3);
+ if (!dp1) {
+ efi_st_error("AppendDevicePathInstance failed\n");
+ return EFI_ST_FAILURE;
+ }
+ len = dpu->get_device_path_size(dp1);
+ /* 46 + 42 */
+ if (len != 88) {
+ efi_st_error("Wrong device path length %u, expected 88\n",
+ (unsigned int)len);
+ return EFI_ST_FAILURE;
+ }
+ /* IsDevicePathMultiInstance */
+ if (!dpu->is_device_path_multi_instance(dp1)) {
+ efi_st_error("IsDevicePathMultiInstance returned false\n");
+ return EFI_ST_FAILURE;
+ }
+ ret = boottime->free_pool(dp2);
+ if (ret != EFI_ST_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
+ ret = boottime->free_pool(dp3);
+ if (ret != EFI_ST_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
+ /* GetNextDevicePathInstance */
+ dp3 = dp1;
+ dp2 = dpu->get_next_device_path_instance(&dp1, &len);
+ if (!dp2) {
+ efi_st_error("GetNextDevicePathInstance failed\n");
+ return EFI_ST_FAILURE;
+ }
+ if (!dp1) {
+ efi_st_error("GetNextDevicePathInstance no 2nd instance\n");
+ return EFI_ST_FAILURE;
+ }
+ if (len != 46) {
+ efi_st_error("Wrong device path length %u, expected 46\n",
+ (unsigned int)len);
+ return EFI_ST_FAILURE;
+ }
+ len = dpu->get_device_path_size(dp1);
+ if (len != 42) {
+ efi_st_error("Wrong device path length %u, expected 42\n",
+ (unsigned int)len);
+ return EFI_ST_FAILURE;
+ }
+ ret = boottime->free_pool(dp2);
+ if (ret != EFI_ST_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
+ dp2 = dpu->get_next_device_path_instance(&dp1, &len);
+ if (!dp2) {
+ efi_st_error("GetNextDevicePathInstance failed\n");
+ return EFI_ST_FAILURE;
+ }
+ if (len != 42) {
+ efi_st_error("Wrong device path length %u, expected 46\n",
+ (unsigned int)len);
+ return EFI_ST_FAILURE;
+ }
+ if (dp1) {
+ efi_st_error("GetNextDevicePathInstance did not signal end\n");
+ return EFI_ST_FAILURE;
+ }
+ ret = boottime->free_pool(dp2);
+ if (ret != EFI_ST_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
+
+ /* Clean up */
+ ret = boottime->free_pool(dp2);
+ if (ret != EFI_ST_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
+ ret = boottime->free_pool(dp3);
+ if (ret != EFI_ST_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
+
+ return EFI_ST_SUCCESS;
+}
+
+EFI_UNIT_TEST(dputil) = {
+ .name = "device path utilities protocol",
+ .phase = EFI_EXECUTE_BEFORE_BOOTTIME_EXIT,
+ .setup = setup,
+ .execute = execute,
+};
diff --git a/lib/of_live.c b/lib/of_live.c
index 148865c967..e574ae8a39 100644
--- a/lib/of_live.c
+++ b/lib/of_live.c
@@ -16,8 +16,6 @@
#include <dm/of_access.h>
#include <linux/err.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static void *unflatten_dt_alloc(void **mem, unsigned long size,
unsigned long align)
{
diff --git a/lib/panic.c b/lib/panic.c
index e2b8b74b7c..bae8a35935 100644
--- a/lib/panic.c
+++ b/lib/panic.c
@@ -37,9 +37,19 @@ void panic_str(const char *str)
void panic(const char *fmt, ...)
{
+#if CONFIG_IS_ENABLED(PRINTF)
va_list args;
va_start(args, fmt);
vprintf(fmt, args);
va_end(args);
+#endif
panic_finish();
}
+
+void __assert_fail(const char *assertion, const char *file, unsigned int line,
+ const char *function)
+{
+ /* This will not return */
+ panic("%s:%u: %s: Assertion `%s' failed.", file, line, function,
+ assertion);
+}
diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig
index fde1ac108d..2b33f323bc 100644
--- a/lib/rsa/Kconfig
+++ b/lib/rsa/Kconfig
@@ -13,14 +13,14 @@ config RSA
option. The software based modular exponentiation is built into
mkimage irrespective of this option.
+if RSA
+
config SPL_RSA
bool "Use RSA Library within SPL"
- depends on RSA
-if RSA
config RSA_SOFTWARE_EXP
bool "Enable driver for RSA Modular Exponentiation in software"
- depends on DM && RSA
+ depends on DM
help
Enables driver for modular exponentiation in software. This is a RSA
algorithm used in FIT image verification. It required RSA Key as
@@ -29,7 +29,7 @@ config RSA_SOFTWARE_EXP
config RSA_FREESCALE_EXP
bool "Enable RSA Modular Exponentiation with FSL crypto accelerator"
- depends on DM && RSA && FSL_CAAM && !ARCH_MX7 && !ARCH_MX6 && !ARCH_MX5
+ depends on DM && FSL_CAAM && !ARCH_MX7 && !ARCH_MX6 && !ARCH_MX5
help
Enables driver for RSA modular exponentiation using Freescale cryptographic
accelerator - CAAM.
diff --git a/lib/smbios.c b/lib/smbios.c
index 8f19ad89c1..00b521eca9 100644
--- a/lib/smbios.c
+++ b/lib/smbios.c
@@ -16,8 +16,6 @@
#include <dm/uclass-internal.h>
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
/**
* smbios_add_string() - add a string to the string area
*
diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
index 0b04813dc2..5f7e27d76e 100644
--- a/lib/tiny-printf.c
+++ b/lib/tiny-printf.c
@@ -23,11 +23,6 @@ struct printf_info {
void (*putc)(struct printf_info *info, char ch);
};
-static void putc_normal(struct printf_info *info, char ch)
-{
- putc(ch);
-}
-
static void out(struct printf_info *info, char c)
{
*info->bf++ = c;
@@ -321,6 +316,12 @@ abort:
return 0;
}
+#if CONFIG_IS_ENABLED(PRINTF)
+static void putc_normal(struct printf_info *info, char ch)
+{
+ putc(ch);
+}
+
int vprintf(const char *fmt, va_list va)
{
struct printf_info info;
@@ -343,6 +344,7 @@ int printf(const char *fmt, ...)
return ret;
}
+#endif
static void putc_outstr(struct printf_info *info, char ch)
{
@@ -381,12 +383,3 @@ int snprintf(char *buf, size_t size, const char *fmt, ...)
return ret;
}
-
-void __assert_fail(const char *assertion, const char *file, unsigned line,
- const char *function)
-{
- /* This will not return */
- printf("%s:%u: %s: Assertion `%s' failed.", file, line, function,
- assertion);
- hang();
-}
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 5f7a5f17dc..8514f50498 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -783,6 +783,7 @@ int sprintf(char *buf, const char *fmt, ...)
return i;
}
+#if CONFIG_IS_ENABLED(PRINTF)
int printf(const char *fmt, ...)
{
va_list args;
@@ -824,15 +825,7 @@ int vprintf(const char *fmt, va_list args)
puts(printbuffer);
return i;
}
-
-
-void __assert_fail(const char *assertion, const char *file, unsigned line,
- const char *function)
-{
- /* This will not return */
- panic("%s:%u: %s: Assertion `%s' failed.", file, line, function,
- assertion);
-}
+#endif
char *simple_itoa(ulong i)
{
diff --git a/net/net.c b/net/net.c
index 8a9b69c6b0..d222c1f2bd 100644
--- a/net/net.c
+++ b/net/net.c
@@ -108,8 +108,6 @@
#include "sntp.h"
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
/** BOOTP EXTENTIONS **/
/* Our subnet mask (0=unknown) */
diff --git a/post/lib_powerpc/cpu.c b/post/lib_powerpc/cpu.c
index 915eb0a764..529f2fa65a 100644
--- a/post/lib_powerpc/cpu.c
+++ b/post/lib_powerpc/cpu.c
@@ -42,8 +42,6 @@ extern int cpu_post_test_multi (void);
extern int cpu_post_test_string (void);
extern int cpu_post_test_complex (void);
-DECLARE_GLOBAL_DATA_PTR;
-
ulong cpu_post_makecr (long v)
{
ulong cr = 0;
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 9eba487ec4..bbc44e3291 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -373,7 +373,6 @@ CONFIG_DIALOG_POWER
CONFIG_DIMM_SLOTS_PER_CTLR
CONFIG_DIRECT_NOR_BOOT
CONFIG_DISABLE_CONSOLE
-CONFIG_DISABLE_IMAGE_LEGACY
CONFIG_DISCONTIGMEM
CONFIG_DISCOVER_PHY
CONFIG_DISPLAY_AER_xxxx
@@ -673,7 +672,6 @@ CONFIG_FSL_IIM
CONFIG_FSL_ISBC_KEY_EXT
CONFIG_FSL_LAYERSCAPE
CONFIG_FSL_LBC
-CONFIG_FSL_LINFLEXUART
CONFIG_FSL_MC9SDZ60
CONFIG_FSL_MEMAC
CONFIG_FSL_NGPIXIS
@@ -974,7 +972,6 @@ CONFIG_IDE_SWAP_IO
CONFIG_IDT8T49N222A
CONFIG_ID_EEPROM
CONFIG_IMA
-CONFIG_IMAGE_FORMAT_LEGACY
CONFIG_IMX
CONFIG_IMX6_PWM_PER_CLK
CONFIG_IMX_HDMI
@@ -1316,7 +1313,6 @@ CONFIG_MPC85XX_FEC_NAME
CONFIG_MPC85XX_PCI2
CONFIG_MPC8xxx_DISABLE_BPTR
CONFIG_MPLL_FREQ
-CONFIG_MP_CLK_FREQ
CONFIG_MSHC_FREQ
CONFIG_MTD_CONCAT
CONFIG_MTD_DEVICE
@@ -1553,8 +1549,6 @@ CONFIG_PLATFORM_ENV_SETTINGS
CONFIG_PLATINUM_BOARD
CONFIG_PLATINUM_CPU
CONFIG_PLATINUM_PROJECT
-CONFIG_PLL1_CLK_FREQ
-CONFIG_PLL1_DIV2_CLK_FREQ
CONFIG_PM
CONFIG_PMC_BR_PRELIM
CONFIG_PMC_OR_PRELIM
@@ -1625,7 +1619,6 @@ CONFIG_PXA_PWR_I2C
CONFIG_PXA_STD_I2C
CONFIG_PXA_VGA
CONFIG_PXA_VIDEO
-CONFIG_P_CLK_FREQ
CONFIG_QBMAN_CLK_DIV
CONFIG_QE
CONFIG_QEMU_MIPS
@@ -1909,7 +1902,6 @@ CONFIG_SPEAR_UART48M
CONFIG_SPEAR_UARTCLKMSK
CONFIG_SPEAR_USBBOOT
CONFIG_SPEAR_USBTTY
-CONFIG_SPI
CONFIG_SPI_ADDR
CONFIG_SPI_BOOTING
CONFIG_SPI_CS_IS_VALID
@@ -2082,7 +2074,6 @@ CONFIG_SYS_APP1_BASE
CONFIG_SYS_APP1_SIZE
CONFIG_SYS_APP2_BASE
CONFIG_SYS_APP2_SIZE
-CONFIG_SYS_ARCH_TIMER
CONFIG_SYS_ARM_CACHE_WRITETHROUGH
CONFIG_SYS_AT91_CPU_NAME
CONFIG_SYS_AT91_MAIN_CLOCK
@@ -3188,10 +3179,8 @@ CONFIG_SYS_I2C_PEX8518_ADDR
CONFIG_SYS_I2C_PINMUX_CLR
CONFIG_SYS_I2C_PINMUX_REG
CONFIG_SYS_I2C_PINMUX_SET
-CONFIG_SYS_I2C_POWERIC_ADDR
CONFIG_SYS_I2C_PXA
CONFIG_SYS_I2C_QIXIS_ADDR
-CONFIG_SYS_I2C_RCAR
CONFIG_SYS_I2C_RTC_ADDR
CONFIG_SYS_I2C_S3C24X0_SLAVE
CONFIG_SYS_I2C_S3C24X0_SPEED
@@ -4656,7 +4645,6 @@ CONFIG_USB_EHCI_KIRKWOOD
CONFIG_USB_EHCI_MX5
CONFIG_USB_EHCI_MXC
CONFIG_USB_EHCI_MXS
-CONFIG_USB_EHCI_RMOBILE
CONFIG_USB_EHCI_SPEAR
CONFIG_USB_EHCI_SUNXI
CONFIG_USB_EHCI_TEGRA
diff --git a/test/dm/adc.c b/test/dm/adc.c
index b0d4fe5b23..85535d9eab 100644
--- a/test/dm/adc.c
+++ b/test/dm/adc.c
@@ -20,8 +20,6 @@
#include <sandbox-adc.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
static int dm_test_adc_bind(struct unit_test_state *uts)
{
struct udevice *dev;
diff --git a/test/dm/eth.c b/test/dm/eth.c
index 67fd660ee4..4915baf07c 100644
--- a/test/dm/eth.c
+++ b/test/dm/eth.c
@@ -18,8 +18,6 @@
#include <asm/eth.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define DM_TEST_ETH_NUM 4
static int dm_test_eth(struct unit_test_state *uts)
diff --git a/test/dm/gpio.c b/test/dm/gpio.c
index b99452340d..6b01dbd73c 100644
--- a/test/dm/gpio.c
+++ b/test/dm/gpio.c
@@ -13,8 +13,6 @@
#include <asm/gpio.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Test that sandbox GPIOs work correctly */
static int dm_test_gpio(struct unit_test_state *uts)
{
diff --git a/test/dm/led.c b/test/dm/led.c
index fde700be38..e46b41674d 100644
--- a/test/dm/led.c
+++ b/test/dm/led.c
@@ -11,8 +11,6 @@
#include <dm/test.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Base test of the led uclass */
static int dm_test_led_base(struct unit_test_state *uts)
{
diff --git a/test/dm/mmc.c b/test/dm/mmc.c
index 5bca4b79d5..c8c470c1b1 100644
--- a/test/dm/mmc.c
+++ b/test/dm/mmc.c
@@ -10,8 +10,6 @@
#include <dm/test.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Basic test of the mmc uclass. We could expand this by implementing an MMC
* stack for sandbox, or at least implementing the basic operation.
diff --git a/test/dm/phy.c b/test/dm/phy.c
index 65b33fe68d..b262531962 100644
--- a/test/dm/phy.c
+++ b/test/dm/phy.c
@@ -11,8 +11,6 @@
#include <dm/test.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Base test of the phy uclass */
static int dm_test_phy_base(struct unit_test_state *uts)
{
diff --git a/test/dm/pmic.c b/test/dm/pmic.c
index 422ea3e416..0e5d671924 100644
--- a/test/dm/pmic.c
+++ b/test/dm/pmic.c
@@ -21,8 +21,6 @@
#include <power/sandbox_pmic.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Test PMIC get method */
static int dm_test_power_pmic_get(struct unit_test_state *uts)
{
diff --git a/test/dm/pwm.c b/test/dm/pwm.c
index 6b2dedf6cc..cccd1ad162 100644
--- a/test/dm/pwm.c
+++ b/test/dm/pwm.c
@@ -10,8 +10,6 @@
#include <dm/test.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Basic test of the pwm uclass */
static int dm_test_pwm_base(struct unit_test_state *uts)
{
diff --git a/test/dm/regmap.c b/test/dm/regmap.c
index 7f66058735..f83a821112 100644
--- a/test/dm/regmap.c
+++ b/test/dm/regmap.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2015 Google, Inc
-2 *
+ *
* SPDX-License-Identifier: GPL-2.0+
*/
@@ -13,8 +13,6 @@
#include <dm/test.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Base test of register maps */
static int dm_test_regmap_base(struct unit_test_state *uts)
{
diff --git a/test/dm/regulator.c b/test/dm/regulator.c
index 395381d4bd..abd6522137 100644
--- a/test/dm/regulator.c
+++ b/test/dm/regulator.c
@@ -22,8 +22,6 @@
#include <power/sandbox_pmic.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
enum {
BUCK1,
BUCK2,
diff --git a/test/dm/spmi.c b/test/dm/spmi.c
index d519a9015e..0ecf70259b 100644
--- a/test/dm/spmi.c
+++ b/test/dm/spmi.c
@@ -16,8 +16,6 @@
#include <asm/gpio.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Test if bus childs got probed propperly*/
static int dm_test_spmi_probe(struct unit_test_state *uts)
{
diff --git a/test/dm/syscon.c b/test/dm/syscon.c
index c40f5fc09d..99bff962a9 100644
--- a/test/dm/syscon.c
+++ b/test/dm/syscon.c
@@ -11,8 +11,6 @@
#include <dm/test.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Base test of system controllers */
static int dm_test_syscon_base(struct unit_test_state *uts)
{
diff --git a/test/dm/timer.c b/test/dm/timer.c
index bf964c443a..ba9bdc10ca 100644
--- a/test/dm/timer.c
+++ b/test/dm/timer.c
@@ -10,8 +10,6 @@
#include <dm/test.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/*
* Basic test of the timer uclass.
*/
diff --git a/test/dm/usb.c b/test/dm/usb.c
index 4fd249bf64..4e1c870408 100644
--- a/test/dm/usb.c
+++ b/test/dm/usb.c
@@ -16,8 +16,6 @@
#include <dm/uclass-internal.h>
#include <test/ut.h>
-DECLARE_GLOBAL_DATA_PTR;
-
/* Test that sandbox USB works correctly */
static int dm_test_usb_base(struct unit_test_state *uts)
{
diff --git a/test/dm/video.c b/test/dm/video.c
index caca496902..2f7df4e611 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -24,8 +24,6 @@
* in sandbox_sdl_sync() would also need to change to handle the different
* surface depth.
*/
-DECLARE_GLOBAL_DATA_PTR;
-
/* Basic test of the video uclass */
static int dm_test_video_base(struct unit_test_state *uts)
{
diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c
index 8eee72e257..8cd9ffa1c6 100644
--- a/tools/mkenvimage.c
+++ b/tools/mkenvimage.c
@@ -162,13 +162,13 @@ int main(int argc, char **argv)
txt_fd = STDIN_FILENO;
do {
- filebuf = realloc(filebuf, readlen);
+ filebuf = realloc(filebuf, filesize + readlen);
if (!filebuf) {
fprintf(stderr, "Can't realloc memory for the input file buffer\n");
return EXIT_FAILURE;
}
readbytes = read(txt_fd, filebuf + filesize, readlen);
- if (errno) {
+ if (readbytes < 0) {
fprintf(stderr, "Error while reading stdin: %s\n",
strerror(errno));
return EXIT_FAILURE;
diff --git a/tools/mkimage.c b/tools/mkimage.c
index 4e561820e7..32e07be94a 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -301,6 +301,8 @@ static void process_args(int argc, char **argv)
else if (!params.datafile)
usage("Missing data file for auto-FIT (use -d)");
} else if (type != IH_TYPE_INVALID) {
+ if (type == IH_TYPE_SCRIPT && !params.datafile)
+ usage("Missing data file for script (use -d)");
params.type = type;
}