diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2008-02-25 19:43:20 -0500 |
---|---|---|
committer | Josh Boyer <jwboyer@linux.vnet.ibm.com> | 2008-03-26 08:19:16 -0400 |
commit | ecc6cd73b7ccfa10c1f07d017fc7f62fe78eaab5 (patch) | |
tree | a98a3e830ad2e59959c156fb79f5c2c25024eb44 /arch | |
parent | 54f53f2b94feb72622bec7a8563fc487d9f97720 (diff) |
[POWERPC] Start removing linux,network-index in favour of aliases
This patch alters the bootwrapper for a number of machines (roubhly
all 4xx based cuboot or treeboot platforms) to use aliases instead of
the linux,network-index hack to work out which MAC address to attach
to which ethernet device node.
The now obsolete linux,network-index properties are removed from the
corresponding device trees. This won't break backwards compatiblity,
because in cases where this fixup code is relevant, the device tree is
part of the kernel image.
The references to linux,network-index are removed from
booting-without-of.txt. Not only is it now deprecated, but as a hack
applicable only when the device tree blob and fixup code were in the
same image, this property never belonged in booting-without-of.txt
which describes the interface between the kernel and firmware or
bootloaders which produce a device tree. By the time the device tree
reaches the kernel, all the MAC addresses must be fully filled in.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/boot/bamboo.c | 3 | ||||
-rw-r--r-- | arch/powerpc/boot/cuboot-rainier.c | 3 | ||||
-rw-r--r-- | arch/powerpc/boot/cuboot-sequoia.c | 3 | ||||
-rw-r--r-- | arch/powerpc/boot/cuboot-taishan.c | 3 | ||||
-rw-r--r-- | arch/powerpc/boot/cuboot-warp.c | 2 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/bamboo.dts | 2 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/ebony.dts | 2 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/rainier.dts | 2 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/sequoia.dts | 2 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/taishan.dts | 4 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/walnut.dts | 1 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/warp.dts | 1 | ||||
-rw-r--r-- | arch/powerpc/boot/ebony.c | 3 | ||||
-rw-r--r-- | arch/powerpc/boot/treeboot-walnut.c | 2 |
14 files changed, 12 insertions, 21 deletions
diff --git a/arch/powerpc/boot/bamboo.c b/arch/powerpc/boot/bamboo.c index 54b33f1500e2..b82cacbc60db 100644 --- a/arch/powerpc/boot/bamboo.c +++ b/arch/powerpc/boot/bamboo.c | |||
@@ -33,7 +33,8 @@ static void bamboo_fixups(void) | |||
33 | ibm440ep_fixup_clocks(sysclk, 11059200, 25000000); | 33 | ibm440ep_fixup_clocks(sysclk, 11059200, 25000000); |
34 | ibm4xx_sdram_fixup_memsize(); | 34 | ibm4xx_sdram_fixup_memsize(); |
35 | ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00); | 35 | ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00); |
36 | dt_fixup_mac_addresses(bamboo_mac0, bamboo_mac1); | 36 | dt_fixup_mac_address_by_alias("ethernet0", bamboo_mac0); |
37 | dt_fixup_mac_address_by_alias("ethernet1", bamboo_mac1); | ||
37 | } | 38 | } |
38 | 39 | ||
39 | void bamboo_init(void *mac0, void *mac1) | 40 | void bamboo_init(void *mac0, void *mac1) |
diff --git a/arch/powerpc/boot/cuboot-rainier.c b/arch/powerpc/boot/cuboot-rainier.c index cf452b66dce8..0a3fddee54df 100644 --- a/arch/powerpc/boot/cuboot-rainier.c +++ b/arch/powerpc/boot/cuboot-rainier.c | |||
@@ -42,7 +42,8 @@ static void rainier_fixups(void) | |||
42 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); | 42 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); |
43 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 43 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
44 | ibm4xx_denali_fixup_memsize(); | 44 | ibm4xx_denali_fixup_memsize(); |
45 | dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr); | 45 | dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); |
46 | dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); | ||
46 | } | 47 | } |
47 | 48 | ||
48 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | 49 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, |
diff --git a/arch/powerpc/boot/cuboot-sequoia.c b/arch/powerpc/boot/cuboot-sequoia.c index f555575a44de..caf8f2e842ea 100644 --- a/arch/powerpc/boot/cuboot-sequoia.c +++ b/arch/powerpc/boot/cuboot-sequoia.c | |||
@@ -42,7 +42,8 @@ static void sequoia_fixups(void) | |||
42 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); | 42 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); |
43 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 43 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
44 | ibm4xx_denali_fixup_memsize(); | 44 | ibm4xx_denali_fixup_memsize(); |
45 | dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr); | 45 | dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); |
46 | dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); | ||
46 | } | 47 | } |
47 | 48 | ||
48 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | 49 | void platform_init(unsigned long r3, unsigned long r4, unsigned long r5, |
diff --git a/arch/powerpc/boot/cuboot-taishan.c b/arch/powerpc/boot/cuboot-taishan.c index b55b80467eed..9bc906a754dd 100644 --- a/arch/powerpc/boot/cuboot-taishan.c +++ b/arch/powerpc/boot/cuboot-taishan.c | |||
@@ -40,7 +40,8 @@ static void taishan_fixups(void) | |||
40 | 40 | ||
41 | ibm4xx_sdram_fixup_memsize(); | 41 | ibm4xx_sdram_fixup_memsize(); |
42 | 42 | ||
43 | dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr); | 43 | dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); |
44 | dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr); | ||
44 | 45 | ||
45 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 46 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
46 | } | 47 | } |
diff --git a/arch/powerpc/boot/cuboot-warp.c b/arch/powerpc/boot/cuboot-warp.c index 3db93e85e9ea..eb108a877492 100644 --- a/arch/powerpc/boot/cuboot-warp.c +++ b/arch/powerpc/boot/cuboot-warp.c | |||
@@ -24,7 +24,7 @@ static void warp_fixups(void) | |||
24 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); | 24 | ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); |
25 | ibm4xx_sdram_fixup_memsize(); | 25 | ibm4xx_sdram_fixup_memsize(); |
26 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 26 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
27 | dt_fixup_mac_addresses(&bd.bi_enetaddr); | 27 | dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr); |
28 | } | 28 | } |
29 | 29 | ||
30 | 30 | ||
diff --git a/arch/powerpc/boot/dts/bamboo.dts b/arch/powerpc/boot/dts/bamboo.dts index 7dc37c9a7446..ba2521bdaab1 100644 --- a/arch/powerpc/boot/dts/bamboo.dts +++ b/arch/powerpc/boot/dts/bamboo.dts | |||
@@ -204,7 +204,6 @@ | |||
204 | }; | 204 | }; |
205 | 205 | ||
206 | EMAC0: ethernet@ef600e00 { | 206 | EMAC0: ethernet@ef600e00 { |
207 | linux,network-index = <0>; | ||
208 | device_type = "network"; | 207 | device_type = "network"; |
209 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; | 208 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; |
210 | interrupt-parent = <&UIC1>; | 209 | interrupt-parent = <&UIC1>; |
@@ -225,7 +224,6 @@ | |||
225 | }; | 224 | }; |
226 | 225 | ||
227 | EMAC1: ethernet@ef600f00 { | 226 | EMAC1: ethernet@ef600f00 { |
228 | linux,network-index = <1>; | ||
229 | device_type = "network"; | 227 | device_type = "network"; |
230 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; | 228 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; |
231 | interrupt-parent = <&UIC1>; | 229 | interrupt-parent = <&UIC1>; |
diff --git a/arch/powerpc/boot/dts/ebony.dts b/arch/powerpc/boot/dts/ebony.dts index 0b000cb7ed8b..5079dc890e0e 100644 --- a/arch/powerpc/boot/dts/ebony.dts +++ b/arch/powerpc/boot/dts/ebony.dts | |||
@@ -241,7 +241,6 @@ | |||
241 | }; | 241 | }; |
242 | 242 | ||
243 | EMAC0: ethernet@40000800 { | 243 | EMAC0: ethernet@40000800 { |
244 | linux,network-index = <0>; | ||
245 | device_type = "network"; | 244 | device_type = "network"; |
246 | compatible = "ibm,emac-440gp", "ibm,emac"; | 245 | compatible = "ibm,emac-440gp", "ibm,emac"; |
247 | interrupt-parent = <&UIC1>; | 246 | interrupt-parent = <&UIC1>; |
@@ -261,7 +260,6 @@ | |||
261 | zmii-channel = <0>; | 260 | zmii-channel = <0>; |
262 | }; | 261 | }; |
263 | EMAC1: ethernet@40000900 { | 262 | EMAC1: ethernet@40000900 { |
264 | linux,network-index = <1>; | ||
265 | device_type = "network"; | 263 | device_type = "network"; |
266 | compatible = "ibm,emac-440gp", "ibm,emac"; | 264 | compatible = "ibm,emac-440gp", "ibm,emac"; |
267 | interrupt-parent = <&UIC1>; | 265 | interrupt-parent = <&UIC1>; |
diff --git a/arch/powerpc/boot/dts/rainier.dts b/arch/powerpc/boot/dts/rainier.dts index f947c75a2e94..9f6f58b2e077 100644 --- a/arch/powerpc/boot/dts/rainier.dts +++ b/arch/powerpc/boot/dts/rainier.dts | |||
@@ -254,7 +254,6 @@ | |||
254 | }; | 254 | }; |
255 | 255 | ||
256 | EMAC0: ethernet@ef600e00 { | 256 | EMAC0: ethernet@ef600e00 { |
257 | linux,network-index = <0>; | ||
258 | device_type = "network"; | 257 | device_type = "network"; |
259 | compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4"; | 258 | compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4"; |
260 | interrupt-parent = <&EMAC0>; | 259 | interrupt-parent = <&EMAC0>; |
@@ -284,7 +283,6 @@ | |||
284 | }; | 283 | }; |
285 | 284 | ||
286 | EMAC1: ethernet@ef600f00 { | 285 | EMAC1: ethernet@ef600f00 { |
287 | linux,network-index = <1>; | ||
288 | device_type = "network"; | 286 | device_type = "network"; |
289 | compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4"; | 287 | compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4"; |
290 | interrupt-parent = <&EMAC1>; | 288 | interrupt-parent = <&EMAC1>; |
diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/sequoia.dts index 8db9515d7dc3..675026bf1fb0 100644 --- a/arch/powerpc/boot/dts/sequoia.dts +++ b/arch/powerpc/boot/dts/sequoia.dts | |||
@@ -269,7 +269,6 @@ | |||
269 | }; | 269 | }; |
270 | 270 | ||
271 | EMAC0: ethernet@ef600e00 { | 271 | EMAC0: ethernet@ef600e00 { |
272 | linux,network-index = <0>; | ||
273 | device_type = "network"; | 272 | device_type = "network"; |
274 | compatible = "ibm,emac-440epx", "ibm,emac4"; | 273 | compatible = "ibm,emac-440epx", "ibm,emac4"; |
275 | interrupt-parent = <&EMAC0>; | 274 | interrupt-parent = <&EMAC0>; |
@@ -299,7 +298,6 @@ | |||
299 | }; | 298 | }; |
300 | 299 | ||
301 | EMAC1: ethernet@ef600f00 { | 300 | EMAC1: ethernet@ef600f00 { |
302 | linux,network-index = <1>; | ||
303 | device_type = "network"; | 301 | device_type = "network"; |
304 | compatible = "ibm,emac-440epx", "ibm,emac4"; | 302 | compatible = "ibm,emac-440epx", "ibm,emac4"; |
305 | interrupt-parent = <&EMAC1>; | 303 | interrupt-parent = <&EMAC1>; |
diff --git a/arch/powerpc/boot/dts/taishan.dts b/arch/powerpc/boot/dts/taishan.dts index 8278068c802c..466c3f35ce13 100644 --- a/arch/powerpc/boot/dts/taishan.dts +++ b/arch/powerpc/boot/dts/taishan.dts | |||
@@ -235,7 +235,6 @@ | |||
235 | 235 | ||
236 | EMAC0: ethernet@40000800 { | 236 | EMAC0: ethernet@40000800 { |
237 | unused = <1>; | 237 | unused = <1>; |
238 | linux,network-index = <2>; | ||
239 | device_type = "network"; | 238 | device_type = "network"; |
240 | compatible = "ibm,emac-440gx", "ibm,emac4"; | 239 | compatible = "ibm,emac-440gx", "ibm,emac4"; |
241 | interrupt-parent = <&UIC1>; | 240 | interrupt-parent = <&UIC1>; |
@@ -256,7 +255,6 @@ | |||
256 | }; | 255 | }; |
257 | EMAC1: ethernet@40000900 { | 256 | EMAC1: ethernet@40000900 { |
258 | unused = <1>; | 257 | unused = <1>; |
259 | linux,network-index = <3>; | ||
260 | device_type = "network"; | 258 | device_type = "network"; |
261 | compatible = "ibm,emac-440gx", "ibm,emac4"; | 259 | compatible = "ibm,emac-440gx", "ibm,emac4"; |
262 | interrupt-parent = <&UIC1>; | 260 | interrupt-parent = <&UIC1>; |
@@ -277,7 +275,6 @@ | |||
277 | }; | 275 | }; |
278 | 276 | ||
279 | EMAC2: ethernet@40000c00 { | 277 | EMAC2: ethernet@40000c00 { |
280 | linux,network-index = <0>; | ||
281 | device_type = "network"; | 278 | device_type = "network"; |
282 | compatible = "ibm,emac-440gx", "ibm,emac4"; | 279 | compatible = "ibm,emac-440gx", "ibm,emac4"; |
283 | interrupt-parent = <&UIC2>; | 280 | interrupt-parent = <&UIC2>; |
@@ -300,7 +297,6 @@ | |||
300 | }; | 297 | }; |
301 | 298 | ||
302 | EMAC3: ethernet@40000e00 { | 299 | EMAC3: ethernet@40000e00 { |
303 | linux,network-index = <1>; | ||
304 | device_type = "network"; | 300 | device_type = "network"; |
305 | compatible = "ibm,emac-440gx", "ibm,emac4"; | 301 | compatible = "ibm,emac-440gx", "ibm,emac4"; |
306 | interrupt-parent = <&UIC2>; | 302 | interrupt-parent = <&UIC2>; |
diff --git a/arch/powerpc/boot/dts/walnut.dts b/arch/powerpc/boot/dts/walnut.dts index dcc21b0438e5..a328607c8f84 100644 --- a/arch/powerpc/boot/dts/walnut.dts +++ b/arch/powerpc/boot/dts/walnut.dts | |||
@@ -125,7 +125,6 @@ | |||
125 | }; | 125 | }; |
126 | 126 | ||
127 | EMAC: ethernet@ef600800 { | 127 | EMAC: ethernet@ef600800 { |
128 | linux,network-index = <0>; | ||
129 | device_type = "network"; | 128 | device_type = "network"; |
130 | compatible = "ibm,emac-405gp", "ibm,emac"; | 129 | compatible = "ibm,emac-405gp", "ibm,emac"; |
131 | interrupt-parent = <&UIC0>; | 130 | interrupt-parent = <&UIC0>; |
diff --git a/arch/powerpc/boot/dts/warp.dts b/arch/powerpc/boot/dts/warp.dts index dc1499d30f43..b04a52e22bf5 100644 --- a/arch/powerpc/boot/dts/warp.dts +++ b/arch/powerpc/boot/dts/warp.dts | |||
@@ -204,7 +204,6 @@ | |||
204 | }; | 204 | }; |
205 | 205 | ||
206 | EMAC0: ethernet@ef600e00 { | 206 | EMAC0: ethernet@ef600e00 { |
207 | linux,network-index = <0>; | ||
208 | device_type = "network"; | 207 | device_type = "network"; |
209 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; | 208 | compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac"; |
210 | interrupt-parent = <&UIC1>; | 209 | interrupt-parent = <&UIC1>; |
diff --git a/arch/powerpc/boot/ebony.c b/arch/powerpc/boot/ebony.c index f61364c47a76..5532ab3221dd 100644 --- a/arch/powerpc/boot/ebony.c +++ b/arch/powerpc/boot/ebony.c | |||
@@ -75,7 +75,8 @@ static void ebony_fixups(void) | |||
75 | 75 | ||
76 | ibm440gp_fixup_clocks(sysclk, 6 * 1843200); | 76 | ibm440gp_fixup_clocks(sysclk, 6 * 1843200); |
77 | ibm4xx_sdram_fixup_memsize(); | 77 | ibm4xx_sdram_fixup_memsize(); |
78 | dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); | 78 | dt_fixup_mac_address_by_alias("ethernet0", ebony_mac0); |
79 | dt_fixup_mac_address_by_alias("ethernet1", ebony_mac1); | ||
79 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); | 80 | ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); |
80 | ebony_flashsel_fixup(); | 81 | ebony_flashsel_fixup(); |
81 | } | 82 | } |
diff --git a/arch/powerpc/boot/treeboot-walnut.c b/arch/powerpc/boot/treeboot-walnut.c index 472e36605a52..097974e59fac 100644 --- a/arch/powerpc/boot/treeboot-walnut.c +++ b/arch/powerpc/boot/treeboot-walnut.c | |||
@@ -68,7 +68,7 @@ static void walnut_fixups(void) | |||
68 | ibm4xx_quiesce_eth((u32 *)0xef600800, NULL); | 68 | ibm4xx_quiesce_eth((u32 *)0xef600800, NULL); |
69 | ibm4xx_fixup_ebc_ranges("/plb/ebc"); | 69 | ibm4xx_fixup_ebc_ranges("/plb/ebc"); |
70 | walnut_flashsel_fixup(); | 70 | walnut_flashsel_fixup(); |
71 | dt_fixup_mac_addresses((u8 *) WALNUT_OPENBIOS_MAC_OFF); | 71 | dt_fixup_mac_address_by_alias("ethernet0", (u8 *) WALNUT_OPENBIOS_MAC_OFF); |
72 | } | 72 | } |
73 | 73 | ||
74 | void platform_init(void) | 74 | void platform_init(void) |