2 * Copyright 2011-2012 Freescale Semiconductor, Inc.
4 * See file CREDITS for list of people who contributed to this
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 #include <asm/processor.h>
26 #include <asm/cache.h>
27 #include <asm/immap_85xx.h>
31 #include <fdt_support.h>
37 DECLARE_GLOBAL_DATA_PTR;
39 int board_early_init_f(void)
41 ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
43 clrbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_CTS_B0_GPIO42);
44 setbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_CTS_B0_DSP_TMS);
46 clrbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_RTS_B0_GPIO43);
47 setbits_be32(&gur->pmuxcr2, MPC85xx_PMUXCR2_UART_RTS_B0_DSP_TCK |
48 MPC85xx_PMUXCR2_UART_CTS_B1_SIM_PD);
49 setbits_be32(&gur->halt_req_mask, HALTED_TO_HALT_REQ_MASK_0);
50 clrsetbits_be32(&gur->pmuxcr, MPC85xx_PMUXCR_IFC_AD_GPIO_MASK |
51 MPC85xx_PMUXCR_IFC_AD17_GPO_MASK,
52 MPC85xx_PMUXCR_IFC_AD_GPIO |
53 MPC85xx_PMUXCR_IFC_AD17_GPO | MPC85xx_PMUXCR_SDHC_USIM);
63 printf("Board: %sRDB\n", cpu->name);
68 #if defined(CONFIG_OF_BOARD_SETUP)
69 void ft_board_setup(void *blob, bd_t *bd)
74 ft_cpu_setup(blob, bd);
76 base = getenv_bootm_low();
77 size = getenv_bootm_size();
79 fdt_fixup_memory(blob, (u64)base, (u64)size);
81 fdt_fixup_dr_usb(blob, bd);