[U-Boot] 8308 Clock issues - Not PCI_HOST

Kim Phillips kim.phillips at freescale.com
Wed May 4 04:26:03 CEST 2011


On Tue, 3 May 2011 15:26:16 -0700
Barry G <mr.scada at gmail.com> wrote:

> 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).

this is without a debugger connected, right?  does your
CONFIG_SYS_HRCW_HIGH include PCI1_ARBITER_ENABLE?  If not, can you
try matching that and more HRCW_HIGH and _LOW bits to those in the
existing 8308 boards using mpc8308_p1m.h and MPC8308RDB.h?

btw, the reset.rcwh read should be using some sort of accessor fn,
like __raw_readl.

> 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?

I don't have an 8308, but the comment above the HRCWH
setting in the 8308 config files suggest that others indeed have.

wrt to the proper patch, how about ifndef 8308 the
HRCW1_PCI_HOST condition altogether?  actually, looking at the 8308
manual, I don't even see the SPMR_CKID bit existing in the 8308
either, so the prior read should also be ifdeffed out.

Kim



More information about the U-Boot mailing list