1 /* 2 * r7s72100 processor support 3 * 4 * Copyright (C) 2013 Renesas Solutions Corp. 5 * Copyright (C) 2013 Magnus Damm 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; version 2 of the License. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 */ 20 21 #include <linux/irq.h> 22 #include <linux/kernel.h> 23 #include <linux/of_platform.h> 24 #include <linux/sh_timer.h> 25 26 #include <asm/mach/arch.h> 27 28 #include "common.h" 29 #include "irqs.h" 30 #include "r7s72100.h" 31 32 static struct resource mtu2_resources[] __initdata = { 33 DEFINE_RES_MEM(0xfcff0000, 0x400), 34 DEFINE_RES_IRQ_NAMED(gic_iid(139), "tgi0a"), 35 }; 36 37 #define r7s72100_register_mtu2() \ 38 platform_device_register_resndata(NULL, "sh-mtu2", \ 39 -1, mtu2_resources, \ 40 ARRAY_SIZE(mtu2_resources), \ 41 NULL, 0) 42 43 void __init r7s72100_add_dt_devices(void) 44 { 45 r7s72100_register_mtu2(); 46 } 47 48 #ifdef CONFIG_USE_OF 49 static const char *r7s72100_boards_compat_dt[] __initdata = { 50 "renesas,r7s72100", 51 NULL, 52 }; 53 54 DT_MACHINE_START(R7S72100_DT, "Generic R7S72100 (Flattened Device Tree)") 55 .init_early = shmobile_init_delay, 56 .dt_compat = r7s72100_boards_compat_dt, 57 MACHINE_END 58 #endif /* CONFIG_USE_OF */ 59