powerpc/boot: cuboot: Fix up ethernet3 MAC address on MPC85xx
PATCH 1/1 powerpc/boot: cuboot: Fix up ethernet3 MAC address on MPC85xx
MPC85xx platforms do support 4 ethernet ports, so make sure the boot wrapper fixes up all of them in the fdt.
--- arch/powerpc/boot/cuboot-85xx.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/powerpc/boot/cuboot-85xx.c +2 -0
@@ -15,6 +15,7 @@#include "cuboot.h" #define TARGET_85xx +#define TARGET_HAS_ETH3 #include "ppcboot.h" static bd_t bd;
@@ -27,6 +28,7 @@ static void platform_fixups(void)dt_fixup_mac_address_by_alias ("ethernet0" , bd.bi_enetaddr);dt_fixup_mac_address_by_alias ("ethernet1" , bd.bi_enet1addr);dt_fixup_mac_address_by_alias ("ethernet2" , bd.bi_enet2addr); +dt_fixup_mac_address_by_alias ("ethernet3" , bd.bi_enet3addr);dt_fixup_cpu_clocks (bd.bi_intfreq, bd.bi_busfreq /8 , bd.bi_busfreq);/* Unfortunately, the specific model number is encoded in the
Signature · 1 line
1.6.0.2
Quoted 13 lines · Nate Case
MPC85xx platforms do support 4 ethernet ports, so make sure the boot wrapper fixes up all of them in the fdt.
Signed-off-by Nate Case <[email protected]>---
arch/powerpc/boot/cuboot-85xx.c| 2 ++1 files changed, 2 insertions(+), 0 deletions(-)arch/powerpc/boot/cuboot-85xx.c +0
-0
arch/powerpc/boot/cuboot-85xx.c line 18
Quoted 4 lines
arch/powerpc/boot/cuboot-85xx.c +1
-0@@ -15,6 +15,7 @@#include "cuboot.h" #define TARGET_85xx +#define TARGET_HAS_ETH3
This is problematic in that we'd be changing the memory layout of the bd_t and not ALL 85xx's have HAS_ETH3 set.
- k
Quoted 5 lines · Kumar Gala
Quoted 2 lines
#define
TARGET_85xx
+#defineTARGET_HAS_ETH3This is problematic in that we'd be changing the memory layout of the
bd_tand not ALL 85xx's haveHAS_ETH3set.
It shouldn't be problematic. The bi_enet3addr field is at the end of the structure on MPC85xx. The only fields after it in ppcboot.h are 4xx-specific
fields. I believe the MAC addresses were placed at the end of the struct for
this very reason.
Signature · 1 line
Nate Case <[email protected]>
Quoted 9 lines · Nathaniel Case
On Wed, 10 Jun 2009 21:54:01 -0500, Kumar Gala <[email protected]
Quoted 1 line
Quoted 5 lines · wrote:
Quoted 2 lines
#define
TARGET_85xx
+#defineTARGET_HAS_ETH3This is problematic in that we'd be changing the memory layout of the
bd_tand not ALL 85xx's haveHAS_ETH3set.
Quoted 6 lines
It shouldn't be problematic. The
bi_enet3addrfield is at the end of the structure on MPC85xx. The only fields after it inppcboot.hare 4xx-specific
fields. I believe the MAC addresses were placed at the end of the struct for
this very reason.
ahh, good point... I'll add this detail to the commit message when I commit this.
- k
Quoted 7 lines · Nate Case
MPC85xx platforms do support 4 ethernet ports, so make sure the boot wrapper fixes up all of them in the fdt.
Signed-off-by Nate Case <[email protected]>---
arch/powerpc/boot/cuboot-85xx.c| 2 ++1 files changed, 2 insertions(+), 0 deletions(-)
applied (updated commit message) to next
- k