aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-02-05 00:02:01 +0000
committerJeff Garzik <jeff@garzik.org>2008-02-11 11:05:22 -0500
commit33ba509191dd6c6735cc96d2ba411fa311f9a6be (patch)
tree94294478bc81af77c5e05cd977314baf207d37e6 /drivers
parent931165739a75f88530d5b02cafaacf9bb6b66d87 (diff)
DM9000: Add platform data to specify external phy
Patch from: Laurent Pinchart <laurentp@cse-semaphore.com> This patch adds a flag to the DM9000 platform data which, when set, configures the device to use an external PHY. Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Ben Dooks <ben-linuy@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/dm9000.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index e4390d917b8..b5e47dfa552 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -137,6 +137,7 @@ typedef struct board_info {
u16 dbug_cnt;
u8 io_mode; /* 0:word, 2:byte */
u8 phy_addr;
+ unsigned int flags;
void (*inblk)(void __iomem *port, void *data, int length);
void (*outblk)(void __iomem *port, void *data, int length);
@@ -525,6 +526,8 @@ dm9000_probe(struct platform_device *pdev)
if (pdata->dumpblk != NULL)
db->dumpblk = pdata->dumpblk;
+
+ db->flags = pdata->flags;
}
dm9000_reset(db);
@@ -665,6 +668,9 @@ dm9000_init_dm9000(struct net_device *dev)
iow(db, DM9000_GPCR, GPCR_GEP_CNTL); /* Let GPIO0 output */
iow(db, DM9000_GPR, 0); /* Enable PHY */
+ if (db->flags & DM9000_PLATF_EXT_PHY)
+ iow(db, DM9000_NCR, NCR_EXT_PHY);
+
/* Program operating register */
iow(db, DM9000_TCR, 0); /* TX Polling clear */
iow(db, DM9000_BPTR, 0x3f); /* Less 3Kb, 200us */