Simon Horman | b8b82b2 | 2012-11-22 00:34:25 +0900 | [diff] [blame] | 1 | /* |
| 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. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 21 | */ |
| 22 | |
| 23 | #include <linux/delay.h> |
Simon Horman | b8b82b2 | 2012-11-22 00:34:25 +0900 | [diff] [blame] | 24 | #include <linux/io.h> |
| 25 | #include <linux/irq.h> |
Simon Horman | b8b82b2 | 2012-11-22 00:34:25 +0900 | [diff] [blame] | 26 | #include <linux/input.h> |
| 27 | #include <linux/of_platform.h> |
Simon Horman | b8b82b2 | 2012-11-22 00:34:25 +0900 | [diff] [blame] | 28 | #include <mach/sh73a0.h> |
| 29 | #include <mach/common.h> |
| 30 | #include <asm/hardware/cache-l2x0.h> |
| 31 | #include <asm/mach-types.h> |
| 32 | #include <asm/mach/arch.h> |
| 33 | |
Simon Horman | b8b82b2 | 2012-11-22 00:34:25 +0900 | [diff] [blame] | 34 | static void __init kzm_init(void) |
| 35 | { |
| 36 | sh73a0_add_standard_devices_dt(); |
Guennadi Liakhovetski | f017d01 | 2013-02-08 19:38:27 +0100 | [diff] [blame] | 37 | |
Simon Horman | b8b82b2 | 2012-11-22 00:34:25 +0900 | [diff] [blame] | 38 | #ifdef CONFIG_CACHE_L2X0 |
| 39 | /* Early BRESP enable, Shared attribute override enable, 64K*8way */ |
| 40 | l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff); |
| 41 | #endif |
| 42 | } |
| 43 | |
Simon Horman | b8b82b2 | 2012-11-22 00:34:25 +0900 | [diff] [blame] | 44 | static const char *kzm9g_boards_compat_dt[] __initdata = { |
| 45 | "renesas,kzm9g-reference", |
| 46 | NULL, |
| 47 | }; |
| 48 | |
Simon Horman | b8b82b2 | 2012-11-22 00:34:25 +0900 | [diff] [blame] | 49 | DT_MACHINE_START(KZM9G_DT, "kzm9g-reference") |
| 50 | .smp = smp_ops(sh73a0_smp_ops), |
| 51 | .map_io = sh73a0_map_io, |
| 52 | .init_early = sh73a0_init_delay, |
| 53 | .nr_irqs = NR_IRQS_LEGACY, |
Simon Horman | b8b82b2 | 2012-11-22 00:34:25 +0900 | [diff] [blame] | 54 | .init_machine = kzm_init, |
Simon Horman | b8b82b2 | 2012-11-22 00:34:25 +0900 | [diff] [blame] | 55 | .dt_compat = kzm9g_boards_compat_dt, |
| 56 | MACHINE_END |