Grant Likely | 3ba7222 | 2011-07-26 03:19:06 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Versatile board support using the device tree |
| 3 | * |
| 4 | * Copyright (C) 2010 Secret Lab Technologies Ltd. |
| 5 | * Copyright (C) 2009 Jeremy Kerr <jeremy.kerr@canonical.com> |
| 6 | * Copyright (C) 2004 ARM Limited |
| 7 | * Copyright (C) 2000 Deep Blue Solutions Ltd |
| 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; either version 2 of the License, or |
| 12 | * (at your option) any later version. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU General Public License |
| 20 | * along with this program; if not, write to the Free Software |
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 22 | */ |
| 23 | |
| 24 | #include <linux/init.h> |
| 25 | #include <linux/of_irq.h> |
| 26 | #include <linux/of_platform.h> |
Jamie Iles | c8be7ac | 2011-09-27 20:46:10 +0100 | [diff] [blame] | 27 | #include <asm/hardware/vic.h> |
Grant Likely | 3ba7222 | 2011-07-26 03:19:06 -0600 | [diff] [blame] | 28 | #include <asm/mach-types.h> |
| 29 | #include <asm/mach/arch.h> |
| 30 | |
| 31 | #include "core.h" |
| 32 | |
| 33 | static void __init versatile_dt_init(void) |
| 34 | { |
| 35 | of_platform_populate(NULL, of_default_bus_match_table, |
| 36 | versatile_auxdata_lookup, NULL); |
| 37 | } |
| 38 | |
| 39 | static const char *versatile_dt_match[] __initconst = { |
| 40 | "arm,versatile-ab", |
| 41 | "arm,versatile-pb", |
| 42 | NULL, |
| 43 | }; |
| 44 | |
| 45 | DT_MACHINE_START(VERSATILE_PB, "ARM-Versatile (Device Tree Support)") |
| 46 | .map_io = versatile_map_io, |
| 47 | .init_early = versatile_init_early, |
| 48 | .init_irq = versatile_init_irq, |
Jamie Iles | c8be7ac | 2011-09-27 20:46:10 +0100 | [diff] [blame] | 49 | .handle_irq = vic_handle_irq, |
Grant Likely | 3ba7222 | 2011-07-26 03:19:06 -0600 | [diff] [blame] | 50 | .timer = &versatile_timer, |
| 51 | .init_machine = versatile_dt_init, |
| 52 | .dt_compat = versatile_dt_match, |
Russell King | b56a7c6 | 2011-11-03 11:43:08 +0000 | [diff] [blame] | 53 | .restart = versatile_restart, |
Grant Likely | 3ba7222 | 2011-07-26 03:19:06 -0600 | [diff] [blame] | 54 | MACHINE_END |