u-boot-brain/board/freescale/common
Jerry Huang 71775d3b54 powerpc/mpc85xx: Set SYSCLK to the required frequency
For ICS307-02, there is one general expression to generate SYSCLK:
CLK1Frequency = InputFrequency * 2 * (VDW + 8) / ((RDW + 2) * OD)

If we want the required frequency for SYSCLK, we must find one solution
to generate this frequency, this solution includes VDW, RDW and OD.
For OD, there are only eight option value: 10, 2, 8, 4, 5, 7, 3, 6.
For RDW, the range is 1 to 127.
For VDW, the range is 4 to 511.

First, we use one OD, RDW and required SYSCLK to calculate the VDW,
if VDW is in it's range, we will calculate the CLK1Frequency with
the OD, RDW and VDW calculated, and we will check this percent
(CLK1Frequency / required SYSCLK), and the precision is 1/1000.
if the percent is less than 1/1000, we think the CLK1Frequency is we want.
Otherwise, We will continue to calculate it with the next OD and RDW.

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:48:54 -06:00
..
p_corenet powerpc/85xx: Refactor P2041RDB to use common p_corenet files 2011-09-29 19:01:06 -05:00
cadmus.c powerpc/mpc85xxcds: Fix PCI speed 2011-10-03 08:52:14 -05:00
cadmus.h Move the MPC8541/MPC8555/MPC8548 CDS board under board/freescale. 2007-12-11 22:34:20 -06:00
cds_pci_ft.c FSL: Clean up board/freescale/common/Makefile 2008-03-26 11:43:04 -05:00
cds_via.c FSL: Clean up board/freescale/common/Makefile 2008-03-26 11:43:04 -05:00
eeprom.h Move the MPC8541/MPC8555/MPC8548 CDS board under board/freescale. 2007-12-11 22:34:20 -06:00
fman.c powerpc/85xx: Add FMan ethernet support to P4080DS 2011-09-29 19:01:05 -05:00
fman.h powerpc/85xx: Add FMan ethernet support to P4080DS 2011-09-29 19:01:05 -05:00
ics307_clk.c powerpc/mpc85xx: Set SYSCLK to the required frequency 2011-11-11 07:48:54 -06:00
ics307_clk.h powerpc/mpc85xx: Set SYSCLK to the required frequency 2011-11-11 07:48:54 -06:00
Makefile punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
ngpixis.c powerpc/mpc85xx: Set SYSCLK to the required frequency 2011-11-11 07:48:54 -06:00
ngpixis.h powerpc: Add P3041DS/P5020DS board support (uses corenet_ds code) 2011-04-27 22:29:04 -05:00
pixis.c Make sure that argv[] argument pointers are not modified. 2010-07-04 23:55:42 +02:00
pixis.h ppc/85xx: Add a structure defn for PIXIS registers 2010-07-16 10:55:08 -05:00
pq-mds-pib.c ppc/85xx: Add PIB/ATM support for MPC8569mds 2010-01-25 22:13:26 -06:00
pq-mds-pib.h mpc83xx: Split PIB init code from pci.c and add Qoc3 ATM card support 2007-08-16 23:12:11 -05:00
sdhc_boot.c Minor coding style cleanup. 2011-05-19 22:22:44 +02:00
sgmii_riser.c fsl: Remove unnecessary debug printfs 2009-03-09 17:46:10 -05:00
sgmii_riser.h Fixup SGMII PHY ids in the device tree 2009-02-16 18:05:54 -06:00
sys_eeprom.c fsl: obsolete NXID v0 EEPROMs, automatically upgrade them to NXID v1 2011-04-04 09:24:42 -05:00
via.h Move the MPC8541/MPC8555/MPC8548 CDS board under board/freescale. 2007-12-11 22:34:20 -06:00