| 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 "common.h" |
| 16 | |
| 17 | #include <asm/setup.h> |
| 18 | #include <asm/irq.h> |
| 19 | #include <asm/mach/arch.h> |
| 20 | #include <asm/mach/map.h> |
| 21 | #include <asm/mach/irq.h> |
| 22 | |
| 23 | static void __init mcs814x_dt_device_init(void) |
| 24 | { |
| 25 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
| 26 | mcs814x_init_machine(); |
| 27 | } |
| 28 | |
| 29 | static const char *mcs8140_dt_board_compat[] __initdata = { |
| 30 | "moschip,mcs8140", |
| 31 | NULL, /* sentinel */ |
| 32 | }; |
| 33 | |
| 34 | DT_MACHINE_START(mcs8140_dt, "Moschip MCS8140 board") |
| 35 | /* Maintainer: Florian Fainelli <florian@openwrt.org> */ |
| 36 | .timer = &mcs814x_timer, |
| 37 | .map_io = mcs814x_map_io, |
| 38 | .init_early = mcs814x_clk_init, |
| 39 | .init_irq = mcs814x_of_irq_init, |
| 40 | .init_machine = mcs814x_dt_device_init, |
| 41 | .restart = mcs814x_restart, |
| 42 | .dt_compat = mcs8140_dt_board_compat, |
| 43 | MACHINE_END |
| 44 | |
| 45 | |