blob: 702b9faabd9f23e11918008c929f80e821e3a884 [file] [log] [blame]
Mingkai Hu0e58b512015-10-26 19:47:50 +08001/*
2 * Copyright 2014-2015, Freescale Semiconductor
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#ifndef _FSL_LAYERSCAPE_CPU_H
8#define _FSL_LAYERSCAPE_CPU_H
9
10static struct cpu_type cpu_type_list[] = {
Mingkai Hu0e58b512015-10-26 19:47:50 +080011 CPU_TYPE_ENTRY(LS2080, LS2080, 8),
Prabhakar Kushwaha122bcfd2015-11-09 16:42:07 +053012 CPU_TYPE_ENTRY(LS2085, LS2085, 8),
Mingkai Hu0e58b512015-10-26 19:47:50 +080013 CPU_TYPE_ENTRY(LS2045, LS2045, 4),
Mingkai Hue4e93ea2015-10-26 19:47:51 +080014 CPU_TYPE_ENTRY(LS1043, LS1043, 4),
Mingkai Hu4a7a5152016-03-23 19:10:43 +080015 CPU_TYPE_ENTRY(LS1023, LS1023, 2),
Pratiyush Mohan Srivastavaa7b9d342015-12-22 16:48:43 +053016 CPU_TYPE_ENTRY(LS2040, LS2040, 4),
Mingkai Hu0e58b512015-10-26 19:47:50 +080017};
18
19#ifndef CONFIG_SYS_DCACHE_OFF
20
21#define SECTION_SHIFT_L0 39UL
22#define SECTION_SHIFT_L1 30UL
23#define SECTION_SHIFT_L2 21UL
24#define BLOCK_SIZE_L0 0x8000000000
25#define BLOCK_SIZE_L1 0x40000000
26#define BLOCK_SIZE_L2 0x200000
27#define NUM_OF_ENTRY 512
28#define TCR_EL2_PS_40BIT (2 << 16)
29
30#define LAYERSCAPE_VA_BITS (40)
31#define LAYERSCAPE_TCR (TCR_TG0_4K | \
32 TCR_EL2_PS_40BIT | \
33 TCR_SHARED_NON | \
34 TCR_ORGN_NC | \
35 TCR_IRGN_NC | \
36 TCR_T0SZ(LAYERSCAPE_VA_BITS))
37#define LAYERSCAPE_TCR_FINAL (TCR_TG0_4K | \
38 TCR_EL2_PS_40BIT | \
39 TCR_SHARED_OUTER | \
40 TCR_ORGN_WBWA | \
41 TCR_IRGN_WBWA | \
42 TCR_T0SZ(LAYERSCAPE_VA_BITS))
43
44#ifdef CONFIG_FSL_LSCH3
45#define CONFIG_SYS_FSL_CCSR_BASE 0x00000000
46#define CONFIG_SYS_FSL_CCSR_SIZE 0x10000000
47#define CONFIG_SYS_FSL_QSPI_BASE1 0x20000000
48#define CONFIG_SYS_FSL_QSPI_SIZE1 0x10000000
49#define CONFIG_SYS_FSL_IFC_BASE1 0x30000000
50#define CONFIG_SYS_FSL_IFC_SIZE1 0x10000000
51#define CONFIG_SYS_FSL_IFC_SIZE1_1 0x400000
52#define CONFIG_SYS_FSL_DRAM_BASE1 0x80000000
53#define CONFIG_SYS_FSL_DRAM_SIZE1 0x80000000
54#define CONFIG_SYS_FSL_QSPI_BASE2 0x400000000
55#define CONFIG_SYS_FSL_QSPI_SIZE2 0x100000000
56#define CONFIG_SYS_FSL_IFC_BASE2 0x500000000
57#define CONFIG_SYS_FSL_IFC_SIZE2 0x100000000
58#define CONFIG_SYS_FSL_DCSR_BASE 0x700000000
59#define CONFIG_SYS_FSL_DCSR_SIZE 0x40000000
60#define CONFIG_SYS_FSL_MC_BASE 0x80c000000
61#define CONFIG_SYS_FSL_MC_SIZE 0x4000000
62#define CONFIG_SYS_FSL_NI_BASE 0x810000000
63#define CONFIG_SYS_FSL_NI_SIZE 0x8000000
64#define CONFIG_SYS_FSL_QBMAN_BASE 0x818000000
65#define CONFIG_SYS_FSL_QBMAN_SIZE 0x8000000
66#define CONFIG_SYS_FSL_QBMAN_SIZE_1 0x4000000
67#define CONFIG_SYS_PCIE1_PHYS_SIZE 0x200000000
68#define CONFIG_SYS_PCIE2_PHYS_SIZE 0x200000000
69#define CONFIG_SYS_PCIE3_PHYS_SIZE 0x200000000
70#define CONFIG_SYS_PCIE4_PHYS_SIZE 0x200000000
71#define CONFIG_SYS_FSL_WRIOP1_BASE 0x4300000000
72#define CONFIG_SYS_FSL_WRIOP1_SIZE 0x100000000
73#define CONFIG_SYS_FSL_AIOP1_BASE 0x4b00000000
74#define CONFIG_SYS_FSL_AIOP1_SIZE 0x100000000
75#define CONFIG_SYS_FSL_PEBUF_BASE 0x4c00000000
76#define CONFIG_SYS_FSL_PEBUF_SIZE 0x400000000
77#define CONFIG_SYS_FSL_DRAM_BASE2 0x8080000000
78#define CONFIG_SYS_FSL_DRAM_SIZE2 0x7F80000000
Mingkai Hue4e93ea2015-10-26 19:47:51 +080079#elif defined(CONFIG_FSL_LSCH2)
80#define CONFIG_SYS_FSL_BOOTROM_BASE 0x0
81#define CONFIG_SYS_FSL_BOOTROM_SIZE 0x1000000
82#define CONFIG_SYS_FSL_CCSR_BASE 0x1000000
83#define CONFIG_SYS_FSL_CCSR_SIZE 0xf000000
84#define CONFIG_SYS_FSL_DCSR_BASE 0x20000000
85#define CONFIG_SYS_FSL_DCSR_SIZE 0x4000000
86#define CONFIG_SYS_FSL_QSPI_BASE 0x40000000
87#define CONFIG_SYS_FSL_QSPI_SIZE 0x20000000
88#define CONFIG_SYS_FSL_IFC_BASE 0x60000000
89#define CONFIG_SYS_FSL_IFC_SIZE 0x20000000
90#define CONFIG_SYS_FSL_DRAM_BASE1 0x80000000
91#define CONFIG_SYS_FSL_DRAM_SIZE1 0x80000000
92#define CONFIG_SYS_FSL_QBMAN_BASE 0x500000000
93#define CONFIG_SYS_FSL_QBMAN_SIZE 0x10000000
94#define CONFIG_SYS_FSL_DRAM_BASE2 0x880000000
95#define CONFIG_SYS_FSL_DRAM_SIZE2 0x780000000 /* 30GB */
96#define CONFIG_SYS_PCIE1_PHYS_SIZE 0x800000000
97#define CONFIG_SYS_PCIE2_PHYS_SIZE 0x800000000
98#define CONFIG_SYS_PCIE3_PHYS_SIZE 0x800000000
99#define CONFIG_SYS_FSL_DRAM_BASE3 0x8800000000
100#define CONFIG_SYS_FSL_DRAM_SIZE3 0x7800000000 /* 480GB */
Mingkai Hu0e58b512015-10-26 19:47:50 +0800101#endif
102
103struct sys_mmu_table {
104 u64 virt_addr;
105 u64 phys_addr;
106 u64 size;
107 u64 memory_type;
Alison Wange28e18c2015-11-05 11:15:49 +0800108 u64 attribute;
Mingkai Hu0e58b512015-10-26 19:47:50 +0800109};
110
111struct table_info {
112 u64 *ptr;
113 u64 table_base;
114 u64 entry_size;
115};
116
117static const struct sys_mmu_table early_mmu_table[] = {
118#ifdef CONFIG_FSL_LSCH3
119 { CONFIG_SYS_FSL_CCSR_BASE, CONFIG_SYS_FSL_CCSR_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800120 CONFIG_SYS_FSL_CCSR_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100121 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800122 { CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100123 CONFIG_SYS_FSL_OCRAM_SIZE, MT_NORMAL, PTE_BLOCK_NON_SHARE },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800124 /* For IFC Region #1, only the first 4MB is cache-enabled */
125 { CONFIG_SYS_FSL_IFC_BASE1, CONFIG_SYS_FSL_IFC_BASE1,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100126 CONFIG_SYS_FSL_IFC_SIZE1_1, MT_NORMAL, PTE_BLOCK_NON_SHARE },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800127 { CONFIG_SYS_FSL_IFC_BASE1 + CONFIG_SYS_FSL_IFC_SIZE1_1,
128 CONFIG_SYS_FSL_IFC_BASE1 + CONFIG_SYS_FSL_IFC_SIZE1_1,
129 CONFIG_SYS_FSL_IFC_SIZE1 - CONFIG_SYS_FSL_IFC_SIZE1_1,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100130 MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800131 { CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FSL_IFC_BASE1,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100132 CONFIG_SYS_FSL_IFC_SIZE1, MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800133 { CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1,
York Sun0804d562015-12-04 11:57:08 -0800134 CONFIG_SYS_FSL_DRAM_SIZE1, MT_NORMAL,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100135 PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS },
York Sun97ceebd2015-11-25 14:56:40 -0800136 /* Map IFC region #2 up to CONFIG_SYS_FLASH_BASE for NAND boot */
137 { CONFIG_SYS_FSL_IFC_BASE2, CONFIG_SYS_FSL_IFC_BASE2,
138 CONFIG_SYS_FLASH_BASE - CONFIG_SYS_FSL_IFC_BASE2,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100139 MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800140 { CONFIG_SYS_FSL_DCSR_BASE, CONFIG_SYS_FSL_DCSR_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800141 CONFIG_SYS_FSL_DCSR_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100142 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800143 { CONFIG_SYS_FSL_DRAM_BASE2, CONFIG_SYS_FSL_DRAM_BASE2,
York Sun0804d562015-12-04 11:57:08 -0800144 CONFIG_SYS_FSL_DRAM_SIZE2, MT_NORMAL,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100145 PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800146#elif defined(CONFIG_FSL_LSCH2)
147 { CONFIG_SYS_FSL_CCSR_BASE, CONFIG_SYS_FSL_CCSR_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800148 CONFIG_SYS_FSL_CCSR_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100149 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800150 { CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100151 CONFIG_SYS_FSL_OCRAM_SIZE, MT_NORMAL, PTE_BLOCK_NON_SHARE },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800152 { CONFIG_SYS_FSL_DCSR_BASE, CONFIG_SYS_FSL_DCSR_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800153 CONFIG_SYS_FSL_DCSR_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100154 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Qianyu Gong138a36a2016-01-25 15:16:07 +0800155 { CONFIG_SYS_FSL_QSPI_BASE, CONFIG_SYS_FSL_QSPI_BASE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100156 CONFIG_SYS_FSL_QSPI_SIZE, MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800157 { CONFIG_SYS_FSL_IFC_BASE, CONFIG_SYS_FSL_IFC_BASE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100158 CONFIG_SYS_FSL_IFC_SIZE, MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800159 { CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1,
Ed Swarthout2cfcf192016-03-28 16:16:01 -0500160 CONFIG_SYS_FSL_DRAM_SIZE1, MT_NORMAL,
161 PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800162 { CONFIG_SYS_FSL_DRAM_BASE2, CONFIG_SYS_FSL_DRAM_BASE2,
Ed Swarthout2cfcf192016-03-28 16:16:01 -0500163 CONFIG_SYS_FSL_DRAM_SIZE2, MT_NORMAL,
164 PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800165#endif
166};
167
168static const struct sys_mmu_table final_mmu_table[] = {
169#ifdef CONFIG_FSL_LSCH3
170 { CONFIG_SYS_FSL_CCSR_BASE, CONFIG_SYS_FSL_CCSR_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800171 CONFIG_SYS_FSL_CCSR_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100172 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800173 { CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100174 CONFIG_SYS_FSL_OCRAM_SIZE, MT_NORMAL, PTE_BLOCK_NON_SHARE },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800175 { CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1,
York Sun0804d562015-12-04 11:57:08 -0800176 CONFIG_SYS_FSL_DRAM_SIZE1, MT_NORMAL,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100177 PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800178 { CONFIG_SYS_FSL_QSPI_BASE2, CONFIG_SYS_FSL_QSPI_BASE2,
Alison Wange28e18c2015-11-05 11:15:49 +0800179 CONFIG_SYS_FSL_QSPI_SIZE2, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100180 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800181 { CONFIG_SYS_FSL_IFC_BASE2, CONFIG_SYS_FSL_IFC_BASE2,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100182 CONFIG_SYS_FSL_IFC_SIZE2, MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800183 { CONFIG_SYS_FSL_DCSR_BASE, CONFIG_SYS_FSL_DCSR_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800184 CONFIG_SYS_FSL_DCSR_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100185 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800186 { CONFIG_SYS_FSL_MC_BASE, CONFIG_SYS_FSL_MC_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800187 CONFIG_SYS_FSL_MC_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100188 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800189 { CONFIG_SYS_FSL_NI_BASE, CONFIG_SYS_FSL_NI_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800190 CONFIG_SYS_FSL_NI_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100191 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800192 /* For QBMAN portal, only the first 64MB is cache-enabled */
193 { CONFIG_SYS_FSL_QBMAN_BASE, CONFIG_SYS_FSL_QBMAN_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800194 CONFIG_SYS_FSL_QBMAN_SIZE_1, MT_NORMAL,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100195 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN | PTE_BLOCK_NS },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800196 { CONFIG_SYS_FSL_QBMAN_BASE + CONFIG_SYS_FSL_QBMAN_SIZE_1,
197 CONFIG_SYS_FSL_QBMAN_BASE + CONFIG_SYS_FSL_QBMAN_SIZE_1,
198 CONFIG_SYS_FSL_QBMAN_SIZE - CONFIG_SYS_FSL_QBMAN_SIZE_1,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100199 MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800200 { CONFIG_SYS_PCIE1_PHYS_ADDR, CONFIG_SYS_PCIE1_PHYS_ADDR,
Alison Wange28e18c2015-11-05 11:15:49 +0800201 CONFIG_SYS_PCIE1_PHYS_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100202 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800203 { CONFIG_SYS_PCIE2_PHYS_ADDR, CONFIG_SYS_PCIE2_PHYS_ADDR,
Alison Wange28e18c2015-11-05 11:15:49 +0800204 CONFIG_SYS_PCIE2_PHYS_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100205 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800206 { CONFIG_SYS_PCIE3_PHYS_ADDR, CONFIG_SYS_PCIE3_PHYS_ADDR,
Alison Wange28e18c2015-11-05 11:15:49 +0800207 CONFIG_SYS_PCIE3_PHYS_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100208 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
York Suncbe8e1c2016-04-04 11:41:26 -0700209#ifdef CONFIG_LS2080A
Mingkai Hu0e58b512015-10-26 19:47:50 +0800210 { CONFIG_SYS_PCIE4_PHYS_ADDR, CONFIG_SYS_PCIE4_PHYS_ADDR,
Alison Wange28e18c2015-11-05 11:15:49 +0800211 CONFIG_SYS_PCIE4_PHYS_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100212 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800213#endif
214 { CONFIG_SYS_FSL_WRIOP1_BASE, CONFIG_SYS_FSL_WRIOP1_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800215 CONFIG_SYS_FSL_WRIOP1_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100216 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800217 { CONFIG_SYS_FSL_AIOP1_BASE, CONFIG_SYS_FSL_AIOP1_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800218 CONFIG_SYS_FSL_AIOP1_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100219 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800220 { CONFIG_SYS_FSL_PEBUF_BASE, CONFIG_SYS_FSL_PEBUF_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800221 CONFIG_SYS_FSL_PEBUF_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100222 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800223 { CONFIG_SYS_FSL_DRAM_BASE2, CONFIG_SYS_FSL_DRAM_BASE2,
York Sun0804d562015-12-04 11:57:08 -0800224 CONFIG_SYS_FSL_DRAM_SIZE2, MT_NORMAL,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100225 PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800226#elif defined(CONFIG_FSL_LSCH2)
227 { CONFIG_SYS_FSL_BOOTROM_BASE, CONFIG_SYS_FSL_BOOTROM_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800228 CONFIG_SYS_FSL_BOOTROM_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100229 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800230 { CONFIG_SYS_FSL_CCSR_BASE, CONFIG_SYS_FSL_CCSR_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800231 CONFIG_SYS_FSL_CCSR_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100232 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800233 { CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100234 CONFIG_SYS_FSL_OCRAM_SIZE, MT_NORMAL, PTE_BLOCK_NON_SHARE },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800235 { CONFIG_SYS_FSL_DCSR_BASE, CONFIG_SYS_FSL_DCSR_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800236 CONFIG_SYS_FSL_DCSR_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100237 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800238 { CONFIG_SYS_FSL_QSPI_BASE, CONFIG_SYS_FSL_QSPI_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800239 CONFIG_SYS_FSL_QSPI_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100240 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800241 { CONFIG_SYS_FSL_IFC_BASE, CONFIG_SYS_FSL_IFC_BASE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100242 CONFIG_SYS_FSL_IFC_SIZE, MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800243 { CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1,
244 CONFIG_SYS_FSL_DRAM_SIZE1, MT_NORMAL,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100245 PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800246 { CONFIG_SYS_FSL_QBMAN_BASE, CONFIG_SYS_FSL_QBMAN_BASE,
Alison Wange28e18c2015-11-05 11:15:49 +0800247 CONFIG_SYS_FSL_QBMAN_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100248 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800249 { CONFIG_SYS_FSL_DRAM_BASE2, CONFIG_SYS_FSL_DRAM_BASE2,
Ed Swarthout2cfcf192016-03-28 16:16:01 -0500250 CONFIG_SYS_FSL_DRAM_SIZE2, MT_NORMAL,
251 PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800252 { CONFIG_SYS_PCIE1_PHYS_ADDR, CONFIG_SYS_PCIE1_PHYS_ADDR,
Alison Wange28e18c2015-11-05 11:15:49 +0800253 CONFIG_SYS_PCIE1_PHYS_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100254 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800255 { CONFIG_SYS_PCIE2_PHYS_ADDR, CONFIG_SYS_PCIE2_PHYS_ADDR,
Alison Wange28e18c2015-11-05 11:15:49 +0800256 CONFIG_SYS_PCIE2_PHYS_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100257 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800258 { CONFIG_SYS_PCIE3_PHYS_ADDR, CONFIG_SYS_PCIE3_PHYS_ADDR,
Alison Wange28e18c2015-11-05 11:15:49 +0800259 CONFIG_SYS_PCIE3_PHYS_SIZE, MT_DEVICE_NGNRNE,
Alexander Grafce0a64e2016-03-04 01:09:54 +0100260 PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN },
Mingkai Hue4e93ea2015-10-26 19:47:51 +0800261 { CONFIG_SYS_FSL_DRAM_BASE3, CONFIG_SYS_FSL_DRAM_BASE3,
Ed Swarthout2cfcf192016-03-28 16:16:01 -0500262 CONFIG_SYS_FSL_DRAM_SIZE3, MT_NORMAL,
263 PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS },
Mingkai Hu0e58b512015-10-26 19:47:50 +0800264#endif
265};
266#endif
267
268int fsl_qoriq_core_to_cluster(unsigned int core);
269u32 cpu_mask(void);
270#endif /* _FSL_LAYERSCAPE_CPU_H */