mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-21 17:32:09 +01:00
ARM: stm32: Auto-detect ROM API table on STM32MP15xx
The ROM API table location is passed to the SPL by BootROM in register r0, make use of this, store the content of r0 and later use it to access the ROM API table to determine current boot device. Signed-off-by: Marek Vasut <marek.vasut@mailbox.org> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
This commit is contained in:
parent
d4972d5b59
commit
ecd6fd02e1
@ -330,7 +330,6 @@ static uintptr_t nt_fw_dtb __section(".data");
|
|||||||
void save_boot_params(unsigned long r0, unsigned long r1, unsigned long r2,
|
void save_boot_params(unsigned long r0, unsigned long r1, unsigned long r2,
|
||||||
unsigned long r3)
|
unsigned long r3)
|
||||||
{
|
{
|
||||||
if (IS_ENABLED(CONFIG_STM32_ECDSA_VERIFY))
|
|
||||||
rom_api_table = r0;
|
rom_api_table = r0;
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_TFABOOT))
|
if (IS_ENABLED(CONFIG_TFABOOT))
|
||||||
|
|||||||
@ -64,7 +64,6 @@
|
|||||||
* - boot instance = bit 31:16
|
* - boot instance = bit 31:16
|
||||||
* - boot device = bit 15:0
|
* - boot device = bit 15:0
|
||||||
*/
|
*/
|
||||||
#define BOOTROM_PARAM_ADDR 0x2FFC0078
|
|
||||||
#define BOOTROM_MODE_MASK GENMASK(15, 0)
|
#define BOOTROM_MODE_MASK GENMASK(15, 0)
|
||||||
#define BOOTROM_MODE_SHIFT 0
|
#define BOOTROM_MODE_SHIFT 0
|
||||||
#define BOOTROM_INSTANCE_MASK GENMASK(31, 16)
|
#define BOOTROM_INSTANCE_MASK GENMASK(31, 16)
|
||||||
@ -189,7 +188,7 @@ void spl_board_init(void)
|
|||||||
static void update_bootmode(void)
|
static void update_bootmode(void)
|
||||||
{
|
{
|
||||||
u32 boot_mode;
|
u32 boot_mode;
|
||||||
u32 bootrom_itf = readl(BOOTROM_PARAM_ADDR);
|
u32 bootrom_itf = readl(get_stm32mp_rom_api_table());
|
||||||
u32 bootrom_device, bootrom_instance;
|
u32 bootrom_device, bootrom_instance;
|
||||||
|
|
||||||
/* enable TAMP clock = RTCAPBEN */
|
/* enable TAMP clock = RTCAPBEN */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user