From 094624fa66758e9f555587c29b23cf5bc67c10fd Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Sat, 20 Oct 2007 00:53:10 +1000 Subject: [POWERPC] 4xx: Fix timebase clock selection on Walnut The current bootwrapper fails to set the timebase clock to the CPU clock which causes the time to increment incorrectly. This fixes it by using the correct #define for the CPC0_CR1 register. Signed-off-by: Josh Boyer --- arch/powerpc/boot/treeboot-walnut.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/powerpc/boot/treeboot-walnut.c') diff --git a/arch/powerpc/boot/treeboot-walnut.c b/arch/powerpc/boot/treeboot-walnut.c index 3adf2d08a230..6be76b7edc10 100644 --- a/arch/powerpc/boot/treeboot-walnut.c +++ b/arch/powerpc/boot/treeboot-walnut.c @@ -57,8 +57,8 @@ void ibm405gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk) } /* setup the timebase clock to tick at the cpu frequency */ - cpc0_cr1 = cpc0_cr1 & ~ 0x00800000; - mtdcr(DCRN_CPC0_CR1, cpc0_cr1); + cpc0_cr1 = cpc0_cr1 & ~0x00800000; + mtdcr(DCRN_405_CPC0_CR1, cpc0_cr1); tb = cpu; dt_fixup_cpu_clocks(cpu, tb, 0); -- cgit v1.2.3 From b3af7a55da9925b73136d5358573e8962dfd35a0 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Sat, 20 Oct 2007 00:53:11 +1000 Subject: [POWERPC] 4xx: Enable EMAC for PPC405 Walnut board This patch enables the ibm_newemac driver for the Walnut board. It fixes the device tree for the walnut board to order the MAL interrupts correctly and adds the local-mac-address property to the EMAC node. The bootwrapper is also updated to extract the MAC address from the OpenBIOS offset where it is stored. Signed-off-by: Josh Boyer --- arch/powerpc/boot/treeboot-walnut.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/powerpc/boot/treeboot-walnut.c') diff --git a/arch/powerpc/boot/treeboot-walnut.c b/arch/powerpc/boot/treeboot-walnut.c index 6be76b7edc10..bb2c309d70fc 100644 --- a/arch/powerpc/boot/treeboot-walnut.c +++ b/arch/powerpc/boot/treeboot-walnut.c @@ -109,6 +109,7 @@ static void walnut_flashsel_fixup(void) setprop(sram, "reg", reg_sram, sizeof(reg_sram)); } +#define WALNUT_OPENBIOS_MAC_OFF 0xfffffe0b static void walnut_fixups(void) { ibm4xx_fixup_memsize(); @@ -116,6 +117,7 @@ static void walnut_fixups(void) ibm4xx_quiesce_eth((u32 *)0xef600800, NULL); ibm4xx_fixup_ebc_ranges("/plb/ebc"); walnut_flashsel_fixup(); + dt_fixup_mac_addresses((u8 *) WALNUT_OPENBIOS_MAC_OFF); } void platform_init(void) -- cgit v1.2.3