arm64: ls1046a: Support semihosting fallback

Use the semihosting_enabled function to determine whether or not to
enable semihosting devices. This allows for graceful fallback in the
event a debugger is not attached.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
This commit is contained in:
Sean Anderson 2022-03-22 16:59:33 -04:00 committed by Tom Rini
parent 2332590c48
commit 53b953f2eb
2 changed files with 4 additions and 2 deletions

View File

@ -12,6 +12,7 @@
#include <image.h>
#include <init.h>
#include <log.h>
#include <semihosting.h>
#include <spl.h>
#include <asm/cache.h>
#include <asm/global_data.h>
@ -27,7 +28,7 @@ DECLARE_GLOBAL_DATA_PTR;
u32 spl_boot_device(void)
{
if (IS_ENABLED(CONFIG_SPL_SEMIHOSTING))
if (semihosting_enabled())
return BOOT_DEVICE_SMH;
#ifdef CONFIG_SPL_MMC
return BOOT_DEVICE_MMC1;

View File

@ -32,7 +32,8 @@ DECLARE_GLOBAL_DATA_PTR;
struct serial_device *default_serial_console(void)
{
#if IS_ENABLED(CONFIG_SEMIHOSTING_SERIAL)
return &serial_smh_device;
if (semihosting_enabled())
return &serial_smh_device;
#endif
return &eserial1_device;
}