Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111890
b: refs/heads/master
c: ac84060
h: refs/heads/master
v: v3
  • Loading branch information
Lennert Buytenhek authored and Lennert Buytenhek committed Sep 5, 2008
1 parent 6cd8757 commit bd3a605
Show file tree
Hide file tree
Showing 21 changed files with 29 additions and 29 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: fc0eb9f226d8ecc8e3b563bf808bd6d61a6153a1
refs/heads/master: ac840605f3b1d9b99e1e6629a54994f8e003ff91
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-kirkwood/rd88f6281-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-loki/lb88rc8480-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
};

Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-orion5x/db88f5281-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ subsys_initcall(db88f5281_pci_init);
* Ethernet
****************************************************************************/
static struct mv643xx_eth_platform_data db88f5281_eth_data = {
.phy_addr = 8,
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
};

/*****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-orion5x/dns323-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ subsys_initcall(dns323_pci_init);
*/

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

/****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-orion5x/kurobox_pro-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ subsys_initcall(kurobox_pro_pci_init);
****************************************************************************/

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

/*****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-orion5x/mss2-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ subsys_initcall(mss2_pci_init);
****************************************************************************/

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

/*****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-orion5x/mv2120-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* Ethernet
****************************************************************************/
static struct mv643xx_eth_platform_data mv2120_eth_data = {
.phy_addr = 8,
.phy_addr = MV643XX_ETH_PHY_ADDR(8),
};

static struct mv_sata_platform_data mv2120_sata_data = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static struct orion5x_mpp_mode rd88f5181l_fxo_mpp_modes[] __initdata = {
};

static struct mv643xx_eth_platform_data rd88f5181l_fxo_eth_data = {
.phy_addr = -1,
.phy_addr = MV643XX_ETH_PHY_NONE,
.speed = SPEED_1000,
.duplex = DUPLEX_FULL,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static struct orion5x_mpp_mode rd88f5181l_ge_mpp_modes[] __initdata = {
};

static struct mv643xx_eth_platform_data rd88f5181l_ge_eth_data = {
.phy_addr = -1,
.phy_addr = MV643XX_ETH_PHY_NONE,
.speed = SPEED_1000,
.duplex = DUPLEX_FULL,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-orion5x/rd88f5182-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ subsys_initcall(rd88f5182_pci_init);
****************************************************************************/

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

/*****************************************************************************
Expand Down
3 changes: 1 addition & 2 deletions trunk/arch/arm/mach-orion5x/ts78xx-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ static struct platform_device ts78xx_nor_boot_flash = {
* Ethernet
****************************************************************************/
static struct mv643xx_eth_platform_data ts78xx_eth_data = {
.phy_addr = 0,
.force_phy_addr = 1,
.phy_addr = MV643XX_ETH_PHY_ADDR(0),
};

/*****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-orion5x/tsx09-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void qnap_tsx09_power_off(void)
****************************************************************************/

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

static int __init qnap_tsx09_parse_hex_nibble(char n)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-orion5x/wnr854t-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static struct platform_device wnr854t_nor_flash = {
};

static struct mv643xx_eth_platform_data wnr854t_eth_data = {
.phy_addr = -1,
.phy_addr = MV643XX_ETH_PHY_NONE,
.speed = SPEED_1000,
.duplex = DUPLEX_FULL,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-orion5x/wrt350n-v2-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static struct platform_device wrt350n_v2_nor_flash = {
};

static struct mv643xx_eth_platform_data wrt350n_v2_eth_data = {
.phy_addr = -1,
.phy_addr = MV643XX_ETH_PHY_NONE,
.speed = SPEED_1000,
.duplex = DUPLEX_FULL,
};
Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/powerpc/sysdev/mv64x60_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,8 @@ static int __init mv64x60_eth_device_setup(struct device_node *np, int id,
return -ENODEV;

prop = of_get_property(phy, "reg", NULL);
if (prop) {
pdata.force_phy_addr = 1;
pdata.phy_addr = *prop;
}
if (prop)
pdata.phy_addr = MV643XX_ETH_PHY_ADDR(*prop);

of_node_put(phy);

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2412,10 +2412,10 @@ static void set_params(struct mv643xx_eth_private *mp,
else
uc_addr_get(mp, dev->dev_addr);

if (pd->phy_addr == -1) {
if (pd->phy_addr == MV643XX_ETH_PHY_NONE) {
mp->phy_addr = -1;
} else {
if (pd->force_phy_addr || pd->phy_addr) {
if (pd->phy_addr != MV643XX_ETH_PHY_ADDR_DEFAULT) {
mp->phy_addr = pd->phy_addr & 0x3f;
phy_addr_set(mp, mp->phy_addr);
} else {
Expand Down
5 changes: 4 additions & 1 deletion trunk/include/linux/mv643xx_eth.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;

/*
Expand Down

0 comments on commit bd3a605

Please sign in to comment.