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>
This commit is contained in:
committed by
Lennert Buytenhek
parent
fc0eb9f226
commit
ac840605f3
@@ -21,6 +21,10 @@ struct mv643xx_eth_shared_platform_data {
|
||||
unsigned int t_clk;
|
||||
};
|
||||
|
||||
#define MV643XX_ETH_PHY_ADDR_DEFAULT 0
|
||||
#define MV643XX_ETH_PHY_ADDR(x) (0x80 | (x))
|
||||
#define MV643XX_ETH_PHY_NONE 0xff
|
||||
|
||||
struct mv643xx_eth_platform_data {
|
||||
/*
|
||||
* Pointer back to our parent instance, and our port number.
|
||||
@@ -31,7 +35,6 @@ struct mv643xx_eth_platform_data {
|
||||
/*
|
||||
* Whether a PHY is present, and if yes, at which address.
|
||||
*/
|
||||
int force_phy_addr;
|
||||
int phy_addr;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user