Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions arch/arm/mach-sc5xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,13 @@ config TARGET_SC598_SOM_EZLITE
bool
prompt "SC598-SOM with SOMCRR-EZLITE"
select ADI_CARRIER_SOMCRR_EZLITE
select BOARD_LATE_INIT

config TARGET_SC598_SOM_EZKIT
bool
prompt "SC598-SOM with SOMCRR-EZKIT"
select ADI_CARRIER_SOMCRR_EZKIT
select BOARD_LATE_INIT

endchoice

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-sc5xx/soc.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* (C) Copyright 2022 - Analog Devices, Inc.
Expand Down Expand Up @@ -110,7 +110,7 @@

*bmode = local_mode;

if (local_mode >= 0 && local_mode <= ARRAY_SIZE(bmodes))
if (local_mode < ARRAY_SIZE(bmodes))
return bmodes[local_mode];
return "unknown";
}
Expand Down
15 changes: 15 additions & 0 deletions board/adi/common-sc598-som/sc598-som.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

#include <config.h>
#include <env.h>
#include <phy.h>
#include <asm/u-boot.h>
#include <asm/arch/sc5xx.h>
Expand Down Expand Up @@ -32,3 +33,17 @@ int board_init(void)

return 0;
}

int board_late_init(void)
{
u32 bmode;

sc5xx_get_boot_mode(&bmode);

if (bmode == 1)
return env_set("bootcmd", "run spiboot");
if (bmode == 6)
return env_set("bootcmd", "run emmcboot");

return 0;
}
Loading