diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-23 16:31:31 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-23 16:31:31 -0700 | 
| commit | f01b9b73f57f4f92d39bba0d9aa4a38f318212df (patch) | |
| tree | b815a4477af34f7f6c61dff0c04db6cb975cdd55 /arch/arm/mach-socfpga/socfpga.c | |
| parent | fde75430278130505cac21997cd9f90b7bb2670a (diff) | |
| parent | 66314223aa5e862c9d1d068cb7186b4fd58ebeaa (diff) | |
| download | olio-linux-3.10-f01b9b73f57f4f92d39bba0d9aa4a38f318212df.tar.xz olio-linux-3.10-f01b9b73f57f4f92d39bba0d9aa4a38f318212df.zip  | |
Merge tag 'newsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull support for three new arm SoC types from Arnd Bergmann:
 - The mvebu platform includes Marvell's Armada XP and Armada 370 chips,
   made by the mvebu business unit inside of Marvell.  Since the same
   group also made the older but similar platforms we call "orion5x",
   "kirkwood", "mv78xx0" and "dove", we plan to move all of them into
   the mach-mvebu directory in the future.
 - socfpga is Altera's platform based on Cortex-A9 cores and a lot of
   FPGA space.  This is similar to the Xilinx zynq platform we already
   support.  The code is particularly clean, which is helped by the fact
   that the hardware doesn't do much besides the parts that are expected
   to get added in the FPGA.
 - The OMAP subarchitecture gains support for the latest generation, the
   OMAP5 based on the new Cortex-A15 core.  Support is rather
   rudimentary for now, but will be extended in the future.
* tag 'newsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (25 commits)
  ARM: socfpga: initial support for Altera's SOCFPGA platform
  arm: mvebu: generate DTBs for supported SoCs
  ARM: mvebu: MPIC: read number of interrupts from control register
  arm: mach-mvebu: add entry to MAINTAINERS
  arm: mach-mvebu: add compilation/configuration change
  arm: mach-mvebu: add defconfig
  arm: mach-mvebu: add documentation for new device tree bindings
  arm: mach-mvebu: add support for Armada 370 and Armada XP with DT
  arm: mach-mvebu: add source files
  arm: mach-mvebu: add header
  clocksource: time-armada-370-xp: Marvell Armada 370/XP SoC timer driver
  ARM: Kconfig update to support additional GPIOs in OMAP5
  ARM: OMAP5: Add the build support
  arm/dts: OMAP5: Add omap5 dts files
  ARM: OMAP5: board-generic: Add device tree support
  ARM: omap2+: board-generic: clean up the irq data from board file
  ARM: OMAP5: Add SMP support
  ARM: OMAP5: Add the WakeupGen IP updates
  ARM: OMAP5: l3: Add l3 error handler support for omap5
  ARM: OMAP5: gpmc: Update gpmc_init()
  ...
Conflicts:
	Documentation/devicetree/bindings/arm/omap/omap.txt
	arch/arm/mach-omap2/Makefile
	drivers/clocksource/Kconfig
	drivers/clocksource/Makefile
Diffstat (limited to 'arch/arm/mach-socfpga/socfpga.c')
| -rw-r--r-- | arch/arm/mach-socfpga/socfpga.c | 62 | 
1 files changed, 62 insertions, 0 deletions
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c new file mode 100644 index 00000000000..f01e1ebf539 --- /dev/null +++ b/arch/arm/mach-socfpga/socfpga.c @@ -0,0 +1,62 @@ +/* + *  Copyright (C) 2012 Altera Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program.  If not, see <http://www.gnu.org/licenses/>. + */ +#include <linux/dw_apb_timer.h> +#include <linux/of_irq.h> +#include <linux/of_platform.h> + +#include <asm/hardware/cache-l2x0.h> +#include <asm/hardware/gic.h> +#include <asm/mach/arch.h> + +extern void socfpga_init_clocks(void); + +const static struct of_device_id irq_match[] = { +	{ .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, +	{} +}; + +static void __init gic_init_irq(void) +{ +	of_irq_init(irq_match); +} + +static void socfpga_cyclone5_restart(char mode, const char *cmd) +{ +	/* TODO: */ +} + +static void __init socfpga_cyclone5_init(void) +{ +	l2x0_of_init(0, ~0UL); +	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); +	socfpga_init_clocks(); +} + +static const char *altera_dt_match[] = { +	"altr,socfpga", +	"altr,socfpga-cyclone5", +	NULL +}; + +DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA") +	.init_irq	= gic_init_irq, +	.handle_irq     = gic_handle_irq, +	.timer		= &dw_apb_timer, +	.init_machine	= socfpga_cyclone5_init, +	.restart	= socfpga_cyclone5_restart, +	.dt_compat	= altera_dt_match, +MACHINE_END  |