diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-28 16:49:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-28 16:49:49 -0500 |
commit | bb04af0e2e5bcd8d1a5d7f7d5c704f7eb328f241 (patch) | |
tree | fd67625ba9758dceff28dfca39127d7f07dae981 /drivers/net | |
parent | 0affa456cb6da51a31a6dd76b3d8827f467f807d (diff) | |
parent | 0ff66f0c7a5f1f4f5a0d91341b6f71fd2a49f0fa (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (176 commits)
[ARM] 4795/1: S3C244X: Add armclk and setparent call
[ARM] 4794/1: S3C24XX: Comonise S3C2440 and S3C2442 clock code
[ARM] 4793/1: S3C24XX: Add IRQ->GPIO pin mapping function
[ARM] 4792/1: S3C24XX: Remove warnings from debug-macro.S
[ARM] 4791/1: S3C2412: Make fclk a parent of msysclk
[ARM] 4790/1: S3C2412: Fix parent selection for msysclk.
[ARM] 4789/1: S3C2412: Add missing CLKDIVN register values
[ARM] 4788/1: S3C24XX: Fix paramet to s3c2410_dma_ctrl if S3C2410_DMAF_AUTOSTART used.
[ARM] 4787/1: S3C24XX: s3c2410_dma_request() should return the allocated channel number
[ARM] 4786/1: S3C2412: Add SPI FIFO controll constants
[ARM] 4785/1: S3C24XX: Add _SHIFT definitions for S3C2410_BANKCON registers
[ARM] 4784/1: S3C24XX: Fix GPIO restore glitches
[ARM] 4783/1: S3C24XX: Add s3c2410_gpio_getpull()
[ARM] 4782/1: S3C24XX: Define FIQ_START for any FIQ users
[ARM] 4781/1: S3C24XX: DMA suspend and resume support
[ARM] 4780/1: S3C2412: Allow for seperate DMA channels for TX and RX
[ARM] 4779/1: S3C2412: Add s3c2412_gpio_set_sleepcfg() call
[ARM] 4778/1: S3C2412: Add armclk and init from DVS state
[ARM] 4777/1: S3C24XX: Ensure clk_set_rate() checks the set_rate method for the clk
[ARM] 4775/1: s3c2410: fix compilation error if only s3c2442 cpu is selected
...
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/dm9000.c | 3 | ||||
-rw-r--r-- | drivers/net/smc91x.c | 19 | ||||
-rw-r--r-- | drivers/net/smc91x.h | 24 |
4 files changed, 25 insertions, 23 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 9af05a2f4af3..a6728661c416 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -212,7 +212,7 @@ config MII | |||
212 | 212 | ||
213 | config MACB | 213 | config MACB |
214 | tristate "Atmel MACB support" | 214 | tristate "Atmel MACB support" |
215 | depends on AVR32 || ARCH_AT91SAM9260 || ARCH_AT91SAM9263 | 215 | depends on AVR32 || ARCH_AT91SAM9260 || ARCH_AT91SAM9263 || ARCH_AT91CAP9 |
216 | select PHYLIB | 216 | select PHYLIB |
217 | help | 217 | help |
218 | The Atmel MACB ethernet interface is found on many AT32 and AT91 | 218 | The Atmel MACB ethernet interface is found on many AT32 and AT91 |
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 3286d2a0a870..6a20a5491a96 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -66,6 +66,7 @@ | |||
66 | #include <linux/dm9000.h> | 66 | #include <linux/dm9000.h> |
67 | #include <linux/delay.h> | 67 | #include <linux/delay.h> |
68 | #include <linux/platform_device.h> | 68 | #include <linux/platform_device.h> |
69 | #include <linux/irq.h> | ||
69 | 70 | ||
70 | #include <asm/delay.h> | 71 | #include <asm/delay.h> |
71 | #include <asm/irq.h> | 72 | #include <asm/irq.h> |
@@ -113,7 +114,7 @@ | |||
113 | #define writesl outsl | 114 | #define writesl outsl |
114 | #define DM9000_IRQ_FLAGS (IRQF_SHARED | IRQF_TRIGGER_HIGH) | 115 | #define DM9000_IRQ_FLAGS (IRQF_SHARED | IRQF_TRIGGER_HIGH) |
115 | #else | 116 | #else |
116 | #define DM9000_IRQ_FLAGS IRQF_SHARED | 117 | #define DM9000_IRQ_FLAGS (IRQF_SHARED | IRQT_RISING) |
117 | #endif | 118 | #endif |
118 | 119 | ||
119 | /* | 120 | /* |
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 7da7589d45dd..4020e9e955b3 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -1775,7 +1775,8 @@ static int __init smc_findirq(void __iomem *ioaddr) | |||
1775 | * o actually GRAB the irq. | 1775 | * o actually GRAB the irq. |
1776 | * o GRAB the region | 1776 | * o GRAB the region |
1777 | */ | 1777 | */ |
1778 | static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr) | 1778 | static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr, |
1779 | unsigned long irq_flags) | ||
1779 | { | 1780 | { |
1780 | struct smc_local *lp = netdev_priv(dev); | 1781 | struct smc_local *lp = netdev_priv(dev); |
1781 | static int version_printed = 0; | 1782 | static int version_printed = 0; |
@@ -1941,7 +1942,7 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr) | |||
1941 | } | 1942 | } |
1942 | 1943 | ||
1943 | /* Grab the IRQ */ | 1944 | /* Grab the IRQ */ |
1944 | retval = request_irq(dev->irq, &smc_interrupt, SMC_IRQ_FLAGS, dev->name, dev); | 1945 | retval = request_irq(dev->irq, &smc_interrupt, irq_flags, dev->name, dev); |
1945 | if (retval) | 1946 | if (retval) |
1946 | goto err_out; | 1947 | goto err_out; |
1947 | 1948 | ||
@@ -2123,8 +2124,9 @@ static void smc_release_datacs(struct platform_device *pdev, struct net_device * | |||
2123 | static int smc_drv_probe(struct platform_device *pdev) | 2124 | static int smc_drv_probe(struct platform_device *pdev) |
2124 | { | 2125 | { |
2125 | struct net_device *ndev; | 2126 | struct net_device *ndev; |
2126 | struct resource *res; | 2127 | struct resource *res, *ires; |
2127 | unsigned int __iomem *addr; | 2128 | unsigned int __iomem *addr; |
2129 | unsigned long irq_flags = SMC_IRQ_FLAGS; | ||
2128 | int ret; | 2130 | int ret; |
2129 | 2131 | ||
2130 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs"); | 2132 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs"); |
@@ -2150,12 +2152,17 @@ static int smc_drv_probe(struct platform_device *pdev) | |||
2150 | SET_NETDEV_DEV(ndev, &pdev->dev); | 2152 | SET_NETDEV_DEV(ndev, &pdev->dev); |
2151 | 2153 | ||
2152 | ndev->dma = (unsigned char)-1; | 2154 | ndev->dma = (unsigned char)-1; |
2153 | ndev->irq = platform_get_irq(pdev, 0); | 2155 | |
2154 | if (ndev->irq < 0) { | 2156 | ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
2157 | if (!ires) { | ||
2155 | ret = -ENODEV; | 2158 | ret = -ENODEV; |
2156 | goto out_free_netdev; | 2159 | goto out_free_netdev; |
2157 | } | 2160 | } |
2158 | 2161 | ||
2162 | ndev->irq = ires->start; | ||
2163 | if (SMC_IRQ_FLAGS == -1) | ||
2164 | irq_flags = ires->flags & IRQF_TRIGGER_MASK; | ||
2165 | |||
2159 | ret = smc_request_attrib(pdev); | 2166 | ret = smc_request_attrib(pdev); |
2160 | if (ret) | 2167 | if (ret) |
2161 | goto out_free_netdev; | 2168 | goto out_free_netdev; |
@@ -2181,7 +2188,7 @@ static int smc_drv_probe(struct platform_device *pdev) | |||
2181 | #endif | 2188 | #endif |
2182 | 2189 | ||
2183 | platform_set_drvdata(pdev, ndev); | 2190 | platform_set_drvdata(pdev, ndev); |
2184 | ret = smc_probe(ndev, addr); | 2191 | ret = smc_probe(ndev, addr, irq_flags); |
2185 | if (ret != 0) | 2192 | if (ret != 0) |
2186 | goto out_iounmap; | 2193 | goto out_iounmap; |
2187 | 2194 | ||
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 07b7f7120e37..271c28dc9baa 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -54,6 +54,7 @@ | |||
54 | #define SMC_outw(v, a, r) writew(v, (a) + (r)) | 54 | #define SMC_outw(v, a, r) writew(v, (a) + (r)) |
55 | #define SMC_insw(a, r, p, l) readsw((a) + (r), p, l) | 55 | #define SMC_insw(a, r, p, l) readsw((a) + (r), p, l) |
56 | #define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l) | 56 | #define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l) |
57 | #define SMC_IRQ_FLAGS (-1) /* from resource */ | ||
57 | 58 | ||
58 | #elif defined(CONFIG_BLACKFIN) | 59 | #elif defined(CONFIG_BLACKFIN) |
59 | 60 | ||
@@ -158,7 +159,7 @@ | |||
158 | #define SMC_outw(v, a, r) writew(v, (a) + (r)) | 159 | #define SMC_outw(v, a, r) writew(v, (a) + (r)) |
159 | #define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l) | 160 | #define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l) |
160 | 161 | ||
161 | #define SMC_IRQ_FLAGS (0) | 162 | #define SMC_IRQ_FLAGS (-1) |
162 | 163 | ||
163 | #elif defined(CONFIG_SA1100_ASSABET) | 164 | #elif defined(CONFIG_SA1100_ASSABET) |
164 | 165 | ||
@@ -177,6 +178,7 @@ | |||
177 | #define SMC_outb(v, a, r) writeb(v, (a) + (r)) | 178 | #define SMC_outb(v, a, r) writeb(v, (a) + (r)) |
178 | #define SMC_insb(a, r, p, l) readsb((a) + (r), p, (l)) | 179 | #define SMC_insb(a, r, p, l) readsb((a) + (r), p, (l)) |
179 | #define SMC_outsb(a, r, p, l) writesb((a) + (r), p, (l)) | 180 | #define SMC_outsb(a, r, p, l) writesb((a) + (r), p, (l)) |
181 | #define SMC_IRQ_FLAGS (-1) /* from resource */ | ||
180 | 182 | ||
181 | #elif defined(CONFIG_MACH_LOGICPD_PXA270) | 183 | #elif defined(CONFIG_MACH_LOGICPD_PXA270) |
182 | 184 | ||
@@ -194,7 +196,8 @@ | |||
194 | #elif defined(CONFIG_ARCH_INNOKOM) || \ | 196 | #elif defined(CONFIG_ARCH_INNOKOM) || \ |
195 | defined(CONFIG_MACH_MAINSTONE) || \ | 197 | defined(CONFIG_MACH_MAINSTONE) || \ |
196 | defined(CONFIG_ARCH_PXA_IDP) || \ | 198 | defined(CONFIG_ARCH_PXA_IDP) || \ |
197 | defined(CONFIG_ARCH_RAMSES) | 199 | defined(CONFIG_ARCH_RAMSES) || \ |
200 | defined(CONFIG_ARCH_PCM027) | ||
198 | 201 | ||
199 | #define SMC_CAN_USE_8BIT 1 | 202 | #define SMC_CAN_USE_8BIT 1 |
200 | #define SMC_CAN_USE_16BIT 1 | 203 | #define SMC_CAN_USE_16BIT 1 |
@@ -210,6 +213,7 @@ | |||
210 | #define SMC_outl(v, a, r) writel(v, (a) + (r)) | 213 | #define SMC_outl(v, a, r) writel(v, (a) + (r)) |
211 | #define SMC_insl(a, r, p, l) readsl((a) + (r), p, l) | 214 | #define SMC_insl(a, r, p, l) readsl((a) + (r), p, l) |
212 | #define SMC_outsl(a, r, p, l) writesl((a) + (r), p, l) | 215 | #define SMC_outsl(a, r, p, l) writesl((a) + (r), p, l) |
216 | #define SMC_IRQ_FLAGS (-1) /* from resource */ | ||
213 | 217 | ||
214 | /* We actually can't write halfwords properly if not word aligned */ | 218 | /* We actually can't write halfwords properly if not word aligned */ |
215 | static inline void | 219 | static inline void |
@@ -238,6 +242,7 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) | |||
238 | #define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l) | 242 | #define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l) |
239 | #define SMC_outb(v, a, r) writeb(v, (a) + (r)) | 243 | #define SMC_outb(v, a, r) writeb(v, (a) + (r)) |
240 | #define SMC_outw(v, a, r) writew(v, (a) + (r)) | 244 | #define SMC_outw(v, a, r) writew(v, (a) + (r)) |
245 | #define SMC_IRQ_FLAGS (-1) /* from resource */ | ||
241 | 246 | ||
242 | #elif defined(CONFIG_ARCH_OMAP) | 247 | #elif defined(CONFIG_ARCH_OMAP) |
243 | 248 | ||
@@ -252,17 +257,7 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg) | |||
252 | #define SMC_outw(v, a, r) writew(v, (a) + (r)) | 257 | #define SMC_outw(v, a, r) writew(v, (a) + (r)) |
253 | #define SMC_insw(a, r, p, l) readsw((a) + (r), p, l) | 258 | #define SMC_insw(a, r, p, l) readsw((a) + (r), p, l) |
254 | #define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l) | 259 | #define SMC_outsw(a, r, p, l) writesw((a) + (r), p, l) |
255 | 260 | #define SMC_IRQ_FLAGS (-1) /* from resource */ | |
256 | #include <asm/mach-types.h> | ||
257 | #include <asm/arch/cpu.h> | ||
258 | |||
259 | #define SMC_IRQ_FLAGS (( \ | ||
260 | machine_is_omap_h2() \ | ||
261 | || machine_is_omap_h3() \ | ||
262 | || machine_is_omap_h4() \ | ||
263 | || (machine_is_omap_innovator() && !cpu_is_omap1510()) \ | ||
264 | ) ? IRQF_TRIGGER_FALLING : IRQF_TRIGGER_RISING) | ||
265 | |||
266 | 261 | ||
267 | #elif defined(CONFIG_SH_SH4202_MICRODEV) | 262 | #elif defined(CONFIG_SH_SH4202_MICRODEV) |
268 | 263 | ||
@@ -453,8 +448,7 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r, | |||
453 | #define SMC_outl(v, a, r) writel(v, (a) + (r)) | 448 | #define SMC_outl(v, a, r) writel(v, (a) + (r)) |
454 | #define SMC_insl(a, r, p, l) readsl((a) + (r), p, l) | 449 | #define SMC_insl(a, r, p, l) readsl((a) + (r), p, l) |
455 | #define SMC_outsl(a, r, p, l) writesl((a) + (r), p, l) | 450 | #define SMC_outsl(a, r, p, l) writesl((a) + (r), p, l) |
456 | 451 | #define SMC_IRQ_FLAGS (-1) /* from resource */ | |
457 | #define SMC_IRQ_FLAGS (0) | ||
458 | 452 | ||
459 | #else | 453 | #else |
460 | 454 | ||