public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] MPC8308: Fixup clocks in PCI Host configuration
@ 2013-01-08 18:24 Barry Grussling
  2013-01-09  1:18 ` Kim Phillips
  2013-01-09 20:15 ` Wolfgang Denk
  0 siblings, 2 replies; 10+ messages in thread
From: Barry Grussling @ 2013-01-08 18:24 UTC (permalink / raw)
  To: u-boot

While trying to bring up a custom MPC8308 based board I found
that the clocking was wrong.  The comment in
include/configs/mpc8308_p1m.h led me to believe
setting HRCWH_PCI_HOST and HRCWH_PCI1_ARBITER_ENABLE in the
CONFIG_SYS_HRCW_HIGH should allow the system to work, but on
my newer version of the 8308 this is not working.  Setting
the HRCWH_PCI_HOST bit (which doesn't exist according to the manual)
doesn't latch, and as such the im->reset.rcwh & HRCWH_PCI_HOST test
in speed.c fails.  Since this board is running off the
CONFIG_83XX_CLKIN and is not a PCI client, I end up with 0xdeadbeef
and hosed clock values.

This patch allows for proper clocks on the 8308 as a workaround
for the lack of HRCWH_PCI_HOST support.

Signed-off-by: Barry Grussling <barry@grussling.com>
---
 arch/powerpc/cpu/mpc83xx/speed.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c
index b8c05d1..6f715ea 100644
--- a/arch/powerpc/cpu/mpc83xx/speed.c
+++ b/arch/powerpc/cpu/mpc83xx/speed.c
@@ -160,6 +160,10 @@ int get_clocks(void)
 	} else {
 #if defined(CONFIG_83XX_PCICLK)
 		pci_sync_in = CONFIG_83XX_PCICLK;
+#elif defined(CONFIG_83XX_CLKIN) && defined(CONFIG_MPC8308)
+	/* 8308 doesn't have the HRCWH_PCI_HOST, but should 
+	 * run off the CONFIG_83XX_CLKIN */
+		pci_sync_in = CONFIG_83XX_CLKIN / (1 + clkin_div);
 #else
 		pci_sync_in = 0xDEADBEEF;
 #endif
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-01-18  0:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08 18:24 [U-Boot] [PATCH] MPC8308: Fixup clocks in PCI Host configuration Barry Grussling
2013-01-09  1:18 ` Kim Phillips
2013-01-09  2:25   ` [U-Boot] [PATCH V2] " Barry Grussling
2013-01-15  0:59     ` Kim Phillips
2013-01-15  7:15       ` Gerlando Falauto
2013-01-15 19:39       ` Ira W. Snyder
2013-01-18  0:48         ` Kim Phillips
2013-01-09  2:29   ` [U-Boot] [PATCH] " Barry Grussling
2013-01-09 20:15 ` Wolfgang Denk
2013-01-10  4:13   ` Barry Grussling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox