[U-Boot] 8308 Clock issues - Not PCI_HOST

Barry G mr.scada at gmail.com
Wed May 4 00:26:16 CEST 2011


Hello,

I am working on porting u-boot to our custom board.  Everything
is working fine using my BSP except one common area in u-boot
that I have had issues with and have fixed with the following patch:
--- u-boot.without_b2040/arch/powerpc/cpu/mpc83xx/speed.c
2011-05-02 08:11:04.916529581 -0700
+++ u-boot/arch/powerpc/cpu/mpc83xx/speed.c     2011-05-02
08:11:19.023546051 -0700
@@ -156,6 +156,10 @@
        } else {
 #if defined(CONFIG_83XX_PCICLK)
              pci_sync_in = CONFIG_83XX_PCICLK;
+#elif defined(CONFIG_83XX_CLKIN)
+      /* 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

The issue is since the 8308 is using PCI express, the check
for im->reset.rcwh & HRCWH_PCI_HOST fails (this bit isn't
defined for the 8308) and I don't have the CONFIG_83XX_PCICLK
defined.  I am not using PCI on the board.  Without my patch
I end up with deadbeef and a board with really whacky clock
frequencies :-)

Looking at the MPC8308RDB.h, I see they defined HRCWH_PCI_HOST
even though it really isn't a standard PCI host.  I tried doing this but
it didn't work on my 8308 (the test still doesn't see the bit set in the rcwh).

That all said, my patch works but seems kind of lame.  Is there
a better way to fix this?  Has anyone else had this issue?

Thanks,

Barry


More information about the U-Boot mailing list