Tom Rini 03de305ec4 Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"
As part of bringing the master branch back in to next, we need to allow
for all of these changes to exist here.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-20 13:35:03 -06:00

34 lines
702 B
C

// SPDX-License-Identifier: GPL-2.0+
#include <config.h>
#include <asm/global_data.h>
#include <asm/io.h>
#include "sl28.h"
DECLARE_GLOBAL_DATA_PTR;
u32 get_lpuart_clk(void)
{
return gd->bus_clk / CONFIG_SYS_FSL_LPUART_CLK_DIV;
}
enum boot_source sl28_boot_source(void)
{
u32 rcw_src = in_le32(DCFG_BASE + DCFG_PORSR1) & DCFG_PORSR1_RCW_SRC;
switch (rcw_src) {
case DCFG_PORSR1_RCW_SRC_SDHC1:
return BOOT_SOURCE_SDHC;
case DCFG_PORSR1_RCW_SRC_SDHC2:
return BOOT_SOURCE_MMC;
case DCFG_PORSR1_RCW_SRC_I2C:
return BOOT_SOURCE_I2C;
case DCFG_PORSR1_RCW_SRC_FSPI_NOR:
return BOOT_SOURCE_SPI;
default:
debug("unknown bootsource (%08x)\n", rcw_src);
return BOOT_SOURCE_UNKNOWN;
}
}