From: Wadim Egorov <w.egorov@phytec.de>
To: <u-boot@lists.denx.de>
Cc: <nm@ti.com>, <upstream@lists.phytec.de>, <bb@ti.com>, <vigneshr@ti.com>
Subject: [PATCH v2 1/3] arm: mach-k3: am625: copy bootindex to OCRAM for main domain SPL
Date: Wed, 3 Apr 2024 15:59:09 +0200 [thread overview]
Message-ID: <20240403135911.1987293-2-w.egorov@phytec.de> (raw)
In-Reply-To: <20240403135911.1987293-1-w.egorov@phytec.de>
Relocate booindex to OCRAM region after it gets opened by TIFS so
the main domain bootloaders can have access to this data.
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
---
v2:
- Relocate bootindex to OCRAM, drop misleading comments and remove not needed changes
---
arch/arm/mach-k3/am625_init.c | 8 ++++++++
arch/arm/mach-k3/include/mach/am62_hardware.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c
index 6c96e881146..c9c97b6ce19 100644
--- a/arch/arm/mach-k3/am625_init.c
+++ b/arch/arm/mach-k3/am625_init.c
@@ -175,6 +175,14 @@ void board_init_f(ulong dummy)
k3_sysfw_loader(true, NULL, NULL);
}
+ /*
+ * Relocate boot information to OCRAM (after TIFS has opend this
+ * region for us) so the next bootloader stages can keep access to
+ * primary vs backup bootmodes.
+ */
+ if (IS_ENABLED(CONFIG_CPU_V7R))
+ writel(bootindex, K3_BOOT_PARAM_TABLE_INDEX_OCRAM);
+
/*
* Force probe of clk_k3 driver here to ensure basic default clock
* configuration is always done.
diff --git a/arch/arm/mach-k3/include/mach/am62_hardware.h b/arch/arm/mach-k3/include/mach/am62_hardware.h
index 54380f36e16..30c2f11062c 100644
--- a/arch/arm/mach-k3/include/mach/am62_hardware.h
+++ b/arch/arm/mach-k3/include/mach/am62_hardware.h
@@ -76,6 +76,7 @@
#define CTRLMMR_MCU_RST_CTRL (MCU_CTRL_MMR0_BASE + 0x18170)
#define ROM_EXTENDED_BOOT_DATA_INFO 0x43c3f1e0
+#define K3_BOOT_PARAM_TABLE_INDEX_OCRAM 0x7000F290
#define TI_SRAM_SCRATCH_BOARD_EEPROM_START 0x43c30000
--
2.34.1
next prev parent reply other threads:[~2024-04-03 13:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 13:59 [PATCH v2 0/3] *** Introduce get_boot_device() for K3 platform *** Wadim Egorov
2024-04-03 13:59 ` Wadim Egorov [this message]
2024-04-03 13:59 ` [PATCH v2 2/3] arm: mach-k3: am625: Provide a way to obtain boot device for non SPLs Wadim Egorov
2024-04-03 13:59 ` [PATCH v2 3/3] board: phycore-am62x: Extend for better environment handling Wadim Egorov
2024-04-12 14:52 ` [PATCH v2 0/3] *** Introduce get_boot_device() for K3 platform *** Tom Rini
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=20240403135911.1987293-2-w.egorov@phytec.de \
--to=w.egorov@phytec.de \
--cc=bb@ti.com \
--cc=nm@ti.com \
--cc=u-boot@lists.denx.de \
--cc=upstream@lists.phytec.de \
--cc=vigneshr@ti.com \
/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