diff options
author | Magnus Damm <damm@opensource.se> | 2012-05-16 02:45:42 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-05-17 18:14:02 -0400 |
commit | 0c73f7bc124e1657a583d9dfb0d168a69005e2d3 (patch) | |
tree | f037e47e3115451a34d09283dfb17e3928e67cbb /arch/arm/mach-shmobile | |
parent | 088efd9273b5076a0aead479aa31f1066d182b3e (diff) |
mach-shmobile: KZM9D board Ethernet support V3
Tie in the on-board Ethernet controller on KZM9D
and make use of the GPIO controller for external
IRQ pin support.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/board-kzm9d.c | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c index 42fc4794c9ed..be81f0feba06 100644 --- a/arch/arm/mach-shmobile/board-kzm9d.c +++ b/arch/arm/mach-shmobile/board-kzm9d.c | |||
@@ -20,18 +20,60 @@ | |||
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/smsc911x.h> | ||
23 | #include <mach/common.h> | 25 | #include <mach/common.h> |
24 | #include <mach/emev2.h> | 26 | #include <mach/emev2.h> |
25 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
26 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
27 | #include <asm/hardware/gic.h> | 29 | #include <asm/hardware/gic.h> |
28 | 30 | ||
31 | /* Ether */ | ||
32 | static struct resource smsc911x_resources[] = { | ||
33 | [0] = { | ||
34 | .start = 0x20000000, | ||
35 | .end = 0x2000ffff, | ||
36 | .flags = IORESOURCE_MEM, | ||
37 | }, | ||
38 | [1] = { | ||
39 | .start = EMEV2_GPIO_IRQ(1), | ||
40 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, | ||
41 | }, | ||
42 | }; | ||
43 | |||
44 | static struct smsc911x_platform_config smsc911x_platdata = { | ||
45 | .flags = SMSC911X_USE_32BIT, | ||
46 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
47 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, | ||
48 | }; | ||
49 | |||
50 | static struct platform_device smsc91x_device = { | ||
51 | .name = "smsc911x", | ||
52 | .id = 0, | ||
53 | .dev = { | ||
54 | .platform_data = &smsc911x_platdata, | ||
55 | }, | ||
56 | .num_resources = ARRAY_SIZE(smsc911x_resources), | ||
57 | .resource = smsc911x_resources, | ||
58 | }; | ||
59 | |||
60 | static struct platform_device *kzm9d_devices[] __initdata = { | ||
61 | &smsc91x_device, | ||
62 | }; | ||
63 | |||
64 | void __init kzm9d_add_standard_devices(void) | ||
65 | { | ||
66 | emev2_add_standard_devices(); | ||
67 | |||
68 | platform_add_devices(kzm9d_devices, ARRAY_SIZE(kzm9d_devices)); | ||
69 | } | ||
70 | |||
29 | MACHINE_START(KZM9D, "kzm9d") | 71 | MACHINE_START(KZM9D, "kzm9d") |
30 | .map_io = emev2_map_io, | 72 | .map_io = emev2_map_io, |
31 | .init_early = emev2_add_early_devices, | 73 | .init_early = emev2_add_early_devices, |
32 | .nr_irqs = NR_IRQS_LEGACY, | 74 | .nr_irqs = NR_IRQS_LEGACY, |
33 | .init_irq = emev2_init_irq, | 75 | .init_irq = emev2_init_irq, |
34 | .handle_irq = gic_handle_irq, | 76 | .handle_irq = gic_handle_irq, |
35 | .init_machine = emev2_add_standard_devices, | 77 | .init_machine = kzm9d_add_standard_devices, |
36 | .timer = &shmobile_timer, | 78 | .timer = &shmobile_timer, |
37 | MACHINE_END | 79 | MACHINE_END |