blob: 2e82e44ab85258b725c3d62c665ceb4e757fc2f9 [file] [log] [blame]
Simon Hormanb8b82b22012-11-22 00:34:25 +09001/*
2 * KZM-A9-GT board support - Reference Device Tree Implementation
3 *
4 * Copyright (C) 2012 Horms Solutions Ltd.
5 *
6 * Based on board-kzm9g.c
7 * Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; version 2 of the License.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
Simon Hormanb8b82b22012-11-22 00:34:25 +090017 */
18
19#include <linux/delay.h>
Simon Hormanb8b82b22012-11-22 00:34:25 +090020#include <linux/io.h>
21#include <linux/irq.h>
Simon Hormanb8b82b22012-11-22 00:34:25 +090022#include <linux/input.h>
23#include <linux/of_platform.h>
Geert Uytterhoevended59d62014-06-20 18:53:09 +020024
Simon Hormanb8b82b22012-11-22 00:34:25 +090025#include <asm/hardware/cache-l2x0.h>
26#include <asm/mach-types.h>
27#include <asm/mach/arch.h>
Geert Uytterhoevended59d62014-06-20 18:53:09 +020028
Magnus Dammfd44aa52014-06-17 16:47:37 +090029#include "common.h"
Geert Uytterhoevended59d62014-06-20 18:53:09 +020030#include "sh73a0.h"
Simon Hormanb8b82b22012-11-22 00:34:25 +090031
Simon Hormanb8b82b22012-11-22 00:34:25 +090032static void __init kzm_init(void)
33{
34 sh73a0_add_standard_devices_dt();
Guennadi Liakhovetskif017d012013-02-08 19:38:27 +010035
Simon Hormanb8b82b22012-11-22 00:34:25 +090036#ifdef CONFIG_CACHE_L2X0
Russell King36bccb12014-03-19 12:44:41 +000037 /* Shared attribute override enable, 64K*8way */
Russell King2edb89c2014-03-19 12:16:36 +000038 l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
Simon Hormanb8b82b22012-11-22 00:34:25 +090039#endif
40}
41
Geert Uytterhoeven534547c2014-11-07 14:46:32 +010042#define RESCNT2 IOMEM(0xe6188020)
43static void kzm9g_restart(enum reboot_mode mode, const char *cmd)
44{
45 /* Do soft power on reset */
46 writel((1 << 31), RESCNT2);
47}
48
Simon Hormanb8b82b22012-11-22 00:34:25 +090049static const char *kzm9g_boards_compat_dt[] __initdata = {
50 "renesas,kzm9g-reference",
51 NULL,
52};
53
Simon Hormanb8b82b22012-11-22 00:34:25 +090054DT_MACHINE_START(KZM9G_DT, "kzm9g-reference")
55 .smp = smp_ops(sh73a0_smp_ops),
56 .map_io = sh73a0_map_io,
Magnus Dammfc35ca22014-08-20 22:03:30 +090057 .init_early = shmobile_init_delay,
Simon Hormanb8b82b22012-11-22 00:34:25 +090058 .init_machine = kzm_init,
Magnus Dammeeed09e2014-07-31 08:32:24 +090059 .init_late = shmobile_init_late,
Geert Uytterhoeven534547c2014-11-07 14:46:32 +010060 .restart = kzm9g_restart,
Simon Hormanb8b82b22012-11-22 00:34:25 +090061 .dt_compat = kzm9g_boards_compat_dt,
62MACHINE_END