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), |
| 14 | CPU_TYPE_ENTRY(LS1043A, LS1043A, 4), |
| 15 | CPU_TYPE_ENTRY(LS1023A, LS1023A, 2), |
| 16 | CPU_TYPE_ENTRY(LS2040A, LS2040A, 4), |
| 17 | CPU_TYPE_ENTRY(LS1012A, LS1012A, 1), |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 18 | }; |
| 19 | |
| 20 | #ifndef CONFIG_SYS_DCACHE_OFF |
| 21 | |
| 22 | #define SECTION_SHIFT_L0 39UL |
| 23 | #define SECTION_SHIFT_L1 30UL |
| 24 | #define SECTION_SHIFT_L2 21UL |
| 25 | #define BLOCK_SIZE_L0 0x8000000000 |
| 26 | #define BLOCK_SIZE_L1 0x40000000 |
| 27 | #define BLOCK_SIZE_L2 0x200000 |
| 28 | #define NUM_OF_ENTRY 512 |
| 29 | #define TCR_EL2_PS_40BIT (2 << 16) |
| 30 | |
| 31 | #define LAYERSCAPE_VA_BITS (40) |
| 32 | #define LAYERSCAPE_TCR (TCR_TG0_4K | \ |
| 33 | TCR_EL2_PS_40BIT | \ |
| 34 | TCR_SHARED_NON | \ |
| 35 | TCR_ORGN_NC | \ |
| 36 | TCR_IRGN_NC | \ |
| 37 | TCR_T0SZ(LAYERSCAPE_VA_BITS)) |
| 38 | #define LAYERSCAPE_TCR_FINAL (TCR_TG0_4K | \ |
| 39 | TCR_EL2_PS_40BIT | \ |
| 40 | TCR_SHARED_OUTER | \ |
| 41 | TCR_ORGN_WBWA | \ |
| 42 | TCR_IRGN_WBWA | \ |
| 43 | TCR_T0SZ(LAYERSCAPE_VA_BITS)) |
| 44 | |
| 45 | #ifdef CONFIG_FSL_LSCH3 |
| 46 | #define CONFIG_SYS_FSL_CCSR_BASE 0x00000000 |
| 47 | #define CONFIG_SYS_FSL_CCSR_SIZE 0x10000000 |
| 48 | #define CONFIG_SYS_FSL_QSPI_BASE1 0x20000000 |
| 49 | #define CONFIG_SYS_FSL_QSPI_SIZE1 0x10000000 |
| 50 | #define CONFIG_SYS_FSL_IFC_BASE1 0x30000000 |
| 51 | #define CONFIG_SYS_FSL_IFC_SIZE1 0x10000000 |
| 52 | #define CONFIG_SYS_FSL_IFC_SIZE1_1 0x400000 |
| 53 | #define CONFIG_SYS_FSL_DRAM_BASE1 0x80000000 |
| 54 | #define CONFIG_SYS_FSL_DRAM_SIZE1 0x80000000 |
| 55 | #define CONFIG_SYS_FSL_QSPI_BASE2 0x400000000 |
| 56 | #define CONFIG_SYS_FSL_QSPI_SIZE2 0x100000000 |
| 57 | #define CONFIG_SYS_FSL_IFC_BASE2 0x500000000 |
| 58 | #define CONFIG_SYS_FSL_IFC_SIZE2 0x100000000 |
| 59 | #define CONFIG_SYS_FSL_DCSR_BASE 0x700000000 |
| 60 | #define CONFIG_SYS_FSL_DCSR_SIZE 0x40000000 |
| 61 | #define CONFIG_SYS_FSL_MC_BASE 0x80c000000 |
| 62 | #define CONFIG_SYS_FSL_MC_SIZE 0x4000000 |
| 63 | #define CONFIG_SYS_FSL_NI_BASE 0x810000000 |
| 64 | #define CONFIG_SYS_FSL_NI_SIZE 0x8000000 |
| 65 | #define CONFIG_SYS_FSL_QBMAN_BASE 0x818000000 |
| 66 | #define CONFIG_SYS_FSL_QBMAN_SIZE 0x8000000 |
| 67 | #define CONFIG_SYS_FSL_QBMAN_SIZE_1 0x4000000 |
| 68 | #define CONFIG_SYS_PCIE1_PHYS_SIZE 0x200000000 |
| 69 | #define CONFIG_SYS_PCIE2_PHYS_SIZE 0x200000000 |
| 70 | #define CONFIG_SYS_PCIE3_PHYS_SIZE 0x200000000 |
| 71 | #define CONFIG_SYS_PCIE4_PHYS_SIZE 0x200000000 |
| 72 | #define CONFIG_SYS_FSL_WRIOP1_BASE 0x4300000000 |
| 73 | #define CONFIG_SYS_FSL_WRIOP1_SIZE 0x100000000 |
| 74 | #define CONFIG_SYS_FSL_AIOP1_BASE 0x4b00000000 |
| 75 | #define CONFIG_SYS_FSL_AIOP1_SIZE 0x100000000 |
| 76 | #define CONFIG_SYS_FSL_PEBUF_BASE 0x4c00000000 |
| 77 | #define CONFIG_SYS_FSL_PEBUF_SIZE 0x400000000 |
| 78 | #define CONFIG_SYS_FSL_DRAM_BASE2 0x8080000000 |
| 79 | #define CONFIG_SYS_FSL_DRAM_SIZE2 0x7F80000000 |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 80 | #elif defined(CONFIG_FSL_LSCH2) |
| 81 | #define CONFIG_SYS_FSL_BOOTROM_BASE 0x0 |
| 82 | #define CONFIG_SYS_FSL_BOOTROM_SIZE 0x1000000 |
| 83 | #define CONFIG_SYS_FSL_CCSR_BASE 0x1000000 |
| 84 | #define CONFIG_SYS_FSL_CCSR_SIZE 0xf000000 |
| 85 | #define CONFIG_SYS_FSL_DCSR_BASE 0x20000000 |
| 86 | #define CONFIG_SYS_FSL_DCSR_SIZE 0x4000000 |
| 87 | #define CONFIG_SYS_FSL_QSPI_BASE 0x40000000 |
| 88 | #define CONFIG_SYS_FSL_QSPI_SIZE 0x20000000 |
| 89 | #define CONFIG_SYS_FSL_IFC_BASE 0x60000000 |
| 90 | #define CONFIG_SYS_FSL_IFC_SIZE 0x20000000 |
| 91 | #define CONFIG_SYS_FSL_DRAM_BASE1 0x80000000 |
| 92 | #define CONFIG_SYS_FSL_DRAM_SIZE1 0x80000000 |
| 93 | #define CONFIG_SYS_FSL_QBMAN_BASE 0x500000000 |
| 94 | #define CONFIG_SYS_FSL_QBMAN_SIZE 0x10000000 |
| 95 | #define CONFIG_SYS_FSL_DRAM_BASE2 0x880000000 |
| 96 | #define CONFIG_SYS_FSL_DRAM_SIZE2 0x780000000 /* 30GB */ |
| 97 | #define CONFIG_SYS_PCIE1_PHYS_SIZE 0x800000000 |
| 98 | #define CONFIG_SYS_PCIE2_PHYS_SIZE 0x800000000 |
| 99 | #define CONFIG_SYS_PCIE3_PHYS_SIZE 0x800000000 |
| 100 | #define CONFIG_SYS_FSL_DRAM_BASE3 0x8800000000 |
| 101 | #define CONFIG_SYS_FSL_DRAM_SIZE3 0x7800000000 /* 480GB */ |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 102 | #endif |
| 103 | |
| 104 | struct sys_mmu_table { |
| 105 | u64 virt_addr; |
| 106 | u64 phys_addr; |
| 107 | u64 size; |
| 108 | u64 memory_type; |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 109 | u64 attribute; |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 110 | }; |
| 111 | |
| 112 | struct table_info { |
| 113 | u64 *ptr; |
| 114 | u64 table_base; |
| 115 | u64 entry_size; |
| 116 | }; |
| 117 | |
| 118 | static const struct sys_mmu_table early_mmu_table[] = { |
| 119 | #ifdef CONFIG_FSL_LSCH3 |
| 120 | { CONFIG_SYS_FSL_CCSR_BASE, CONFIG_SYS_FSL_CCSR_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 121 | CONFIG_SYS_FSL_CCSR_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 122 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 123 | { CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 124 | CONFIG_SYS_FSL_OCRAM_SIZE, MT_NORMAL, PTE_BLOCK_NON_SHARE }, |
Yuan Yao | 331c87c | 2016-06-08 18:25:00 +0800 | [diff] [blame] | 125 | { CONFIG_SYS_FSL_QSPI_BASE1, CONFIG_SYS_FSL_QSPI_BASE1, |
| 126 | CONFIG_SYS_FSL_QSPI_SIZE1, MT_NORMAL, PTE_BLOCK_NON_SHARE}, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 127 | /* For IFC Region #1, only the first 4MB is cache-enabled */ |
| 128 | { CONFIG_SYS_FSL_IFC_BASE1, CONFIG_SYS_FSL_IFC_BASE1, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 129 | CONFIG_SYS_FSL_IFC_SIZE1_1, MT_NORMAL, PTE_BLOCK_NON_SHARE }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 130 | { CONFIG_SYS_FSL_IFC_BASE1 + CONFIG_SYS_FSL_IFC_SIZE1_1, |
| 131 | CONFIG_SYS_FSL_IFC_BASE1 + CONFIG_SYS_FSL_IFC_SIZE1_1, |
| 132 | CONFIG_SYS_FSL_IFC_SIZE1 - CONFIG_SYS_FSL_IFC_SIZE1_1, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 133 | MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 134 | { CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FSL_IFC_BASE1, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 135 | CONFIG_SYS_FSL_IFC_SIZE1, MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 136 | { CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1, |
York Sun | 0804d56 | 2015-12-04 11:57:08 -0800 | [diff] [blame] | 137 | CONFIG_SYS_FSL_DRAM_SIZE1, MT_NORMAL, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 138 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS }, |
York Sun | 97ceebd | 2015-11-25 14:56:40 -0800 | [diff] [blame] | 139 | /* Map IFC region #2 up to CONFIG_SYS_FLASH_BASE for NAND boot */ |
| 140 | { CONFIG_SYS_FSL_IFC_BASE2, CONFIG_SYS_FSL_IFC_BASE2, |
| 141 | CONFIG_SYS_FLASH_BASE - CONFIG_SYS_FSL_IFC_BASE2, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 142 | MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 143 | { CONFIG_SYS_FSL_DCSR_BASE, CONFIG_SYS_FSL_DCSR_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 144 | CONFIG_SYS_FSL_DCSR_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 145 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 146 | { CONFIG_SYS_FSL_DRAM_BASE2, CONFIG_SYS_FSL_DRAM_BASE2, |
York Sun | 0804d56 | 2015-12-04 11:57:08 -0800 | [diff] [blame] | 147 | CONFIG_SYS_FSL_DRAM_SIZE2, MT_NORMAL, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 148 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 149 | #elif defined(CONFIG_FSL_LSCH2) |
| 150 | { CONFIG_SYS_FSL_CCSR_BASE, CONFIG_SYS_FSL_CCSR_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 151 | CONFIG_SYS_FSL_CCSR_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 152 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 153 | { CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 154 | CONFIG_SYS_FSL_OCRAM_SIZE, MT_NORMAL, PTE_BLOCK_NON_SHARE }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 155 | { CONFIG_SYS_FSL_DCSR_BASE, CONFIG_SYS_FSL_DCSR_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 156 | CONFIG_SYS_FSL_DCSR_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 157 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Qianyu Gong | 138a36a | 2016-01-25 15:16:07 +0800 | [diff] [blame] | 158 | { CONFIG_SYS_FSL_QSPI_BASE, CONFIG_SYS_FSL_QSPI_BASE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 159 | CONFIG_SYS_FSL_QSPI_SIZE, MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 160 | { CONFIG_SYS_FSL_IFC_BASE, CONFIG_SYS_FSL_IFC_BASE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 161 | CONFIG_SYS_FSL_IFC_SIZE, MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 162 | { CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1, |
Ed Swarthout | 2cfcf19 | 2016-03-28 16:16:01 -0500 | [diff] [blame] | 163 | CONFIG_SYS_FSL_DRAM_SIZE1, MT_NORMAL, |
| 164 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 165 | { CONFIG_SYS_FSL_DRAM_BASE2, CONFIG_SYS_FSL_DRAM_BASE2, |
Ed Swarthout | 2cfcf19 | 2016-03-28 16:16:01 -0500 | [diff] [blame] | 166 | CONFIG_SYS_FSL_DRAM_SIZE2, MT_NORMAL, |
| 167 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 168 | #endif |
| 169 | }; |
| 170 | |
| 171 | static const struct sys_mmu_table final_mmu_table[] = { |
| 172 | #ifdef CONFIG_FSL_LSCH3 |
| 173 | { CONFIG_SYS_FSL_CCSR_BASE, CONFIG_SYS_FSL_CCSR_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 174 | CONFIG_SYS_FSL_CCSR_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 175 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 176 | { CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 177 | CONFIG_SYS_FSL_OCRAM_SIZE, MT_NORMAL, PTE_BLOCK_NON_SHARE }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 178 | { CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1, |
York Sun | 0804d56 | 2015-12-04 11:57:08 -0800 | [diff] [blame] | 179 | CONFIG_SYS_FSL_DRAM_SIZE1, MT_NORMAL, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 180 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS }, |
Yuan Yao | 331c87c | 2016-06-08 18:25:00 +0800 | [diff] [blame] | 181 | { CONFIG_SYS_FSL_QSPI_BASE1, CONFIG_SYS_FSL_QSPI_BASE1, |
| 182 | CONFIG_SYS_FSL_QSPI_SIZE1, MT_NORMAL, PTE_BLOCK_NON_SHARE}, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 183 | { CONFIG_SYS_FSL_QSPI_BASE2, CONFIG_SYS_FSL_QSPI_BASE2, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 184 | CONFIG_SYS_FSL_QSPI_SIZE2, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 185 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 186 | { CONFIG_SYS_FSL_IFC_BASE2, CONFIG_SYS_FSL_IFC_BASE2, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 187 | CONFIG_SYS_FSL_IFC_SIZE2, MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 188 | { CONFIG_SYS_FSL_DCSR_BASE, CONFIG_SYS_FSL_DCSR_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 189 | CONFIG_SYS_FSL_DCSR_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 190 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 191 | { CONFIG_SYS_FSL_MC_BASE, CONFIG_SYS_FSL_MC_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 192 | CONFIG_SYS_FSL_MC_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 193 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 194 | { CONFIG_SYS_FSL_NI_BASE, CONFIG_SYS_FSL_NI_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 195 | CONFIG_SYS_FSL_NI_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 196 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 197 | /* For QBMAN portal, only the first 64MB is cache-enabled */ |
| 198 | { CONFIG_SYS_FSL_QBMAN_BASE, CONFIG_SYS_FSL_QBMAN_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 199 | CONFIG_SYS_FSL_QBMAN_SIZE_1, MT_NORMAL, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 200 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN | PTE_BLOCK_NS }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 201 | { CONFIG_SYS_FSL_QBMAN_BASE + CONFIG_SYS_FSL_QBMAN_SIZE_1, |
| 202 | CONFIG_SYS_FSL_QBMAN_BASE + CONFIG_SYS_FSL_QBMAN_SIZE_1, |
| 203 | CONFIG_SYS_FSL_QBMAN_SIZE - CONFIG_SYS_FSL_QBMAN_SIZE_1, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 204 | MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 205 | { CONFIG_SYS_PCIE1_PHYS_ADDR, CONFIG_SYS_PCIE1_PHYS_ADDR, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 206 | CONFIG_SYS_PCIE1_PHYS_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 207 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 208 | { CONFIG_SYS_PCIE2_PHYS_ADDR, CONFIG_SYS_PCIE2_PHYS_ADDR, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 209 | CONFIG_SYS_PCIE2_PHYS_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 210 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 211 | { CONFIG_SYS_PCIE3_PHYS_ADDR, CONFIG_SYS_PCIE3_PHYS_ADDR, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 212 | CONFIG_SYS_PCIE3_PHYS_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 213 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
York Sun | cbe8e1c | 2016-04-04 11:41:26 -0700 | [diff] [blame] | 214 | #ifdef CONFIG_LS2080A |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 215 | { CONFIG_SYS_PCIE4_PHYS_ADDR, CONFIG_SYS_PCIE4_PHYS_ADDR, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 216 | CONFIG_SYS_PCIE4_PHYS_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 217 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 218 | #endif |
| 219 | { CONFIG_SYS_FSL_WRIOP1_BASE, CONFIG_SYS_FSL_WRIOP1_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 220 | CONFIG_SYS_FSL_WRIOP1_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 221 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 222 | { CONFIG_SYS_FSL_AIOP1_BASE, CONFIG_SYS_FSL_AIOP1_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 223 | CONFIG_SYS_FSL_AIOP1_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 224 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 225 | { CONFIG_SYS_FSL_PEBUF_BASE, CONFIG_SYS_FSL_PEBUF_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 226 | CONFIG_SYS_FSL_PEBUF_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 227 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 228 | { CONFIG_SYS_FSL_DRAM_BASE2, CONFIG_SYS_FSL_DRAM_BASE2, |
York Sun | 0804d56 | 2015-12-04 11:57:08 -0800 | [diff] [blame] | 229 | CONFIG_SYS_FSL_DRAM_SIZE2, MT_NORMAL, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 230 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 231 | #elif defined(CONFIG_FSL_LSCH2) |
| 232 | { CONFIG_SYS_FSL_BOOTROM_BASE, CONFIG_SYS_FSL_BOOTROM_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 233 | CONFIG_SYS_FSL_BOOTROM_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 234 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 235 | { CONFIG_SYS_FSL_CCSR_BASE, CONFIG_SYS_FSL_CCSR_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 236 | CONFIG_SYS_FSL_CCSR_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 237 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 238 | { CONFIG_SYS_FSL_OCRAM_BASE, CONFIG_SYS_FSL_OCRAM_BASE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 239 | CONFIG_SYS_FSL_OCRAM_SIZE, MT_NORMAL, PTE_BLOCK_NON_SHARE }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 240 | { CONFIG_SYS_FSL_DCSR_BASE, CONFIG_SYS_FSL_DCSR_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 241 | CONFIG_SYS_FSL_DCSR_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 242 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 243 | { CONFIG_SYS_FSL_QSPI_BASE, CONFIG_SYS_FSL_QSPI_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 244 | CONFIG_SYS_FSL_QSPI_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 245 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 246 | { CONFIG_SYS_FSL_IFC_BASE, CONFIG_SYS_FSL_IFC_BASE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 247 | CONFIG_SYS_FSL_IFC_SIZE, MT_DEVICE_NGNRNE, PTE_BLOCK_NON_SHARE }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 248 | { CONFIG_SYS_FSL_DRAM_BASE1, CONFIG_SYS_FSL_DRAM_BASE1, |
| 249 | CONFIG_SYS_FSL_DRAM_SIZE1, MT_NORMAL, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 250 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 251 | { CONFIG_SYS_FSL_QBMAN_BASE, CONFIG_SYS_FSL_QBMAN_BASE, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 252 | CONFIG_SYS_FSL_QBMAN_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 253 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 254 | { CONFIG_SYS_FSL_DRAM_BASE2, CONFIG_SYS_FSL_DRAM_BASE2, |
Ed Swarthout | 2cfcf19 | 2016-03-28 16:16:01 -0500 | [diff] [blame] | 255 | CONFIG_SYS_FSL_DRAM_SIZE2, MT_NORMAL, |
| 256 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 257 | { CONFIG_SYS_PCIE1_PHYS_ADDR, CONFIG_SYS_PCIE1_PHYS_ADDR, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 258 | CONFIG_SYS_PCIE1_PHYS_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 259 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 260 | { CONFIG_SYS_PCIE2_PHYS_ADDR, CONFIG_SYS_PCIE2_PHYS_ADDR, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 261 | CONFIG_SYS_PCIE2_PHYS_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 262 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 263 | { CONFIG_SYS_PCIE3_PHYS_ADDR, CONFIG_SYS_PCIE3_PHYS_ADDR, |
Alison Wang | e28e18c | 2015-11-05 11:15:49 +0800 | [diff] [blame] | 264 | CONFIG_SYS_PCIE3_PHYS_SIZE, MT_DEVICE_NGNRNE, |
Alexander Graf | ce0a64e | 2016-03-04 01:09:54 +0100 | [diff] [blame] | 265 | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN | PTE_BLOCK_UXN }, |
Mingkai Hu | e4e93ea | 2015-10-26 19:47:51 +0800 | [diff] [blame] | 266 | { CONFIG_SYS_FSL_DRAM_BASE3, CONFIG_SYS_FSL_DRAM_BASE3, |
Ed Swarthout | 2cfcf19 | 2016-03-28 16:16:01 -0500 | [diff] [blame] | 267 | CONFIG_SYS_FSL_DRAM_SIZE3, MT_NORMAL, |
| 268 | PTE_BLOCK_OUTER_SHARE | PTE_BLOCK_NS }, |
Mingkai Hu | 0e58b51 | 2015-10-26 19:47:50 +0800 | [diff] [blame] | 269 | #endif |
| 270 | }; |
| 271 | #endif |
| 272 | |
| 273 | int fsl_qoriq_core_to_cluster(unsigned int core); |
| 274 | u32 cpu_mask(void); |
| 275 | #endif /* _FSL_LAYERSCAPE_CPU_H */ |