Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 10 | static struct cpu_type cpu_type_list[] = { |
Prabhakar Kushwaha | ac7f242 | 2016-06-24 13:48:13 +0530 | [diff] [blame] | 11 | CPU_TYPE_ENTRY(LS2080A, LS2080A, 8), |
| 12 | CPU_TYPE_ENTRY(LS2085A, LS2085A, 8), |
| 13 | CPU_TYPE_ENTRY(LS2045A, LS2045A, 4), |
Priyanka Jain | 4a6f173 | 2016-11-17 12:29:55 +0530 | [diff] [blame] | 14 | CPU_TYPE_ENTRY(LS2088A, LS2088A, 8), |
| 15 | CPU_TYPE_ENTRY(LS2084A, LS2084A, 8), |
| 16 | CPU_TYPE_ENTRY(LS2048A, LS2048A, 4), |
| 17 | CPU_TYPE_ENTRY(LS2044A, LS2044A, 4), |
Prabhakar Kushwaha | ac7f242 | 2016-06-24 13:48:13 +0530 | [diff] [blame] | 18 | CPU_TYPE_ENTRY(LS1043A, LS1043A, 4), |
| 19 | CPU_TYPE_ENTRY(LS1023A, LS1023A, 2), |
Mingkai Hu | cd54c0f | 2016-07-05 16:01:55 +0800 | [diff] [blame] | 20 | CPU_TYPE_ENTRY(LS1046A, LS1046A, 4), |
| 21 | CPU_TYPE_ENTRY(LS1026A, LS1026A, 2), |
Prabhakar Kushwaha | ac7f242 | 2016-06-24 13:48:13 +0530 | [diff] [blame] | 22 | CPU_TYPE_ENTRY(LS2040A, LS2040A, 4), |
| 23 | CPU_TYPE_ENTRY(LS1012A, LS1012A, 1), |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 24 | }; |
| 25 | |
| 26 | #ifndef CONFIG_SYS_DCACHE_OFF |
| 27 | |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 28 | #ifdef CONFIG_FSL_LSCH3 |
| 29 | #define CONFIG_SYS_FSL_CCSR_BASE 0x00000000 |
| 30 | #define CONFIG_SYS_FSL_CCSR_SIZE 0x10000000 |
| 31 | #define CONFIG_SYS_FSL_QSPI_BASE1 0x20000000 |
| 32 | #define CONFIG_SYS_FSL_QSPI_SIZE1 0x10000000 |
| 33 | #define CONFIG_SYS_FSL_IFC_BASE1 0x30000000 |
| 34 | #define CONFIG_SYS_FSL_IFC_SIZE1 0x10000000 |
| 35 | #define CONFIG_SYS_FSL_IFC_SIZE1_1 0x400000 |
| 36 | #define CONFIG_SYS_FSL_DRAM_BASE1 0x80000000 |
| 37 | #define CONFIG_SYS_FSL_DRAM_SIZE1 0x80000000 |
| 38 | #define CONFIG_SYS_FSL_QSPI_BASE2 0x400000000 |
| 39 | #define CONFIG_SYS_FSL_QSPI_SIZE2 0x100000000 |
| 40 | #define CONFIG_SYS_FSL_IFC_BASE2 0x500000000 |
| 41 | #define CONFIG_SYS_FSL_IFC_SIZE2 0x100000000 |
| 42 | #define CONFIG_SYS_FSL_DCSR_BASE 0x700000000 |
| 43 | #define CONFIG_SYS_FSL_DCSR_SIZE 0x40000000 |
| 44 | #define CONFIG_SYS_FSL_MC_BASE 0x80c000000 |
| 45 | #define CONFIG_SYS_FSL_MC_SIZE 0x4000000 |
| 46 | #define CONFIG_SYS_FSL_NI_BASE 0x810000000 |
| 47 | #define CONFIG_SYS_FSL_NI_SIZE 0x8000000 |
| 48 | #define CONFIG_SYS_FSL_QBMAN_BASE 0x818000000 |
| 49 | #define CONFIG_SYS_FSL_QBMAN_SIZE 0x8000000 |
| 50 | #define CONFIG_SYS_FSL_QBMAN_SIZE_1 0x4000000 |
| 51 | #define CONFIG_SYS_PCIE1_PHYS_SIZE 0x200000000 |
| 52 | #define CONFIG_SYS_PCIE2_PHYS_SIZE 0x200000000 |
| 53 | #define CONFIG_SYS_PCIE3_PHYS_SIZE 0x200000000 |
| 54 | #define CONFIG_SYS_PCIE4_PHYS_SIZE 0x200000000 |
| 55 | #define CONFIG_SYS_FSL_WRIOP1_BASE 0x4300000000 |
| 56 | #define CONFIG_SYS_FSL_WRIOP1_SIZE 0x100000000 |
| 57 | #define CONFIG_SYS_FSL_AIOP1_BASE 0x4b00000000 |
| 58 | #define CONFIG_SYS_FSL_AIOP1_SIZE 0x100000000 |
| 59 | #define CONFIG_SYS_FSL_PEBUF_BASE 0x4c00000000 |
| 60 | #define CONFIG_SYS_FSL_PEBUF_SIZE 0x400000000 |
| 61 | #define CONFIG_SYS_FSL_DRAM_BASE2 0x8080000000 |
| 62 | #define CONFIG_SYS_FSL_DRAM_SIZE2 0x7F80000000 |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 63 | #elif defined(CONFIG_FSL_LSCH2) |
| 64 | #define CONFIG_SYS_FSL_BOOTROM_BASE 0x0 |
| 65 | #define CONFIG_SYS_FSL_BOOTROM_SIZE 0x1000000 |
| 66 | #define CONFIG_SYS_FSL_CCSR_BASE 0x1000000 |
| 67 | #define CONFIG_SYS_FSL_CCSR_SIZE 0xf000000 |
| 68 | #define CONFIG_SYS_FSL_DCSR_BASE 0x20000000 |
| 69 | #define CONFIG_SYS_FSL_DCSR_SIZE 0x4000000 |
| 70 | #define CONFIG_SYS_FSL_QSPI_BASE 0x40000000 |
| 71 | #define CONFIG_SYS_FSL_QSPI_SIZE 0x20000000 |
| 72 | #define CONFIG_SYS_FSL_IFC_BASE 0x60000000 |
| 73 | #define CONFIG_SYS_FSL_IFC_SIZE 0x20000000 |
| 74 | #define CONFIG_SYS_FSL_DRAM_BASE1 0x80000000 |
| 75 | #define CONFIG_SYS_FSL_DRAM_SIZE1 0x80000000 |
| 76 | #define CONFIG_SYS_FSL_QBMAN_BASE 0x500000000 |
| 77 | #define CONFIG_SYS_FSL_QBMAN_SIZE 0x10000000 |
| 78 | #define CONFIG_SYS_FSL_DRAM_BASE2 0x880000000 |
| 79 | #define CONFIG_SYS_FSL_DRAM_SIZE2 0x780000000 /* 30GB */ |
| 80 | #define CONFIG_SYS_PCIE1_PHYS_SIZE 0x800000000 |
| 81 | #define CONFIG_SYS_PCIE2_PHYS_SIZE 0x800000000 |
| 82 | #define CONFIG_SYS_PCIE3_PHYS_SIZE 0x800000000 |
| 83 | #define CONFIG_SYS_FSL_DRAM_BASE3 0x8800000000 |
| 84 | #define CONFIG_SYS_FSL_DRAM_SIZE3 0x7800000000 /* 480GB */ |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 85 | #endif |
| 86 | |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 87 | #define EARLY_PGTABLE_SIZE 0x5000 |
| 88 | static struct mm_region early_map[] = { |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 89 | #ifdef CONFIG_FSL_LSCH3 |
| 90 | { CONFIG_SYS_FSL_CCSR_BASE, CONFIG_SYS_FSL_CCSR_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 91 | CONFIG_SYS_FSL_CCSR_SIZE, |
| 92 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 93 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 94 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 95 | { CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE, |
Hou Zhiqiang | 3a109ef | 2016-12-16 17:15:45 +0800 | [diff] [blame] | 96 | SYS_FSL_OCRAM_SPACE_SIZE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 97 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE |
| 98 | }, |
Yuan Yao | 331c87c | 2016-06-08 18:25:00 +0800 | [diff] [blame] | 99 | { CONFIG_SYS_FSL_QSPI_BASE1, CONFIG_SYS_FSL_QSPI_BASE1, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 100 | CONFIG_SYS_FSL_QSPI_SIZE1, |
| 101 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE}, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 102 | /* For IFC Region #1, only the first 4MB is cache-enabled */ |
| 103 | { CONFIG_SYS_FSL_IFC_BASE1, CONFIG_SYS_FSL_IFC_BASE1, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 104 | CONFIG_SYS_FSL_IFC_SIZE1_1, |
| 105 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE |
| 106 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 107 | { CONFIG_SYS_FSL_IFC_BASE1 + CONFIG_SYS_FSL_IFC_SIZE1_1, |
| 108 | CONFIG_SYS_FSL_IFC_BASE1 + CONFIG_SYS_FSL_IFC_SIZE1_1, |
| 109 | CONFIG_SYS_FSL_IFC_SIZE1 - CONFIG_SYS_FSL_IFC_SIZE1_1, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 110 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE |
| 111 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 112 | { CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FSL_IFC_BASE1, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 113 | CONFIG_SYS_FSL_IFC_SIZE1, |
| 114 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE |
| 115 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 116 | { CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 117 | CONFIG_SYS_FSL_DRAM_SIZE1, |
York Sun | 729f2d1 | 2017-03-06 09:02:34 -0800 | [diff] [blame] | 118 | #if defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD) |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 119 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | |
York Sun | 729f2d1 | 2017-03-06 09:02:34 -0800 | [diff] [blame] | 120 | #else /* Start with nGnRnE and PXN and UXN to prevent speculative access */ |
| 121 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_PXN | PTE_BLOCK_UXN | |
| 122 | #endif |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 123 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS |
| 124 | }, |
York Sun | 97ceebd | 2015-11-25 14:56:40 -0800 | [diff] [blame] | 125 | /* Map IFC region #2 up to CONFIG_SYS_FLASH_BASE for NAND boot */ |
| 126 | { CONFIG_SYS_FSL_IFC_BASE2, CONFIG_SYS_FSL_IFC_BASE2, |
| 127 | CONFIG_SYS_FLASH_BASE - CONFIG_SYS_FSL_IFC_BASE2, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 128 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE |
| 129 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 130 | { CONFIG_SYS_FSL_DCSR_BASE, CONFIG_SYS_FSL_DCSR_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 131 | CONFIG_SYS_FSL_DCSR_SIZE, |
| 132 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 133 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 134 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 135 | { CONFIG_SYS_FSL_DRAM_BASE2, CONFIG_SYS_FSL_DRAM_BASE2, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 136 | CONFIG_SYS_FSL_DRAM_SIZE2, |
York Sun | 729f2d1 | 2017-03-06 09:02:34 -0800 | [diff] [blame] | 137 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_PXN | PTE_BLOCK_UXN | |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 138 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS |
| 139 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 140 | #elif defined(CONFIG_FSL_LSCH2) |
| 141 | { CONFIG_SYS_FSL_CCSR_BASE, CONFIG_SYS_FSL_CCSR_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 142 | CONFIG_SYS_FSL_CCSR_SIZE, |
| 143 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 144 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 145 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 146 | { CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE, |
Hou Zhiqiang | 3a109ef | 2016-12-16 17:15:45 +0800 | [diff] [blame] | 147 | SYS_FSL_OCRAM_SPACE_SIZE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 148 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE |
| 149 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 150 | { CONFIG_SYS_FSL_DCSR_BASE, CONFIG_SYS_FSL_DCSR_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 151 | CONFIG_SYS_FSL_DCSR_SIZE, |
| 152 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 153 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 154 | }, |
Qianyu Gong | 138a36a | 2016-01-25 15:16:07 +0800 | [diff] [blame] | 155 | { CONFIG_SYS_FSL_QSPI_BASE, CONFIG_SYS_FSL_QSPI_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 156 | CONFIG_SYS_FSL_QSPI_SIZE, |
| 157 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE |
| 158 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 159 | { CONFIG_SYS_FSL_IFC_BASE, CONFIG_SYS_FSL_IFC_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 160 | CONFIG_SYS_FSL_IFC_SIZE, |
| 161 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE |
| 162 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 163 | { CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 164 | CONFIG_SYS_FSL_DRAM_SIZE1, |
York Sun | 729f2d1 | 2017-03-06 09:02:34 -0800 | [diff] [blame] | 165 | #if defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD) |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 166 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | |
York Sun | 729f2d1 | 2017-03-06 09:02:34 -0800 | [diff] [blame] | 167 | #else /* Start with nGnRnE and PXN and UXN to prevent speculative access */ |
| 168 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_PXN | PTE_BLOCK_UXN | |
| 169 | #endif |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 170 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS |
| 171 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 172 | { CONFIG_SYS_FSL_DRAM_BASE2, CONFIG_SYS_FSL_DRAM_BASE2, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 173 | CONFIG_SYS_FSL_DRAM_SIZE2, |
York Sun | 729f2d1 | 2017-03-06 09:02:34 -0800 | [diff] [blame] | 174 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_PXN | PTE_BLOCK_UXN | |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 175 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS |
| 176 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 177 | #endif |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 178 | {}, /* list terminator */ |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 179 | }; |
| 180 | |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 181 | static struct mm_region final_map[] = { |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 182 | #ifdef CONFIG_FSL_LSCH3 |
| 183 | { CONFIG_SYS_FSL_CCSR_BASE, CONFIG_SYS_FSL_CCSR_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 184 | CONFIG_SYS_FSL_CCSR_SIZE, |
| 185 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 186 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 187 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 188 | { CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE, |
Hou Zhiqiang | 3a109ef | 2016-12-16 17:15:45 +0800 | [diff] [blame] | 189 | SYS_FSL_OCRAM_SPACE_SIZE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 190 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE |
| 191 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 192 | { CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 193 | CONFIG_SYS_FSL_DRAM_SIZE1, |
| 194 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | |
| 195 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS |
| 196 | }, |
Yuan Yao | 331c87c | 2016-06-08 18:25:00 +0800 | [diff] [blame] | 197 | { CONFIG_SYS_FSL_QSPI_BASE1, CONFIG_SYS_FSL_QSPI_BASE1, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 198 | CONFIG_SYS_FSL_QSPI_SIZE1, |
| 199 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE |
| 200 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 201 | { CONFIG_SYS_FSL_QSPI_BASE2, CONFIG_SYS_FSL_QSPI_BASE2, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 202 | CONFIG_SYS_FSL_QSPI_SIZE2, |
| 203 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 204 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 205 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 206 | { CONFIG_SYS_FSL_IFC_BASE2, CONFIG_SYS_FSL_IFC_BASE2, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 207 | CONFIG_SYS_FSL_IFC_SIZE2, |
| 208 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE |
| 209 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 210 | { CONFIG_SYS_FSL_DCSR_BASE, CONFIG_SYS_FSL_DCSR_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 211 | CONFIG_SYS_FSL_DCSR_SIZE, |
| 212 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 213 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 214 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 215 | { CONFIG_SYS_FSL_MC_BASE, CONFIG_SYS_FSL_MC_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 216 | CONFIG_SYS_FSL_MC_SIZE, |
| 217 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 218 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 219 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 220 | { CONFIG_SYS_FSL_NI_BASE, CONFIG_SYS_FSL_NI_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 221 | CONFIG_SYS_FSL_NI_SIZE, |
| 222 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 223 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 224 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 225 | /* For QBMAN portal, only the first 64MB is cache-enabled */ |
| 226 | { CONFIG_SYS_FSL_QBMAN_BASE, CONFIG_SYS_FSL_QBMAN_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 227 | CONFIG_SYS_FSL_QBMAN_SIZE_1, |
| 228 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | |
| 229 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN | PTE_BLOCK_NS |
| 230 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 231 | { CONFIG_SYS_FSL_QBMAN_BASE + CONFIG_SYS_FSL_QBMAN_SIZE_1, |
| 232 | CONFIG_SYS_FSL_QBMAN_BASE + CONFIG_SYS_FSL_QBMAN_SIZE_1, |
| 233 | CONFIG_SYS_FSL_QBMAN_SIZE - CONFIG_SYS_FSL_QBMAN_SIZE_1, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 234 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 235 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 236 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 237 | { CONFIG_SYS_PCIE1_PHYS_ADDR, CONFIG_SYS_PCIE1_PHYS_ADDR, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 238 | CONFIG_SYS_PCIE1_PHYS_SIZE, |
| 239 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 240 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 241 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 242 | { CONFIG_SYS_PCIE2_PHYS_ADDR, CONFIG_SYS_PCIE2_PHYS_ADDR, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 243 | CONFIG_SYS_PCIE2_PHYS_SIZE, |
| 244 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 245 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 246 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 247 | { CONFIG_SYS_PCIE3_PHYS_ADDR, CONFIG_SYS_PCIE3_PHYS_ADDR, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 248 | CONFIG_SYS_PCIE3_PHYS_SIZE, |
| 249 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 250 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 251 | }, |
York Sun | 4ce6fbf | 2017-03-27 11:41:01 -0700 | [diff] [blame] | 252 | #ifdef CONFIG_ARCH_LS2080A |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 253 | { CONFIG_SYS_PCIE4_PHYS_ADDR, CONFIG_SYS_PCIE4_PHYS_ADDR, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 254 | CONFIG_SYS_PCIE4_PHYS_SIZE, |
| 255 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 256 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 257 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 258 | #endif |
| 259 | { CONFIG_SYS_FSL_WRIOP1_BASE, CONFIG_SYS_FSL_WRIOP1_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 260 | CONFIG_SYS_FSL_WRIOP1_SIZE, |
| 261 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 262 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 263 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 264 | { CONFIG_SYS_FSL_AIOP1_BASE, CONFIG_SYS_FSL_AIOP1_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 265 | CONFIG_SYS_FSL_AIOP1_SIZE, |
| 266 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 267 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 268 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 269 | { CONFIG_SYS_FSL_PEBUF_BASE, CONFIG_SYS_FSL_PEBUF_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 270 | CONFIG_SYS_FSL_PEBUF_SIZE, |
| 271 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 272 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 273 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 274 | { CONFIG_SYS_FSL_DRAM_BASE2, CONFIG_SYS_FSL_DRAM_BASE2, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 275 | CONFIG_SYS_FSL_DRAM_SIZE2, |
| 276 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | |
| 277 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS |
| 278 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 279 | #elif defined(CONFIG_FSL_LSCH2) |
| 280 | { CONFIG_SYS_FSL_BOOTROM_BASE, CONFIG_SYS_FSL_BOOTROM_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 281 | CONFIG_SYS_FSL_BOOTROM_SIZE, |
| 282 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 283 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 284 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 285 | { CONFIG_SYS_FSL_CCSR_BASE, CONFIG_SYS_FSL_CCSR_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 286 | CONFIG_SYS_FSL_CCSR_SIZE, |
| 287 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 288 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 289 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 290 | { CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE, |
Hou Zhiqiang | 3a109ef | 2016-12-16 17:15:45 +0800 | [diff] [blame] | 291 | SYS_FSL_OCRAM_SPACE_SIZE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 292 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE |
| 293 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 294 | { CONFIG_SYS_FSL_DCSR_BASE, CONFIG_SYS_FSL_DCSR_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 295 | CONFIG_SYS_FSL_DCSR_SIZE, |
| 296 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 297 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 298 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 299 | { CONFIG_SYS_FSL_QSPI_BASE, CONFIG_SYS_FSL_QSPI_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 300 | CONFIG_SYS_FSL_QSPI_SIZE, |
| 301 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 302 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 303 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 304 | { CONFIG_SYS_FSL_IFC_BASE, CONFIG_SYS_FSL_IFC_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 305 | CONFIG_SYS_FSL_IFC_SIZE, |
| 306 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE |
| 307 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 308 | { CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 309 | CONFIG_SYS_FSL_DRAM_SIZE1, |
| 310 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | |
| 311 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS |
| 312 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 313 | { CONFIG_SYS_FSL_QBMAN_BASE, CONFIG_SYS_FSL_QBMAN_BASE, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 314 | CONFIG_SYS_FSL_QBMAN_SIZE, |
| 315 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 316 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 317 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 318 | { CONFIG_SYS_FSL_DRAM_BASE2, CONFIG_SYS_FSL_DRAM_BASE2, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 319 | CONFIG_SYS_FSL_DRAM_SIZE2, |
| 320 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | |
| 321 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS |
| 322 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 323 | { CONFIG_SYS_PCIE1_PHYS_ADDR, CONFIG_SYS_PCIE1_PHYS_ADDR, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 324 | CONFIG_SYS_PCIE1_PHYS_SIZE, |
| 325 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 326 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 327 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 328 | { CONFIG_SYS_PCIE2_PHYS_ADDR, CONFIG_SYS_PCIE2_PHYS_ADDR, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 329 | CONFIG_SYS_PCIE2_PHYS_SIZE, |
| 330 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 331 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 332 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 333 | { CONFIG_SYS_PCIE3_PHYS_ADDR, CONFIG_SYS_PCIE3_PHYS_ADDR, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 334 | CONFIG_SYS_PCIE3_PHYS_SIZE, |
| 335 | PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | |
| 336 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN |
| 337 | }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 338 | { CONFIG_SYS_FSL_DRAM_BASE3, CONFIG_SYS_FSL_DRAM_BASE3, |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 339 | CONFIG_SYS_FSL_DRAM_SIZE3, |
| 340 | PTE_BLOCK_MEMTYPE(MT_NORMAL) | |
| 341 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS |
| 342 | }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 343 | #endif |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 344 | #ifdef CONFIG_SYS_MEM_RESERVE_SECURE |
| 345 | {}, /* space holder for secure mem */ |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 346 | #endif |
York Sun | 9da8f50 | 2016-06-24 16:46:23 -0700 | [diff] [blame] | 347 | {}, |
| 348 | }; |
| 349 | #endif /* !CONFIG_SYS_DCACHE_OFF */ |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 350 | |
| 351 | int fsl_qoriq_core_to_cluster(unsigned int core); |
| 352 | u32 cpu_mask(void); |
| 353 | #endif /* _FSL_LAYERSCAPE_CPU_H */ |