f197fab9e7cd1bc6a84247f1e365f37428d49f61
[openwrt/staging/yousong.git] / target / linux / mcs814x / files-3.3 / arch / arm / mach-mcs814x / board-mcs8140-dt.c
1 /*
2 * Setup code for Moschip MCS8140-based board using Device Tree
3 *
4 * Copyright (C) 2012, Florian Fainelli <florian@openwrt.org>
5 *
6 * Licensed under GPLv2.
7 */
8 #include <linux/types.h>
9 #include <linux/init.h>
10 #include <linux/module.h>
11 #include <linux/gpio.h>
12 #include <linux/irqdomain.h>
13 #include <linux/of_platform.h>
14
15 #include <mach/hardware.h>
16 #include "common.h"
17
18 #include <asm/setup.h>
19 #include <asm/irq.h>
20 #include <asm/mach/arch.h>
21 #include <asm/mach/map.h>
22 #include <asm/mach/irq.h>
23
24 static void __init mcs814x_dt_device_init(void)
25 {
26 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
27 mcs814x_init_machine();
28 }
29
30 static const char *mcs8140_dt_board_compat[] __initdata = {
31 "devolo,dlan-usb-extender",
32 "tigal,rbt-832",
33 "moschip,mcs8140",
34 NULL, /* sentinel */
35 };
36
37 DT_MACHINE_START(mcs8140_dt, "Moschip MCS8140 board")
38 /* Maintainer: Florian Fainelli <florian@openwrt.org> */
39 .timer = &mcs814x_timer,
40 .map_io = mcs814x_map_io,
41 .init_early = mcs814x_clk_init,
42 .init_irq = mcs814x_of_irq_init,
43 .init_machine = mcs814x_dt_device_init,
44 .restart = mcs814x_restart,
45 .dt_compat = mcs8140_dt_board_compat,
46 MACHINE_END
47