mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
arm: mvebu: fix boot from UART when in fallback mode
It's the first 8 bits of the bootrom error register that contain the boot error/fallback error code. Let's check that and continue to boot from UART. Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk> Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
348b488f5e
commit
e83e2b3900
2 changed files with 15 additions and 0 deletions
|
@ -111,10 +111,16 @@
|
|||
#define COMPHY_REFCLK_ALIGNMENT (MVEBU_REGISTER(0x182f8))
|
||||
|
||||
/* BootROM error register (also includes some status infos) */
|
||||
#if defined(CONFIG_ARMADA_38X)
|
||||
#define CONFIG_BOOTROM_ERR_REG (MVEBU_REGISTER(0x182d0))
|
||||
#define BOOTROM_ERR_MODE_OFFS 0
|
||||
#define BOOTROM_ERR_MODE_MASK (0xf << BOOTROM_ERR_MODE_OFFS)
|
||||
#else
|
||||
#define CONFIG_BOOTROM_ERR_REG (MVEBU_REGISTER(0x182d0))
|
||||
#define BOOTROM_ERR_MODE_OFFS 28
|
||||
#define BOOTROM_ERR_MODE_MASK (0xf << BOOTROM_ERR_MODE_OFFS)
|
||||
#define BOOTROM_ERR_MODE_UART 0x6
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARMADA_375)
|
||||
/* SAR values for Armada 375 */
|
||||
|
|
|
@ -26,7 +26,16 @@ static u32 get_boot_device(void)
|
|||
val = readl(CONFIG_BOOTROM_ERR_REG);
|
||||
boot_device = (val & BOOTROM_ERR_MODE_MASK) >> BOOTROM_ERR_MODE_OFFS;
|
||||
debug("BOOTROM_REG=0x%08x boot_device=0x%x\n", val, boot_device);
|
||||
#if defined(CONFIG_ARMADA_38X)
|
||||
/*
|
||||
* If the bootrom error register contains any else than zeros
|
||||
* in the first 8 bits it's an error condition. And in that case
|
||||
* try to boot from UART.
|
||||
*/
|
||||
if (boot_device)
|
||||
#else
|
||||
if (boot_device == BOOTROM_ERR_MODE_UART)
|
||||
#endif
|
||||
return BOOT_DEVICE_UART;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue