2 * Copyright 2014 Freescale Semiconductor
4 * SPDX-License-Identifier: GPL-2.0+
13 #include <fdt_support.h>
17 DECLARE_GLOBAL_DATA_PTR;
21 init_final_memctl_regs();
25 int board_early_init_f(void)
27 init_early_memctl_regs(); /* tighten IFC timing */
35 gd->ram_size = initdram(0);
42 u32 __iomem *cntcr = (u32 *)CONFIG_SYS_FSL_TIMER_ADDR;
43 u32 __iomem *cltbenr = (u32 *)CONFIG_SYS_FSL_PMU_CLTBENR;
45 out_le32(cltbenr, 0x1); /* enable cluster0 timebase */
46 out_le32(cntcr, 0x1); /* enable clock for timer */
52 * Board specific reset that is system reset.
54 void reset_cpu(ulong addr)
58 int board_eth_init(bd_t *bis)
62 #ifdef CONFIG_SMC91111
63 error = smc91111_initialize(0, CONFIG_SMC91111_BASE);
66 #ifdef CONFIG_FSL_MC_ENET
67 error = cpu_eth_init(bis);
72 #ifdef CONFIG_FSL_MC_ENET
73 void fdt_fixup_board_enet(void *fdt)
77 offset = fdt_path_offset(fdt, "/fsl,dprc@0");
78 if (get_mc_boot_status() == 0)
79 fdt_status_okay(fdt, offset);
81 fdt_status_fail(fdt, offset);
85 #ifdef CONFIG_OF_BOARD_SETUP
86 void ft_board_setup(void *blob, bd_t *bd)
91 /* limit the memory size to bank 1 until Linux can handle 40-bit PA */
92 base = getenv_bootm_low();
93 size = getenv_bootm_size();
94 fdt_fixup_memory(blob, (u64)base, (u64)size);
96 #ifdef CONFIG_FSL_MC_ENET
97 fdt_fixup_board_enet(blob);