diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-06-19 14:48:56 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2012-06-19 14:48:56 +0000 |
commit | f4afa00862b7db8a2da8c012843a286716c0a534 (patch) | |
tree | 9c15efab8fd398654de98648e07f26c51d6eec66 /target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/board-mcs8140-dt.c | |
parent | 7c87391c55a713a9ef9df169ab23e79177184b1a (diff) | |
download | master-31e0f0ae-f4afa00862b7db8a2da8c012843a286716c0a534.tar.gz master-31e0f0ae-f4afa00862b7db8a2da8c012843a286716c0a534.tar.bz2 master-31e0f0ae-f4afa00862b7db8a2da8c012843a286716c0a534.zip |
add Moschip MSC814x support
This target currently only supports Moschip's MCS8140 SoC, but support
for other chips in the same family (MCS8142, MCS8144) will be easy to add.
Target support is entirely using Device Tree for probing peripherals.
Drivers support include:
- PCI
- USB 1 & 2
- watchdog
- random number generator
- UART
- timer
- internal Ethernet PHY
- Ethernet MAC core
Support for the following boards is included using Device Tree
- Devolo dLAN USB Extender
- Tigal RBT-832
SVN-Revision: 32462
Diffstat (limited to 'target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/board-mcs8140-dt.c')
-rw-r--r-- | target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/board-mcs8140-dt.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/board-mcs8140-dt.c b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/board-mcs8140-dt.c new file mode 100644 index 0000000000..3816fb6e27 --- /dev/null +++ b/target/linux/mcs814x/files-3.3/arch/arm/mach-mcs814x/board-mcs8140-dt.c @@ -0,0 +1,48 @@ +/* + * 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 <mach/hardware.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 = { + "devolo,dlan-usb-extender", + "tigal,rbt-832", + "moschip,mcs8140", + NULL, /* sentinel */ +}; + +DT_MACHINE_START(mcs8140_dt, "Moschip MCS8140 board") + /* Maintainer: Florian Fainelli <florian@openwrt.org> */ + .timer = &mcs814x_timer, + .map_io = mcs814x_map_io, + .init_early = mcs814x_clk_init, + .init_irq = mcs814x_of_irq_init, + .init_machine = mcs814x_dt_device_init, + .handle_irq = mcs814x_handle_irq, + .restart = mcs814x_restart, + .dt_compat = mcs8140_dt_board_compat, +MACHINE_END + |