1 // SPDX-License-Identifier: GPL-2.0+
4 #include <asm/global_data.h>
9 DECLARE_GLOBAL_DATA_PTR;
11 u32 get_lpuart_clk(void)
13 return gd->bus_clk / CONFIG_SYS_FSL_LPUART_CLK_DIV;
16 enum boot_source sl28_boot_source(void)
18 u32 rcw_src = in_le32(DCFG_BASE + DCFG_PORSR1) & DCFG_PORSR1_RCW_SRC;
21 case DCFG_PORSR1_RCW_SRC_SDHC1:
22 return BOOT_SOURCE_SDHC;
23 case DCFG_PORSR1_RCW_SRC_SDHC2:
24 return BOOT_SOURCE_MMC;
25 case DCFG_PORSR1_RCW_SRC_I2C:
26 return BOOT_SOURCE_I2C;
27 case DCFG_PORSR1_RCW_SRC_FSPI_NOR:
28 return BOOT_SOURCE_SPI;
30 debug("unknown bootsource (%08x)\n", rcw_src);
31 return BOOT_SOURCE_UNKNOWN;