diff options
author | Florian Fainelli <florian@openwrt.org> | 2015-01-10 20:12:02 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2015-01-10 20:12:02 +0000 |
commit | dd4ee63fa43cf13190891a5df62676054942b52e (patch) | |
tree | 961871e70f77414e4bc647923a07119390b4676e /target/linux/mcs814x/files-3.14/arch/arm/mach-mcs814x/board-mcs8140-dt.c | |
parent | 3b523f6780113b0f55a2362ab093145dfa2a7c75 (diff) | |
download | upstream-dd4ee63fa43cf13190891a5df62676054942b52e.tar.gz upstream-dd4ee63fa43cf13190891a5df62676054942b52e.tar.bz2 upstream-dd4ee63fa43cf13190891a5df62676054942b52e.zip |
mcs814x: add 3.14 kernel support
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 43926
Diffstat (limited to 'target/linux/mcs814x/files-3.14/arch/arm/mach-mcs814x/board-mcs8140-dt.c')
-rw-r--r-- | target/linux/mcs814x/files-3.14/arch/arm/mach-mcs814x/board-mcs8140-dt.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/mcs814x/files-3.14/arch/arm/mach-mcs814x/board-mcs8140-dt.c b/target/linux/mcs814x/files-3.14/arch/arm/mach-mcs814x/board-mcs8140-dt.c new file mode 100644 index 0000000000..0d11450c73 --- /dev/null +++ b/target/linux/mcs814x/files-3.14/arch/arm/mach-mcs814x/board-mcs8140-dt.c @@ -0,0 +1,45 @@ +/* + * Setup code for Moschip MCS8140-based board using Device Tree + * + * Copyright (C) 2012, Florian Fainelli <florian@openwrt.org> + * + * Licensed under GPLv2. + */ +#include <linux/types.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/gpio.h> +#include <linux/irqdomain.h> +#include <linux/of_platform.h> + +#include "common.h" + +#include <asm/setup.h> +#include <asm/irq.h> +#include <asm/mach/arch.h> +#include <asm/mach/map.h> +#include <asm/mach/irq.h> + +static void __init mcs814x_dt_device_init(void) +{ + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + mcs814x_init_machine(); +} + +static const char *mcs8140_dt_board_compat[] __initdata = { + "moschip,mcs8140", + NULL, /* sentinel */ +}; + +DT_MACHINE_START(mcs8140_dt, "Moschip MCS8140 board") + /* Maintainer: Florian Fainelli <florian@openwrt.org> */ + .map_io = mcs814x_map_io, + .init_early = mcs814x_clk_init, + .init_irq = mcs814x_of_irq_init, + .init_time = mcs814x_timer_init, + .init_machine = mcs814x_dt_device_init, + .restart = mcs814x_restart, + .dt_compat = mcs8140_dt_board_compat, + .handle_irq = mcs814x_handle_irq, +MACHINE_END + |