From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 9/9] ARM: OMAP: beaglebone: add PBL SD xload support
Date: Tue, 22 Apr 2025 07:26:35 +0200 [thread overview]
Message-ID: <20250422052635.3423961-10-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250422052635.3423961-1-a.fatoum@pengutronix.de>
From: Ahmad Fatoum <a.fatoum@barebox.org>
The existing "full" MLO image supports multiple boot media at once, but
the newcomer SD/MMC only image has the advantage of doing so in the same
build alongside barebox second stage.
This makes for easier integration in BSPs, so provide it as extra image
if CONFIG_OMAP_BUILD_IFT is disabled.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/arm/boards/beaglebone/lowlevel.c | 10 ++++++----
arch/arm/mach-omap/Kconfig | 8 ++++++--
images/Makefile.am33xx | 4 ++++
3 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boards/beaglebone/lowlevel.c b/arch/arm/boards/beaglebone/lowlevel.c
index fec4f177781c..05764fc9138b 100644
--- a/arch/arm/boards/beaglebone/lowlevel.c
+++ b/arch/arm/boards/beaglebone/lowlevel.c
@@ -16,6 +16,7 @@
#include <mach/omap/syslib.h>
#include <mach/omap/am33xx-mux.h>
#include <mach/omap/am33xx-generic.h>
+#include <mach/omap/xload.h>
#include "beaglebone.h"
@@ -116,9 +117,6 @@ static void __udelay(int us)
static noinline int beaglebone_sram_init(void)
{
uint32_t sdram_size;
- void *fdt;
-
- fdt = __dtb_z_am335x_bone_common_start;
if (is_beaglebone_black())
sdram_size = SZ_512M;
@@ -150,7 +148,11 @@ static noinline int beaglebone_sram_init(void)
*/
__udelay(3000);
- barebox_arm_entry(OMAP_DRAM_ADDR_SPACE_START, sdram_size, fdt);
+ if (IS_ENABLED(CONFIG_OMAP_BUILD_IFT))
+ barebox_arm_entry(OMAP_DRAM_ADDR_SPACE_START, sdram_size,
+ __dtb_z_am335x_bone_common_start);
+ else
+ am33xx_hsmmc_start_image();
}
ENTRY_FUNCTION(start_am33xx_beaglebone_sram, bootinfo, r1, r2)
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index e7a9b331125d..bf2ab75eaf68 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -60,12 +60,15 @@ config OMAP_GPMC
NAND, OneNAND etc.
config OMAP_BUILD_IFT
- prompt "build ift binary (MLO)"
+ prompt "build ift binaries (MLO) only"
bool
help
- Say Y here if you want to build an MLO binary. On TI SoCs, this
+ Say Y here if you want to build only MLO binaries. On TI SoCs, this
binary is loaded to SRAM. It is responsible for initializing
the SDRAM and possibly chainloading a full-featured barebox.
+ If you say n here, barebox may still generate extra MLO binaries
+ alongside second stage barebox binaries, but these are currently
+ limited to only specific bootmedia as indicated in their file name.
config OMAP_BUILD_SPI
prompt "build SPI binary"
@@ -153,6 +156,7 @@ config MACH_BEAGLE
config MACH_BEAGLEBONE
bool "Texas Instrument's Beagle Bone"
select ARCH_AM33XX
+ select MCI_OMAP_HSMMC_PBL
help
Say Y here if you are using Beagle Bone
diff --git a/images/Makefile.am33xx b/images/Makefile.am33xx
index a63def771ed3..2a1cf3a0c40b 100644
--- a/images/Makefile.am33xx
+++ b/images/Makefile.am33xx
@@ -132,6 +132,10 @@ pblb-$(CONFIG_MACH_BEAGLEBONE) += start_am33xx_beaglebone_sdram
FILE_barebox-am33xx-beaglebone.img = start_am33xx_beaglebone_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_BEAGLEBONE) += barebox-am33xx-beaglebone.img
+pblb-$(CONFIG_MACH_BEAGLEBONE) += start_am33xx_beaglebone_sram
+FILE_barebox-am33xx-beaglebone-mlo.mmc.img = start_am33xx_beaglebone_sram.pblb.mlo
+am33xx-barebox-$(CONFIG_MACH_BEAGLEBONE) += barebox-am33xx-beaglebone-mlo.mmc.img
+
pblb-$(CONFIG_MACH_BEAGLEBONE) += start_am33xx_beaglebone_sram
FILE_barebox-am33xx-beaglebone-mlo.img = start_am33xx_beaglebone_sram.pblb.mlo
am33xx-mlo-$(CONFIG_MACH_BEAGLEBONE) += barebox-am33xx-beaglebone-mlo.img
--
2.39.5
next prev parent reply other threads:[~2025-04-22 5:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 5:26 [PATCH 0/9] " Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 1/9] clocksource: make available in PBL Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 2/9] clocksource: ti-dm: " Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 3/9] mci: move mci_setup_cmd definition into header Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 4/9] mci: add common PBL helper for chainloading after BootROM initialization Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 5/9] mci: pbl: add autodetection of BootROM-initialized standard capacity cards Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 6/9] mci: omap_hsmmc: split out common code Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 7/9] ARM: OMAP: add am33xx_hsmmc_start_image for PBL Ahmad Fatoum
2025-04-22 5:26 ` [PATCH 8/9] mci: omap_hsmmc: add xload implementation " Ahmad Fatoum
2025-04-22 5:26 ` Ahmad Fatoum [this message]
2025-04-22 10:55 ` [PATCH 0/9] ARM: OMAP: beaglebone: add PBL SD xload support Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250422052635.3423961-10-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox