From da54deb1ac8ee65475c7dca556df751b7e31806e Mon Sep 17 00:00:00 2001 From: Beleswar Padhi Date: Tue, 9 Dec 2025 11:20:43 +0530 Subject: configs: am43xx: Migrate to CONFIG_SYS_MEM_TOP_HIDE from CFG_PRAM The TI AM43xx HS boards have been using CFG_PRAM to hide the top 64MB firewalled DRAM memory from U-Boot. However, CFG_PRAM only prevents U-Boot from relocating into that memory, but it is still open for access for any other usage. Therefore, migrate into using CONFIG_SYS_MEM_TOP_HIDE which reduces the ram size itself ensuring that memory is not visible to U-Boot at all (either for reloc, or general usage). Signed-off-by: Beleswar Padhi --- include/configs/am43xx_evm.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include') diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index 036995cbb48..99d3ecb3fff 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -148,9 +148,4 @@ #define NANDBOOT #endif /* CONFIG_MTD_RAW_NAND */ -#if defined(CONFIG_TI_SECURE_DEVICE) -/* Avoid relocating onto firewalled area at end of DRAM */ -#define CFG_PRAM (64 * 1024) -#endif /* CONFIG_TI_SECURE_DEVICE */ - #endif /* __CONFIG_AM43XX_EVM_H */ -- cgit v1.3.1 From 94d0c1d3edb4a71b49c1ff85f5f3990c727bcaba Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Thu, 11 Dec 2025 17:34:56 +0100 Subject: spl: mmc: Account for SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE being a choice Add SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE as condition where so far SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION was enough - though often by chance as both options were enabled. Reorder the #ifdef blocks at this chance to follow the order in the Kconfig menu. Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options") Signed-off-by: Jan Kiszka Reviewed-by: Tien Fong Chee --- common/spl/spl_mmc.c | 17 +++++++++-------- include/part.h | 3 ++- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index d8ce3a84614..1942e417075 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -106,7 +106,8 @@ static int spl_mmc_find_device(struct mmc **mmcp, int mmc_dev) return 0; } -#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION +#if defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION) || \ + defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE) static int mmc_load_image_raw_partition(struct spl_image_info *spl_image, struct spl_boot_device *bootdev, struct mmc *mmc, int partition, @@ -419,19 +420,19 @@ int spl_mmc_load(struct spl_image_info *spl_image, raw_sect = spl_mmc_get_uboot_raw_sector(mmc, raw_sect); -#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION - ret = mmc_load_image_raw_partition(spl_image, bootdev, - mmc, raw_part, - raw_sect); - if (!ret) - return 0; -#endif #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR ret = mmc_load_image_raw_sector(spl_image, bootdev, mmc, raw_sect + spl_mmc_raw_uboot_offset(part)); if (!ret) return 0; +#elif defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION) || \ + defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE) + ret = mmc_load_image_raw_partition(spl_image, bootdev, + mmc, raw_part, + raw_sect); + if (!ret) + return 0; #endif /* If RAW mode fails, try FS mode. */ fallthrough; diff --git a/include/part.h b/include/part.h index 6caaa6526aa..ba4a63ddc75 100644 --- a/include/part.h +++ b/include/part.h @@ -461,7 +461,8 @@ ulong disk_blk_erase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt); #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) + defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION) || \ + defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE) # define part_get_info_ptr(x) x # else # define part_get_info_ptr(x) NULL -- cgit v1.3.1