Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ac840605 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Lennert Buytenhek
Browse files

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: default avatarLennert Buytenhek <buytenh@marvell.com>
parent fc0eb9f2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
#include "common.h"

static struct mv643xx_eth_platform_data db88f6281_ge00_data = {
	.phy_addr	= 8,
	.phy_addr	= MV643XX_ETH_PHY_ADDR(8),
};

static struct mv_sata_platform_data db88f6281_sata_data = {
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
#define RD88F6192_GPIO_USB_VBUS		10

static struct mv643xx_eth_platform_data rd88f6192_ge00_data = {
	.phy_addr	= 8,
	.phy_addr	= MV643XX_ETH_PHY_ADDR(8),
};

static struct mv_sata_platform_data rd88f6192_sata_data = {
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ static struct platform_device rd88f6281_nand_flash = {
};

static struct mv643xx_eth_platform_data rd88f6281_ge00_data = {
	.phy_addr	= -1,
	.phy_addr	= MV643XX_ETH_PHY_NONE,
	.speed		= SPEED_1000,
	.duplex		= DUPLEX_FULL,
};
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ static struct platform_device lb88rc8480_boot_flash = {
};

static struct mv643xx_eth_platform_data lb88rc8480_ge0_data = {
	.phy_addr	= 1,
	.phy_addr	= MV643XX_ETH_PHY_ADDR(1),
	.mac_addr	= { 0x00, 0x50, 0x43, 0x11, 0x22, 0x33 },
};

+4 −4
Original line number Diff line number Diff line
@@ -19,19 +19,19 @@
#include "common.h"

static struct mv643xx_eth_platform_data db78x00_ge00_data = {
	.phy_addr	= 8,
	.phy_addr	= MV643XX_ETH_PHY_ADDR(8),
};

static struct mv643xx_eth_platform_data db78x00_ge01_data = {
	.phy_addr	= 9,
	.phy_addr	= MV643XX_ETH_PHY_ADDR(9),
};

static struct mv643xx_eth_platform_data db78x00_ge10_data = {
	.phy_addr	= -1,
	.phy_addr	= MV643XX_ETH_PHY_NONE,
};

static struct mv643xx_eth_platform_data db78x00_ge11_data = {
	.phy_addr	= -1,
	.phy_addr	= MV643XX_ETH_PHY_NONE,
};

static struct mv_sata_platform_data db78x00_sata_data = {
Loading