diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-08-26 08:06:47 -0400 |
---|---|---|
committer | Lennert Buytenhek <buytenh@marvell.com> | 2008-09-05 00:33:59 -0400 |
commit | ac840605f3b1d9b99e1e6629a54994f8e003ff91 (patch) | |
tree | c0d47ef7ca41c4f88baa5e66b07f95ad586c7341 /arch/powerpc/sysdev | |
parent | fc0eb9f226d8ecc8e3b563bf808bd6d61a6153a1 (diff) |
mv643xx_eth: remove force_phy_addr field
Currently, there are two different fields in the
mv643xx_eth_platform_data struct that together describe the PHY
address -- one field (phy_addr) has the address of the PHY, but if
that address is zero, a second field (force_phy_addr) needs to be
set to distinguish the actual address zero from a zero due to not
having filled in the PHY address explicitly (which should mean
'use the default PHY address').
If we are a bit smarter about the encoding of the phy_addr field,
we can avoid the need for a second field -- this patch does that.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/mv64x60_dev.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c index 32e0ad0ebea8..b6bd775d2e22 100644 --- a/arch/powerpc/sysdev/mv64x60_dev.c +++ b/arch/powerpc/sysdev/mv64x60_dev.c | |||
@@ -293,10 +293,8 @@ static int __init mv64x60_eth_device_setup(struct device_node *np, int id, | |||
293 | return -ENODEV; | 293 | return -ENODEV; |
294 | 294 | ||
295 | prop = of_get_property(phy, "reg", NULL); | 295 | prop = of_get_property(phy, "reg", NULL); |
296 | if (prop) { | 296 | if (prop) |
297 | pdata.force_phy_addr = 1; | 297 | pdata.phy_addr = MV643XX_ETH_PHY_ADDR(*prop); |
298 | pdata.phy_addr = *prop; | ||
299 | } | ||
300 | 298 | ||
301 | of_node_put(phy); | 299 | of_node_put(phy); |
302 | 300 | ||