Viresh Kumar | e3978dc | 2012-04-19 22:23:13 +0530 | [diff] [blame] | 1 | /* |
| 2 | * arch/arm/mach-spear13xx/spear1310.c |
| 3 | * |
| 4 | * SPEAr1310 machine source file |
| 5 | * |
| 6 | * Copyright (C) 2012 ST Microelectronics |
Viresh Kumar | da89947 | 2015-07-17 16:23:50 -0700 | [diff] [blame] | 7 | * Viresh Kumar <vireshk@kernel.org> |
Viresh Kumar | e3978dc | 2012-04-19 22:23:13 +0530 | [diff] [blame] | 8 | * |
| 9 | * This file is licensed under the terms of the GNU General Public |
| 10 | * License version 2. This program is licensed "as is" without any |
| 11 | * warranty of any kind, whether express or implied. |
| 12 | */ |
| 13 | |
| 14 | #define pr_fmt(fmt) "SPEAr1310: " fmt |
| 15 | |
| 16 | #include <linux/amba/pl022.h> |
| 17 | #include <linux/of_platform.h> |
Vipul Kumar Samar | 300a685 | 2012-10-15 17:55:58 +0530 | [diff] [blame] | 18 | #include <linux/pata_arasan_cf_data.h> |
Viresh Kumar | e3978dc | 2012-04-19 22:23:13 +0530 | [diff] [blame] | 19 | #include <asm/mach/arch.h> |
| 20 | #include <asm/mach/map.h> |
Arnd Bergmann | 2b9c613 | 2012-12-02 15:49:04 +0100 | [diff] [blame] | 21 | #include "generic.h" |
Viresh Kumar | e3978dc | 2012-04-19 22:23:13 +0530 | [diff] [blame] | 22 | #include <mach/spear.h> |
| 23 | |
| 24 | /* Base addresses */ |
Vipul Kumar Samar | 07e812a | 2012-10-17 12:08:26 +0530 | [diff] [blame] | 25 | #define SPEAR1310_RAS_GRP1_BASE UL(0xD8000000) |
| 26 | #define VA_SPEAR1310_RAS_GRP1_BASE UL(0xFA000000) |
Vipul Kumar Samar | 07e812a | 2012-10-17 12:08:26 +0530 | [diff] [blame] | 27 | |
Viresh Kumar | e3978dc | 2012-04-19 22:23:13 +0530 | [diff] [blame] | 28 | static void __init spear1310_dt_init(void) |
| 29 | { |
Arnd Bergmann | 6e8887f6 | 2013-01-28 21:48:47 +0000 | [diff] [blame] | 30 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
Viresh Kumar | 2449d33 | 2014-03-10 15:43:18 +0530 | [diff] [blame] | 31 | platform_device_register_simple("spear-cpufreq", -1, NULL, 0); |
Viresh Kumar | e3978dc | 2012-04-19 22:23:13 +0530 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | static const char * const spear1310_dt_board_compat[] = { |
| 35 | "st,spear1310", |
| 36 | "st,spear1310-evb", |
| 37 | NULL, |
| 38 | }; |
| 39 | |
| 40 | /* |
| 41 | * Following will create 16MB static virtual/physical mappings |
| 42 | * PHYSICAL VIRTUAL |
| 43 | * 0xD8000000 0xFA000000 |
| 44 | */ |
Sachin Kamat | 17681ff | 2014-06-24 17:13:54 +0530 | [diff] [blame] | 45 | static struct map_desc spear1310_io_desc[] __initdata = { |
Viresh Kumar | e3978dc | 2012-04-19 22:23:13 +0530 | [diff] [blame] | 46 | { |
| 47 | .virtual = VA_SPEAR1310_RAS_GRP1_BASE, |
| 48 | .pfn = __phys_to_pfn(SPEAR1310_RAS_GRP1_BASE), |
| 49 | .length = SZ_16M, |
| 50 | .type = MT_DEVICE |
| 51 | }, |
| 52 | }; |
| 53 | |
| 54 | static void __init spear1310_map_io(void) |
| 55 | { |
| 56 | iotable_init(spear1310_io_desc, ARRAY_SIZE(spear1310_io_desc)); |
| 57 | spear13xx_map_io(); |
| 58 | } |
| 59 | |
| 60 | DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree") |
Arnd Bergmann | 2d8b21d | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 61 | .smp = smp_ops(spear13xx_smp_ops), |
Viresh Kumar | e3978dc | 2012-04-19 22:23:13 +0530 | [diff] [blame] | 62 | .map_io = spear1310_map_io, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 63 | .init_time = spear13xx_timer_init, |
Viresh Kumar | e3978dc | 2012-04-19 22:23:13 +0530 | [diff] [blame] | 64 | .init_machine = spear1310_dt_init, |
| 65 | .restart = spear_restart, |
| 66 | .dt_compat = spear1310_dt_board_compat, |
| 67 | MACHINE_END |