Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105175
b: refs/heads/master
c: 52256c0
h: refs/heads/master
i:
  105173: 7f31340
  105171: 31ee03c
  105167: 5bf62fe
v: v3
  • Loading branch information
Eric Miao authored and Russell King committed Jul 12, 2008
1 parent 68fd59b commit 3bbbf53
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 159198862adad7109bb347bb30a620f67beac45f
refs/heads/master: 52256c0e06e4a4df67134b951a21b50c713a9588
13 changes: 8 additions & 5 deletions trunk/drivers/net/smc91x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1939,8 +1939,11 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr,
if (retval)
goto err_out;

#ifdef SMC_USE_PXA_DMA
{
#ifdef CONFIG_ARCH_PXA
# ifdef SMC_USE_PXA_DMA
lp->cfg.flags |= SMC91X_USE_DMA;
# endif
if (lp->cfg.flags & SMC91X_USE_DMA) {
int dma = pxa_request_dma(dev->name, DMA_PRIO_LOW,
smc_pxa_dma_irq, NULL);
if (dma >= 0)
Expand Down Expand Up @@ -1980,7 +1983,7 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr,
}

err_out:
#ifdef SMC_USE_PXA_DMA
#ifdef CONFIG_ARCH_PXA
if (retval && dev->dma != (unsigned char)-1)
pxa_free_dma(dev->dma);
#endif
Expand Down Expand Up @@ -2198,7 +2201,7 @@ static int smc_drv_probe(struct platform_device *pdev)
goto out_release_attrib;
}

#ifdef SMC_USE_PXA_DMA
#ifdef CONFIG_ARCH_PXA
{
struct smc_local *lp = netdev_priv(ndev);
lp->device = &pdev->dev;
Expand Down Expand Up @@ -2241,7 +2244,7 @@ static int smc_drv_remove(struct platform_device *pdev)

free_irq(ndev->irq, ndev);

#ifdef SMC_USE_PXA_DMA
#ifdef CONFIG_ARCH_PXA
if (ndev->dma != (unsigned char)-1)
pxa_free_dma(ndev->dma);
#endif
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/smc91x.h
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ struct smc_local {

spinlock_t lock;

#ifdef SMC_USE_PXA_DMA
#ifdef CONFIG_ARCH_PXA
/* DMA needs the physical address of the chip */
u_long physaddr;
struct device *device;
Expand All @@ -510,7 +510,7 @@ struct smc_local {
#define SMC_16BIT(p) ((p)->cfg.flags & SMC91X_USE_16BIT)
#define SMC_32BIT(p) ((p)->cfg.flags & SMC91X_USE_32BIT)

#ifdef SMC_USE_PXA_DMA
#ifdef CONFIG_ARCH_PXA
/*
* Let's use the DMA engine on the XScale PXA2xx for RX packets. This is
* always happening in irq context so no need to worry about races. TX is
Expand Down Expand Up @@ -604,7 +604,7 @@ smc_pxa_dma_irq(int dma, void *dummy)
{
DCSR(dma) = 0;
}
#endif /* SMC_USE_PXA_DMA */
#endif /* CONFIG_ARCH_PXA */


/*
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/smc91x.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#define SMC91X_IO_SHIFT_3 (3 << 4)
#define SMC91X_IO_SHIFT(x) (((x) >> 4) & 0x3)

#define SMC91X_USE_DMA (1 << 6)

struct smc91x_platdata {
unsigned long flags;
};
Expand Down

0 comments on commit 3bbbf53

Please sign in to comment.