Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105172
b: refs/heads/master
c: fa6d3be
h: refs/heads/master
v: v3
  • Loading branch information
Eric Miao authored and Russell King committed Jul 12, 2008
1 parent 31ee03c commit d92e1eb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 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: d280eadc4fba0bf99fb1c3b60e8c5e007f7da02c
refs/heads/master: fa6d3be08538bb80274d20c7e59f9beca48fa44a
12 changes: 3 additions & 9 deletions trunk/drivers/net/smc91x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2154,20 +2154,14 @@ static int smc_drv_probe(struct platform_device *pdev)

lp = netdev_priv(ndev);

#ifdef SMC_DYNAMIC_BUS_CONFIG
if (pd)
memcpy(&lp->cfg, pd, sizeof(lp->cfg));
else {
lp->cfg.flags = SMC91X_USE_8BIT;
lp->cfg.flags |= SMC91X_USE_16BIT;
lp->cfg.flags |= SMC91X_USE_32BIT;
lp->cfg.flags |= (SMC_CAN_USE_8BIT) ? SMC91X_USE_8BIT : 0;
lp->cfg.flags |= (SMC_CAN_USE_16BIT) ? SMC91X_USE_16BIT : 0;
lp->cfg.flags |= (SMC_CAN_USE_32BIT) ? SMC91X_USE_32BIT : 0;
}

lp->cfg.flags &= ~(SMC_CAN_USE_8BIT ? 0 : SMC91X_USE_8BIT);
lp->cfg.flags &= ~(SMC_CAN_USE_16BIT ? 0 : SMC91X_USE_16BIT);
lp->cfg.flags &= ~(SMC_CAN_USE_32BIT ? 0 : SMC91X_USE_32BIT);
#endif

ndev->dma = (unsigned char)-1;

ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
Expand Down
13 changes: 3 additions & 10 deletions trunk/drivers/net/smc91x.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r,
#define RPC_LSA_DEFAULT RPC_LED_100_10
#define RPC_LSB_DEFAULT RPC_LED_TX_RX

#define SMC_DYNAMIC_BUS_CONFIG
#endif


Expand Down Expand Up @@ -504,15 +503,9 @@ struct smc_local {
struct smc91x_platdata cfg;
};

#ifdef SMC_DYNAMIC_BUS_CONFIG
#define SMC_8BIT(p) (((p)->cfg.flags & SMC91X_USE_8BIT) && SMC_CAN_USE_8BIT)
#define SMC_16BIT(p) (((p)->cfg.flags & SMC91X_USE_16BIT) && SMC_CAN_USE_16BIT)
#define SMC_32BIT(p) (((p)->cfg.flags & SMC91X_USE_32BIT) && SMC_CAN_USE_32BIT)
#else
#define SMC_8BIT(p) SMC_CAN_USE_8BIT
#define SMC_16BIT(p) SMC_CAN_USE_16BIT
#define SMC_32BIT(p) SMC_CAN_USE_32BIT
#endif
#define SMC_8BIT(p) ((p)->cfg.flags & SMC91X_USE_8BIT)
#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
/*
Expand Down

0 comments on commit d92e1eb

Please sign in to comment.