diff options
author | Manorit Chawdhry <m-chawdhry@ti.com> | 2023-06-23 20:10:31 +0000 |
---|---|---|
committer | Praneeth Bajjuri <praneeth@ti.com> | 2023-06-23 09:18:47 -0500 |
commit | 4c1ca75febfee9eed1cdf09b34f5748a17e92886 (patch) | |
tree | 012dacc0e42bee2714a233de936859cb2b57365f /include | |
parent | a2ef8f673f454abc1427837d1ce06a9cf9d4000f (diff) |
include: armv7: Enable distroboot across all configs
Since K3 devices are moving towards distroboot, remove duplicates and
add it in common file to import from.
Reviewed-by: Nikhil M Jain <n-jain1@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/am62ax_evm.h | 26 | ||||
-rw-r--r-- | include/configs/am62x_evm.h | 27 | ||||
-rw-r--r-- | include/configs/j721e_evm.h | 31 | ||||
-rw-r--r-- | include/configs/j721s2_evm.h | 3 | ||||
-rw-r--r-- | include/configs/j784s4_evm.h | 27 | ||||
-rw-r--r-- | include/configs/ti_armv7_common.h | 50 |
6 files changed, 50 insertions, 114 deletions
diff --git a/include/configs/am62ax_evm.h b/include/configs/am62ax_evm.h index 64eb429d06..7eef6644dd 100644 --- a/include/configs/am62ax_evm.h +++ b/include/configs/am62ax_evm.h @@ -14,32 +14,6 @@ /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000 -#ifdef CONFIG_CMD_MMC -#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) -#else -#define DISTRO_BOOT_DEV_MMC(func) -#endif - -#ifdef CONFIG_CMD_PXE -#define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na) -#else -#define DISTRO_BOOT_DEV_PXE(func) -#endif - -#ifdef CONFIG_CMD_DHCP -#define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na) -#else -#define DISTRO_BOOT_DEV_DHCP(func) -#endif - -#define BOOT_TARGET_DEVICES(func) \ - DISTRO_BOOT_DEV_MMC(func) \ - DISTRO_BOOT_DEV_PXE(func) \ - DISTRO_BOOT_DEV_DHCP(func) - -/* Incorporate settings into the U-Boot environment */ -#define CFG_EXTRA_ENV_SETTINGS \ - BOOTENV /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h> diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h index 991d417b56..13a7741060 100644 --- a/include/configs/am62x_evm.h +++ b/include/configs/am62x_evm.h @@ -14,33 +14,6 @@ /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000 -#ifdef CONFIG_CMD_MMC -#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) -#else -#define DISTRO_BOOT_DEV_MMC(func) -#endif - -#ifdef CONFIG_CMD_PXE -#define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na) -#else -#define DISTRO_BOOT_DEV_PXE(func) -#endif - -#ifdef CONFIG_CMD_DHCP -#define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na) -#else -#define DISTRO_BOOT_DEV_DHCP(func) -#endif - -#define BOOT_TARGET_DEVICES(func) \ - DISTRO_BOOT_DEV_MMC(func) \ - DISTRO_BOOT_DEV_PXE(func) \ - DISTRO_BOOT_DEV_DHCP(func) - -/* Incorporate settings into the U-Boot environment */ -#define CFG_EXTRA_ENV_SETTINGS \ - BOOTENV \ - /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h> diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h index 0b6ca50207..6c8eef78ce 100644 --- a/include/configs/j721e_evm.h +++ b/include/configs/j721e_evm.h @@ -27,37 +27,6 @@ #define CFG_SYS_UBOOT_BASE 0x50100000 #endif -#if CONFIG_IS_ENABLED(CMD_PXE) -# define BOOT_TARGET_PXE(func) func(PXE, pxe, na) -#else -# define BOOT_TARGET_PXE(func) -#endif - -#if CONFIG_IS_ENABLED(CMD_DHCP) -# define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) -#else -# define BOOT_TARGET_DHCP(func) -#endif - -#ifdef CONFIG_CMD_USB -# define BOOT_TARGET_USB(func) func(USB, usb, 0) -#else -# define BOOT_TARGET_USB(func) -#endif - -#define BOOT_TARGET_DEVICES(func) \ - BOOT_TARGET_USB(func) \ - func(MMC, mmc, 1) \ - func(MMC, mmc, 0) \ - BOOT_TARGET_PXE(func) \ - BOOT_TARGET_DHCP(func) - -#include <config_distro_bootcmd.h> - -/* Incorporate settings into the U-Boot environment */ -#define CFG_EXTRA_ENV_SETTINGS \ - BOOTENV - /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h> diff --git a/include/configs/j721s2_evm.h b/include/configs/j721s2_evm.h index 8db87a4ee2..692c6bb5e4 100644 --- a/include/configs/j721s2_evm.h +++ b/include/configs/j721s2_evm.h @@ -23,9 +23,6 @@ #define CFG_SYS_UBOOT_BASE 0x50080000 #endif -/* Incorporate settings into the U-Boot environment */ -#define CFG_EXTRA_ENV_SETTINGS - /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h> diff --git a/include/configs/j784s4_evm.h b/include/configs/j784s4_evm.h index 3e429fb036..1cd638ab6e 100644 --- a/include/configs/j784s4_evm.h +++ b/include/configs/j784s4_evm.h @@ -16,33 +16,6 @@ /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000 -#ifdef CONFIG_CMD_MMC -#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) -#else -#define DISTRO_BOOT_DEV_MMC(func) -#endif - -#ifdef CONFIG_CMD_PXE -#define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na) -#else -#define DISTRO_BOOT_DEV_PXE(func) -#endif - -#ifdef CONFIG_CMD_DHCP -#define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na) -#else -#define DISTRO_BOOT_DEV_DHCP(func) -#endif - -#define BOOT_TARGET_DEVICES(func) \ - DISTRO_BOOT_DEV_MMC(func) \ - DISTRO_BOOT_DEV_PXE(func) \ - DISTRO_BOOT_DEV_DHCP(func) - -/* Incorporate settings into the U-Boot environment */ -#define CFG_EXTRA_ENV_SETTINGS \ - BOOTENV - /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h> diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index 149a74d98e..dbbeff34ba 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -154,4 +154,54 @@ #define NETARGS "" #endif +#ifdef CONFIG_ARM64 +#ifdef CONFIG_DISTRO_DEFAULTS +#ifdef CONFIG_CMD_PXE +# define BOOT_TARGET_PXE(func) func(PXE, pxe, na) +#else +# define BOOT_TARGET_PXE(func) +#endif + +#ifdef CONFIG_CMD_DHCP +# define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) +#else +# define BOOT_TARGET_DHCP(func) +#endif + +#ifdef CONFIG_CMD_MMC +#define BOOT_TARGET_MMC(func) \ + func(TI_MMC, ti_mmc, na) \ + func(MMC, mmc, 0) \ + func(MMC, mmc, 1) +#else +#define BOOT_TARGET_MMC(func) +#endif + +#define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance) + +#define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \ + "ti_mmc " + +#ifdef CONFIG_CMD_USB +# define BOOT_TARGET_USB(func) func(USB, usb, 0) +#else +# define BOOT_TARGET_USB(func) +#endif + +#define BOOT_TARGET_DEVICES(func) \ + BOOT_TARGET_MMC(func) \ + BOOT_TARGET_USB(func) \ + BOOT_TARGET_PXE(func) \ + BOOT_TARGET_DHCP(func) + +#include <config_distro_bootcmd.h> + +/* Incorporate settings into the U-Boot environment */ +#define CFG_EXTRA_ENV_SETTINGS \ + BOOTENV + +#endif + +#endif /* CONFIG_ARM64 */ + #endif /* __CONFIG_TI_ARMV7_COMMON_H__ */ |