Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Versatile Express V2M Motherboard Support |
| 3 | */ |
| 4 | #include <linux/device.h> |
| 5 | #include <linux/amba/bus.h> |
| 6 | #include <linux/amba/mmci.h> |
| 7 | #include <linux/io.h> |
Marc Zyngier | 3695adc | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 8 | #include <linux/smp.h> |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 9 | #include <linux/init.h> |
Pawel Moll | 8deed17 | 2012-02-23 13:04:51 +0000 | [diff] [blame] | 10 | #include <linux/of_address.h> |
| 11 | #include <linux/of_fdt.h> |
| 12 | #include <linux/of_irq.h> |
| 13 | #include <linux/of_platform.h> |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 14 | #include <linux/platform_device.h> |
Nick Bowler | 95c34f8 | 2011-01-21 15:51:06 +0100 | [diff] [blame] | 15 | #include <linux/ata_platform.h> |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 16 | #include <linux/smsc911x.h> |
| 17 | #include <linux/spinlock.h> |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 18 | #include <linux/usb/isp1760.h> |
Marc Zyngier | 0f71fd4 | 2011-05-18 10:51:51 +0100 | [diff] [blame] | 19 | #include <linux/mtd/physmap.h> |
Pawel Moll | b2a54ff | 2012-07-09 11:33:47 +0100 | [diff] [blame] | 20 | #include <linux/regulator/fixed.h> |
| 21 | #include <linux/regulator/machine.h> |
Pawel Moll | 38669e0 | 2012-10-09 12:56:36 +0100 | [diff] [blame] | 22 | #include <linux/vexpress.h> |
Pawel Moll | 6e973d2 | 2013-04-18 18:23:22 +0100 | [diff] [blame] | 23 | #include <linux/clkdev.h> |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 24 | |
Will Deacon | 80b5efbd | 2011-02-28 17:01:04 +0100 | [diff] [blame] | 25 | #include <asm/mach-types.h> |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 26 | #include <asm/sizes.h> |
Will Deacon | 80b5efbd | 2011-02-28 17:01:04 +0100 | [diff] [blame] | 27 | #include <asm/mach/arch.h> |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 28 | #include <asm/mach/map.h> |
| 29 | #include <asm/mach/time.h> |
| 30 | #include <asm/hardware/arm_timer.h> |
Pawel Moll | 8deed17 | 2012-02-23 13:04:51 +0000 | [diff] [blame] | 31 | #include <asm/hardware/cache-l2x0.h> |
Russell King | 58daf18 | 2011-01-05 18:09:03 +0000 | [diff] [blame] | 32 | #include <asm/hardware/timer-sp.h> |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 33 | |
Will Deacon | 80b5efbd | 2011-02-28 17:01:04 +0100 | [diff] [blame] | 34 | #include <mach/ct-ca9x4.h> |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 35 | #include <mach/motherboard.h> |
| 36 | |
Russell King | 0af85dd | 2010-12-15 21:58:50 +0000 | [diff] [blame] | 37 | #include <plat/sched_clock.h> |
Marc Zyngier | 3695adc | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 38 | #include <plat/platsmp.h> |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 39 | |
| 40 | #include "core.h" |
| 41 | |
| 42 | #define V2M_PA_CS0 0x40000000 |
| 43 | #define V2M_PA_CS1 0x44000000 |
| 44 | #define V2M_PA_CS2 0x48000000 |
| 45 | #define V2M_PA_CS3 0x4c000000 |
| 46 | #define V2M_PA_CS7 0x10000000 |
| 47 | |
| 48 | static struct map_desc v2m_io_desc[] __initdata = { |
| 49 | { |
Pawel Moll | 98ed4ce | 2012-01-25 15:37:29 +0000 | [diff] [blame] | 50 | .virtual = V2M_PERIPH, |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 51 | .pfn = __phys_to_pfn(V2M_PA_CS7), |
| 52 | .length = SZ_128K, |
| 53 | .type = MT_DEVICE, |
| 54 | }, |
| 55 | }; |
| 56 | |
Pawel Moll | 98ed4ce | 2012-01-25 15:37:29 +0000 | [diff] [blame] | 57 | static void __init v2m_sp804_init(void __iomem *base, unsigned int irq) |
| 58 | { |
| 59 | if (WARN_ON(!base || irq == NO_IRQ)) |
| 60 | return; |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 61 | |
Pawel Moll | 98ed4ce | 2012-01-25 15:37:29 +0000 | [diff] [blame] | 62 | sp804_clocksource_init(base + TIMER_2_BASE, "v2m-timer1"); |
| 63 | sp804_clockevents_init(base + TIMER_1_BASE, irq, "v2m-timer0"); |
| 64 | } |
| 65 | |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 66 | |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 67 | static struct resource v2m_pcie_i2c_resource = { |
| 68 | .start = V2M_SERIAL_BUS_PCI, |
| 69 | .end = V2M_SERIAL_BUS_PCI + SZ_4K - 1, |
| 70 | .flags = IORESOURCE_MEM, |
| 71 | }; |
| 72 | |
| 73 | static struct platform_device v2m_pcie_i2c_device = { |
| 74 | .name = "versatile-i2c", |
| 75 | .id = 0, |
| 76 | .num_resources = 1, |
| 77 | .resource = &v2m_pcie_i2c_resource, |
| 78 | }; |
| 79 | |
| 80 | static struct resource v2m_ddc_i2c_resource = { |
| 81 | .start = V2M_SERIAL_BUS_DVI, |
| 82 | .end = V2M_SERIAL_BUS_DVI + SZ_4K - 1, |
| 83 | .flags = IORESOURCE_MEM, |
| 84 | }; |
| 85 | |
| 86 | static struct platform_device v2m_ddc_i2c_device = { |
| 87 | .name = "versatile-i2c", |
| 88 | .id = 1, |
| 89 | .num_resources = 1, |
| 90 | .resource = &v2m_ddc_i2c_resource, |
| 91 | }; |
| 92 | |
| 93 | static struct resource v2m_eth_resources[] = { |
| 94 | { |
| 95 | .start = V2M_LAN9118, |
| 96 | .end = V2M_LAN9118 + SZ_64K - 1, |
| 97 | .flags = IORESOURCE_MEM, |
| 98 | }, { |
| 99 | .start = IRQ_V2M_LAN9118, |
| 100 | .end = IRQ_V2M_LAN9118, |
| 101 | .flags = IORESOURCE_IRQ, |
| 102 | }, |
| 103 | }; |
| 104 | |
| 105 | static struct smsc911x_platform_config v2m_eth_config = { |
| 106 | .flags = SMSC911X_USE_32BIT, |
| 107 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, |
| 108 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, |
| 109 | .phy_interface = PHY_INTERFACE_MODE_MII, |
| 110 | }; |
| 111 | |
| 112 | static struct platform_device v2m_eth_device = { |
| 113 | .name = "smsc911x", |
| 114 | .id = -1, |
| 115 | .resource = v2m_eth_resources, |
| 116 | .num_resources = ARRAY_SIZE(v2m_eth_resources), |
| 117 | .dev.platform_data = &v2m_eth_config, |
| 118 | }; |
| 119 | |
Pawel Moll | b2a54ff | 2012-07-09 11:33:47 +0100 | [diff] [blame] | 120 | static struct regulator_consumer_supply v2m_eth_supplies[] = { |
| 121 | REGULATOR_SUPPLY("vddvario", "smsc911x"), |
| 122 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), |
| 123 | }; |
| 124 | |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 125 | static struct resource v2m_usb_resources[] = { |
| 126 | { |
| 127 | .start = V2M_ISP1761, |
| 128 | .end = V2M_ISP1761 + SZ_128K - 1, |
| 129 | .flags = IORESOURCE_MEM, |
| 130 | }, { |
| 131 | .start = IRQ_V2M_ISP1761, |
| 132 | .end = IRQ_V2M_ISP1761, |
| 133 | .flags = IORESOURCE_IRQ, |
| 134 | }, |
| 135 | }; |
| 136 | |
| 137 | static struct isp1760_platform_data v2m_usb_config = { |
| 138 | .is_isp1761 = true, |
| 139 | .bus_width_16 = false, |
| 140 | .port1_otg = true, |
| 141 | .analog_oc = false, |
| 142 | .dack_polarity_high = false, |
| 143 | .dreq_polarity_high = false, |
| 144 | }; |
| 145 | |
| 146 | static struct platform_device v2m_usb_device = { |
| 147 | .name = "isp1760", |
| 148 | .id = -1, |
| 149 | .resource = v2m_usb_resources, |
| 150 | .num_resources = ARRAY_SIZE(v2m_usb_resources), |
| 151 | .dev.platform_data = &v2m_usb_config, |
| 152 | }; |
| 153 | |
Marc Zyngier | 0f71fd4 | 2011-05-18 10:51:51 +0100 | [diff] [blame] | 154 | static struct physmap_flash_data v2m_flash_data = { |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 155 | .width = 4, |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 156 | }; |
| 157 | |
| 158 | static struct resource v2m_flash_resources[] = { |
| 159 | { |
| 160 | .start = V2M_NOR0, |
| 161 | .end = V2M_NOR0 + SZ_64M - 1, |
| 162 | .flags = IORESOURCE_MEM, |
| 163 | }, { |
| 164 | .start = V2M_NOR1, |
| 165 | .end = V2M_NOR1 + SZ_64M - 1, |
| 166 | .flags = IORESOURCE_MEM, |
| 167 | }, |
| 168 | }; |
| 169 | |
| 170 | static struct platform_device v2m_flash_device = { |
Marc Zyngier | 0f71fd4 | 2011-05-18 10:51:51 +0100 | [diff] [blame] | 171 | .name = "physmap-flash", |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 172 | .id = -1, |
| 173 | .resource = v2m_flash_resources, |
| 174 | .num_resources = ARRAY_SIZE(v2m_flash_resources), |
| 175 | .dev.platform_data = &v2m_flash_data, |
| 176 | }; |
| 177 | |
Nick Bowler | 95c34f8 | 2011-01-21 15:51:06 +0100 | [diff] [blame] | 178 | static struct pata_platform_info v2m_pata_data = { |
| 179 | .ioport_shift = 2, |
| 180 | }; |
| 181 | |
| 182 | static struct resource v2m_pata_resources[] = { |
| 183 | { |
| 184 | .start = V2M_CF, |
| 185 | .end = V2M_CF + 0xff, |
| 186 | .flags = IORESOURCE_MEM, |
| 187 | }, { |
| 188 | .start = V2M_CF + 0x100, |
| 189 | .end = V2M_CF + SZ_4K - 1, |
| 190 | .flags = IORESOURCE_MEM, |
| 191 | }, |
| 192 | }; |
| 193 | |
| 194 | static struct platform_device v2m_cf_device = { |
| 195 | .name = "pata_platform", |
| 196 | .id = -1, |
| 197 | .resource = v2m_pata_resources, |
| 198 | .num_resources = ARRAY_SIZE(v2m_pata_resources), |
| 199 | .dev.platform_data = &v2m_pata_data, |
| 200 | }; |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 201 | |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 202 | static struct mmci_platform_data v2m_mmci_data = { |
| 203 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
Pawel Moll | 974cc7b | 2014-04-23 10:49:31 +0100 | [diff] [blame] | 204 | .status = vexpress_get_mci_cardin, |
| 205 | .gpio_cd = -1, |
| 206 | .gpio_wp = -1, |
Pawel Moll | 38669e0 | 2012-10-09 12:56:36 +0100 | [diff] [blame] | 207 | }; |
| 208 | |
| 209 | static struct resource v2m_sysreg_resources[] = { |
| 210 | { |
| 211 | .start = V2M_SYSREGS, |
| 212 | .end = V2M_SYSREGS + 0xfff, |
| 213 | .flags = IORESOURCE_MEM, |
| 214 | }, |
| 215 | }; |
| 216 | |
| 217 | static struct platform_device v2m_sysreg_device = { |
| 218 | .name = "vexpress-sysreg", |
| 219 | .id = -1, |
| 220 | .resource = v2m_sysreg_resources, |
| 221 | .num_resources = ARRAY_SIZE(v2m_sysreg_resources), |
| 222 | }; |
| 223 | |
| 224 | static struct platform_device v2m_muxfpga_device = { |
| 225 | .name = "vexpress-muxfpga", |
| 226 | .id = 0, |
| 227 | .num_resources = 1, |
| 228 | .resource = (struct resource []) { |
| 229 | VEXPRESS_RES_FUNC(0, 7), |
| 230 | } |
| 231 | }; |
| 232 | |
| 233 | static struct platform_device v2m_shutdown_device = { |
| 234 | .name = "vexpress-shutdown", |
| 235 | .id = 0, |
| 236 | .num_resources = 1, |
| 237 | .resource = (struct resource []) { |
| 238 | VEXPRESS_RES_FUNC(0, 8), |
| 239 | } |
| 240 | }; |
| 241 | |
| 242 | static struct platform_device v2m_reboot_device = { |
| 243 | .name = "vexpress-reboot", |
| 244 | .id = 0, |
| 245 | .num_resources = 1, |
| 246 | .resource = (struct resource []) { |
| 247 | VEXPRESS_RES_FUNC(0, 9), |
| 248 | } |
| 249 | }; |
| 250 | |
| 251 | static struct platform_device v2m_dvimode_device = { |
| 252 | .name = "vexpress-dvimode", |
| 253 | .id = 0, |
| 254 | .num_resources = 1, |
| 255 | .resource = (struct resource []) { |
| 256 | VEXPRESS_RES_FUNC(0, 11), |
| 257 | } |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 258 | }; |
| 259 | |
Russell King | cdd4e1a | 2011-12-18 12:07:09 +0000 | [diff] [blame] | 260 | static AMBA_APB_DEVICE(aaci, "mb:aaci", 0, V2M_AACI, IRQ_V2M_AACI, NULL); |
| 261 | static AMBA_APB_DEVICE(mmci, "mb:mmci", 0, V2M_MMCI, IRQ_V2M_MMCI, &v2m_mmci_data); |
| 262 | static AMBA_APB_DEVICE(kmi0, "mb:kmi0", 0, V2M_KMI0, IRQ_V2M_KMI0, NULL); |
| 263 | static AMBA_APB_DEVICE(kmi1, "mb:kmi1", 0, V2M_KMI1, IRQ_V2M_KMI1, NULL); |
| 264 | static AMBA_APB_DEVICE(uart0, "mb:uart0", 0, V2M_UART0, IRQ_V2M_UART0, NULL); |
| 265 | static AMBA_APB_DEVICE(uart1, "mb:uart1", 0, V2M_UART1, IRQ_V2M_UART1, NULL); |
| 266 | static AMBA_APB_DEVICE(uart2, "mb:uart2", 0, V2M_UART2, IRQ_V2M_UART2, NULL); |
| 267 | static AMBA_APB_DEVICE(uart3, "mb:uart3", 0, V2M_UART3, IRQ_V2M_UART3, NULL); |
| 268 | static AMBA_APB_DEVICE(wdt, "mb:wdt", 0, V2M_WDT, IRQ_V2M_WDT, NULL); |
| 269 | static AMBA_APB_DEVICE(rtc, "mb:rtc", 0, V2M_RTC, IRQ_V2M_RTC, NULL); |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 270 | |
| 271 | static struct amba_device *v2m_amba_devs[] __initdata = { |
| 272 | &aaci_device, |
| 273 | &mmci_device, |
| 274 | &kmi0_device, |
| 275 | &kmi1_device, |
| 276 | &uart0_device, |
| 277 | &uart1_device, |
| 278 | &uart2_device, |
| 279 | &uart3_device, |
| 280 | &wdt_device, |
| 281 | &rtc_device, |
| 282 | }; |
| 283 | |
Pawel Moll | d1b8a77 | 2012-07-13 11:48:16 +0100 | [diff] [blame] | 284 | static void __init v2m_timer_init(void) |
| 285 | { |
Pawel Moll | 38669e0 | 2012-10-09 12:56:36 +0100 | [diff] [blame] | 286 | vexpress_clk_init(ioremap(V2M_SYSCTL, SZ_4K)); |
Pawel Moll | d1b8a77 | 2012-07-13 11:48:16 +0100 | [diff] [blame] | 287 | v2m_sp804_init(ioremap(V2M_TIMER01, SZ_4K), IRQ_V2M_TIMER0); |
| 288 | } |
| 289 | |
Rob Herring | 2fdf999 | 2011-05-30 19:44:22 +0100 | [diff] [blame] | 290 | static void __init v2m_init_early(void) |
| 291 | { |
Pawel Moll | d1b8a77 | 2012-07-13 11:48:16 +0100 | [diff] [blame] | 292 | if (ct_desc->init_early) |
| 293 | ct_desc->init_early(); |
Pawel Moll | 38669e0 | 2012-10-09 12:56:36 +0100 | [diff] [blame] | 294 | versatile_sched_clock_init(vexpress_get_24mhz_clock_base(), 24000000); |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 295 | } |
| 296 | |
Will Deacon | 80b5efbd | 2011-02-28 17:01:04 +0100 | [diff] [blame] | 297 | struct ct_desc *ct_desc; |
| 298 | |
| 299 | static struct ct_desc *ct_descs[] __initdata = { |
| 300 | #ifdef CONFIG_ARCH_VEXPRESS_CA9X4 |
| 301 | &ct_ca9x4_desc, |
| 302 | #endif |
| 303 | }; |
| 304 | |
| 305 | static void __init v2m_populate_ct_desc(void) |
| 306 | { |
| 307 | int i; |
| 308 | u32 current_tile_id; |
| 309 | |
| 310 | ct_desc = NULL; |
Pawel Moll | 38669e0 | 2012-10-09 12:56:36 +0100 | [diff] [blame] | 311 | current_tile_id = vexpress_get_procid(VEXPRESS_SITE_MASTER) |
Pawel Moll | 98ed4ce | 2012-01-25 15:37:29 +0000 | [diff] [blame] | 312 | & V2M_CT_ID_MASK; |
Will Deacon | 80b5efbd | 2011-02-28 17:01:04 +0100 | [diff] [blame] | 313 | |
| 314 | for (i = 0; i < ARRAY_SIZE(ct_descs) && !ct_desc; ++i) |
| 315 | if (ct_descs[i]->id == current_tile_id) |
| 316 | ct_desc = ct_descs[i]; |
| 317 | |
| 318 | if (!ct_desc) |
Pawel Moll | 8deed17 | 2012-02-23 13:04:51 +0000 | [diff] [blame] | 319 | panic("vexpress: this kernel does not support core tile ID 0x%08x when booting via ATAGs.\n" |
| 320 | "You may need a device tree blob or a different kernel to boot on this board.\n", |
| 321 | current_tile_id); |
Will Deacon | 80b5efbd | 2011-02-28 17:01:04 +0100 | [diff] [blame] | 322 | } |
| 323 | |
| 324 | static void __init v2m_map_io(void) |
| 325 | { |
| 326 | iotable_init(v2m_io_desc, ARRAY_SIZE(v2m_io_desc)); |
Pawel Moll | 38669e0 | 2012-10-09 12:56:36 +0100 | [diff] [blame] | 327 | vexpress_sysreg_early_init(ioremap(V2M_SYSREGS, SZ_4K)); |
Will Deacon | 80b5efbd | 2011-02-28 17:01:04 +0100 | [diff] [blame] | 328 | v2m_populate_ct_desc(); |
| 329 | ct_desc->map_io(); |
| 330 | } |
| 331 | |
| 332 | static void __init v2m_init_irq(void) |
| 333 | { |
| 334 | ct_desc->init_irq(); |
| 335 | } |
| 336 | |
| 337 | static void __init v2m_init(void) |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 338 | { |
| 339 | int i; |
| 340 | |
Pawel Moll | b2a54ff | 2012-07-09 11:33:47 +0100 | [diff] [blame] | 341 | regulator_register_fixed(0, v2m_eth_supplies, |
| 342 | ARRAY_SIZE(v2m_eth_supplies)); |
| 343 | |
Pawel Moll | 38669e0 | 2012-10-09 12:56:36 +0100 | [diff] [blame] | 344 | platform_device_register(&v2m_sysreg_device); |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 345 | platform_device_register(&v2m_pcie_i2c_device); |
| 346 | platform_device_register(&v2m_ddc_i2c_device); |
| 347 | platform_device_register(&v2m_flash_device); |
Nick Bowler | 95c34f8 | 2011-01-21 15:51:06 +0100 | [diff] [blame] | 348 | platform_device_register(&v2m_cf_device); |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 349 | platform_device_register(&v2m_eth_device); |
| 350 | platform_device_register(&v2m_usb_device); |
| 351 | |
| 352 | for (i = 0; i < ARRAY_SIZE(v2m_amba_devs); i++) |
| 353 | amba_device_register(v2m_amba_devs[i], &iomem_resource); |
| 354 | |
Pawel Moll | 974cc7b | 2014-04-23 10:49:31 +0100 | [diff] [blame] | 355 | vexpress_syscfg_device_register(&v2m_muxfpga_device); |
| 356 | vexpress_syscfg_device_register(&v2m_shutdown_device); |
| 357 | vexpress_syscfg_device_register(&v2m_reboot_device); |
| 358 | vexpress_syscfg_device_register(&v2m_dvimode_device); |
Pawel Moll | 3b9334a | 2014-04-30 16:46:29 +0100 | [diff] [blame] | 359 | |
Will Deacon | 80b5efbd | 2011-02-28 17:01:04 +0100 | [diff] [blame] | 360 | ct_desc->init_tile(); |
Russell King | ceade89 | 2010-02-11 21:44:53 +0000 | [diff] [blame] | 361 | } |
Will Deacon | 80b5efbd | 2011-02-28 17:01:04 +0100 | [diff] [blame] | 362 | |
| 363 | MACHINE_START(VEXPRESS, "ARM-Versatile Express") |
Nicolas Pitre | e9ce8e5 | 2011-07-05 22:38:18 -0400 | [diff] [blame] | 364 | .atag_offset = 0x100, |
Marc Zyngier | 3695adc | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 365 | .smp = smp_ops(vexpress_smp_ops), |
Will Deacon | 80b5efbd | 2011-02-28 17:01:04 +0100 | [diff] [blame] | 366 | .map_io = v2m_map_io, |
| 367 | .init_early = v2m_init_early, |
| 368 | .init_irq = v2m_init_irq, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 369 | .init_time = v2m_timer_init, |
Will Deacon | 80b5efbd | 2011-02-28 17:01:04 +0100 | [diff] [blame] | 370 | .init_machine = v2m_init, |
| 371 | MACHINE_END |
Pawel Moll | 8deed17 | 2012-02-23 13:04:51 +0000 | [diff] [blame] | 372 | |
Pawel Moll | 8deed17 | 2012-02-23 13:04:51 +0000 | [diff] [blame] | 373 | static void __init v2m_dt_init(void) |
| 374 | { |
Pawel Moll | 3b9334a | 2014-04-30 16:46:29 +0100 | [diff] [blame] | 375 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
Pawel Moll | 8deed17 | 2012-02-23 13:04:51 +0000 | [diff] [blame] | 376 | } |
| 377 | |
Pawel Moll | 38669e0 | 2012-10-09 12:56:36 +0100 | [diff] [blame] | 378 | static const char * const v2m_dt_match[] __initconst = { |
Pawel Moll | 8deed17 | 2012-02-23 13:04:51 +0000 | [diff] [blame] | 379 | "arm,vexpress", |
| 380 | NULL, |
| 381 | }; |
| 382 | |
| 383 | DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express") |
| 384 | .dt_compat = v2m_dt_match, |
Russell King | b28dd4a | 2014-04-28 15:43:12 +0100 | [diff] [blame] | 385 | .l2c_aux_val = 0x00400000, |
| 386 | .l2c_aux_mask = 0xfe0fffff, |
Pawel Moll | d2606f8 | 2013-09-17 18:30:58 +0100 | [diff] [blame] | 387 | .smp = smp_ops(vexpress_smp_dt_ops), |
Jon Medhurst | 033a899 | 2013-01-30 09:12:55 +0000 | [diff] [blame] | 388 | .smp_init = smp_init_ops(vexpress_smp_init_ops), |
Pawel Moll | 8deed17 | 2012-02-23 13:04:51 +0000 | [diff] [blame] | 389 | .init_machine = v2m_dt_init, |
Pawel Moll | 8deed17 | 2012-02-23 13:04:51 +0000 | [diff] [blame] | 390 | MACHINE_END |