diff options
-rw-r--r-- | drivers/net/smc91x.c | 13 | ||||
-rw-r--r-- | drivers/net/smc91x.h | 6 | ||||
-rw-r--r-- | include/linux/smc91x.h | 2 |
3 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 34bfc60e8074..2040965d7724 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -1939,8 +1939,11 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr, | |||
1939 | if (retval) | 1939 | if (retval) |
1940 | goto err_out; | 1940 | goto err_out; |
1941 | 1941 | ||
1942 | #ifdef SMC_USE_PXA_DMA | 1942 | #ifdef CONFIG_ARCH_PXA |
1943 | { | 1943 | # ifdef SMC_USE_PXA_DMA |
1944 | lp->cfg.flags |= SMC91X_USE_DMA; | ||
1945 | # endif | ||
1946 | if (lp->cfg.flags & SMC91X_USE_DMA) { | ||
1944 | int dma = pxa_request_dma(dev->name, DMA_PRIO_LOW, | 1947 | int dma = pxa_request_dma(dev->name, DMA_PRIO_LOW, |
1945 | smc_pxa_dma_irq, NULL); | 1948 | smc_pxa_dma_irq, NULL); |
1946 | if (dma >= 0) | 1949 | if (dma >= 0) |
@@ -1980,7 +1983,7 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr, | |||
1980 | } | 1983 | } |
1981 | 1984 | ||
1982 | err_out: | 1985 | err_out: |
1983 | #ifdef SMC_USE_PXA_DMA | 1986 | #ifdef CONFIG_ARCH_PXA |
1984 | if (retval && dev->dma != (unsigned char)-1) | 1987 | if (retval && dev->dma != (unsigned char)-1) |
1985 | pxa_free_dma(dev->dma); | 1988 | pxa_free_dma(dev->dma); |
1986 | #endif | 1989 | #endif |
@@ -2198,7 +2201,7 @@ static int smc_drv_probe(struct platform_device *pdev) | |||
2198 | goto out_release_attrib; | 2201 | goto out_release_attrib; |
2199 | } | 2202 | } |
2200 | 2203 | ||
2201 | #ifdef SMC_USE_PXA_DMA | 2204 | #ifdef CONFIG_ARCH_PXA |
2202 | { | 2205 | { |
2203 | struct smc_local *lp = netdev_priv(ndev); | 2206 | struct smc_local *lp = netdev_priv(ndev); |
2204 | lp->device = &pdev->dev; | 2207 | lp->device = &pdev->dev; |
@@ -2241,7 +2244,7 @@ static int smc_drv_remove(struct platform_device *pdev) | |||
2241 | 2244 | ||
2242 | free_irq(ndev->irq, ndev); | 2245 | free_irq(ndev->irq, ndev); |
2243 | 2246 | ||
2244 | #ifdef SMC_USE_PXA_DMA | 2247 | #ifdef CONFIG_ARCH_PXA |
2245 | if (ndev->dma != (unsigned char)-1) | 2248 | if (ndev->dma != (unsigned char)-1) |
2246 | pxa_free_dma(ndev->dma); | 2249 | pxa_free_dma(ndev->dma); |
2247 | #endif | 2250 | #endif |
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 80fb80f39200..f02cc6ac248b 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -492,7 +492,7 @@ struct smc_local { | |||
492 | 492 | ||
493 | spinlock_t lock; | 493 | spinlock_t lock; |
494 | 494 | ||
495 | #ifdef SMC_USE_PXA_DMA | 495 | #ifdef CONFIG_ARCH_PXA |
496 | /* DMA needs the physical address of the chip */ | 496 | /* DMA needs the physical address of the chip */ |
497 | u_long physaddr; | 497 | u_long physaddr; |
498 | struct device *device; | 498 | struct device *device; |
@@ -510,7 +510,7 @@ struct smc_local { | |||
510 | #define SMC_16BIT(p) ((p)->cfg.flags & SMC91X_USE_16BIT) | 510 | #define SMC_16BIT(p) ((p)->cfg.flags & SMC91X_USE_16BIT) |
511 | #define SMC_32BIT(p) ((p)->cfg.flags & SMC91X_USE_32BIT) | 511 | #define SMC_32BIT(p) ((p)->cfg.flags & SMC91X_USE_32BIT) |
512 | 512 | ||
513 | #ifdef SMC_USE_PXA_DMA | 513 | #ifdef CONFIG_ARCH_PXA |
514 | /* | 514 | /* |
515 | * Let's use the DMA engine on the XScale PXA2xx for RX packets. This is | 515 | * Let's use the DMA engine on the XScale PXA2xx for RX packets. This is |
516 | * always happening in irq context so no need to worry about races. TX is | 516 | * always happening in irq context so no need to worry about races. TX is |
@@ -604,7 +604,7 @@ smc_pxa_dma_irq(int dma, void *dummy) | |||
604 | { | 604 | { |
605 | DCSR(dma) = 0; | 605 | DCSR(dma) = 0; |
606 | } | 606 | } |
607 | #endif /* SMC_USE_PXA_DMA */ | 607 | #endif /* CONFIG_ARCH_PXA */ |
608 | 608 | ||
609 | 609 | ||
610 | /* | 610 | /* |
diff --git a/include/linux/smc91x.h b/include/linux/smc91x.h index 0dea9459a8e4..3827b922ba1f 100644 --- a/include/linux/smc91x.h +++ b/include/linux/smc91x.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #define SMC91X_IO_SHIFT_3 (3 << 4) | 14 | #define SMC91X_IO_SHIFT_3 (3 << 4) |
15 | #define SMC91X_IO_SHIFT(x) (((x) >> 4) & 0x3) | 15 | #define SMC91X_IO_SHIFT(x) (((x) >> 4) & 0x3) |
16 | 16 | ||
17 | #define SMC91X_USE_DMA (1 << 6) | ||
18 | |||
17 | struct smc91x_platdata { | 19 | struct smc91x_platdata { |
18 | unsigned long flags; | 20 | unsigned long flags; |
19 | }; | 21 | }; |