diff options
Diffstat (limited to 'arch/mips/mti-sead3/sead3-net.c')
-rw-r--r-- | arch/mips/mti-sead3/sead3-net.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/mips/mti-sead3/sead3-net.c b/arch/mips/mti-sead3/sead3-net.c index dd11e7eb771c..46176b804576 100644 --- a/arch/mips/mti-sead3/sead3-net.c +++ b/arch/mips/mti-sead3/sead3-net.c | |||
@@ -7,9 +7,12 @@ | |||
7 | */ | 7 | */ |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/irq.h> | 9 | #include <linux/irq.h> |
10 | #include <linux/irqchip/mips-gic.h> | ||
10 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
11 | #include <linux/smsc911x.h> | 12 | #include <linux/smsc911x.h> |
12 | 13 | ||
14 | #include <asm/mips-boards/sead3int.h> | ||
15 | |||
13 | static struct smsc911x_platform_config sead3_smsc911x_data = { | 16 | static struct smsc911x_platform_config sead3_smsc911x_data = { |
14 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | 17 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
15 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | 18 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, |
@@ -17,14 +20,13 @@ static struct smsc911x_platform_config sead3_smsc911x_data = { | |||
17 | .phy_interface = PHY_INTERFACE_MODE_MII, | 20 | .phy_interface = PHY_INTERFACE_MODE_MII, |
18 | }; | 21 | }; |
19 | 22 | ||
20 | struct resource sead3_net_resourcess[] = { | 23 | struct resource sead3_net_resources[] = { |
21 | { | 24 | { |
22 | .start = 0x1f010000, | 25 | .start = 0x1f010000, |
23 | .end = 0x1f01ffff, | 26 | .end = 0x1f01ffff, |
24 | .flags = IORESOURCE_MEM | 27 | .flags = IORESOURCE_MEM |
25 | }, | 28 | }, |
26 | { | 29 | { |
27 | .start = MIPS_CPU_IRQ_BASE + 6, | ||
28 | .flags = IORESOURCE_IRQ | 30 | .flags = IORESOURCE_IRQ |
29 | } | 31 | } |
30 | }; | 32 | }; |
@@ -35,12 +37,16 @@ static struct platform_device sead3_net_device = { | |||
35 | .dev = { | 37 | .dev = { |
36 | .platform_data = &sead3_smsc911x_data, | 38 | .platform_data = &sead3_smsc911x_data, |
37 | }, | 39 | }, |
38 | .num_resources = ARRAY_SIZE(sead3_net_resourcess), | 40 | .num_resources = ARRAY_SIZE(sead3_net_resources), |
39 | .resource = sead3_net_resourcess | 41 | .resource = sead3_net_resources |
40 | }; | 42 | }; |
41 | 43 | ||
42 | static int __init sead3_net_init(void) | 44 | static int __init sead3_net_init(void) |
43 | { | 45 | { |
46 | if (gic_present) | ||
47 | sead3_net_resources[1].start = MIPS_GIC_IRQ_BASE + GIC_INT_NET; | ||
48 | else | ||
49 | sead3_net_resources[1].start = MIPS_CPU_IRQ_BASE + CPU_INT_NET; | ||
44 | return platform_device_register(&sead3_net_device); | 50 | return platform_device_register(&sead3_net_device); |
45 | } | 51 | } |
46 | 52 | ||