diff options
author | Tom Rini <trini@konsulko.com> | 2025-01-02 11:07:42 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-01-08 11:58:54 -0600 |
commit | abc4a9dbfd08f29e91fb7f764a367dde7bcc0d29 (patch) | |
tree | b7697127b304659f001c03323f08a87ff6a9dbce /arch/arm/mach-k3/am62ax/am62a7_init.c | |
parent | ec9263b4f15c4cf82eb6a211c67baa6385065b8e (diff) | |
parent | 20c35e8ac84270a58fa9c422f9409bfa90258965 (diff) |
Merge patch series "Enable MMC UHS modes"
Judith Mendez <jm@ti.com> says:
This patch series adds config options for Sitara K3 boards
to support MMC UHS modes.
While testing with SD card boot and eMMC boot,
found missing eMMC boot support for am62ax in am62a7_init,
patch 1/7, and missing config option to support eMMC boot.
While we are here, for am62ax, enable config option to
change MMC bus modes and enable r5 SDHCI ADMA for faster boot
time.
Also for all k3 Sitara boards, cleanup MMC ENV configs that
are no longer needed since we no longer load env from MMC
device.
Link: https://lore.kernel.org/r/20241220203704.2076499-1-jm@ti.com
Diffstat (limited to 'arch/arm/mach-k3/am62ax/am62a7_init.c')
-rw-r--r-- | arch/arm/mach-k3/am62ax/am62a7_init.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-k3/am62ax/am62a7_init.c b/arch/arm/mach-k3/am62ax/am62a7_init.c index 5c0d3ee6869..78153c97a58 100644 --- a/arch/arm/mach-k3/am62ax/am62a7_init.c +++ b/arch/arm/mach-k3/am62ax/am62a7_init.c @@ -171,6 +171,25 @@ void board_init_f(ulong dummy) debug("am62a_init: %s done\n", __func__); } +u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device) +{ + u32 devstat = readl(CTRLMMR_MAIN_DEVSTAT); + u32 bootmode = (devstat & MAIN_DEVSTAT_PRIMARY_BOOTMODE_MASK) >> + MAIN_DEVSTAT_PRIMARY_BOOTMODE_SHIFT; + u32 bootmode_cfg = (devstat & MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_MASK) >> + MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_SHIFT; + + switch (bootmode) { + case BOOT_DEVICE_EMMC: + return MMCSD_MODE_EMMCBOOT; + case BOOT_DEVICE_MMC: + if (bootmode_cfg & MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_MASK) + return MMCSD_MODE_RAW; + default: + return MMCSD_MODE_FS; + } +} + u32 spl_boot_device(void) { return get_boot_device(); |