2 * Copyright 2011-2012 Freescale Semiconductor, Inc.
4 * SPDX-License-Identifier: GPL-2.0+
8 #include <asm/processor.h>
10 #include <asm/cache.h>
11 #include <asm/immap_85xx.h>
14 #include <linux/libfdt.h>
15 #include <fdt_support.h>
18 #include <jffs2/load_kernel.h>
24 DECLARE_GLOBAL_DATA_PTR;
26 int board_early_init_f(void)
28 ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
30 clrbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_CTS_B0_GPIO42);
31 setbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_CTS_B0_DSP_TMS);
33 clrbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_RTS_B0_GPIO43);
34 setbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_RTS_B0_DSP_TCK |
35 MPC85xx_PMUXCR2_UART_CTS_B1_SIM_PD);
36 setbits_be32(&gur->halt_req_mask, HALTED_TO_HALT_REQ_MASK_0);
37 clrsetbits_be32(&gur->pmuxcr, MPC85xx_PMUXCR_IFC_AD_GPIO_MASK |
38 MPC85xx_PMUXCR_IFC_AD17_GPO_MASK,
39 MPC85xx_PMUXCR_IFC_AD_GPIO |
40 MPC85xx_PMUXCR_IFC_AD17_GPO | MPC85xx_PMUXCR_SDHC_USIM);
50 printf("Board: %sRDB\n", cpu->name);
55 #if defined(CONFIG_OF_BOARD_SETUP)
56 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
57 struct node_info nodes[] = {
58 { "fsl,ifc-nand", MTD_DEV_TYPE_NAND, },
61 int ft_board_setup(void *blob, bd_t *bd)
66 ft_cpu_setup(blob, bd);
68 base = env_get_bootm_low();
69 size = env_get_bootm_size();
71 fdt_fixup_memory(blob, (u64)base, (u64)size);
72 #ifdef CONFIG_FDT_FIXUP_PARTITIONS
73 fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
76 fsl_fdt_fixup_dr_usb(blob, bd);