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