2 * Device Tree support for Allwinner A1X SoCs
4 * Copyright (C) 2012 Maxime Ripard
6 * Maxime Ripard <maxime.ripard@free-electrons.com>
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
13 #include <linux/kernel.h>
14 #include <linux/init.h>
15 #include <linux/of_irq.h>
16 #include <linux/of_platform.h>
18 #include <linux/sunxi_timer.h>
20 #include <linux/irqchip/sunxi.h>
22 #include <asm/hardware/vic.h>
24 #include <asm/mach/arch.h>
25 #include <asm/mach/map.h>
29 static struct map_desc sunxi_io_desc
[] __initdata
= {
31 .virtual = (unsigned long) SUNXI_REGS_VIRT_BASE
,
32 .pfn
= __phys_to_pfn(SUNXI_REGS_PHYS_BASE
),
33 .length
= SUNXI_REGS_SIZE
,
38 void __init
sunxi_map_io(void)
40 iotable_init(sunxi_io_desc
, ARRAY_SIZE(sunxi_io_desc
));
43 static void __init
sunxi_dt_init(void)
45 of_platform_populate(NULL
, of_default_bus_match_table
, NULL
, NULL
);
48 static const char * const sunxi_board_dt_compat
[] = {
54 DT_MACHINE_START(SUNXI_DT
, "Allwinner A1X (Device Tree)")
55 .init_machine
= sunxi_dt_init
,
56 .map_io
= sunxi_map_io
,
57 .init_irq
= sunxi_init_irq
,
58 .handle_irq
= sunxi_handle_irq
,
59 .timer
= &sunxi_timer
,
60 .dt_compat
= sunxi_board_dt_compat
,