Skip to contentSkip to conversation

Please pull u-boot-mpc86xx.git

U-Boot-Users Jon Loeliger 2 participants 3 messages Apr 20, 2007 – May 7, 2007

lore
Share & tools
lore
#0 lore raw

Wolfgang,

Here are a few more bug cleanups for the 8641 HPCN board!

Thanks,
jdl

The following changes since commit 14da5f7675bbb427c469e3f45006e027b6e21db9:
Wolfgang Denk (1):
Cleanup compiler warnings, update CHANGELOG

are found in the git repository at:

git://www.denx.de/git/u-boot-mpc86xx.git

Ed Swarthout (1):
mpc8641hpcn: Fix LAW and TLB setup to use the IO_PHYS #defines.

Jon Loeliger (2):
mpc86xx: protect memcpy to bad address if a mac-address is missing from dt mpc86xx; Write MAC address to mac-address and local-mac-address

Zhang Wei (1):
Enable LAWs for MPC8641 PCI-Ex2.

 board/mpc8641hpcn/init.S |   10 +++++-----
 cpu/mpc86xx/cpu.c        |   24 ++++++++++++++++++++----
 2 files changed, 25 insertions(+), 9 deletions(-)
board/mpc8641hpcn/init.S +5 -5
index 6b3e2d2..cb21ba6 100644
@@ -59,7 +59,7 @@
 #define LAWAR2	(LAWAR_EN | LAWAR_TRGT_IF_PCI1 | (LAWAR_SIZE & LAWAR_SIZE_512M))
 
 #define LAWBAR3 ((CFG_PCI2_MEM_BASE>>12) & 0xffffff)
-#define LAWAR3	(~LAWAR_EN & (LAWAR_TRGT_IF_PCI2 | (LAWAR_SIZE & LAWAR_SIZE_512M)))
+#define LAWAR3	(LAWAR_EN | LAWAR_TRGT_IF_PCI2 | (LAWAR_SIZE & LAWAR_SIZE_512M))
 
 /*
  * This is not so much the SDRAM map as it is the whole localbus map.
@@ -67,11 +67,11 @@
 #define LAWBAR4 ((0xf8100000>>12) & 0xffffff)
 #define LAWAR4	(LAWAR_EN | LAWAR_TRGT_IF_LBC | (LAWAR_SIZE & LAWAR_SIZE_2M))
 
-#define LAWBAR5 ((CFG_PCI1_IO_BASE>>12) & 0xffffff)
+#define LAWBAR5 ((CFG_PCI1_IO_PHYS>>12) & 0xffffff)
 #define LAWAR5	(LAWAR_EN | LAWAR_TRGT_IF_PCI1 | (LAWAR_SIZE & LAWAR_SIZE_16M))
 
-#define LAWBAR6 ((CFG_PCI2_IO_BASE>>12) & 0xffffff)
-#define LAWAR6	(~LAWAR_EN &( LAWAR_TRGT_IF_PCI2 | (LAWAR_SIZE & LAWAR_SIZE_16M)))
+#define LAWBAR6 ((CFG_PCI2_IO_PHYS>>12) & 0xffffff)
+#define LAWAR6	(LAWAR_EN | LAWAR_TRGT_IF_PCI2 | (LAWAR_SIZE & LAWAR_SIZE_16M))
 
 #define LAWBAR7 ((0xfe000000 >>12) & 0xffffff)
 #define LAWAR7	(LAWAR_EN | LAWAR_TRGT_IF_LBC | (LAWAR_SIZE & LAWAR_SIZE_32M))
@@ -84,7 +84,7 @@
 #define LAWAR8  ((LAWAR_TRGT_IF_DDR2 | (LAWAR_SIZE & LAWAR_SIZE_512M)) & ~LAWAR_EN)
 #endif
 
-#define LAWBAR9 ((CFG_RIO_MEM_BASE>>12) & 0xfffff)
+#define LAWBAR9 ((CFG_RIO_MEM_PHYS>>12) & 0xfffff)
 #define LAWAR9  (LAWAR_EN | LAWAR_TRGT_IF_RIO | (LAWAR_SIZE & LAWAR_SIZE_512M))
 
 	.section .bootpg, "ax"
cpu/mpc86xx/cpu.c +20 -4
index 84f5bef..a33acfe 100644
@@ -280,22 +280,38 @@ ft_cpu_setup(void *blob, bd_t *bd)
 
 #if defined(CONFIG_MPC86XX_TSEC1)
 	p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 24000/mac-address", &len);
-	memcpy(p, bd->bi_enetaddr, 6);
+	if (p != NULL)
+		memcpy(p, bd->bi_enetaddr, 6);
+	p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 24000/local-mac-address", &len);
+	if (p)
+		memcpy(p, bd->bi_enetaddr, 6);
 #endif
 
 #if defined(CONFIG_MPC86XX_TSEC2)
 	p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 25000/mac-address", &len);
-	memcpy(p, bd->bi_enet1addr, 6);
+	if (p != NULL)
+		memcpy(p, bd->bi_enet1addr, 6);
+	p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 25000/local-mac-address", &len);
+	if (p != NULL)
+		memcpy(p, bd->bi_enet1addr, 6);
 #endif
 
 #if defined(CONFIG_MPC86XX_TSEC3)
 	p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 26000/mac-address", &len);
-	memcpy(p, bd->bi_enet2addr, 6);
+	if (p != NULL)
+		memcpy(p, bd->bi_enet2addr, 6);
+	p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 26000/local-mac-address", &len);
+	if (p != NULL)
+		memcpy(p, bd->bi_enet2addr, 6);
 #endif
 
 #if defined(CONFIG_MPC86XX_TSEC4)
 	p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 27000/mac-address", &len);
-	memcpy(p, bd->bi_enet3addr, 6);
+	if (p != NULL)
+		memcpy(p, bd->bi_enet3addr, 6);
+	p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 27000/local-mac-address", &len);
+	if (p != NULL)
+		memcpy(p, bd->bi_enet3addr, 6);
 #endif
 
 }
#1 lore raw
Quoted 23 lines · In message <1177101965.14328.76.camel@ld0161-tx32> you wrote:

Here are a few more bug cleanups for the 8641 HPCN board!

Thanks,
jdl

The following changes since commit 14da5f7675bbb427c469e3f45006e027b6e21db9:
Wolfgang Denk (1):
Cleanup compiler warnings, update CHANGELOG

are found in the git repository at:

git://www.denx.de/git/u-boot-mpc86xx.git

Ed Swarthout (1):
mpc8641hpcn: Fix LAW and TLB setup to use the IO_PHYS #defines.

Jon Loeliger (2):
mpc86xx: protect memcpy to bad address if a mac-address is missing from dt mpc86xx; Write MAC address to mac-address and local-mac-address

Quoted 6 lines

Zhang Wei (1):
Enable LAWs for MPC8641 PCI-Ex2.

 board/mpc8641hpcn/init.S |   10 +++++-----
 cpu/mpc86xx/cpu.c        |   24 ++++++++++++++++++++----
 2 files changed, 25 insertions(+), 9 deletions(-)

Merged. Thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,    CEO: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Never call a man a fool.  Borrow from him.
#2 lore raw
Quoted 7 lines

Merged. Thanks.

Best regards,

Wolfgang Denk

Thank you!

And on behalf of 85xx, thank you again! :-)

Jdl