aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2008-08-26 08:06:47 -0400
committerLennert Buytenhek <buytenh@marvell.com>2008-09-05 00:33:59 -0400
commitac840605f3b1d9b99e1e6629a54994f8e003ff91 (patch)
treec0d47ef7ca41c4f88baa5e66b07f95ad586c7341 /arch/arm/mach-orion5x
parentfc0eb9f226d8ecc8e3b563bf808bd6d61a6153a1 (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/arm/mach-orion5x')
-rw-r--r--arch/arm/mach-orion5x/db88f5281-setup.c2
-rw-r--r--arch/arm/mach-orion5x/dns323-setup.c2
-rw-r--r--arch/arm/mach-orion5x/kurobox_pro-setup.c2
-rw-r--r--arch/arm/mach-orion5x/mss2-setup.c2
-rw-r--r--arch/arm/mach-orion5x/mv2120-setup.c2
-rw-r--r--arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c2
-rw-r--r--arch/arm/mach-orion5x/rd88f5181l-ge-setup.c2
-rw-r--r--arch/arm/mach-orion5x/rd88f5182-setup.c2
-rw-r--r--arch/arm/mach-orion5x/ts78xx-setup.c3
-rw-r--r--arch/arm/mach-orion5x/tsx09-common.c2
-rw-r--r--arch/arm/mach-orion5x/wnr854t-setup.c2
-rw-r--r--arch/arm/mach-orion5x/wrt350n-v2-setup.c2
12 files changed, 12 insertions, 13 deletions
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c
index ff13e9060b18..d318bea2af91 100644
--- a/arch/arm/mach-orion5x/db88f5281-setup.c
+++ b/arch/arm/mach-orion5x/db88f5281-setup.c
@@ -285,7 +285,7 @@ subsys_initcall(db88f5281_pci_init);
285 * Ethernet 285 * Ethernet
286 ****************************************************************************/ 286 ****************************************************************************/
287static struct mv643xx_eth_platform_data db88f5281_eth_data = { 287static struct mv643xx_eth_platform_data db88f5281_eth_data = {
288 .phy_addr = 8, 288 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
289}; 289};
290 290
291/***************************************************************************** 291/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index b38c65ccfb15..3e66098340a5 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -79,7 +79,7 @@ subsys_initcall(dns323_pci_init);
79 */ 79 */
80 80
81static struct mv643xx_eth_platform_data dns323_eth_data = { 81static struct mv643xx_eth_platform_data dns323_eth_data = {
82 .phy_addr = 8, 82 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
83}; 83};
84 84
85/**************************************************************************** 85/****************************************************************************
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c
index e321ec331839..610f2a6297f8 100644
--- a/arch/arm/mach-orion5x/kurobox_pro-setup.c
+++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c
@@ -161,7 +161,7 @@ subsys_initcall(kurobox_pro_pci_init);
161 ****************************************************************************/ 161 ****************************************************************************/
162 162
163static struct mv643xx_eth_platform_data kurobox_pro_eth_data = { 163static struct mv643xx_eth_platform_data kurobox_pro_eth_data = {
164 .phy_addr = 8, 164 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
165}; 165};
166 166
167/***************************************************************************** 167/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c
index 53ff1893b883..68acca98e638 100644
--- a/arch/arm/mach-orion5x/mss2-setup.c
+++ b/arch/arm/mach-orion5x/mss2-setup.c
@@ -109,7 +109,7 @@ subsys_initcall(mss2_pci_init);
109 ****************************************************************************/ 109 ****************************************************************************/
110 110
111static struct mv643xx_eth_platform_data mss2_eth_data = { 111static struct mv643xx_eth_platform_data mss2_eth_data = {
112 .phy_addr = 8, 112 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
113}; 113};
114 114
115/***************************************************************************** 115/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c
index 978d4d599396..97c9ccb2ac60 100644
--- a/arch/arm/mach-orion5x/mv2120-setup.c
+++ b/arch/arm/mach-orion5x/mv2120-setup.c
@@ -39,7 +39,7 @@
39 * Ethernet 39 * Ethernet
40 ****************************************************************************/ 40 ****************************************************************************/
41static struct mv643xx_eth_platform_data mv2120_eth_data = { 41static struct mv643xx_eth_platform_data mv2120_eth_data = {
42 .phy_addr = 8, 42 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
43}; 43};
44 44
45static struct mv_sata_platform_data mv2120_sata_data = { 45static struct mv_sata_platform_data mv2120_sata_data = {
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
index e72fe1e065e8..500cdadaf09c 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
@@ -88,7 +88,7 @@ static struct orion5x_mpp_mode rd88f5181l_fxo_mpp_modes[] __initdata = {
88}; 88};
89 89
90static struct mv643xx_eth_platform_data rd88f5181l_fxo_eth_data = { 90static struct mv643xx_eth_platform_data rd88f5181l_fxo_eth_data = {
91 .phy_addr = -1, 91 .phy_addr = MV643XX_ETH_PHY_NONE,
92 .speed = SPEED_1000, 92 .speed = SPEED_1000,
93 .duplex = DUPLEX_FULL, 93 .duplex = DUPLEX_FULL,
94}; 94};
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
index a1fe3257320d..ebde81416499 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
@@ -89,7 +89,7 @@ static struct orion5x_mpp_mode rd88f5181l_ge_mpp_modes[] __initdata = {
89}; 89};
90 90
91static struct mv643xx_eth_platform_data rd88f5181l_ge_eth_data = { 91static struct mv643xx_eth_platform_data rd88f5181l_ge_eth_data = {
92 .phy_addr = -1, 92 .phy_addr = MV643XX_ETH_PHY_NONE,
93 .speed = SPEED_1000, 93 .speed = SPEED_1000,
94 .duplex = DUPLEX_FULL, 94 .duplex = DUPLEX_FULL,
95}; 95};
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c
index 4c3bcd76ac85..a04f9e4b633a 100644
--- a/arch/arm/mach-orion5x/rd88f5182-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
@@ -221,7 +221,7 @@ subsys_initcall(rd88f5182_pci_init);
221 ****************************************************************************/ 221 ****************************************************************************/
222 222
223static struct mv643xx_eth_platform_data rd88f5182_eth_data = { 223static struct mv643xx_eth_platform_data rd88f5182_eth_data = {
224 .phy_addr = 8, 224 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
225}; 225};
226 226
227/***************************************************************************** 227/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
index ae0a5dccd2a1..1368e9fd1a06 100644
--- a/arch/arm/mach-orion5x/ts78xx-setup.c
+++ b/arch/arm/mach-orion5x/ts78xx-setup.c
@@ -103,8 +103,7 @@ static struct platform_device ts78xx_nor_boot_flash = {
103 * Ethernet 103 * Ethernet
104 ****************************************************************************/ 104 ****************************************************************************/
105static struct mv643xx_eth_platform_data ts78xx_eth_data = { 105static struct mv643xx_eth_platform_data ts78xx_eth_data = {
106 .phy_addr = 0, 106 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
107 .force_phy_addr = 1,
108}; 107};
109 108
110/***************************************************************************** 109/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/tsx09-common.c b/arch/arm/mach-orion5x/tsx09-common.c
index 83feac3147a6..19cde24fbfdf 100644
--- a/arch/arm/mach-orion5x/tsx09-common.c
+++ b/arch/arm/mach-orion5x/tsx09-common.c
@@ -48,7 +48,7 @@ void qnap_tsx09_power_off(void)
48 ****************************************************************************/ 48 ****************************************************************************/
49 49
50struct mv643xx_eth_platform_data qnap_tsx09_eth_data = { 50struct mv643xx_eth_platform_data qnap_tsx09_eth_data = {
51 .phy_addr = 8, 51 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
52}; 52};
53 53
54static int __init qnap_tsx09_parse_hex_nibble(char n) 54static int __init qnap_tsx09_parse_hex_nibble(char n)
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c
index b6bc43e07eed..7ddc22c2bb54 100644
--- a/arch/arm/mach-orion5x/wnr854t-setup.c
+++ b/arch/arm/mach-orion5x/wnr854t-setup.c
@@ -92,7 +92,7 @@ static struct platform_device wnr854t_nor_flash = {
92}; 92};
93 93
94static struct mv643xx_eth_platform_data wnr854t_eth_data = { 94static struct mv643xx_eth_platform_data wnr854t_eth_data = {
95 .phy_addr = -1, 95 .phy_addr = MV643XX_ETH_PHY_NONE,
96 .speed = SPEED_1000, 96 .speed = SPEED_1000,
97 .duplex = DUPLEX_FULL, 97 .duplex = DUPLEX_FULL,
98}; 98};
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
index b10da17b3fbd..9a4fd5256462 100644
--- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c
+++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
@@ -100,7 +100,7 @@ static struct platform_device wrt350n_v2_nor_flash = {
100}; 100};
101 101
102static struct mv643xx_eth_platform_data wrt350n_v2_eth_data = { 102static struct mv643xx_eth_platform_data wrt350n_v2_eth_data = {
103 .phy_addr = -1, 103 .phy_addr = MV643XX_ETH_PHY_NONE,
104 .speed = SPEED_1000, 104 .speed = SPEED_1000,
105 .duplex = DUPLEX_FULL, 105 .duplex = DUPLEX_FULL,
106}; 106};