[POWERPC] 4xx: Rework clock probing in boot wrapper

This reworks the boot wrapper library function that probes
the chip clocks. Better separate the base function that is
used on 440GX,SPe,EP,... from the uart fixups as those need
different device-tree path on different processors.

Also, rework the function itself based on the arch/ppc code
from Eugene Surovegin which I find more readable, and which
handles one more bypass case. Also handle the subtle difference
between 440EP/EPx and 440SPe/GX, on the former, PerClk is derived
from the PLB clock while on the later, it's derived from the OPB.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
This commit is contained in:
Benjamin Herrenschmidt
2007-12-21 15:39:33 +11:00
committed by Josh Boyer
parent bc0b4e7ffb
commit 190de00538
7 changed files with 232 additions and 134 deletions

View File

@@ -34,9 +34,7 @@ static void taishan_fixups(void)
registers */
unsigned long sysclk = 33000000;
/* 440EP Clock logic is all but identical to 440GX
so we just use that code for now at least */
ibm440ep_fixup_clocks(sysclk, 6 * 1843200);
ibm440gx_fixup_clocks(sysclk, 6 * 1843200, 25000000);
ibm4xx_sdram_fixup_memsize();