summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/global_data.h2
-rw-r--r--include/bootcount.h4
-rw-r--r--include/config_distro_bootcmd.h10
-rw-r--r--include/configs/P1010RDB.h4
-rw-r--r--include/configs/am335x_evm.h4
-rw-r--r--include/configs/am335x_guardian.h4
-rw-r--r--include/configs/am335x_shc.h4
-rw-r--r--include/configs/am43xx_evm.h4
-rw-r--r--include/configs/am57xx_evm.h2
-rw-r--r--include/configs/apalis-tk1.h58
-rw-r--r--include/configs/apalis_t30.h12
-rw-r--r--include/configs/capricorn-common.h4
-rw-r--r--include/configs/cardhu.h4
-rw-r--r--include/configs/cgtqmx8.h2
-rw-r--r--include/configs/colibri_t20.h11
-rw-r--r--include/configs/colibri_t30.h12
-rw-r--r--include/configs/da850evm.h2
-rw-r--r--include/configs/dra7xx_evm.h4
-rw-r--r--include/configs/ds116.h4
-rw-r--r--include/configs/ds414.h4
-rw-r--r--include/configs/endeavoru.h43
-rw-r--r--include/configs/gardena-smart-gateway-mt7688.h2
-rw-r--r--include/configs/grouper.h45
-rw-r--r--include/configs/ideapad-yoga-11.h58
-rw-r--r--include/configs/imx6q-bosch-acc.h2
-rw-r--r--include/configs/imx6ulz_smm_m2.h4
-rw-r--r--include/configs/imx8mm-cl-iot-gate.h2
-rw-r--r--include/configs/imx8mm_beacon.h2
-rw-r--r--include/configs/imx8mm_data_modul_edm_sbc.h2
-rw-r--r--include/configs/imx8mm_evk.h2
-rw-r--r--include/configs/imx8mm_icore_mx8mm.h4
-rw-r--r--include/configs/imx8mm_phg.h2
-rw-r--r--include/configs/imx8mm_venice.h2
-rw-r--r--include/configs/imx8mp_rsb3720.h2
-rw-r--r--include/configs/imx8mq_cm.h2
-rw-r--r--include/configs/imx8mq_evk.h2
-rw-r--r--include/configs/imx8mq_phanbell.h2
-rw-r--r--include/configs/imx8mq_reform2.h2
-rw-r--r--include/configs/imx8qm_mek.h2
-rw-r--r--include/configs/imx8qxp_mek.h2
-rw-r--r--include/configs/imx8ulp_evk.h2
-rw-r--r--include/configs/imx93_evk.h2
-rw-r--r--include/configs/khadas-vim3_android.h8
-rw-r--r--include/configs/khadas-vim3l_android.h8
-rw-r--r--include/configs/kontron-sl-mx8mm.h4
-rw-r--r--include/configs/kontron_pitx_imx8m.h2
-rw-r--r--include/configs/librem5.h2
-rw-r--r--include/configs/linkit-smart-7688.h2
-rw-r--r--include/configs/ls1043a_common.h6
-rw-r--r--include/configs/ls1046a_common.h6
-rw-r--r--include/configs/ls1088a_common.h2
-rw-r--r--include/configs/meson64.h28
-rw-r--r--include/configs/meson64_android.h26
-rw-r--r--include/configs/msc_sm2s_imx8mp.h2
-rw-r--r--include/configs/mt7621.h2
-rw-r--r--include/configs/mt7628.h2
-rw-r--r--include/configs/n2350.h4
-rw-r--r--include/configs/p1_p2_rdb_pc.h4
-rw-r--r--include/configs/p2771-0000.h20
-rw-r--r--include/configs/p3450-0000.h13
-rw-r--r--include/configs/phycore_imx8mm.h2
-rw-r--r--include/configs/pico-imx8mq.h2
-rw-r--r--include/configs/qc750.h42
-rw-r--r--include/configs/rk3399_common.h4
-rw-r--r--include/configs/rockchip-common.h2
-rw-r--r--include/configs/socfpga_common.h2
-rw-r--r--include/configs/stm32mp15_common.h4
-rw-r--r--include/configs/stm32mp15_dh_dhsom.h2
-rw-r--r--include/configs/surface-rt.h18
-rw-r--r--include/configs/ti_omap3_common.h2
-rw-r--r--include/configs/ti_omap4_common.h2
-rw-r--r--include/configs/transformer-common.h91
-rw-r--r--include/configs/transformer-t20.h4
-rw-r--r--include/configs/transformer-t30.h6
-rw-r--r--include/configs/turris_1x.h4
-rw-r--r--include/configs/turris_omnia.h4
-rw-r--r--include/configs/verdin-imx8mm.h2
-rw-r--r--include/configs/verdin-imx8mp.h4
-rw-r--r--include/configs/vining_2000.h2
-rw-r--r--include/configs/x3-t30.h44
-rw-r--r--include/configs/xilinx_zynqmp.h2
-rw-r--r--include/configs/zynq-common.h4
-rw-r--r--include/dm/ofnode.h41
-rw-r--r--include/dt-bindings/clock/sun50i-h616-ccu.h116
-rw-r--r--include/dt-bindings/reset/sun50i-h616-ccu.h70
-rw-r--r--include/efi_loader.h2
-rw-r--r--include/env.h2
-rw-r--r--include/env/nvidia/prod_upd.env60
-rw-r--r--include/env_callback.h2
-rw-r--r--include/fdtdec.h2
-rw-r--r--include/image-android-dt.h2
-rw-r--r--include/iotrace.h2
-rw-r--r--include/led.h147
-rw-r--r--include/linux/kconfig.h8
-rw-r--r--include/linux/mtd/spi-nor.h22
-rw-r--r--include/log.h12
-rw-r--r--include/mmc.h2
-rw-r--r--include/mtd/cfi_flash.h2
-rw-r--r--include/net.h6
-rw-r--r--include/part.h2
-rw-r--r--include/power/mp5416.h2
-rw-r--r--include/power/pca9450.h1
-rw-r--r--include/sdp.h2
-rw-r--r--include/search.h2
-rw-r--r--include/spi.h23
-rw-r--r--include/spl.h84
-rw-r--r--include/spl_gpio.h19
-rw-r--r--include/status_led.h13
-rw-r--r--include/stdio.h5
-rw-r--r--include/sunxi_gpio.h2
-rw-r--r--include/upl.h4
-rw-r--r--include/vbe.h2
112 files changed, 530 insertions, 862 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index d6c15e2c406..644a0d77873 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -55,7 +55,7 @@ struct global_data {
* @cur_serial_dev: current serial device
*/
struct udevice *cur_serial_dev;
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
/**
* @jt: jump table
*
diff --git a/include/bootcount.h b/include/bootcount.h
index bc06e17c9fb..847c0f02d98 100644
--- a/include/bootcount.h
+++ b/include/bootcount.h
@@ -120,13 +120,13 @@ static inline void bootcount_inc(void)
return;
}
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
/* Only increment bootcount when no bootcount support in SPL */
#if !defined(CONFIG_SPL_BOOTCOUNT_LIMIT) && !defined(CONFIG_TPL_BOOTCOUNT_LIMIT)
bootcount_store(++bootcount);
#endif
env_set_ulong("bootcount", bootcount);
-#endif /* !CONFIG_SPL_BUILD */
+#endif /* !CONFIG_XPL_BUILD */
}
#else
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 2a136b96a6d..0a4e4b8ff85 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -63,7 +63,7 @@
#define BOOTENV_SHARED_MMC BOOTENV_SHARED_BLKDEV(mmc)
#define BOOTENV_DEV_MMC BOOTENV_DEV_BLKDEV
#define BOOTENV_DEV_NAME_MMC BOOTENV_DEV_NAME_BLKDEV
-#elif defined(CONFIG_SPL_BUILD)
+#elif defined(CONFIG_XPL_BUILD)
#define BOOTENV_SHARED_MMC
#define BOOTENV_DEV_MMC BOOTENV_DEV_BLKDEV_NONE
#define BOOTENV_DEV_NAME_MMC BOOTENV_DEV_NAME_BLKDEV_NONE
@@ -198,7 +198,7 @@
#define BOOTENV_SHARED_SATA BOOTENV_SHARED_BLKDEV(sata)
#define BOOTENV_DEV_SATA BOOTENV_DEV_BLKDEV
#define BOOTENV_DEV_NAME_SATA BOOTENV_DEV_NAME_BLKDEV
-#elif defined(CONFIG_SPL_BUILD)
+#elif defined(CONFIG_XPL_BUILD)
#define BOOTENV_SHARED_SATA
#define BOOTENV_DEV_SATA BOOTENV_DEV_BLKDEV_NONE
#define BOOTENV_DEV_NAME_SATA BOOTENV_DEV_NAME_BLKDEV_NONE
@@ -305,7 +305,7 @@
BOOTENV_SHARED_BLKDEV_BODY(usb)
#define BOOTENV_DEV_USB BOOTENV_DEV_BLKDEV
#define BOOTENV_DEV_NAME_USB BOOTENV_DEV_NAME_BLKDEV
-#elif defined(CONFIG_SPL_BUILD)
+#elif defined(CONFIG_XPL_BUILD)
#define BOOTENV_RUN_NET_USB_START
#define BOOTENV_SHARED_USB
#define BOOTENV_DEV_USB BOOTENV_DEV_BLKDEV_NONE
@@ -412,7 +412,7 @@
"\0"
#define BOOTENV_DEV_NAME_DHCP(devtypeu, devtypel, instance) \
"dhcp "
-#elif defined(CONFIG_SPL_BUILD)
+#elif defined(CONFIG_XPL_BUILD)
#define BOOTENV_DEV_DHCP BOOTENV_DEV_BLKDEV_NONE
#define BOOTENV_DEV_NAME_DHCP BOOTENV_DEV_NAME_BLKDEV_NONE
#else
@@ -433,7 +433,7 @@
"fi\0"
#define BOOTENV_DEV_NAME_PXE(devtypeu, devtypel, instance) \
"pxe "
-#elif defined(CONFIG_SPL_BUILD)
+#elif defined(CONFIG_XPL_BUILD)
#define BOOTENV_DEV_PXE BOOTENV_DEV_BLKDEV_NONE
#define BOOTENV_DEV_NAME_PXE BOOTENV_DEV_NAME_BLKDEV_NONE
#else
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 9efae58ce90..20fded56b77 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -43,7 +43,7 @@
#define CFG_SYS_NAND_U_BOOT_SIZE (576 << 10)
#define CFG_SYS_NAND_U_BOOT_DST (0x11000000)
#define CFG_SYS_NAND_U_BOOT_START (0x11000000)
-#elif defined(CONFIG_SPL_BUILD)
+#elif defined(CONFIG_XPL_BUILD)
#define CFG_SYS_NAND_U_BOOT_SIZE (128 << 10)
#define CFG_SYS_NAND_U_BOOT_DST 0xD0000000
#define CFG_SYS_NAND_U_BOOT_START 0xD0000000
@@ -290,7 +290,7 @@ extern unsigned long get_sdram_size(void);
/*
* Config the L2 Cache as L2 SRAM
*/
-#if defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_XPL_BUILD)
#if defined(CONFIG_SDCARD) || defined(CONFIG_SPIFLASH)
#define CFG_SYS_INIT_L2_ADDR 0xD0000000
#define CFG_SYS_INIT_L2_ADDR_PHYS CFG_SYS_INIT_L2_ADDR
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 67f46562539..19d3c72a6f1 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -75,7 +75,7 @@
#include <config_distro_bootcmd.h>
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#include <env/ti/dfu.h>
#define CFG_EXTRA_ENV_SETTINGS \
@@ -181,7 +181,7 @@
#endif /* !CONFIG_MTD_RAW_NAND */
/* USB Device Firmware Update support */
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#define DFUARGS \
DFU_ALT_INFO_EMMC \
DFU_ALT_INFO_MMC \
diff --git a/include/configs/am335x_guardian.h b/include/configs/am335x_guardian.h
index a8fa61c7e50..96efd38594a 100644
--- a/include/configs/am335x_guardian.h
+++ b/include/configs/am335x_guardian.h
@@ -16,7 +16,7 @@
#define V_OSCK 24000000 /* Clock output from T2 */
#define V_SCLK (V_OSCK)
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#define MEM_LAYOUT_ENV_SETTINGS \
"scriptaddr=0x80000000\0" \
@@ -70,7 +70,7 @@
"setenv boot_syslinux_conf \"extlinux/extlinux.conf\"; " \
"run bootcmd_ubifs0;\0"
-#endif /* ! CONFIG_SPL_BUILD */
+#endif /* ! CONFIG_XPL_BUILD */
#define SPLASH_SCREEN_NAND_PART "nand0,10"
#define SPLASH_SCREEN_BMP_FILE_SIZE 0x26000
diff --git a/include/configs/am335x_shc.h b/include/configs/am335x_shc.h
index dedef91ba59..55d5190b221 100644
--- a/include/configs/am335x_shc.h
+++ b/include/configs/am335x_shc.h
@@ -20,7 +20,7 @@
#define V_OSCK 24000000 /* Clock output from T2 */
#define V_SCLK (V_OSCK)
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#define CFG_EXTRA_ENV_SETTINGS \
"loadaddr=0x80200000\0" \
"kloadaddr=0x84000000\0" \
@@ -117,7 +117,7 @@
"setenv mmcpart 5; " \
"fi; " \
"setenv mmcroot /dev/mmcblk${mmcdev}p${mmcpart};\0"
-#endif /* #ifndef CONFIG_SPL_BUILD */
+#endif /* #ifndef CONFIG_XPL_BUILD */
#if defined CONFIG_SHC_NETBOOT
/* Network Boot */
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index 87ffa769d15..036995cbb48 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -35,7 +35,7 @@
/* NS16550 Configuration */
#define CFG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
/* USB Device Firmware Update support */
#define DFUARGS \
"dfu_bufsiz=0x10000\0" \
@@ -63,7 +63,7 @@
#include <config_distro_bootcmd.h>
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#include <env/ti/dfu.h>
#define CFG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index 4b4362ccfd8..aa31f3b05a0 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -18,7 +18,7 @@
#define CFG_SYS_NS16550_COM2 UART2_BASE /* UART2 */
#define CFG_SYS_NS16550_COM3 UART3_BASE /* UART3 */
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#define DFUARGS \
"dfu_bufsiz=0x10000\0" \
DFU_ALT_INFO_MMC \
diff --git a/include/configs/apalis-tk1.h b/include/configs/apalis-tk1.h
index 71d4727ca98..4c690a17856 100644
--- a/include/configs/apalis-tk1.h
+++ b/include/configs/apalis-tk1.h
@@ -18,64 +18,6 @@
#define FDT_MODULE "apalis-v1.2"
#define FDT_MODULE_V1_0 "apalis"
-/*
- * Custom Distro Boot configuration:
- * 1. 8bit SD port (MMC1)
- * 2. 4bit SD port (MMC2)
- * 3. eMMC (MMC0)
- */
-#define BOOT_TARGET_DEVICES(func) \
- func(MMC, mmc, 1) \
- func(MMC, mmc, 2) \
- func(MMC, mmc, 0) \
- func(USB, usb, 0) \
- func(PXE, pxe, na) \
- func(DHCP, dhcp, na)
-
-#define DFU_ALT_EMMC_INFO "apalis-tk1.img raw 0x0 0x500 mmcpart 1; " \
- "boot part 0 1 mmcpart 0; " \
- "rootfs part 0 2 mmcpart 0; " \
- "zImage fat 0 1 mmcpart 0; " \
- "tegra124-apalis-eval.dtb fat 0 1 mmcpart 0"
-
-#define UBOOT_UPDATE \
- "uboot_hwpart=1\0" \
- "uboot_blk=0\0" \
- "set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff && " \
- "setexpr blkcnt ${blkcnt} / 0x200\0" \
- "update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && " \
- "mmc write ${loadaddr} ${uboot_blk} ${blkcnt}\0" \
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "boot_file=zImage\0" \
- "boot_script_dhcp=boot.scr\0" \
- "console=ttyS0\0" \
- "defargs=lp0_vec=2064@0xf46ff000 core_edp_mv=1150 core_edp_ma=4000 " \
- "usb_port_owner_info=2 lane_owner_info=6 emc_max_dvfs=0 " \
- "user_debug=30 pcie_aspm=off\0" \
- "dfu_alt_info=" DFU_ALT_EMMC_INFO "\0" \
- "fdt_board=eval\0" \
- "fdt_fixup=;\0" \
- "fdt_module=" FDT_MODULE "\0" \
- UBOOT_UPDATE \
- "setethupdate=if env exists ethaddr; then; else setenv ethaddr " \
- "00:14:2d:00:00:00; fi; pci enum && tftpboot ${loadaddr} " \
- "flash_eth.img && source ${loadaddr}\0" \
- "setsdupdate=setenv interface mmc; setenv drive 1; mmc rescan; " \
- "load ${interface} ${drive}:1 ${loadaddr} flash_blk.img " \
- "|| setenv drive 2; mmc rescan; load ${interface} ${drive}:1 " \
- "${loadaddr} flash_blk.img && " \
- "source ${loadaddr}\0" \
- "setup=setenv setupargs igb_mac=${ethaddr} " \
- "consoleblank=0 no_console_suspend=1 console=tty1 " \
- "console=${console},${baudrate}n8 debug_uartport=lsport,0 " \
- "${memargs}\0" \
- "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \
- "setusbupdate=usb start && setenv interface usb; setenv drive 0; " \
- "load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \
- "source ${loadaddr}\0" \
- "vidargs=fbcon=map:1\0"
-
#include "tegra-common-post.h"
#endif /* __CONFIG_H */
diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h
index 80204d706d1..87a679efde6 100644
--- a/include/configs/apalis_t30.h
+++ b/include/configs/apalis_t30.h
@@ -22,18 +22,6 @@
*/
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
-#define UBOOT_UPDATE \
- "uboot_hwpart=1\0" \
- "uboot_blk=0\0" \
- "set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff && " \
- "setexpr blkcnt ${blkcnt} / 0x200\0" \
- "update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && " \
- "mmc write ${loadaddr} ${uboot_blk} ${blkcnt}\0" \
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- UBOOT_UPDATE \
- "boot_script_dhcp=boot.scr\0"
-
#include "tegra-common-post.h"
#endif /* __CONFIG_H */
diff --git a/include/configs/capricorn-common.h b/include/configs/capricorn-common.h
index 9dcacad2fc0..1f61b2b6af6 100644
--- a/include/configs/capricorn-common.h
+++ b/include/configs/capricorn-common.h
@@ -13,10 +13,10 @@
#include "siemens-env-common.h"
/* SPL config */
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define CFG_MALLOC_F_ADDR 0x00120000
-#endif /* CONFIG_SPL_BUILD */
+#endif /* CONFIG_XPL_BUILD */
/* ENET1 connects to base board and MUX with ESAI */
#define CFG_FEC_ENET_DEV 1
diff --git a/include/configs/cardhu.h b/include/configs/cardhu.h
index 82729eb95cf..3412b883cbb 100644
--- a/include/configs/cardhu.h
+++ b/include/configs/cardhu.h
@@ -13,10 +13,6 @@
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "NVIDIA Cardhu"
-#define BOARD_EXTRA_ENV_SETTINGS \
- "board_name=cardhu-a04\0" \
- "fdtfile=tegra30-cardhu-a04.dtb\0"
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
diff --git a/include/configs/cgtqmx8.h b/include/configs/cgtqmx8.h
index 98d4d8cf4bd..0d338389cb9 100644
--- a/include/configs/cgtqmx8.h
+++ b/include/configs/cgtqmx8.h
@@ -11,7 +11,7 @@
#include <linux/sizes.h>
#include <asm/arch/imx-regs.h>
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define CFG_MALLOC_F_ADDR 0x00120000
#endif
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index ea7d648eb6a..bc616d14368 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -13,17 +13,6 @@
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
-/* NAND support */
-
-#define UBOOT_UPDATE \
- "update_uboot=nand erase.part u-boot && " \
- "nand write ${loadaddr} u-boot ${filesize}\0" \
-
-/* Environment in NAND, 64K is a bit excessive but erase block is 512K anyway */
-#define BOARD_EXTRA_ENV_SETTINGS \
- "boot_script_dhcp=boot.scr\0" \
- UBOOT_UPDATE
-
#include "tegra-common-post.h"
#endif /* __CONFIG_H */
diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h
index 7edb2c0b26d..1f474669a73 100644
--- a/include/configs/colibri_t30.h
+++ b/include/configs/colibri_t30.h
@@ -23,18 +23,6 @@
*/
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
-#define UBOOT_UPDATE \
- "uboot_hwpart=1\0" \
- "uboot_blk=0\0" \
- "set_blkcnt=setexpr blkcnt ${filesize} + 0x1ff && " \
- "setexpr blkcnt ${blkcnt} / 0x200\0" \
- "update_uboot=run set_blkcnt && mmc dev 0 ${uboot_hwpart} && " \
- "mmc write ${loadaddr} ${uboot_blk} ${blkcnt}\0" \
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- UBOOT_UPDATE \
- "boot_script_dhcp=boot.scr\0"
-
#include "tegra-common-post.h"
#endif /* __CONFIG_H */
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 416aa96366c..8db849c6d09 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -157,7 +157,7 @@
"console=ttyS2,115200n8\0" \
"hwconfig=dsp:wake=yes"
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* defines for SPL */
#endif
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 633ec1f32fa..96dcd731cb6 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -28,7 +28,7 @@
#define CFG_SYS_NS16550_COM2 UART2_BASE /* UART2 */
#define CFG_SYS_NS16550_COM3 UART3_BASE /* UART3 */
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#define DFUARGS \
"dfu_bufsiz=0x10000\0" \
DFU_ALT_INFO_MMC \
@@ -37,7 +37,7 @@
DFU_ALT_INFO_QSPI
#endif
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#ifdef CONFIG_SPL_DFU
#define DFUARGS \
"dfu_bufsiz=0x10000\0" \
diff --git a/include/configs/ds116.h b/include/configs/ds116.h
index c2326596811..2f2bc43269e 100644
--- a/include/configs/ds116.h
+++ b/include/configs/ds116.h
@@ -18,7 +18,7 @@
*/
#include "mv-common.h"
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#define KERNEL_ADDR_R __stringify(0x1000000)
#define FDT_ADDR_R __stringify(0x2000000)
@@ -39,6 +39,6 @@
"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
"console=ttyS0,115200\0"
-#endif /* CONFIG_SPL_BUILD */
+#endif /* CONFIG_XPL_BUILD */
#endif /* _CONFIG_DS116_H */
diff --git a/include/configs/ds414.h b/include/configs/ds414.h
index 95256575583..431a78de416 100644
--- a/include/configs/ds414.h
+++ b/include/configs/ds414.h
@@ -43,7 +43,7 @@
*/
#include "mv-common.h"
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#define KERNEL_ADDR_R __stringify(0x1000000)
#define FDT_ADDR_R __stringify(0x2000000)
@@ -80,6 +80,6 @@
"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
"console=ttyS0,115200\0"
-#endif /* CONFIG_SPL_BUILD */
+#endif /* CONFIG_XPL_BUILD */
#endif /* _CONFIG_SYNOLOGY_DS414_H */
diff --git a/include/configs/endeavoru.h b/include/configs/endeavoru.h
index 348078f9770..33d0021ec13 100644
--- a/include/configs/endeavoru.h
+++ b/include/configs/endeavoru.h
@@ -10,54 +10,11 @@
#ifndef __CONFIG_H
#define __CONFIG_H
-#include <linux/sizes.h>
-
#include "tegra30-common.h"
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "HTC One X"
-#define ENDEAVORU_FLASH_UBOOT \
- "flash_uboot=echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "mmc dev 0 1;" \
- "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \
- "echo Reading bootloader;" \
- "if load mmc 0:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 0:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader to eMMC;" \
- "mmc dev 0 1;" \
- "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \
- "mmc dev 0 2;" \
- "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \
- "echo Bootloader written successfully;" \
- "pause 'Press ANY key to reboot device...'; reset;" \
- "else echo Reading bootloader failed;" \
- "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0"
-
-#define ENDEAVORU_BOOTMENU \
- ENDEAVORU_FLASH_UBOOT \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_2=update bootloader=run flash_uboot\0" \
- "bootmenu_3=reboot RCM=enterrcm\0" \
- "bootmenu_4=reboot=reset\0" \
- "bootmenu_5=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "boot_block_size_r=0x200000\0" \
- "boot_block_size=0x1000\0" \
- "bootloader_file=u-boot-dtb-tegra.bin\0" \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- ENDEAVORU_BOOTMENU
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
diff --git a/include/configs/gardena-smart-gateway-mt7688.h b/include/configs/gardena-smart-gateway-mt7688.h
index 1b97ae22fc6..a89d298b525 100644
--- a/include/configs/gardena-smart-gateway-mt7688.h
+++ b/include/configs/gardena-smart-gateway-mt7688.h
@@ -15,7 +15,7 @@
#define CFG_SYS_UBOOT_BASE 0
/* Serial SPL */
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_SERIAL)
+#if defined(CONFIG_XPL_BUILD) && defined(CONFIG_SPL_SERIAL)
#define CFG_SYS_NS16550_CLK 40000000
#define CFG_SYS_NS16550_COM1 0xb0000c00
#endif
diff --git a/include/configs/grouper.h b/include/configs/grouper.h
index 8064b88902e..b6ef6ff2ecb 100644
--- a/include/configs/grouper.h
+++ b/include/configs/grouper.h
@@ -6,56 +6,11 @@
#ifndef __CONFIG_H
#define __CONFIG_H
-#include <linux/sizes.h>
-
#include "tegra30-common.h"
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "ASUS Google Nexus 7 (2012)"
-#define GROUPER_FLASH_UBOOT \
- "flash_uboot=echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "mmc dev 0 1;" \
- "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \
- "echo Reading bootloader;" \
- "if load mmc 0:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 0:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader to eMMC;" \
- "mmc dev 0 1;" \
- "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \
- "mmc dev 0 2;" \
- "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \
- "echo Bootloader written successfully;" \
- "pause 'Press ANY key to reboot device...'; reset;" \
- "else echo Reading bootloader failed;" \
- "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0"
-
-#define GROUPER_BOOTMENU \
- GROUPER_FLASH_UBOOT \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_2=update bootloader=run flash_uboot\0" \
- "bootmenu_3=reboot RCM=enterrcm\0" \
- "bootmenu_4=reboot=reset\0" \
- "bootmenu_5=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "boot_block_size_r=0x200000\0" \
- "boot_block_size=0x1000\0" \
- "bootloader_file=u-boot-dtb-tegra.bin\0" \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "button_cmd_1_name=Lid\0" \
- "button_cmd_1=poweroff\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- GROUPER_BOOTMENU
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
diff --git a/include/configs/ideapad-yoga-11.h b/include/configs/ideapad-yoga-11.h
index 12c7649f788..c4e6b2a647c 100644
--- a/include/configs/ideapad-yoga-11.h
+++ b/include/configs/ideapad-yoga-11.h
@@ -11,64 +11,6 @@
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "Lenovo Ideapad Yoga 11"
-#define IDEAPAD_FLASH_UBOOT \
- "flash_uboot=sf probe 0:1;" \
- "echo Dumping current SPI flash content ...;" \
- "sf read ${kernel_addr_r} 0x0 ${spi_size};" \
- "if fatwrite mmc 1:1 ${kernel_addr_r} spi-flash-backup.bin ${spi_size};" \
- "then echo SPI flash content was successfully written into spi-flash-backup.bin;" \
- "echo Reading SPI flash binary;" \
- "if load mmc 1:1 ${kernel_addr_r} repart-block.bin;" \
- "then echo Writing bootloader into SPI flash;" \
- "sf probe 0:1;" \
- "sf update ${kernel_addr_r} 0x0 ${spi_size};" \
- "echo Bootloader SUCCESSFULLY written into SPI flash;" \
- "pause 'Press ANY key to reboot...'; reset;" \
- "else echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "sf read ${kernel_addr_r} 0x0 ${boot_block_size_r};" \
- "echo Reading bootloader;" \
- "if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 1:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader into SPI flash;" \
- "sf probe 0:1;" \
- "sf update ${kernel_addr_r} 0x0 ${boot_block_size_r};" \
- "sf update ${ramdisk_addr_r} ${boot_block_size_r} ${boot_block_size_r};" \
- "echo Bootloader written SUCCESSFULLY;" \
- "pause 'Press ANY key to reboot...'; reset;" \
- "else echo Reading bootloader failed;" \
- "pause 'Press ANY key to reboot...'; reset; fi;" \
- "fi;" \
- "else echo SPI flash backup FAILED! Aborting ...;" \
- "pause 'Press ANY key to reboot...'; reset; fi\0"
-
-#define IDEAPAD_BOOTMENU \
- IDEAPAD_FLASH_UBOOT \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \
- "bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_3=update bootloader=run flash_uboot\0" \
- "bootmenu_4=reboot RCM=enterrcm\0" \
- "bootmenu_5=reboot=reset\0" \
- "bootmenu_6=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "spi_size=0x400000\0" \
- "boot_block_size_r=0x200000\0" \
- "boot_block_size=0x1000\0" \
- "bootloader_file=u-boot-dtb-tegra.bin\0" \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "button_cmd_1_name=Lid sensor\0" \
- "button_cmd_1=poweroff\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- IDEAPAD_BOOTMENU
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
diff --git a/include/configs/imx6q-bosch-acc.h b/include/configs/imx6q-bosch-acc.h
index fab5063b73f..64ddbf711d3 100644
--- a/include/configs/imx6q-bosch-acc.h
+++ b/include/configs/imx6q-bosch-acc.h
@@ -92,7 +92,7 @@
/* SPL */
#ifdef CONFIG_SPL
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define CFG_SYS_FSL_USDHC_NUM 2
#ifdef CONFIG_SYS_BOOT_EMMC
diff --git a/include/configs/imx6ulz_smm_m2.h b/include/configs/imx6ulz_smm_m2.h
index 9da98d0af27..44a3fc02e8a 100644
--- a/include/configs/imx6ulz_smm_m2.h
+++ b/include/configs/imx6ulz_smm_m2.h
@@ -14,14 +14,14 @@
#define CFG_MXC_UART_BASE UART4_BASE
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#define BOOT_TARGET_DEVICES(func) \
func(NAND, nand, 0) \
#include <config_distro_bootcmd.h>
-#endif /* !CONFIG_SPL_BUILD */
+#endif /* !CONFIG_XPL_BUILD */
#define MEM_LAYOUT_ENV_SETTINGS \
"scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
diff --git a/include/configs/imx8mm-cl-iot-gate.h b/include/configs/imx8mm-cl-iot-gate.h
index 146f7945719..6ed4a6fd3fc 100644
--- a/include/configs/imx8mm-cl-iot-gate.h
+++ b/include/configs/imx8mm-cl-iot-gate.h
@@ -14,7 +14,7 @@
#define CFG_SYS_UBOOT_BASE \
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
#define CFG_MALLOC_F_ADDR 0x912000
/* For RAW image gives a error info not panic */
diff --git a/include/configs/imx8mm_beacon.h b/include/configs/imx8mm_beacon.h
index fa20651d2df..2ec7f3d8b6f 100644
--- a/include/configs/imx8mm_beacon.h
+++ b/include/configs/imx8mm_beacon.h
@@ -21,7 +21,7 @@
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
#endif
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
#define CFG_MALLOC_F_ADDR 0x930000
/* For RAW image gives a error info not panic */
diff --git a/include/configs/imx8mm_data_modul_edm_sbc.h b/include/configs/imx8mm_data_modul_edm_sbc.h
index 9a5e5bd009d..d323f84ac7a 100644
--- a/include/configs/imx8mm_data_modul_edm_sbc.h
+++ b/include/configs/imx8mm_data_modul_edm_sbc.h
@@ -10,7 +10,7 @@
#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define CFG_MALLOC_F_ADDR 0x930000
/* For RAW image gives a error info not panic */
diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h
index 9dd63fc1196..3bbbd900dd4 100644
--- a/include/configs/imx8mm_evk.h
+++ b/include/configs/imx8mm_evk.h
@@ -22,7 +22,7 @@
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
#endif
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
#define CFG_MALLOC_F_ADDR 0x930000
/* For RAW image gives a error info not panic */
diff --git a/include/configs/imx8mm_icore_mx8mm.h b/include/configs/imx8mm_icore_mx8mm.h
index 2158b0af74f..145dab91215 100644
--- a/include/configs/imx8mm_icore_mx8mm.h
+++ b/include/configs/imx8mm_icore_mx8mm.h
@@ -13,11 +13,11 @@
#define CFG_SYS_UBOOT_BASE \
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
# define CFG_MALLOC_F_ADDR 0x930000
/* For RAW image gives a error info not panic */
-#endif /* CONFIG_SPL_BUILD */
+#endif /* CONFIG_XPL_BUILD */
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 2) \
diff --git a/include/configs/imx8mm_phg.h b/include/configs/imx8mm_phg.h
index d2d7ffa0f5b..038d3a7ce3f 100644
--- a/include/configs/imx8mm_phg.h
+++ b/include/configs/imx8mm_phg.h
@@ -14,7 +14,7 @@
#define CFG_SYS_UBOOT_BASE \
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
#define CFG_MALLOC_F_ADDR 0x930000
#endif
diff --git a/include/configs/imx8mm_venice.h b/include/configs/imx8mm_venice.h
index 66816618b0c..ed09dd09bcb 100644
--- a/include/configs/imx8mm_venice.h
+++ b/include/configs/imx8mm_venice.h
@@ -12,7 +12,7 @@
#define CFG_SYS_UBOOT_BASE \
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
#define CFG_MALLOC_F_ADDR 0x930000
#endif
diff --git a/include/configs/imx8mp_rsb3720.h b/include/configs/imx8mp_rsb3720.h
index b82e35f4963..8b96f7fd1e4 100644
--- a/include/configs/imx8mp_rsb3720.h
+++ b/include/configs/imx8mp_rsb3720.h
@@ -23,7 +23,7 @@
EFI_GUID(0xb5fb6f08, 0xe142, 0x4db1, 0x97, 0xea, \
0x5f, 0xd3, 0x6b, 0x9b, 0xe5, 0xb9)
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define CFG_MALLOC_F_ADDR 0x184000 /* malloc f used before \
* GD_FLG_FULL_MALLOC_INIT \
* set \
diff --git a/include/configs/imx8mq_cm.h b/include/configs/imx8mq_cm.h
index 2bbd6b1680f..ccbb0f85559 100644
--- a/include/configs/imx8mq_cm.h
+++ b/include/configs/imx8mq_cm.h
@@ -10,7 +10,7 @@
#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
#define CFG_MALLOC_F_ADDR 0x182000
diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h
index 9eefc31dc6f..666f46ac105 100644
--- a/include/configs/imx8mq_evk.h
+++ b/include/configs/imx8mq_evk.h
@@ -10,7 +10,7 @@
#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
diff --git a/include/configs/imx8mq_phanbell.h b/include/configs/imx8mq_phanbell.h
index cd73a72d2b7..3bc4b0034e8 100644
--- a/include/configs/imx8mq_phanbell.h
+++ b/include/configs/imx8mq_phanbell.h
@@ -9,7 +9,7 @@
#include <linux/sizes.h>
#include <asm/arch/imx-regs.h>
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
diff --git a/include/configs/imx8mq_reform2.h b/include/configs/imx8mq_reform2.h
index 7fa441a8a83..40f96a5f219 100644
--- a/include/configs/imx8mq_reform2.h
+++ b/include/configs/imx8mq_reform2.h
@@ -10,7 +10,7 @@
#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
diff --git a/include/configs/imx8qm_mek.h b/include/configs/imx8qm_mek.h
index 4d5abe2d073..842184bcae2 100644
--- a/include/configs/imx8qm_mek.h
+++ b/include/configs/imx8qm_mek.h
@@ -10,7 +10,7 @@
#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define CFG_MALLOC_F_ADDR 0x00120000
#endif
diff --git a/include/configs/imx8qxp_mek.h b/include/configs/imx8qxp_mek.h
index 93999509948..1b6eb2b81cf 100644
--- a/include/configs/imx8qxp_mek.h
+++ b/include/configs/imx8qxp_mek.h
@@ -10,7 +10,7 @@
#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define CFG_MALLOC_F_ADDR 0x00120000
#endif
diff --git a/include/configs/imx8ulp_evk.h b/include/configs/imx8ulp_evk.h
index aa9da19a11f..9308f5234f4 100644
--- a/include/configs/imx8ulp_evk.h
+++ b/include/configs/imx8ulp_evk.h
@@ -11,7 +11,7 @@
#define CFG_SYS_UBOOT_BASE (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define CFG_MALLOC_F_ADDR 0x22040000
#endif
diff --git a/include/configs/imx93_evk.h b/include/configs/imx93_evk.h
index ce6567e2af6..53fb8c9b1ba 100644
--- a/include/configs/imx93_evk.h
+++ b/include/configs/imx93_evk.h
@@ -13,7 +13,7 @@
#define CFG_SYS_UBOOT_BASE \
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define CFG_MALLOC_F_ADDR 0x204D0000
#endif
diff --git a/include/configs/khadas-vim3_android.h b/include/configs/khadas-vim3_android.h
index da6adf6c413..b76e049f09c 100644
--- a/include/configs/khadas-vim3_android.h
+++ b/include/configs/khadas-vim3_android.h
@@ -21,8 +21,8 @@
"name=dtbo_b,size=8M,uuid=${uuid_gpt_dtbo_b};" \
"name=vbmeta_a,size=512K,uuid=${uuid_gpt_vbmeta_a};" \
"name=vbmeta_b,size=512K,uuid=${uuid_gpt_vbmeta_b};" \
- "name=boot_a,size=32M,bootable,uuid=${uuid_gpt_boot_a};" \
- "name=boot_b,size=32M,bootable,uuid=${uuid_gpt_boot_b};" \
+ "name=boot_a,size=64M,bootable,uuid=${uuid_gpt_boot_a};" \
+ "name=boot_b,size=64M,bootable,uuid=${uuid_gpt_boot_b};" \
"name=super,size=3072M,uuid=${uuid_gpt_super};" \
"name=userdata,size=11282M,uuid=${uuid_gpt_userdata};" \
"name=rootfs,size=-,uuid=" ROOT_UUID
@@ -33,8 +33,8 @@
"name=misc,size=512K,uuid=${uuid_gpt_misc};" \
"name=dtbo,size=8M,uuid=${uuid_gpt_dtbo};" \
"name=vbmeta,size=512K,uuid=${uuid_gpt_vbmeta};" \
- "name=boot,size=32M,bootable,uuid=${uuid_gpt_boot};" \
- "name=recovery,size=32M,uuid=${uuid_gpt_recovery};" \
+ "name=boot,size=64M,bootable,uuid=${uuid_gpt_boot};" \
+ "name=recovery,size=64M,uuid=${uuid_gpt_recovery};" \
"name=cache,size=256M,uuid=${uuid_gpt_cache};" \
"name=super,size=1792M,uuid=${uuid_gpt_super};" \
"name=userdata,size=12786M,uuid=${uuid_gpt_userdata};" \
diff --git a/include/configs/khadas-vim3l_android.h b/include/configs/khadas-vim3l_android.h
index b1768e2d821..0ab8ffd372a 100644
--- a/include/configs/khadas-vim3l_android.h
+++ b/include/configs/khadas-vim3l_android.h
@@ -21,8 +21,8 @@
"name=dtbo_b,size=8M,uuid=${uuid_gpt_dtbo_b};" \
"name=vbmeta_a,size=512K,uuid=${uuid_gpt_vbmeta_a};" \
"name=vbmeta_b,size=512K,uuid=${uuid_gpt_vbmeta_b};" \
- "name=boot_a,size=32M,bootable,uuid=${uuid_gpt_boot_a};" \
- "name=boot_b,size=32M,bootable,uuid=${uuid_gpt_boot_b};" \
+ "name=boot_a,size=64M,bootable,uuid=${uuid_gpt_boot_a};" \
+ "name=boot_b,size=64M,bootable,uuid=${uuid_gpt_boot_b};" \
"name=super,size=3072M,uuid=${uuid_gpt_super};" \
"name=userdata,size=11282M,uuid=${uuid_gpt_userdata};" \
"name=rootfs,size=-,uuid=" ROOT_UUID
@@ -33,8 +33,8 @@
"name=misc,size=512K,uuid=${uuid_gpt_misc};" \
"name=dtbo,size=8M,uuid=${uuid_gpt_dtbo};" \
"name=vbmeta,size=512K,uuid=${uuid_gpt_vbmeta};" \
- "name=boot,size=32M,bootable,uuid=${uuid_gpt_boot};" \
- "name=recovery,size=32M,uuid=${uuid_gpt_recovery};" \
+ "name=boot,size=64M,bootable,uuid=${uuid_gpt_boot};" \
+ "name=recovery,size=64M,uuid=${uuid_gpt_recovery};" \
"name=cache,size=256M,uuid=${uuid_gpt_cache};" \
"name=super,size=1792M,uuid=${uuid_gpt_super};" \
"name=userdata,size=12786M,uuid=${uuid_gpt_userdata};" \
diff --git a/include/configs/kontron-sl-mx8mm.h b/include/configs/kontron-sl-mx8mm.h
index 3a129c5cce7..72a28a6a413 100644
--- a/include/configs/kontron-sl-mx8mm.h
+++ b/include/configs/kontron-sl-mx8mm.h
@@ -10,7 +10,7 @@
#include <asm/arch/imx-regs.h>
#include <linux/sizes.h>
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#include <config.h>
#endif
@@ -39,7 +39,7 @@
#undef BOOTENV_RUN_NET_USB_START
#define BOOTENV_RUN_NET_USB_START
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
#define CFG_MALLOC_F_ADDR 0x930000
#endif
diff --git a/include/configs/kontron_pitx_imx8m.h b/include/configs/kontron_pitx_imx8m.h
index 3dda7b66806..3f52d00d6c8 100644
--- a/include/configs/kontron_pitx_imx8m.h
+++ b/include/configs/kontron_pitx_imx8m.h
@@ -12,7 +12,7 @@
EFI_GUID(0xc898e959, 0x5b1f, 0x4e6d, 0x88, 0xe0, \
0x40, 0xd4, 0x5c, 0xca, 0x13, 0x99)
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
#define CFG_MALLOC_F_ADDR 0x182000
diff --git a/include/configs/librem5.h b/include/configs/librem5.h
index 876b02f4da6..571c7724eaf 100644
--- a/include/configs/librem5.h
+++ b/include/configs/librem5.h
@@ -41,7 +41,7 @@
#define CONSOLE "ttymxc0"
#endif
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
func(USB, usb, 0) \
diff --git a/include/configs/linkit-smart-7688.h b/include/configs/linkit-smart-7688.h
index e8f7a59c401..ec1aa14be01 100644
--- a/include/configs/linkit-smart-7688.h
+++ b/include/configs/linkit-smart-7688.h
@@ -15,7 +15,7 @@
#define CFG_SYS_UBOOT_BASE 0
/* Serial SPL */
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_SERIAL)
+#if defined(CONFIG_XPL_BUILD) && defined(CONFIG_SPL_SERIAL)
#define CFG_SYS_NS16550_CLK 40000000
#define CFG_SYS_NS16550_COM3 0xb0000e00
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index e500a7d80ff..a02c752bbcf 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -8,7 +8,7 @@
#define __LS1043A_COMMON_H
/* SPL build */
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define SPL_NO_FMAN
#define SPL_NO_DSPI
#define SPL_NO_PCIE
@@ -19,10 +19,10 @@
#define SPL_NO_QE
#define SPL_NO_EEPROM
#endif
-#if (defined(CONFIG_SPL_BUILD) && defined(CONFIG_NAND_BOOT))
+#if (defined(CONFIG_XPL_BUILD) && defined(CONFIG_NAND_BOOT))
#define SPL_NO_MMC
#endif
-#if (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SD_BOOT_QSPI))
+#if (defined(CONFIG_XPL_BUILD) && defined(CONFIG_SD_BOOT_QSPI))
#define SPL_NO_IFC
#endif
diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
index 867b098a073..53ef5975a28 100644
--- a/include/configs/ls1046a_common.h
+++ b/include/configs/ls1046a_common.h
@@ -8,7 +8,7 @@
#define __LS1046A_COMMON_H
/* SPL build */
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define SPL_NO_QBMAN
#define SPL_NO_FMAN
#define SPL_NO_ENV
@@ -17,11 +17,11 @@
#define SPL_NO_USB
#define SPL_NO_SATA
#endif
-#if defined(CONFIG_SPL_BUILD) && \
+#if defined(CONFIG_XPL_BUILD) && \
(defined(CONFIG_NAND_BOOT) || defined(CONFIG_QSPI_BOOT))
#define SPL_NO_MMC
#endif
-#if defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_XPL_BUILD)
#define SPL_NO_IFC
#endif
diff --git a/include/configs/ls1088a_common.h b/include/configs/ls1088a_common.h
index 34085eeecc7..cdf281947dc 100644
--- a/include/configs/ls1088a_common.h
+++ b/include/configs/ls1088a_common.h
@@ -7,7 +7,7 @@
#define __LS1088_COMMON_H
/* SPL build */
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define SPL_NO_BOARDINFO
#define SPL_NO_QIXIS
#define SPL_NO_PCI
diff --git a/include/configs/meson64.h b/include/configs/meson64.h
index ccb8ea2e716..f3275b37a51 100644
--- a/include/configs/meson64.h
+++ b/include/configs/meson64.h
@@ -77,6 +77,15 @@
#define BOOTENV_DEV_NAME_USB_DFU(devtypeu, devtypel, instance)
#endif
+#ifdef CONFIG_CMD_MMC
+ #define BOOT_TARGET_MMC(func) \
+ func(MMC, mmc, 0) \
+ func(MMC, mmc, 1) \
+ func(MMC, mmc, 2)
+#else
+ #define BOOT_TARGET_MMC(func)
+#endif
+
#ifdef CONFIG_CMD_USB
#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
#else
@@ -95,18 +104,27 @@
#define BOOT_TARGET_SCSI(func)
#endif
+#if defined(CONFIG_CMD_DHCP) && defined(CONFIG_CMD_PXE)
+ #define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
+ #define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
+#elif defined(CONFIG_CMD_DHCP)
+ #define BOOT_TARGET_PXE(func)
+ #define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
+#else
+ #define BOOT_TARGET_PXE(func)
+ #define BOOT_TARGET_DHCP(func)
+#endif
+
#ifndef BOOT_TARGET_DEVICES
#define BOOT_TARGET_DEVICES(func) \
func(ROMUSB, romusb, na) \
func(USB_DFU, usbdfu, na) \
- func(MMC, mmc, 0) \
- func(MMC, mmc, 1) \
- func(MMC, mmc, 2) \
+ BOOT_TARGET_MMC(func) \
BOOT_TARGET_DEVICES_USB(func) \
BOOT_TARGET_NVME(func) \
BOOT_TARGET_SCSI(func) \
- func(PXE, pxe, na) \
- func(DHCP, dhcp, na)
+ BOOT_TARGET_PXE(func) \
+ BOOT_TARGET_DHCP(func)
#endif
#define BOOTM_SIZE __stringify(0x1700000)
diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h
index c0e977abb01..fa520265800 100644
--- a/include/configs/meson64_android.h
+++ b/include/configs/meson64_android.h
@@ -116,31 +116,7 @@
"fi; " \
"abootimg get dtb --index=$dtb_index dtb_start dtb_size; " \
"cp.b $dtb_start $fdt_addr_r $dtb_size; " \
- "fdt addr $fdt_addr_r 0x80000; " \
- "if test $board_name = sei510; then " \
- "echo \" Reading DTBO for sei510...\"; " \
- "setenv dtbo_index 0;" \
- "elif test $board_name = sei610; then " \
- "echo \" Reading DTBO for sei610...\"; " \
- "setenv dtbo_index 1;" \
- "elif test $board_name = vim3l; then " \
- "echo \" Reading DTBO for vim3l...\"; " \
- "setenv dtbo_index 2;" \
- "elif test $board_name = vim3; then " \
- "echo \" Reading DTBO for vim3...\"; " \
- "setenv dtbo_index 3;" \
- "else " \
- "echo Error: Android boot is not supported for $board_name; " \
- "exit; " \
- "fi; " \
- "part start mmc ${mmcdev} dtbo${slot_suffix} p_dtbo_start; " \
- "part size mmc ${mmcdev} dtbo${slot_suffix} p_dtbo_size; " \
- "mmc read ${dtboaddr} ${p_dtbo_start} ${p_dtbo_size}; " \
- "echo \" Applying DTBOs...\"; " \
- "adtimg addr $dtboaddr; " \
- "adtimg get dt --index=$dtbo_index dtbo0_addr; " \
- "fdt apply $dtbo0_addr;" \
- "setenv bootargs \"$bootargs androidboot.dtbo_idx=$dtbo_index \";"\
+ "fdt addr $fdt_addr_r 0x80000; "
#define BOOT_CMD "bootm ${loadaddr} ${loadaddr} ${fdt_addr_r};"
diff --git a/include/configs/msc_sm2s_imx8mp.h b/include/configs/msc_sm2s_imx8mp.h
index ea5c93ecf69..985b1ca91e6 100644
--- a/include/configs/msc_sm2s_imx8mp.h
+++ b/include/configs/msc_sm2s_imx8mp.h
@@ -20,7 +20,7 @@
#define CFG_FEC_MXC_PHYADDR 1
#endif
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
func(MMC, mmc, 2)
diff --git a/include/configs/mt7621.h b/include/configs/mt7621.h
index e6dba707195..636d62dd883 100644
--- a/include/configs/mt7621.h
+++ b/include/configs/mt7621.h
@@ -15,7 +15,7 @@
#define CFG_SYS_INIT_SP_OFFSET 0x800000
/* Serial SPL */
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_SERIAL)
+#if defined(CONFIG_XPL_BUILD) && defined(CONFIG_SPL_SERIAL)
#define CFG_SYS_NS16550_CLK 50000000
#define CFG_SYS_NS16550_COM1 0xbe000c00
#endif
diff --git a/include/configs/mt7628.h b/include/configs/mt7628.h
index 1df06811d65..ba876ac3029 100644
--- a/include/configs/mt7628.h
+++ b/include/configs/mt7628.h
@@ -13,7 +13,7 @@
#define CFG_SYS_INIT_SP_OFFSET 0x80000
/* Serial SPL */
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_SERIAL)
+#if defined(CONFIG_XPL_BUILD) && defined(CONFIG_SPL_SERIAL)
#define CFG_SYS_NS16550_CLK 40000000
#define CFG_SYS_NS16550_COM1 0xb0000c00
#endif
diff --git a/include/configs/n2350.h b/include/configs/n2350.h
index f98b9f8582d..c789df55bfb 100644
--- a/include/configs/n2350.h
+++ b/include/configs/n2350.h
@@ -18,7 +18,7 @@
*/
#include "mv-common.h"
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#define KERNEL_ADDR_R __stringify(0x1000000)
#define FDT_ADDR_R __stringify(0x2000000)
@@ -39,6 +39,6 @@
"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
"console=ttyS0,115200\0"
-#endif /* CONFIG_SPL_BUILD */
+#endif /* CONFIG_XPL_BUILD */
#endif /* _CONFIG_N2350_H */
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index f5bd0913449..23d8917b718 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -98,7 +98,7 @@
#define CFG_SYS_NAND_U_BOOT_SIZE (832 << 10)
#define CFG_SYS_NAND_U_BOOT_DST (0x11000000)
#define CFG_SYS_NAND_U_BOOT_START (0x11000000)
-#elif defined(CONFIG_SPL_BUILD)
+#elif defined(CONFIG_XPL_BUILD)
#define CFG_SYS_NAND_U_BOOT_SIZE (128 << 10)
#define CFG_SYS_NAND_U_BOOT_DST 0xf8f80000
#define CFG_SYS_NAND_U_BOOT_START 0xf8f80000
@@ -280,7 +280,7 @@
/*
* Config the L2 Cache as L2 SRAM
*/
-#if defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_XPL_BUILD)
#if defined(CONFIG_SDCARD) || defined(CONFIG_SPIFLASH)
#define CFG_SYS_INIT_L2_ADDR 0xf8f80000
#define CFG_SYS_INIT_L2_ADDR_PHYS CFG_SYS_INIT_L2_ADDR
diff --git a/include/configs/p2771-0000.h b/include/configs/p2771-0000.h
index e409cc3896d..fc1b7c0302d 100644
--- a/include/configs/p2771-0000.h
+++ b/include/configs/p2771-0000.h
@@ -15,26 +15,6 @@
/* Environment in eMMC, at the end of 2nd "boot sector" */
-#define BOARD_EXTRA_ENV_SETTINGS \
- "calculated_vars=kernel_addr_r fdt_addr_r scriptaddr pxefile_addr_r " \
- "ramdisk_addr_r\0" \
- "kernel_addr_r_align=00200000\0" \
- "kernel_addr_r_offset=00080000\0" \
- "kernel_addr_r_size=02000000\0" \
- "kernel_addr_r_aliases=loadaddr\0" \
- "fdt_addr_r_align=00200000\0" \
- "fdt_addr_r_offset=00000000\0" \
- "fdt_addr_r_size=00200000\0" \
- "scriptaddr_align=00200000\0" \
- "scriptaddr_offset=00000000\0" \
- "scriptaddr_size=00200000\0" \
- "pxefile_addr_r_align=00200000\0" \
- "pxefile_addr_r_offset=00000000\0" \
- "pxefile_addr_r_size=00200000\0" \
- "ramdisk_addr_r_align=00200000\0" \
- "ramdisk_addr_r_offset=00000000\0" \
- "ramdisk_addr_r_size=02000000\0"
-
#include "tegra-common-post.h"
#endif
diff --git a/include/configs/p3450-0000.h b/include/configs/p3450-0000.h
index e60f42eaa72..1138c1d306f 100644
--- a/include/configs/p3450-0000.h
+++ b/include/configs/p3450-0000.h
@@ -15,19 +15,6 @@
/* Board-specific serial config */
-/* Only MMC/PXE/DHCP for now, add USB back in later when supported */
-#define BOOT_TARGET_DEVICES(func) \
- func(MMC, mmc, 1) \
- func(MMC, mmc, 0) \
- func(PXE, pxe, na) \
- func(DHCP, dhcp, na)
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "preboot=if test -e mmc 1:1 /u-boot-preboot.scr; then " \
- "load mmc 1:1 ${scriptaddr} /u-boot-preboot.scr; " \
- "source ${scriptaddr}; " \
- "fi\0"
-
/* General networking support */
#include "tegra-common-post.h"
diff --git a/include/configs/phycore_imx8mm.h b/include/configs/phycore_imx8mm.h
index 0910ae2d870..e74a3f184c6 100644
--- a/include/configs/phycore_imx8mm.h
+++ b/include/configs/phycore_imx8mm.h
@@ -14,7 +14,7 @@
#define CFG_SYS_UBOOT_BASE \
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
#define CFG_MALLOC_F_ADDR 0x930000
/* For RAW image gives a error info not panic */
diff --git a/include/configs/pico-imx8mq.h b/include/configs/pico-imx8mq.h
index 422b89a3dd3..3012f64c0ae 100644
--- a/include/configs/pico-imx8mq.h
+++ b/include/configs/pico-imx8mq.h
@@ -9,7 +9,7 @@
#include <linux/sizes.h>
#include <asm/arch/imx-regs.h>
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
diff --git a/include/configs/qc750.h b/include/configs/qc750.h
index ce6665d0f34..ad9f9146bb7 100644
--- a/include/configs/qc750.h
+++ b/include/configs/qc750.h
@@ -15,48 +15,6 @@
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "Wexler QC750"
-#define QC750_FLASH_UBOOT \
- "flash_uboot=echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "mmc dev 0 1;" \
- "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \
- "echo Reading bootloader;" \
- "if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 1:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader to eMMC;" \
- "mmc dev 0 1;" \
- "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \
- "mmc dev 0 2;" \
- "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \
- "echo Bootloader written successfully;" \
- "pause 'Press ANY key to reboot device...'; reset;" \
- "else echo Reading bootloader failed;" \
- "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0"
-
-#define QC750_BOOTMENU \
- QC750_FLASH_UBOOT \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \
- "bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_3=update bootloader=run flash_uboot\0" \
- "bootmenu_4=reboot RCM=enterrcm\0" \
- "bootmenu_5=reboot=reset\0" \
- "bootmenu_6=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "boot_block_size_r=0x200000\0" \
- "boot_block_size=0x1000\0" \
- "bootloader_file=u-boot-dtb-tegra.bin\0" \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- QC750_BOOTMENU
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
index d652ae4ca34..c5bcd7dc5e8 100644
--- a/include/configs/rk3399_common.h
+++ b/include/configs/rk3399_common.h
@@ -13,7 +13,7 @@
#define CFG_SYS_SDRAM_BASE 0
#define SDRAM_MAX_SIZE 0xf8000000
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#ifndef ROCKCHIP_DEVICE_SETTINGS
#define ROCKCHIP_DEVICE_SETTINGS
@@ -38,6 +38,6 @@
ROCKCHIP_DEVICE_SETTINGS \
"boot_targets=" BOOT_TARGETS "\0"
-#endif /* CONFIG_SPL_BUILD */
+#endif /* CONFIG_XPL_BUILD */
#endif /* __CONFIG_RK3399_COMMON_H */
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index 9121bba3738..9b8ab3cdf20 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -11,7 +11,7 @@
#define CFG_CPUID_OFFSET 0x7
#endif
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#define BOOT_TARGETS "mmc1 mmc0 nvme scsi usb pxe dhcp spi"
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 4838bfd4f13..2acfdc7df4a 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -117,7 +117,7 @@
/* SPL NAND boot support */
/* Extra Environment */
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#ifdef CONFIG_CMD_DHCP
#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na)
diff --git a/include/configs/stm32mp15_common.h b/include/configs/stm32mp15_common.h
index 29a1197b5ae..af6dd4a8095 100644
--- a/include/configs/stm32mp15_common.h
+++ b/include/configs/stm32mp15_common.h
@@ -33,7 +33,7 @@
#ifdef CONFIG_DISTRO_DEFAULTS
/*****************************************************************************/
-#if !defined(CONFIG_SPL_BUILD)
+#if !defined(CONFIG_XPL_BUILD)
#ifdef CONFIG_CMD_MMC
#define BOOT_TARGET_MMC0(func) func(MMC, mmc, 0)
@@ -129,7 +129,7 @@
STM32MP_EXTRA \
STM32MP_BOARD_EXTRA_ENV
-#endif /* ifndef CONFIG_SPL_BUILD */
+#endif /* ifndef CONFIG_XPL_BUILD */
#endif /* ifdef CONFIG_DISTRO_DEFAULTS*/
#endif /* __CONFIG_STM32MP15_COMMMON_H */
diff --git a/include/configs/stm32mp15_dh_dhsom.h b/include/configs/stm32mp15_dh_dhsom.h
index 6fe6e7b9b8c..0f466711cae 100644
--- a/include/configs/stm32mp15_dh_dhsom.h
+++ b/include/configs/stm32mp15_dh_dhsom.h
@@ -10,7 +10,7 @@
/* PHY needs a longer autoneg timeout */
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define CFG_EXTRA_ENV_SETTINGS \
"dfu_alt_info_ram=u-boot.itb ram " \
__stringify(CONFIG_SPL_LOAD_FIT_ADDRESS) \
diff --git a/include/configs/surface-rt.h b/include/configs/surface-rt.h
index 30f6450cf38..1f0837e179b 100644
--- a/include/configs/surface-rt.h
+++ b/include/configs/surface-rt.h
@@ -13,24 +13,6 @@
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "Microsoft Surface RT"
-#define SURFACE_RT_BOOTMENU \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \
- "bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_3=boot from USB=usb reset; usb start; bootflow scan\0" \
- "bootmenu_4=reboot RCM=enterrcm\0" \
- "bootmenu_5=reboot=reset\0" \
- "bootmenu_6=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "button_cmd_1_name=Hall Sensor\0" \
- "button_cmd_1=poweroff\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- SURFACE_RT_BOOTMENU
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
diff --git a/include/configs/ti_omap3_common.h b/include/configs/ti_omap3_common.h
index 45f7179f035..4a7474ff3f9 100644
--- a/include/configs/ti_omap3_common.h
+++ b/include/configs/ti_omap3_common.h
@@ -31,7 +31,7 @@
115200}
/* Select serial console configuration */
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define CFG_SYS_NS16550_COM1 OMAP34XX_UART1
#define CFG_SYS_NS16550_COM2 OMAP34XX_UART2
#define CFG_SYS_NS16550_COM3 OMAP34XX_UART3
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index c4f116aabf8..7a333090b18 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -95,7 +95,7 @@
* So moving TEXT_BASE down to non-HS limit.
*/
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* No need for i2c in SPL mode as we will use SRI2C for PMIC access on OMAP4 */
#endif
diff --git a/include/configs/transformer-common.h b/include/configs/transformer-common.h
deleted file mode 100644
index bb6817c8d2b..00000000000
--- a/include/configs/transformer-common.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Copyright (c) 2022, Svyatoslav Ryhel <clamor95@gmail.com>.
- */
-
-#ifndef __TRANSFORMER_COMMON_H
-#define __TRANSFORMER_COMMON_H
-
-/* High-level configuration options */
-#define CFG_TEGRA_BOARD_STRING "ASUS Transformer"
-
-#define TRANSFORMER_FLASH_UBOOT \
- "flash_uboot=echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "mmc dev 0 1;" \
- "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \
- "echo Reading bootloader;" \
- "if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 1:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader to eMMC;" \
- "mmc dev 0 1;" \
- "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \
- "mmc dev 0 2;" \
- "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \
- "echo Bootloader written successfully;" \
- "pause 'Press ANY key to reboot device...'; reset;" \
- "else echo Reading bootloader failed;" \
- "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0"
-
-#define TRANSFORMER_FLASH_SPI \
- "update_spi=sf probe 0:1;" \
- "echo Dumping current SPI flash content ...;" \
- "sf read ${kernel_addr_r} 0x0 ${spi_size};" \
- "if fatwrite mmc 1:1 ${kernel_addr_r} spi-flash-backup.bin ${spi_size};" \
- "then echo SPI flash content was successfully written into spi-flash-backup.bin;" \
- "echo Reading SPI flash binary;" \
- "if load mmc 1:1 ${kernel_addr_r} repart-block.bin;" \
- "then echo Writing bootloader into SPI flash;" \
- "sf probe 0:1;" \
- "sf update ${kernel_addr_r} 0x0 ${spi_size};" \
- "poweroff;" \
- "else echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "sf read ${kernel_addr_r} 0x0 ${boot_block_size_r};" \
- "echo Reading bootloader;" \
- "if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 1:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader into SPI flash;" \
- "sf probe 0:1;" \
- "sf update ${kernel_addr_r} 0x0 ${boot_block_size_r};" \
- "sf update ${ramdisk_addr_r} ${boot_block_size_r} ${boot_block_size_r};" \
- "echo Bootloader written successfully; poweroff;" \
- "else echo Reading bootloader failed;" \
- "poweroff; fi;" \
- "fi;" \
- "else echo SPI flash backup FAILED! Aborting ...;" \
- "poweroff; fi\0"
-
-#define TRANSFORMER_BOOTMENU \
- TRANSFORMER_FLASH_UBOOT \
- TRANSFORMER_FLASH_SPI \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \
- "bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_3=update bootloader=run flash_uboot\0" \
- "bootmenu_4=reboot RCM=enterrcm\0" \
- "bootmenu_5=reboot=reset\0" \
- "bootmenu_6=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "spi_size=0x400000\0" \
- "boot_block_size_r=0x200000\0" \
- "boot_block_size=0x1000\0" \
- "bootloader_file=u-boot-dtb-tegra.bin\0" \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "button_cmd_1_name=Lid sensor\0" \
- "button_cmd_1=poweroff\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- TRANSFORMER_BOOTMENU
-
-#endif /* __CONFIG_H */
diff --git a/include/configs/transformer-t20.h b/include/configs/transformer-t20.h
index ca1e70caa71..6a3d9b24036 100644
--- a/include/configs/transformer-t20.h
+++ b/include/configs/transformer-t20.h
@@ -11,7 +11,9 @@
#define __CONFIG_H
#include "tegra20-common.h"
-#include "transformer-common.h"
+
+/* High-level configuration options */
+#define CFG_TEGRA_BOARD_STRING "ASUS Transformer"
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
diff --git a/include/configs/transformer-t30.h b/include/configs/transformer-t30.h
index d2a16f12c18..792b958a302 100644
--- a/include/configs/transformer-t30.h
+++ b/include/configs/transformer-t30.h
@@ -10,10 +10,10 @@
#ifndef __CONFIG_H
#define __CONFIG_H
-#include <linux/sizes.h>
-
#include "tegra30-common.h"
-#include "transformer-common.h"
+
+/* High-level configuration options */
+#define CFG_TEGRA_BOARD_STRING "ASUS Transformer"
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
diff --git a/include/configs/turris_1x.h b/include/configs/turris_1x.h
index 3d398a6c1ec..c05614950c7 100644
--- a/include/configs/turris_1x.h
+++ b/include/configs/turris_1x.h
@@ -63,7 +63,7 @@
/*
* For SD card builds without SPL it is needed to set CONFIG_SYS_RAMBOOT
*
- * if CONFIG_SPL_BUILD
+ * if CONFIG_XPL_BUILD
* if CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR
* define CONFIG_SPL_MAX_SIZE = (CONFIG_SYS_L2_SIZE+CONFIG_FSL_PREPBL_ESDHC_BOOT_SECTOR_DATA
* * SZ_512)
@@ -121,7 +121,7 @@
*/
/* Initial SRAM is used only for SD card boot in first stage image */
-#if !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD)
+#if !defined(CONFIG_SPL) || defined(CONFIG_XPL_BUILD)
#define CFG_SYS_INIT_L2_ADDR 0xf8f80000
#define CFG_SYS_INIT_L2_ADDR_PHYS CFG_SYS_INIT_L2_ADDR
/*
diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h
index 302194bc90f..03a12d519f2 100644
--- a/include/configs/turris_omnia.h
+++ b/include/configs/turris_omnia.h
@@ -31,7 +31,7 @@
#include "mv-common.h"
/* Include the common distro boot environment */
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
@@ -86,6 +86,6 @@
"bootcmd_rescue=" TURRIS_OMNIA_BOOTCMD_RESCUE "\0" \
BOOTENV
-#endif /* CONFIG_SPL_BUILD */
+#endif /* CONFIG_XPL_BUILD */
#endif /* _CONFIG_TURRIS_OMNIA_H */
diff --git a/include/configs/verdin-imx8mm.h b/include/configs/verdin-imx8mm.h
index b018bbe29dd..c54383b886e 100644
--- a/include/configs/verdin-imx8mm.h
+++ b/include/configs/verdin-imx8mm.h
@@ -12,7 +12,7 @@
#define CFG_SYS_UBOOT_BASE \
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
#define CFG_MALLOC_F_ADDR 0x930000
/* For RAW image gives a error info not panic */
diff --git a/include/configs/verdin-imx8mp.h b/include/configs/verdin-imx8mp.h
index 0b88e95603d..bff417fdafb 100644
--- a/include/configs/verdin-imx8mp.h
+++ b/include/configs/verdin-imx8mp.h
@@ -12,13 +12,13 @@
#define CFG_SYS_UBOOT_BASE \
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
#define CFG_MALLOC_F_ADDR 0x184000
/* For RAW image gives a error info not panic */
-#endif /* CONFIG_SPL_BUILD */
+#endif /* CONFIG_XPL_BUILD */
#define MEM_LAYOUT_ENV_SETTINGS \
"fdt_addr_r=0x50200000\0" \
diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h
index 2cf7bc70d8d..752b23d055c 100644
--- a/include/configs/vining_2000.h
+++ b/include/configs/vining_2000.h
@@ -47,7 +47,7 @@
/* 0=user, 1=boot0, 2=boot1, * 4..7=general0..3. */
#endif
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define CFG_MXC_UART_BASE UART1_BASE
#endif
diff --git a/include/configs/x3-t30.h b/include/configs/x3-t30.h
index 78a20128611..c152af9b7e2 100644
--- a/include/configs/x3-t30.h
+++ b/include/configs/x3-t30.h
@@ -10,55 +10,11 @@
#ifndef __CONFIG_H
#define __CONFIG_H
-#include <linux/sizes.h>
-
#include "tegra30-common.h"
/* High-level configuration options */
#define CFG_TEGRA_BOARD_STRING "LG X3 Board"
-#define X3_FLASH_UBOOT \
- "flash_uboot=echo Preparing RAM;" \
- "mw ${kernel_addr_r} 0 ${boot_block_size_r};" \
- "mw ${ramdisk_addr_r} 0 ${boot_block_size_r};" \
- "echo Reading BCT;" \
- "mmc dev 0 1;" \
- "mmc read ${kernel_addr_r} 0 ${boot_block_size};" \
- "echo Reading bootloader;" \
- "if load mmc 0:1 ${ramdisk_addr_r} ${bootloader_file};" \
- "then echo Calculating bootloader size;" \
- "size mmc 0:1 ${bootloader_file};" \
- "ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};" \
- "echo Writing bootloader to eMMC;" \
- "mmc dev 0 1;" \
- "mmc write ${kernel_addr_r} 0 ${boot_block_size};" \
- "mmc dev 0 2;" \
- "mmc write ${ramdisk_addr_r} 0 ${boot_block_size};" \
- "echo Bootloader written successfully;" \
- "pause 'Press ANY key to reboot device...'; reset;" \
- "else echo Reading bootloader failed;" \
- "pause 'Press ANY key to return to bootmenu...'; bootmenu; fi\0"
-
-#define X3_BOOTMENU \
- X3_FLASH_UBOOT \
- "bootmenu_0=mount internal storage=usb start && ums 0 mmc 0; bootmenu\0" \
- "bootmenu_1=mount external storage=usb start && ums 0 mmc 1; bootmenu\0" \
- "bootmenu_2=fastboot=echo Starting Fastboot protocol ...; fastboot usb 0; bootmenu\0" \
- "bootmenu_3=update bootloader=run flash_uboot\0" \
- "bootmenu_4=reboot RCM=enterrcm\0" \
- "bootmenu_5=reboot=reset\0" \
- "bootmenu_6=power off=poweroff\0" \
- "bootmenu_delay=-1\0"
-
-#define BOARD_EXTRA_ENV_SETTINGS \
- "boot_block_size_r=0x200000\0" \
- "boot_block_size=0x1000\0" \
- "bootloader_file=u-boot-dtb-tegra.bin\0" \
- "button_cmd_0_name=Volume Down\0" \
- "button_cmd_0=bootmenu\0" \
- "partitions=name=emmc,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
- X3_BOOTMENU
-
/* Board-specific serial config */
#define CFG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index de0db7bb63f..bb0db7c5ca3 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -183,7 +183,7 @@
#endif
/* SPL can't handle all huge variables - define just DFU */
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_DFU)
+#if defined(CONFIG_XPL_BUILD) && defined(CONFIG_SPL_DFU)
#undef CFG_EXTRA_ENV_SETTINGS
# define CFG_EXTRA_ENV_SETTINGS \
"dfu_alt_info_ram=uboot.bin ram 0x8000000 0x1000000;" \
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 03af859c951..37c77aa1611 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -44,7 +44,7 @@
/* Boot configuration */
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define BOOTENV
#else
@@ -167,7 +167,7 @@
BOOT_TARGET_DEVICES_DHCP(func)
#include <config_distro_bootcmd.h>
-#endif /* CONFIG_SPL_BUILD */
+#endif /* CONFIG_XPL_BUILD */
/* Default environment */
#ifndef CFG_EXTRA_ENV_SETTINGS
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 5795115c490..0787758926f 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -1588,6 +1588,47 @@ int ofnode_conf_read_int(const char *prop_name, int default_val);
const char *ofnode_conf_read_str(const char *prop_name);
/**
+ * ofnode_options_read_bool() - Read a boolean value from the U-Boot options
+ *
+ * This reads a property from the /options/u-boot/ node of the devicetree.
+ *
+ * This only works with the control FDT.
+ *
+ * See dtschema/schemas/options/u-boot.yaml in dt-schema project for bindings
+ *
+ * @prop_name: property name to look up
+ * Return: true, if it exists, false if not
+ */
+bool ofnode_options_read_bool(const char *prop_name);
+
+/**
+ * ofnode_options_read_int() - Read an integer value from the U-Boot options
+ *
+ * This reads a property from the /options/u-boot/ node of the devicetree.
+ *
+ * See dtschema/schemas/options/u-boot.yaml in dt-schema project for bindings
+ *
+ * @prop_name: property name to look up
+ * @default_val: default value to return if the property is not found
+ * Return: integer value, if found, or @default_val if not
+ */
+int ofnode_options_read_int(const char *prop_name, int default_val);
+
+/**
+ * ofnode_options_read_str() - Read a string value from the U-Boot options
+ *
+ * This reads a property from the /options/u-boot/ node of the devicetree.
+ *
+ * This only works with the control FDT.
+ *
+ * See dtschema/schemas/options/u-boot.yaml in dt-schema project for bindings
+ *
+ * @prop_name: property name to look up
+ * Return: string value, if found, or NULL if not
+ */
+const char *ofnode_options_read_str(const char *prop_name);
+
+/**
* ofnode_read_bootscript_address() - Read bootscr-address or bootscr-ram-offset
*
* @bootscr_address: pointer to 64bit address where bootscr-address property value
diff --git a/include/dt-bindings/clock/sun50i-h616-ccu.h b/include/dt-bindings/clock/sun50i-h616-ccu.h
deleted file mode 100644
index 6f8f01e6762..00000000000
--- a/include/dt-bindings/clock/sun50i-h616-ccu.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
-/*
- * Copyright (C) 2020 Arm Ltd.
- */
-
-#ifndef _DT_BINDINGS_CLK_SUN50I_H616_H_
-#define _DT_BINDINGS_CLK_SUN50I_H616_H_
-
-#define CLK_PLL_PERIPH0 4
-
-#define CLK_CPUX 21
-
-#define CLK_APB1 26
-
-#define CLK_DE 29
-#define CLK_BUS_DE 30
-#define CLK_DEINTERLACE 31
-#define CLK_BUS_DEINTERLACE 32
-#define CLK_G2D 33
-#define CLK_BUS_G2D 34
-#define CLK_GPU0 35
-#define CLK_BUS_GPU 36
-#define CLK_GPU1 37
-#define CLK_CE 38
-#define CLK_BUS_CE 39
-#define CLK_VE 40
-#define CLK_BUS_VE 41
-#define CLK_BUS_DMA 42
-#define CLK_BUS_HSTIMER 43
-#define CLK_AVS 44
-#define CLK_BUS_DBG 45
-#define CLK_BUS_PSI 46
-#define CLK_BUS_PWM 47
-#define CLK_BUS_IOMMU 48
-
-#define CLK_MBUS_DMA 50
-#define CLK_MBUS_VE 51
-#define CLK_MBUS_CE 52
-#define CLK_MBUS_TS 53
-#define CLK_MBUS_NAND 54
-#define CLK_MBUS_G2D 55
-
-#define CLK_NAND0 57
-#define CLK_NAND1 58
-#define CLK_BUS_NAND 59
-#define CLK_MMC0 60
-#define CLK_MMC1 61
-#define CLK_MMC2 62
-#define CLK_BUS_MMC0 63
-#define CLK_BUS_MMC1 64
-#define CLK_BUS_MMC2 65
-#define CLK_BUS_UART0 66
-#define CLK_BUS_UART1 67
-#define CLK_BUS_UART2 68
-#define CLK_BUS_UART3 69
-#define CLK_BUS_UART4 70
-#define CLK_BUS_UART5 71
-#define CLK_BUS_I2C0 72
-#define CLK_BUS_I2C1 73
-#define CLK_BUS_I2C2 74
-#define CLK_BUS_I2C3 75
-#define CLK_BUS_I2C4 76
-#define CLK_SPI0 77
-#define CLK_SPI1 78
-#define CLK_BUS_SPI0 79
-#define CLK_BUS_SPI1 80
-#define CLK_EMAC_25M 81
-#define CLK_BUS_EMAC0 82
-#define CLK_BUS_EMAC1 83
-#define CLK_TS 84
-#define CLK_BUS_TS 85
-#define CLK_BUS_THS 86
-#define CLK_SPDIF 87
-#define CLK_BUS_SPDIF 88
-#define CLK_DMIC 89
-#define CLK_BUS_DMIC 90
-#define CLK_AUDIO_CODEC_1X 91
-#define CLK_AUDIO_CODEC_4X 92
-#define CLK_BUS_AUDIO_CODEC 93
-#define CLK_AUDIO_HUB 94
-#define CLK_BUS_AUDIO_HUB 95
-#define CLK_USB_OHCI0 96
-#define CLK_USB_PHY0 97
-#define CLK_USB_OHCI1 98
-#define CLK_USB_PHY1 99
-#define CLK_USB_OHCI2 100
-#define CLK_USB_PHY2 101
-#define CLK_USB_OHCI3 102
-#define CLK_USB_PHY3 103
-#define CLK_BUS_OHCI0 104
-#define CLK_BUS_OHCI1 105
-#define CLK_BUS_OHCI2 106
-#define CLK_BUS_OHCI3 107
-#define CLK_BUS_EHCI0 108
-#define CLK_BUS_EHCI1 109
-#define CLK_BUS_EHCI2 110
-#define CLK_BUS_EHCI3 111
-#define CLK_BUS_OTG 112
-#define CLK_BUS_KEYADC 113
-#define CLK_HDMI 114
-#define CLK_HDMI_SLOW 115
-#define CLK_HDMI_CEC 116
-#define CLK_BUS_HDMI 117
-#define CLK_BUS_TCON_TOP 118
-#define CLK_TCON_TV0 119
-#define CLK_TCON_TV1 120
-#define CLK_BUS_TCON_TV0 121
-#define CLK_BUS_TCON_TV1 122
-#define CLK_TVE0 123
-#define CLK_BUS_TVE_TOP 124
-#define CLK_BUS_TVE0 125
-#define CLK_HDCP 126
-#define CLK_BUS_HDCP 127
-#define CLK_PLL_SYSTEM_32K 128
-
-#endif /* _DT_BINDINGS_CLK_SUN50I_H616_H_ */
diff --git a/include/dt-bindings/reset/sun50i-h616-ccu.h b/include/dt-bindings/reset/sun50i-h616-ccu.h
deleted file mode 100644
index 1bd8bb0a11b..00000000000
--- a/include/dt-bindings/reset/sun50i-h616-ccu.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
-/*
- * Copyright (C) 2020 Arm Ltd.
- */
-
-#ifndef _DT_BINDINGS_RESET_SUN50I_H616_H_
-#define _DT_BINDINGS_RESET_SUN50I_H616_H_
-
-#define RST_MBUS 0
-#define RST_BUS_DE 1
-#define RST_BUS_DEINTERLACE 2
-#define RST_BUS_GPU 3
-#define RST_BUS_CE 4
-#define RST_BUS_VE 5
-#define RST_BUS_DMA 6
-#define RST_BUS_HSTIMER 7
-#define RST_BUS_DBG 8
-#define RST_BUS_PSI 9
-#define RST_BUS_PWM 10
-#define RST_BUS_IOMMU 11
-#define RST_BUS_DRAM 12
-#define RST_BUS_NAND 13
-#define RST_BUS_MMC0 14
-#define RST_BUS_MMC1 15
-#define RST_BUS_MMC2 16
-#define RST_BUS_UART0 17
-#define RST_BUS_UART1 18
-#define RST_BUS_UART2 19
-#define RST_BUS_UART3 20
-#define RST_BUS_UART4 21
-#define RST_BUS_UART5 22
-#define RST_BUS_I2C0 23
-#define RST_BUS_I2C1 24
-#define RST_BUS_I2C2 25
-#define RST_BUS_I2C3 26
-#define RST_BUS_I2C4 27
-#define RST_BUS_SPI0 28
-#define RST_BUS_SPI1 29
-#define RST_BUS_EMAC0 30
-#define RST_BUS_EMAC1 31
-#define RST_BUS_TS 32
-#define RST_BUS_THS 33
-#define RST_BUS_SPDIF 34
-#define RST_BUS_DMIC 35
-#define RST_BUS_AUDIO_CODEC 36
-#define RST_BUS_AUDIO_HUB 37
-#define RST_USB_PHY0 38
-#define RST_USB_PHY1 39
-#define RST_USB_PHY2 40
-#define RST_USB_PHY3 41
-#define RST_BUS_OHCI0 42
-#define RST_BUS_OHCI1 43
-#define RST_BUS_OHCI2 44
-#define RST_BUS_OHCI3 45
-#define RST_BUS_EHCI0 46
-#define RST_BUS_EHCI1 47
-#define RST_BUS_EHCI2 48
-#define RST_BUS_EHCI3 49
-#define RST_BUS_OTG 50
-#define RST_BUS_HDMI 51
-#define RST_BUS_HDMI_SUB 52
-#define RST_BUS_TCON_TOP 53
-#define RST_BUS_TCON_TV0 54
-#define RST_BUS_TCON_TV1 55
-#define RST_BUS_TVE_TOP 56
-#define RST_BUS_TVE0 57
-#define RST_BUS_HDCP 58
-#define RST_BUS_KEYADC 59
-
-#endif /* _DT_BINDINGS_RESET_SUN50I_H616_H_ */
diff --git a/include/efi_loader.h b/include/efi_loader.h
index f84852e384f..511281e150e 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -567,7 +567,7 @@ efi_status_t EFIAPI efi_convert_pointer(efi_uintn_t debug_disposition,
/* Carve out DT reserved memory ranges */
void efi_carve_out_dt_rsv(void *fdt);
/* Purge unused kaslr-seed */
-void efi_try_purge_kaslr_seed(void *fdt);
+void efi_try_purge_rng_seed(void *fdt);
/* Called by bootefi to make console interface available */
efi_status_t efi_console_register(void);
/* Called by efi_init_obj_list() to proble all block devices */
diff --git a/include/env.h b/include/env.h
index d2a5954ded8..01c3eeae7e2 100644
--- a/include/env.h
+++ b/include/env.h
@@ -44,7 +44,7 @@ struct env_clbk_tbl {
* For SPL these are silently dropped to reduce code size, since environment
* callbacks are not supported with SPL.
*/
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#define U_BOOT_ENV_CALLBACK(name, callback) \
static inline __maybe_unused void _u_boot_env_noop_##name(void) \
{ \
diff --git a/include/env/nvidia/prod_upd.env b/include/env/nvidia/prod_upd.env
new file mode 100644
index 00000000000..f4e381994be
--- /dev/null
+++ b/include/env/nvidia/prod_upd.env
@@ -0,0 +1,60 @@
+boot_block_size_r=0x200000
+boot_block_size=0x1000
+bootloader_file=u-boot-dtb-tegra.bin
+spi_size=0x400000
+boot_dev=0
+
+flash_uboot=echo Preparing RAM;
+ mw ${kernel_addr_r} 0 ${boot_block_size_r};
+ mw ${ramdisk_addr_r} 0 ${boot_block_size_r};
+ echo Reading BCT;
+ mmc dev 0 1;
+ mmc read ${kernel_addr_r} 0 ${boot_block_size};
+ echo Reading bootloader;
+ if load mmc ${boot_dev}:1 ${ramdisk_addr_r} ${bootloader_file};
+ then echo Calculating bootloader size;
+ size mmc ${boot_dev}:1 ${bootloader_file};
+ ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};
+ echo Writing bootloader to eMMC;
+ mmc dev 0 1;
+ mmc write ${kernel_addr_r} 0 ${boot_block_size};
+ mmc dev 0 2;
+ mmc write ${ramdisk_addr_r} 0 ${boot_block_size};
+ echo Bootloader written successfully;
+ pause 'Press ANY key to reboot device...'; reset;
+ else echo Reading bootloader failed;
+ pause 'Press ANY key to return to bootmenu...'; bootmenu; fi
+
+update_spi=sf probe 0:1;
+ echo Dumping current SPI flash content ...;
+ sf read ${kernel_addr_r} 0x0 ${spi_size};
+ if fatwrite mmc 1:1 ${kernel_addr_r} spi-flash-backup.bin ${spi_size};
+ then echo SPI flash content was successfully written into spi-flash-backup.bin;
+ echo Reading SPI flash binary;
+ if load mmc 1:1 ${kernel_addr_r} repart-block.bin;
+ then echo Writing bootloader into SPI flash;
+ sf probe 0:1;
+ sf update ${kernel_addr_r} 0x0 ${spi_size};
+ echo Bootloader SUCCESSFULLY written into SPI flash;
+ pause 'Press ANY key to reboot...'; reset;
+ else echo Preparing RAM;
+ mw ${kernel_addr_r} 0 ${boot_block_size_r};
+ mw ${ramdisk_addr_r} 0 ${boot_block_size_r};
+ echo Reading BCT;
+ sf read ${kernel_addr_r} 0x0 ${boot_block_size_r};
+ echo Reading bootloader;
+ if load mmc 1:1 ${ramdisk_addr_r} ${bootloader_file};
+ then echo Calculating bootloader size;
+ size mmc 1:1 ${bootloader_file};
+ ebtupdate ${kernel_addr_r} ${ramdisk_addr_r} ${filesize};
+ echo Writing bootloader into SPI flash;
+ sf probe 0:1;
+ sf update ${kernel_addr_r} 0x0 ${boot_block_size_r};
+ sf update ${ramdisk_addr_r} ${boot_block_size_r} ${boot_block_size_r};
+ echo Bootloader written SUCCESSFULLY;
+ pause 'Press ANY key to reboot...'; reset;
+ else echo Reading bootloader failed;
+ pause 'Press ANY key to reboot...'; reset; fi;
+ fi;
+ else echo SPI flash backup FAILED! Aborting ...;
+ pause 'Press ANY key to reboot...'; reset; fi
diff --git a/include/env_callback.h b/include/env_callback.h
index 66cc8309e71..bc8ff1923e1 100644
--- a/include/env_callback.h
+++ b/include/env_callback.h
@@ -92,7 +92,7 @@
"serial#:serialno," \
CFG_ENV_CALLBACK_LIST_STATIC
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
void env_callback_init(struct env_entry *var_entry);
#else
static inline void env_callback_init(struct env_entry *var_entry)
diff --git a/include/fdtdec.h b/include/fdtdec.h
index e80de24076c..555c9520379 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -143,7 +143,7 @@ extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */
static inline u8 *dtb_dt_embedded(void)
{
#ifdef CONFIG_OF_EMBED
-# ifdef CONFIG_SPL_BUILD
+# ifdef CONFIG_XPL_BUILD
return __dtb_dt_spl_begin;
# else
return __dtb_dt_begin;
diff --git a/include/image-android-dt.h b/include/image-android-dt.h
index 9a3aa8fa30f..d255744e8cb 100644
--- a/include/image-android-dt.h
+++ b/include/image-android-dt.h
@@ -13,7 +13,7 @@ bool android_dt_check_header(ulong hdr_addr);
bool android_dt_get_fdt_by_index(ulong hdr_addr, u32 index, ulong *addr,
u32 *size);
-#if !defined(CONFIG_SPL_BUILD)
+#if !defined(CONFIG_XPL_BUILD)
void android_dt_print_contents(ulong hdr_addr);
#endif
diff --git a/include/iotrace.h b/include/iotrace.h
index d5610426cc8..5527c984fd2 100644
--- a/include/iotrace.h
+++ b/include/iotrace.h
@@ -42,7 +42,7 @@ struct iotrace_record {
*/
#if defined(CONFIG_IO_TRACE) && !defined(IOTRACE_IMPL) && \
- !defined(CONFIG_SPL_BUILD)
+ !defined(CONFIG_XPL_BUILD)
#undef readl
#define readl(addr) iotrace_readl((const void *)(addr))
diff --git a/include/led.h b/include/led.h
index 99f93c5ef86..64247cd3a70 100644
--- a/include/led.h
+++ b/include/led.h
@@ -9,6 +9,47 @@
#include <stdbool.h>
#include <cyclic.h>
+#include <dm/ofnode.h>
+
+/**
+ * DOC: Overview
+ *
+ * Generic LED API provided when a supported compatible is defined in DeviceTree.
+ *
+ * To enable support for LEDs, enable the `CONFIG_LED` Kconfig option.
+ *
+ * The most common implementation is for GPIO-connected LEDs. If using GPIO-connected LEDs,
+ * enable the `LED_GPIO` Kconfig option.
+ *
+ * `LED_BLINK` support requires LED driver support and is therefore optional. If LED blink
+ * functionality is needed, enable the `LED_BLINK` Kconfig option. If LED driver doesn't
+ * support HW Blink, SW Blink can be used with the Cyclic framework by enabling the
+ * CONFIG_LED_SW_BLINK.
+ *
+ * Boot and Activity LEDs are also supported. These LEDs can signal various system operations
+ * during runtime, such as boot initialization, file transfers, and flash write/erase operations.
+ *
+ * To enable a Boot LED, enable `CONFIG_LED_BOOT` and define in `/options/u-boot` root node the
+ * property `boot-led`. This will enable the specified LED to blink and turn ON when
+ * the bootloader initializes correctly.
+ *
+ * To enable an Activity LED, enable `CONFIG_LED_ACTIVITY` and define in `/options/u-boot` root
+ * node the property `activity-led`.
+ * This will enable the specified LED to blink and turn ON during file transfers or flash
+ * write/erase operations.
+ *
+ * Both Boot and Activity LEDs provide a simple API to turn the LED ON or OFF:
+ * `led_boot_on()`, `led_boot_off()`, `led_activity_on()`, and `led_activity_off()`.
+ *
+ * Both configurations can optionally define a `boot/activity-led-period` property
+ * if `CONFIG_LED_BLINK` or `CONFIG_LED_SW_BLINK` is enabled for LED blink operations, which
+ * is usually used by the Activity LED. If not defined the default value of 250 (ms) is used.
+ *
+ * When `CONFIG_LED_BLINK` or `CONFIG_LED_SW_BLINK` is enabled, additional APIs are exposed:
+ * `led_boot_blink()` and `led_activity_blink()`. Note that if `CONFIG_LED_BLINK` or
+ * `CONFIG_LED_SW_BLINK` is disabled, these APIs will behave like the `led_boot_on()` and
+ * `led_activity_on()` APIs, respectively.
+ */
struct udevice;
@@ -40,6 +81,7 @@ struct led_sw_blink {
*
* @label: LED label
* @default_state: LED default state
+ * @sw_blink: LED software blink struct
*/
struct led_uc_plat {
const char *label;
@@ -52,10 +94,22 @@ struct led_uc_plat {
/**
* struct led_uc_priv - Private data the uclass stores about each device
*
- * @period_ms: Flash period in milliseconds
+ * @boot_led_label: Boot LED label
+ * @activity_led_label: Activity LED label
+ * @boot_led_dev: Boot LED dev
+ * @activity_led_dev: Activity LED dev
+ * @boot_led_period: Boot LED blink period
+ * @activity_led_period: Activity LED blink period
*/
struct led_uc_priv {
- int period_ms;
+#ifdef CONFIG_LED_BOOT
+ const char *boot_led_label;
+ int boot_led_period;
+#endif
+#ifdef CONFIG_LED_ACTIVITY
+ const char *activity_led_label;
+ int activity_led_period;
+#endif
};
struct led_ops {
@@ -141,4 +195,93 @@ int led_sw_set_period(struct udevice *dev, int period_ms);
bool led_sw_is_blinking(struct udevice *dev);
bool led_sw_on_state_change(struct udevice *dev, enum led_state_t state);
+#ifdef CONFIG_LED_BOOT
+
+/**
+ * led_boot_on() - turn ON the designated LED for booting
+ *
+ * Return: 0 if OK, -ve on error
+ */
+int led_boot_on(void);
+
+/**
+ * led_boot_off() - turn OFF the designated LED for booting
+ *
+ * Return: 0 if OK, -ve on error
+ */
+int led_boot_off(void);
+
+#if defined(CONFIG_LED_BLINK) || defined(CONFIG_LED_SW_BLINK)
+/**
+ * led_boot_blink() - turn ON the designated LED for booting
+ *
+ * Return: 0 if OK, -ve on error
+ */
+int led_boot_blink(void);
+
+#else
+/* If LED BLINK is not supported/enabled, fallback to LED ON */
+#define led_boot_blink led_boot_on
+#endif
+#else
+static inline int led_boot_on(void)
+{
+ return -ENOSYS;
+}
+
+static inline int led_boot_off(void)
+{
+ return -ENOSYS;
+}
+
+static inline int led_boot_blink(void)
+{
+ return -ENOSYS;
+}
+#endif
+
+#ifdef CONFIG_LED_ACTIVITY
+
+/**
+ * led_activity_on() - turn ON the designated LED for activity
+ *
+ * Return: 0 if OK, -ve on error
+ */
+int led_activity_on(void);
+
+/**
+ * led_activity_off() - turn OFF the designated LED for activity
+ *
+ * Return: 0 if OK, -ve on error
+ */
+int led_activity_off(void);
+
+#if defined(CONFIG_LED_BLINK) || defined(CONFIG_LED_SW_BLINK)
+/**
+ * led_activity_blink() - turn ON the designated LED for activity
+ *
+ * Return: 0 if OK, -ve on error
+ */
+int led_activity_blink(void);
+#else
+/* If LED BLINK is not supported/enabled, fallback to LED ON */
+#define led_activity_blink led_activity_on
+#endif
+#else
+static inline int led_activity_on(void)
+{
+ return -ENOSYS;
+}
+
+static inline int led_activity_off(void)
+{
+ return -ENOSYS;
+}
+
+static inline int led_activity_blink(void)
+{
+ return -ENOSYS;
+}
+#endif
+
#endif
diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h
index 2bc704e1104..ec9584b2426 100644
--- a/include/linux/kconfig.h
+++ b/include/linux/kconfig.h
@@ -53,7 +53,7 @@
/*
* CONFIG_VAL(FOO) evaluates to the value of
* CONFIG_TOOLS_FOO if USE_HOSTCC is defined,
- * CONFIG_FOO if CONFIG_SPL_BUILD is undefined,
+ * CONFIG_FOO if CONFIG_XPL_BUILD is undefined,
* CONFIG_SPL_FOO if CONFIG_SPL_BUILD is defined.
* CONFIG_TPL_FOO if CONFIG_TPL_BUILD is defined.
* CONFIG_VPL_FOO if CONFIG_VPL_BUILD is defined.
@@ -106,21 +106,21 @@ long invalid_use_of_IF_ENABLED_INT(void);
/*
* CONFIG_IS_ENABLED(FOO) expands to
* 1 if USE_HOSTCC is defined and CONFIG_TOOLS_FOO is set to 'y',
- * 1 if CONFIG_SPL_BUILD is undefined and CONFIG_FOO is set to 'y',
+ * 1 if CONFIG_XPL_BUILD is undefined and CONFIG_FOO is set to 'y',
* 1 if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y',
* 1 if CONFIG_TPL_BUILD is defined and CONFIG_TPL_FOO is set to 'y',
* 0 otherwise.
*
* CONFIG_IS_ENABLED(FOO, (abc)) expands to
* abc if USE_HOSTCC is defined and CONFIG_TOOLS_FOO is set to 'y',
- * abc if CONFIG_SPL_BUILD is undefined and CONFIG_FOO is set to 'y',
+ * abc if CONFIG_XPL_BUILD is undefined and CONFIG_FOO is set to 'y',
* abc if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y',
* abc if CONFIG_TPL_BUILD is defined and CONFIG_TPL_FOO is set to 'y',
* nothing otherwise.
*
* CONFIG_IS_ENABLED(FOO, (abc), (def)) expands to
* abc if USE_HOSTCC is defined and CONFIG_TOOLS_FOO is set to 'y',
- * abc if CONFIG_SPL_BUILD is undefined and CONFIG_FOO is set to 'y',
+ * abc if CONFIG_XPL_BUILD is undefined and CONFIG_FOO is set to 'y',
* abc if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y',
* abc if CONFIG_TPL_BUILD is defined and CONFIG_TPL_FOO is set to 'y',
* def otherwise.
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index d1dbf3eadbf..047e83e8463 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -13,6 +13,9 @@
#include <linux/mtd/mtd.h>
#include <spi-mem.h>
+/* In parallel configuration enable multiple CS */
+#define SPI_NOR_ENABLE_MULTI_CS (BIT(0) | BIT(1))
+
/*
* Manufacturer IDs
*
@@ -45,6 +48,8 @@
#define SPINOR_OP_WRSR 0x01 /* Write status register 1 byte */
#define SPINOR_OP_RDSR2 0x3f /* Read status register 2 */
#define SPINOR_OP_WRSR2 0x3e /* Write status register 2 */
+#define SPINOR_OP_RDSR3 0x15 /* Read status register 3 */
+#define SPINOR_OP_WRSR3 0x11 /* Write status register 3 */
#define SPINOR_OP_READ 0x03 /* Read data bytes (low frequency) */
#define SPINOR_OP_READ_FAST 0x0b /* Read data bytes (high frequency) */
#define SPINOR_OP_READ_1_1_2 0x3b /* Read data bytes (Dual Output SPI) */
@@ -177,6 +182,15 @@
/* Status Register 2 bits. */
#define SR2_QUAD_EN_BIT7 BIT(7)
+/*
+ * Maximum number of flashes that can be connected
+ * in stacked/parallel configuration
+ */
+#define SNOR_FLASH_CNT_MAX 2
+
+/* Status Register 3 bits. */
+#define SR3_WPS BIT(2)
+
/* For Cypress flash. */
#define SPINOR_OP_RD_ANY_REG 0x65 /* Read any register */
#define SPINOR_OP_WR_ANY_REG 0x71 /* Write any register */
@@ -294,6 +308,13 @@ enum spi_nor_option_flags {
SNOR_F_BROKEN_RESET = BIT(6),
SNOR_F_SOFT_RESET = BIT(7),
SNOR_F_IO_MODE_EN_VOLATILE = BIT(8),
+#if defined(CONFIG_SPI_ADVANCE)
+ SNOR_F_HAS_STACKED = BIT(9),
+ SNOR_F_HAS_PARALLEL = BIT(10),
+#else
+ SNOR_F_HAS_STACKED = 0,
+ SNOR_F_HAS_PARALLEL = 0,
+#endif
};
struct spi_nor;
@@ -551,6 +572,7 @@ struct spi_nor {
u8 bank_read_cmd;
u8 bank_write_cmd;
u8 bank_curr;
+ u8 upage_prev;
#endif
enum spi_nor_protocol read_proto;
enum spi_nor_protocol write_proto;
diff --git a/include/log.h b/include/log.h
index 7c25bf0b081..bf81a27011f 100644
--- a/include/log.h
+++ b/include/log.h
@@ -246,10 +246,10 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level,
#define _DEBUG 0
#endif
-#ifdef CONFIG_SPL_BUILD
-#define _SPL_BUILD 1
+#ifdef CONFIG_XPL_BUILD
+#define _XPL_BUILD 1
#else
-#define _SPL_BUILD 0
+#define _XPL_BUILD 0
#endif
#if CONFIG_IS_ENABLED(LOG)
@@ -281,9 +281,9 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level,
#define debug(fmt, args...) \
debug_cond(_DEBUG, fmt, ##args)
-/* Show a message if not in SPL */
-#define warn_non_spl(fmt, args...) \
- debug_cond(!_SPL_BUILD, fmt, ##args)
+/* Show a message if not in xPL */
+#define warn_non_xpl(fmt, args...) \
+ debug_cond(!_XPL_BUILD, fmt, ##args)
/*
* An assertion is run-time check done in debug mode only. If DEBUG is not
diff --git a/include/mmc.h b/include/mmc.h
index 0044ff8bef7..e4b960b7294 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -726,7 +726,7 @@ struct mmc {
u64 capacity_boot;
u64 capacity_rpmb;
u64 capacity_gp[4];
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
u64 enh_user_start;
u64 enh_user_size;
#endif
diff --git a/include/mtd/cfi_flash.h b/include/mtd/cfi_flash.h
index f4aecaac75f..be292e3ceb2 100644
--- a/include/mtd/cfi_flash.h
+++ b/include/mtd/cfi_flash.h
@@ -163,7 +163,7 @@ struct cfi_pri_hdr {
#if defined(CONFIG_SYS_MAX_FLASH_BANKS_DETECT)
/* map to cfi_flash_num_flash_banks only when supported */
#if IS_ENABLED(CONFIG_FLASH_CFI_DRIVER) && \
- (!IS_ENABLED(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_SPL_MTD))
+ (!IS_ENABLED(CONFIG_XPL_BUILD) || IS_ENABLED(CONFIG_SPL_MTD))
#define CFI_FLASH_BANKS (cfi_flash_num_flash_banks)
/* board code can update this variable before CFI detection */
extern int cfi_flash_num_flash_banks;
diff --git a/include/net.h b/include/net.h
index bb2ae20f52a..dc8b5e9cc34 100644
--- a/include/net.h
+++ b/include/net.h
@@ -683,7 +683,7 @@ int net_send_udp_packet(uchar *ether, struct in_addr dest, int dport,
/* Processes a received packet */
void net_process_received_packet(uchar *in_packet, int len);
-#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_XPL_BUILD)
void nc_start(void);
int nc_input_packet(uchar *pkt, struct in_addr src_ip, unsigned dest_port,
unsigned src_port, unsigned len);
@@ -691,7 +691,7 @@ int nc_input_packet(uchar *pkt, struct in_addr src_ip, unsigned dest_port,
static __always_inline int eth_is_on_demand_init(void)
{
-#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_XPL_BUILD)
extern enum proto_t net_loop_last_protocol;
return net_loop_last_protocol != NETCONS;
@@ -702,7 +702,7 @@ static __always_inline int eth_is_on_demand_init(void)
static inline void eth_set_last_protocol(int protocol)
{
-#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_XPL_BUILD)
extern enum proto_t net_loop_last_protocol;
net_loop_last_protocol = protocol;
diff --git a/include/part.h b/include/part.h
index 797b542ef1f..92662677551 100644
--- a/include/part.h
+++ b/include/part.h
@@ -439,7 +439,7 @@ ulong disk_blk_erase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt);
* We don't support printing partition information in SPL and only support
* getting partition information in a few cases.
*/
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
# define part_print_ptr(x) NULL
# if defined(CONFIG_SPL_FS_EXT4) || defined(CONFIG_SPL_FS_FAT) || \
defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION)
diff --git a/include/power/mp5416.h b/include/power/mp5416.h
index dc096fed3f2..4326baaa42a 100644
--- a/include/power/mp5416.h
+++ b/include/power/mp5416.h
@@ -32,7 +32,7 @@ enum {
#define MP5416_VSET_SW3_GVAL(x) ((((x) & 0x7f) * 12500) + 600000)
#define MP5416_VSET_SW4_GVAL(x) ((((x) & 0x7f) * 25000) + 800000)
#define MP5416_VSET_LDO_GVAL(x) ((((x) & 0x7f) * 25000) + 800000)
-#define MP5416_VSET_LDO_SVAL(x) ((((x) & 0x7f) * 25000) + 800000)
+#define MP5416_VSET_LDO_SVAL(x) (((x) - 800000) / 25000)
#define MP5416_VSET_SW1_SVAL(x) (((x) - 600000) / 12500)
#define MP5416_VSET_SW2_SVAL(x) (((x) - 800000) / 25000)
#define MP5416_VSET_SW3_SVAL(x) (((x) - 600000) / 12500)
diff --git a/include/power/pca9450.h b/include/power/pca9450.h
index f896d829d37..e5ab09fb8c8 100644
--- a/include/power/pca9450.h
+++ b/include/power/pca9450.h
@@ -62,6 +62,7 @@ enum {
NXP_CHIP_TYPE_PCA9450A = 0,
NXP_CHIP_TYPE_PCA9450BC,
NXP_CHIP_TYPE_PCA9451A,
+ NXP_CHIP_TYPE_PCA9452,
NXP_CHIP_TYPE_AMOUNT
};
diff --git a/include/sdp.h b/include/sdp.h
index 5492f9c47d2..0a97f28073a 100644
--- a/include/sdp.h
+++ b/include/sdp.h
@@ -11,7 +11,7 @@
int sdp_init(struct udevice *udc);
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
#include <spl.h>
int spl_sdp_handle(struct udevice *udc, struct spl_image_info *spl_image,
diff --git a/include/search.h b/include/search.h
index 7faf23f4aca..3952198a0df 100644
--- a/include/search.h
+++ b/include/search.h
@@ -29,7 +29,7 @@ enum env_action {
struct env_entry {
const char *key;
char *data;
-#ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_XPL_BUILD
int (*callback)(const char *name, const char *value, enum env_op op,
int flags);
#endif
diff --git a/include/spi.h b/include/spi.h
index 9e9851284c8..3a92d02f215 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -38,6 +38,18 @@
#define SPI_DEFAULT_WORDLEN 8
+#define SPI_3BYTE_MODE 0x0
+#define SPI_4BYTE_MODE 0x1
+
+/* SPI transfer flags */
+#define SPI_XFER_STRIPE (1 << 6)
+#define SPI_XFER_MASK (3 << 8)
+#define SPI_XFER_LOWER (1 << 8)
+#define SPI_XFER_UPPER (2 << 8)
+
+/* Max no. of CS supported per spi device */
+#define SPI_CS_CNT_MAX 2
+
/**
* struct dm_spi_bus - SPI bus info
*
@@ -71,7 +83,7 @@ struct dm_spi_bus {
* @mode: SPI mode to use for this device (see SPI mode flags)
*/
struct dm_spi_slave_plat {
- unsigned int cs;
+ unsigned int cs[SPI_CS_CNT_MAX];
uint max_hz;
uint mode;
};
@@ -155,6 +167,15 @@ struct spi_slave {
#define SPI_XFER_BEGIN BIT(0) /* Assert CS before transfer */
#define SPI_XFER_END BIT(1) /* Deassert CS after transfer */
#define SPI_XFER_ONCE (SPI_XFER_BEGIN | SPI_XFER_END)
+#define SPI_XFER_U_PAGE BIT(4)
+#define SPI_XFER_STACKED BIT(5)
+ /*
+ * Flag indicating that the spi-controller has multi chip select
+ * capability and can assert/de-assert more than one chip select
+ * at once.
+ */
+ bool multi_cs_cap;
+ u32 bytemode;
};
/**
diff --git a/include/spl.h b/include/spl.h
index de808ccd413..269e36bb441 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -34,24 +34,26 @@ struct spl_boot_device;
enum boot_device;
/*
- * u_boot_first_phase() - check if this is the first U-Boot phase
+ * xpl_is_first_phase() - check if this is the first U-Boot phase
*
- * U-Boot has up to three phases: TPL, SPL and U-Boot proper. Depending on the
- * build flags we can determine whether the current build is for the first
+ * U-Boot has up to four phases: TPL, VPL, SPL and U-Boot proper. Depending on
+ * the build flags we can determine whether the current build is for the first
* phase of U-Boot or not. If there is no SPL, then this is U-Boot proper. If
* there is SPL but no TPL, the the first phase is SPL. If there is TPL, then
- * it is the first phase.
+ * it is the first phase, etc.
*
- * @returns true if this is the first phase of U-Boot
+ * Note that VPL can never be the first phase. If it exists, it is loaded from
+ * TPL
*
+ * Return: true if this is the first phase of U-Boot
*/
-static inline bool u_boot_first_phase(void)
+static inline bool xpl_is_first_phase(void)
{
if (IS_ENABLED(CONFIG_TPL)) {
if (IS_ENABLED(CONFIG_TPL_BUILD))
return true;
} else if (IS_ENABLED(CONFIG_SPL)) {
- if (IS_ENABLED(CONFIG_SPL_BUILD))
+ if (IS_ENABLED(CONFIG_XPL_BUILD))
return true;
} else {
return true;
@@ -60,7 +62,7 @@ static inline bool u_boot_first_phase(void)
return false;
}
-enum u_boot_phase {
+enum xpl_phase_t {
PHASE_NONE, /* Invalid phase, signifying before U-Boot */
PHASE_TPL, /* Running in TPL */
PHASE_VPL, /* Running in VPL */
@@ -72,7 +74,7 @@ enum u_boot_phase {
};
/**
- * spl_phase() - Find out the phase of U-Boot
+ * xpl_phase() - Find out the phase of U-Boot
*
* This can be used to avoid #ifdef logic and use if() instead.
*
@@ -84,43 +86,43 @@ enum u_boot_phase {
*
* but with this you can use:
*
- * if (spl_phase() == PHASE_TPL) {
+ * if (xpl_phase() == PHASE_TPL) {
* ...
* }
*
* To include code only in SPL, you might do:
*
- * #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD)
+ * #if defined(CONFIG_XPL_BUILD) && !defined(CONFIG_TPL_BUILD)
* ...
* #endif
*
* but with this you can use:
*
- * if (spl_phase() == PHASE_SPL) {
+ * if (xpl_phase() == PHASE_SPL) {
* ...
* }
*
* To include code only in U-Boot proper, you might do:
*
- * #ifndef CONFIG_SPL_BUILD
+ * #ifndef CONFIG_XPL_BUILD
* ...
* #endif
*
* but with this you can use:
*
- * if (spl_phase() == PHASE_BOARD_F) {
+ * if (xpl_phase() == PHASE_BOARD_F) {
* ...
* }
*
* Return: U-Boot phase
*/
-static inline enum u_boot_phase spl_phase(void)
+static inline enum xpl_phase_t xpl_phase(void)
{
#ifdef CONFIG_TPL_BUILD
return PHASE_TPL;
#elif defined(CONFIG_VPL_BUILD)
return PHASE_VPL;
-#elif defined(CONFIG_SPL_BUILD)
+#elif defined(CONFIG_XPL_BUILD)
return PHASE_SPL;
#else
DECLARE_GLOBAL_DATA_PTR;
@@ -132,29 +134,39 @@ static inline enum u_boot_phase spl_phase(void)
#endif
}
-/* returns true if in U-Boot proper, false if in SPL */
-static inline bool spl_in_proper(void)
+/* returns true if in U-Boot proper, false if in xPL */
+static inline bool not_xpl(void)
{
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
return false;
#endif
return true;
}
+/* returns true if in xPL, false if in U-Boot proper */
+static inline bool is_xpl(void)
+{
+#ifdef CONFIG_XPL_BUILD
+ return true;
+#endif
+
+ return false;
+}
+
/**
- * spl_prev_phase() - Figure out the previous U-Boot phase
+ * xpl_prev_phase() - Figure out the previous U-Boot phase
*
* Return: the previous phase from this one, e.g. if called in SPL this returns
* PHASE_TPL, if TPL is enabled
*/
-static inline enum u_boot_phase spl_prev_phase(void)
+static inline enum xpl_phase_t xpl_prev_phase(void)
{
#ifdef CONFIG_TPL_BUILD
return PHASE_NONE;
#elif defined(CONFIG_VPL_BUILD)
return PHASE_TPL; /* VPL requires TPL */
-#elif defined(CONFIG_SPL_BUILD)
+#elif defined(CONFIG_XPL_BUILD)
return IS_ENABLED(CONFIG_VPL) ? PHASE_VPL :
IS_ENABLED(CONFIG_TPL) ? PHASE_TPL :
PHASE_NONE;
@@ -165,12 +177,12 @@ static inline enum u_boot_phase spl_prev_phase(void)
}
/**
- * spl_next_phase() - Figure out the next U-Boot phase
+ * xpl_next_phase() - Figure out the next U-Boot phase
*
* Return: the next phase from this one, e.g. if called in TPL this returns
* PHASE_SPL
*/
-static inline enum u_boot_phase spl_next_phase(void)
+static inline enum xpl_phase_t xpl_next_phase(void)
{
#ifdef CONFIG_TPL_BUILD
return IS_ENABLED(CONFIG_VPL) ? PHASE_VPL : PHASE_SPL;
@@ -182,11 +194,11 @@ static inline enum u_boot_phase spl_next_phase(void)
}
/**
- * spl_phase_name() - Get the name of the current phase
+ * xpl_name() - Get the name of a phase
*
* Return: phase name
*/
-static inline const char *spl_phase_name(enum u_boot_phase phase)
+static inline const char *xpl_name(enum xpl_phase_t phase)
{
switch (phase) {
case PHASE_TPL:
@@ -204,12 +216,12 @@ static inline const char *spl_phase_name(enum u_boot_phase phase)
}
/**
- * spl_phase_prefix() - Get the prefix of the current phase
+ * xpl_prefix() - Get the prefix of the current phase
*
* @phase: Phase to look up
* Return: phase prefix ("spl", "tpl", etc.)
*/
-static inline const char *spl_phase_prefix(enum u_boot_phase phase)
+static inline const char *xpl_prefix(enum xpl_phase_t phase)
{
switch (phase) {
case PHASE_TPL:
@@ -227,18 +239,18 @@ static inline const char *spl_phase_prefix(enum u_boot_phase phase)
}
/* A string name for SPL or TPL */
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_XPL_BUILD
# ifdef CONFIG_TPL_BUILD
-# define SPL_TPL_NAME "TPL"
+# define PHASE_NAME "TPL"
# elif defined(CONFIG_VPL_BUILD)
-# define SPL_TPL_NAME "VPL"
-# else
-# define SPL_TPL_NAME "SPL"
+# define PHASE_NAME "VPL"
+# elif defined(CONFIG_SPL_BUILD)
+# define PHASE_NAME "SPL"
# endif
-# define SPL_TPL_PROMPT SPL_TPL_NAME ": "
+# define PHASE_PROMPT PHASE_NAME ": "
#else
-# define SPL_TPL_NAME ""
-# define SPL_TPL_PROMPT ""
+# define PHASE_NAME ""
+# define PHASE_PROMPT ""
#endif
/**
diff --git a/include/spl_gpio.h b/include/spl_gpio.h
index e39ac3f624b..b33261a6485 100644
--- a/include/spl_gpio.h
+++ b/include/spl_gpio.h
@@ -59,4 +59,23 @@ int spl_gpio_output(void *regs, uint gpio, int value);
*/
int spl_gpio_input(void *regs, uint gpio);
+/**
+ * spl_gpio_get_value() - Get GPIO value
+ *
+ * @regs: Pointer to GPIO registers
+ * @gpio: GPIO to adjust (SoC-specific)
+ * Return: return GPIO value if OK, -ve on error
+ */
+int spl_gpio_get_value(void *regs, uint gpio);
+
+/**
+ * spl_gpio_set_value() - Set value on GPIO
+ *
+ * @regs: Pointer to GPIO registers
+ * @gpio: GPIO to adjust (SoC-specific)
+ * @value: 0 to set the output low, 1 to set it high
+ * Return: return 0 if OK, -ve on error
+ */
+int spl_gpio_set_value(void *regs, uint gpio, int value);
+
#endif /* __SPL_GPIO_H */
diff --git a/include/status_led.h b/include/status_led.h
index 6707ab1d29d..1282022253e 100644
--- a/include/status_led.h
+++ b/include/status_led.h
@@ -39,6 +39,13 @@ void status_led_init(void);
void status_led_tick(unsigned long timestamp);
void status_led_set(int led, int state);
+static inline void status_led_boot_blink(void)
+{
+#ifdef CONFIG_LED_STATUS_BOOT_ENABLE
+ status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_BLINKING);
+#endif
+}
+
/***** MVS v1 **********************************************************/
#if (defined(CONFIG_MVS) && CONFIG_MVS < 2)
# define STATUS_LED_PAR im_ioport.iop_pdpar
@@ -72,6 +79,12 @@ void __led_blink(led_id_t mask, int freq);
# include <asm/status_led.h>
#endif
+#else
+
+static inline void status_led_init(void) { }
+static inline void status_led_set(int led, int state) { }
+static inline void status_led_boot_blink(void) { }
+
#endif /* CONFIG_LED_STATUS */
/*
diff --git a/include/stdio.h b/include/stdio.h
index 7b999a519ba..d42fdd2728c 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -9,10 +9,7 @@ int getchar(void);
int tstc(void);
/* stdout */
-#if !defined(CONFIG_SPL_BUILD) || \
- (defined(CONFIG_TPL_BUILD) && defined(CONFIG_TPL_SERIAL)) || \
- (defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) && \
- defined(CONFIG_SPL_SERIAL))
+#if !defined(CONFIG_XPL_BUILD) || CONFIG_IS_ENABLED(SERIAL)
void putc(const char c);
void puts(const char *s);
#ifdef CONFIG_CONSOLE_FLUSH_SUPPORT
diff --git a/include/sunxi_gpio.h b/include/sunxi_gpio.h
index db3742c0397..122987c395e 100644
--- a/include/sunxi_gpio.h
+++ b/include/sunxi_gpio.h
@@ -206,7 +206,7 @@ void sunxi_gpio_set_pull(u32 pin, u32 val);
void sunxi_gpio_set_pull_bank(void *bank_base, int pin_offset, u32 val);
int sunxi_name_to_gpio(const char *name);
-#if !defined CONFIG_SPL_BUILD && defined CONFIG_AXP_GPIO
+#if !defined CONFIG_XPL_BUILD && defined CONFIG_AXP_GPIO
int axp_gpio_init(void);
#else
static inline int axp_gpio_init(void) { return 0; }
diff --git a/include/upl.h b/include/upl.h
index 2ec5ef1b5cf..4d0eca88047 100644
--- a/include/upl.h
+++ b/include/upl.h
@@ -320,7 +320,7 @@ int upl_read_handoff(struct upl *upl, oftree tree);
int upl_get_test_data(struct unit_test_state *uts, struct upl *upl);
#endif /* USE_HOSTCC */
-#if CONFIG_IS_ENABLED(UPL) && defined(CONFIG_SPL_BUILD)
+#if CONFIG_IS_ENABLED(UPL) && defined(CONFIG_XPL_BUILD)
/**
* upl_set_fit_info() - Set up basic info about the FIT
@@ -367,7 +367,7 @@ int _upl_add_image(int node, ulong load_addr, ulong size, const char *desc);
static inline int upl_add_image(const void *fit, int node, ulong load_addr,
ulong size)
{
- if (CONFIG_IS_ENABLED(UPL) && IS_ENABLED(CONFIG_SPL_BUILD)) {
+ if (CONFIG_IS_ENABLED(UPL) && IS_ENABLED(CONFIG_XPL_BUILD)) {
const char *desc = fdt_getprop(fit, node, FIT_DESC_PROP, NULL);
return _upl_add_image(node, load_addr, size, desc);
diff --git a/include/vbe.h b/include/vbe.h
index 5ede8181b98..56bff63362f 100644
--- a/include/vbe.h
+++ b/include/vbe.h
@@ -41,7 +41,7 @@ struct vbe_handoff {
*/
static inline enum vbe_phase_t vbe_phase(void)
{
- if (IS_ENABLED(CONFIG_SPL_BUILD))
+ if (IS_ENABLED(CONFIG_XPL_BUILD))
return VBE_PHASE_FIRMWARE;
return VBE_PHASE_OS;