1 // SPDX-License-Identifier: GPL-2.0+
7 #include <fdt_support.h>
8 #include <asm/global_data.h>
9 #include <linux/libfdt.h>
10 #include <env_internal.h>
11 #include <asm/arch-fsl-layerscape/soc.h>
12 #include <asm/arch-fsl-layerscape/fsl_icid.h>
14 #include <asm/arch/soc.h>
15 #include <fsl_immap.h>
21 DECLARE_GLOBAL_DATA_PTR;
23 int board_early_init_f(void)
25 fsl_lsch3_early_init_f();
31 if (CONFIG_IS_ENABLED(FSL_CAAM))
37 int board_eth_init(struct bd_info *bis)
39 return pci_eth_init(bis);
44 printf("EL: %d\n", current_el());
48 void detail_board_ddr_info(void)
51 print_size(gd->bd->bi_dram[0].size + gd->bd->bi_dram[1].size, "");
55 int ft_board_setup(void *blob, struct bd_info *bd)
57 u64 base[CONFIG_NR_DRAM_BANKS];
58 u64 size[CONFIG_NR_DRAM_BANKS];
59 int nbanks = CONFIG_NR_DRAM_BANKS;
63 ft_cpu_setup(blob, bd);
65 /* fixup DT for the two GPP DDR banks */
66 for (i = 0; i < nbanks; i++) {
67 base[i] = gd->bd->bi_dram[i].start;
68 size[i] = gd->bd->bi_dram[i].size;
71 fdt_fixup_memory_banks(blob, base, size, nbanks);
75 if (CONFIG_IS_ENABLED(SL28_SPL_LOADS_OPTEE_BL32)) {
76 node = fdt_node_offset_by_compatible(blob, -1, "linaro,optee-tz");
78 fdt_set_node_status(blob, node, FDT_STATUS_OKAY, 0);