diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 09:32:42 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 09:32:42 -0700 |
commit | 9f639269ed1522c7d69c54cc8b80ab8ee53fcb10 (patch) | |
tree | bf3e38862b6e4e4c416a6e075b614f2c4befe3e9 /arch/arm/mach-shmobile/board-kzm9d.c | |
parent | b324c67d4800e59171f48d9ddab6cbfb59110482 (diff) | |
parent | 0804dcb2afdcf014947ee98264041765f580d43f (diff) |
Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull support for new arm SoCs from Olof Johansson:
"Three new system-on-chip models are supported: the st-ericsson u9540
in ux500, the sam9n12 in at91 and the emma ev2 in shmobile.
Emma is a little bit special because it is completely unrelated to the
classic shmobile models, but the new Renesas rmobile SoCs are a
combination of things from both Emma and shmobile, so it was decided
to have them all live in one directory.
This also contains updates to existing shmobile soc code as well as
some related board changes due to dependencies."
* tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (23 commits)
mach-shmobile: Use DT_MACHINE for KZM9D V3
mach-shmobile: Emma Mobile EV2 DT support V3
mach-shmobile: KZM9D board Ethernet support V3
mach-shmobile: Emma Mobile EV2 GPIO support V3
mach-shmobile: Emma Mobile EV2 SMP support V3
mach-shmobile: KZM9D board support V3
mach-shmobile: Emma Mobile EV2 SoC base support V3
gpio: Emma Mobile GPIO driver V2
ARM: mach-shmobile: sh73a0: fixup PINT/IRQ16-IRQ31 irq number conflict
ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s
ARM: mach-shmobile: clock-r8a7740: add MMCIF clock
ARM: mach-shmobile: clock-r8a7740: add SDHI clock
ARM: mach-shmobile: clock-r8a7740: add USB clock
ARM: mach-shmobile: clock-r8a7740: add FSI clock
ARM: mach-shmobile: r8a7740: cleanup I2C workaround method
ARM: mach-shmobile: r8a7740: add gpio_irq support
ARM: mach-shmobile: sh7372: Add FSI DMAEngine support
ARM / mach-shmobile: Use preset_lpj with calibrate_delay()
ARM: ux500: ioremap differences for DB9540
ARM: ux500: core U9540 support
...
Diffstat (limited to 'arch/arm/mach-shmobile/board-kzm9d.c')
-rw-r--r-- | arch/arm/mach-shmobile/board-kzm9d.c | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c new file mode 100644 index 00000000000..7bc5e7d39f9 --- /dev/null +++ b/arch/arm/mach-shmobile/board-kzm9d.c @@ -0,0 +1,85 @@ +/* + * kzm9d board support + * + * Copyright (C) 2012 Renesas Solutions Corp. + * Copyright (C) 2012 Magnus Damm + * + * 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; version 2 of the License. + * + * 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, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include <linux/kernel.h> +#include <linux/interrupt.h> +#include <linux/platform_device.h> +#include <linux/smsc911x.h> +#include <mach/common.h> +#include <mach/emev2.h> +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/hardware/gic.h> + +/* Ether */ +static struct resource smsc911x_resources[] = { + [0] = { + .start = 0x20000000, + .end = 0x2000ffff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = EMEV2_GPIO_IRQ(1), + .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, + }, +}; + +static struct smsc911x_platform_config smsc911x_platdata = { + .flags = SMSC911X_USE_32BIT, + .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, + .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, +}; + +static struct platform_device smsc91x_device = { + .name = "smsc911x", + .id = 0, + .dev = { + .platform_data = &smsc911x_platdata, + }, + .num_resources = ARRAY_SIZE(smsc911x_resources), + .resource = smsc911x_resources, +}; + +static struct platform_device *kzm9d_devices[] __initdata = { + &smsc91x_device, +}; + +void __init kzm9d_add_standard_devices(void) +{ + emev2_add_standard_devices(); + + platform_add_devices(kzm9d_devices, ARRAY_SIZE(kzm9d_devices)); +} + +static const char *kzm9d_boards_compat_dt[] __initdata = { + "renesas,kzm9d", + NULL, +}; + +DT_MACHINE_START(KZM9D_DT, "kzm9d") + .map_io = emev2_map_io, + .init_early = emev2_add_early_devices, + .nr_irqs = NR_IRQS_LEGACY, + .init_irq = emev2_init_irq, + .handle_irq = gic_handle_irq, + .init_machine = kzm9d_add_standard_devices, + .timer = &shmobile_timer, + .dt_compat = kzm9d_boards_compat_dt, +MACHINE_END |