2012-04-20 00:53:13 +08:00
|
|
|
/*
|
|
|
|
* arch/arm/mach-spear13xx/spear1310.c
|
|
|
|
*
|
|
|
|
* SPEAr1310 machine source file
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 ST Microelectronics
|
2012-06-21 03:53:02 +08:00
|
|
|
* Viresh Kumar <viresh.linux@gmail.com>
|
2012-04-20 00:53:13 +08:00
|
|
|
*
|
|
|
|
* This file is licensed under the terms of the GNU General Public
|
|
|
|
* License version 2. This program is licensed "as is" without any
|
|
|
|
* warranty of any kind, whether express or implied.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define pr_fmt(fmt) "SPEAr1310: " fmt
|
|
|
|
|
|
|
|
#include <linux/amba/pl022.h>
|
|
|
|
#include <linux/of_platform.h>
|
2012-10-15 20:25:58 +08:00
|
|
|
#include <linux/pata_arasan_cf_data.h>
|
2012-04-20 00:53:13 +08:00
|
|
|
#include <asm/mach/arch.h>
|
|
|
|
#include <asm/mach/map.h>
|
2012-12-02 22:49:04 +08:00
|
|
|
#include "generic.h"
|
2012-04-20 00:53:13 +08:00
|
|
|
#include <mach/spear.h>
|
|
|
|
|
|
|
|
/* Base addresses */
|
2012-10-17 14:38:26 +08:00
|
|
|
#define SPEAR1310_RAS_GRP1_BASE UL(0xD8000000)
|
|
|
|
#define VA_SPEAR1310_RAS_GRP1_BASE UL(0xFA000000)
|
|
|
|
|
2012-04-20 00:53:13 +08:00
|
|
|
static void __init spear1310_dt_init(void)
|
|
|
|
{
|
2013-01-29 05:48:47 +08:00
|
|
|
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
2014-03-10 18:13:18 +08:00
|
|
|
platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
|
2012-04-20 00:53:13 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static const char * const spear1310_dt_board_compat[] = {
|
|
|
|
"st,spear1310",
|
|
|
|
"st,spear1310-evb",
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Following will create 16MB static virtual/physical mappings
|
|
|
|
* PHYSICAL VIRTUAL
|
|
|
|
* 0xD8000000 0xFA000000
|
|
|
|
*/
|
2014-06-24 19:43:54 +08:00
|
|
|
static struct map_desc spear1310_io_desc[] __initdata = {
|
2012-04-20 00:53:13 +08:00
|
|
|
{
|
|
|
|
.virtual = VA_SPEAR1310_RAS_GRP1_BASE,
|
|
|
|
.pfn = __phys_to_pfn(SPEAR1310_RAS_GRP1_BASE),
|
|
|
|
.length = SZ_16M,
|
|
|
|
.type = MT_DEVICE
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static void __init spear1310_map_io(void)
|
|
|
|
{
|
|
|
|
iotable_init(spear1310_io_desc, ARRAY_SIZE(spear1310_io_desc));
|
|
|
|
spear13xx_map_io();
|
|
|
|
}
|
|
|
|
|
|
|
|
DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree")
|
2011-09-08 20:15:22 +08:00
|
|
|
.smp = smp_ops(spear13xx_smp_ops),
|
2012-04-20 00:53:13 +08:00
|
|
|
.map_io = spear1310_map_io,
|
2012-11-09 03:40:59 +08:00
|
|
|
.init_time = spear13xx_timer_init,
|
2012-04-20 00:53:13 +08:00
|
|
|
.init_machine = spear1310_dt_init,
|
|
|
|
.restart = spear_restart,
|
|
|
|
.dt_compat = spear1310_dt_board_compat,
|
|
|
|
MACHINE_END
|