2012-05-16 14:44:58 +08:00
|
|
|
/*
|
|
|
|
* Emma Mobile EV2 processor support
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 Magnus Damm
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
2013-11-07 07:21:11 +08:00
|
|
|
#include <linux/clk-provider.h>
|
2012-05-16 14:44:58 +08:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/init.h>
|
2012-05-16 14:45:54 +08:00
|
|
|
#include <linux/of_platform.h>
|
2012-05-16 14:44:58 +08:00
|
|
|
#include <mach/common.h>
|
|
|
|
#include <mach/emev2.h>
|
|
|
|
#include <asm/mach-types.h>
|
|
|
|
#include <asm/mach/arch.h>
|
|
|
|
#include <asm/mach/map.h>
|
|
|
|
|
2012-05-16 14:45:25 +08:00
|
|
|
static struct map_desc emev2_io_desc[] __initdata = {
|
|
|
|
#ifdef CONFIG_SMP
|
|
|
|
/* 2M mapping for SCU + L2 controller */
|
|
|
|
{
|
|
|
|
.virtual = 0xf0000000,
|
|
|
|
.pfn = __phys_to_pfn(0x1e000000),
|
|
|
|
.length = SZ_2M,
|
|
|
|
.type = MT_DEVICE
|
|
|
|
},
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
void __init emev2_map_io(void)
|
|
|
|
{
|
|
|
|
iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc));
|
|
|
|
}
|
|
|
|
|
2013-07-02 17:27:33 +08:00
|
|
|
void __init emev2_init_delay(void)
|
2012-05-16 14:44:58 +08:00
|
|
|
{
|
|
|
|
shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */
|
2012-05-16 14:45:54 +08:00
|
|
|
}
|
|
|
|
|
2013-11-07 07:21:11 +08:00
|
|
|
static void __init emev2_add_standard_devices_dt(void)
|
|
|
|
{
|
|
|
|
#ifdef CONFIG_COMMON_CLK
|
|
|
|
of_clk_init(NULL);
|
|
|
|
#else
|
|
|
|
emev2_clock_init();
|
|
|
|
#endif
|
|
|
|
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
|
|
|
}
|
|
|
|
|
2013-12-27 11:14:08 +08:00
|
|
|
static const char *emev2_boards_compat_dt[] __initconst = {
|
2012-05-16 14:45:54 +08:00
|
|
|
"renesas,emev2",
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
|
2011-09-08 20:15:22 +08:00
|
|
|
.smp = smp_ops(emev2_smp_ops),
|
2013-07-02 17:28:22 +08:00
|
|
|
.map_io = emev2_map_io,
|
2012-05-16 14:45:54 +08:00
|
|
|
.init_early = emev2_init_delay,
|
2013-11-07 07:21:11 +08:00
|
|
|
.init_machine = emev2_add_standard_devices_dt,
|
2013-11-07 07:21:20 +08:00
|
|
|
.init_late = shmobile_init_late,
|
2012-05-16 14:45:54 +08:00
|
|
|
.dt_compat = emev2_boards_compat_dt,
|
|
|
|
MACHINE_END
|