2 * Copyright 2013 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,
27 #include <linux/compiler.h>
29 #include <asm/processor.h>
30 #include <asm/cache.h>
31 #include <asm/immap_85xx.h>
32 #include <asm/fsl_law.h>
33 #include <asm/fsl_serdes.h>
34 #include <asm/fsl_portals.h>
35 #include <asm/fsl_liodn.h>
37 DECLARE_GLOBAL_DATA_PTR;
41 struct cpu_type *cpu = gd->arch.cpu;
43 printf("Board: %sEMU\n", cpu->name);
48 int board_early_init_r(void)
50 const unsigned int flashbase = CONFIG_SYS_FLASH_BASE;
51 const u8 flash_esel = find_tlb_idx((void *)flashbase, 1);
54 * Remap Boot flash + PROMJET region to caching-inhibited
55 * so that flash can be erased properly.
58 /* Flush d-cache and invalidate i-cache of any FLASH data */
62 /* invalidate existing TLB entry for flash */
63 disable_tlb(flash_esel);
65 set_tlb(1, flashbase, CONFIG_SYS_FLASH_BASE_PHYS,
66 MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
67 0, flash_esel, BOOKE_PAGESZ_256M, 1);
70 #ifdef CONFIG_SYS_DPAA_QBMAN
82 void ft_board_setup(void *blob, bd_t *bd)
87 ft_cpu_setup(blob, bd);
89 base = getenv_bootm_low();
90 size = getenv_bootm_size();
92 fdt_fixup_memory(blob, (u64)base, (u64)size);
94 fdt_fixup_liodn(blob);
95 fdt_fixup_dr_usb(blob, bd);