u-boot/board/freescale
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
..
common powerpc/mpc85xx: Set SYSCLK to the required frequency 2011-11-11 07:48:54 -06:00
corenet_ds powerpc/QorIQ: fix network frame manager TBI PHY address settings 2011-11-08 08:18:16 -06:00
m547xevb ColdFire: Cleanup for partial linking and --gc-sections 2011-09-04 22:46:55 +08:00
m548xevb ColdFire: Fix compilation with CONFIG_SYS_DRAMSZ1 defined 2011-10-19 00:14:16 +08:00
m5208evbe ColdFire: Cleanup for partial linking and --gc-sections 2011-09-04 22:46:55 +08:00
m5235evb ColdFire: Merge differentiated linking files into a sigle one by board 2011-10-19 00:13:39 +08:00
m5249evb ColdFire: Cleanup lds files for multiple defined symbols 2011-10-19 00:13:13 +08:00
m5253demo ColdFire:Add mb for 5253 dram initialization 2011-09-04 22:46:55 +08:00
m5253evbe ColdFire: Cleanup lds files for multiple defined symbols 2011-10-19 00:13:13 +08:00
m5271evb ColdFire: Cleanup lds files for multiple defined symbols 2011-10-19 00:13:13 +08:00
m5272c3 ColdFire: Cleanup lds files for multiple defined symbols 2011-10-19 00:13:13 +08:00
m5275evb ColdFire: Cleanup lds files for multiple defined symbols 2011-10-19 00:13:13 +08:00
m5282evb ColdFire: Cleanup lds files for multiple defined symbols 2011-10-19 00:13:13 +08:00
m5329evb ColdFire: Cleanup for partial linking and --gc-sections 2011-09-04 22:46:55 +08:00
m5373evb ColdFire: Cleanup for partial linking and --gc-sections 2011-09-04 22:46:55 +08:00
m52277evb ColdFire: Fix the compile issue for M52277 2011-11-07 22:02:33 +08:00
m53017evb ColdFire: Cleanup for partial linking and --gc-sections 2011-09-04 22:46:55 +08:00
m54451evb ColdFire: Merge differentiated linking files into a sigle one by board 2011-10-19 00:13:39 +08:00
m54455evb ColdFire: Merge differentiated linking files into a sigle one by board 2011-10-19 00:13:39 +08:00
mpc832xemds punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc837xemds punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc837xerdb punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc5121ads GCC4.6: Squash warning in mpc5121ads.c 2011-10-27 23:54:01 +02:00
mpc7448hpc2 punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8260ads punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8266ads board/freescale/mpc8266ads/mpc8266ads.c: Fix GCC 4.6 build warning 2011-11-07 22:49:44 +01:00
mpc8308rdb punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8313erdb mpc83xx: Rename CONFIG_SYS_DDR_CONFIG and cleanup DDR csbnds code 2011-11-03 18:27:56 -05:00
mpc8315erdb punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8323erdb punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8349emds mpc83xx: Rename CONFIG_SYS_DDR_CONFIG and cleanup DDR csbnds code 2011-11-03 18:27:56 -05:00
mpc8349itx mpc83xx: Rename CONFIG_SYS_DDR_CONFIG and cleanup DDR csbnds code 2011-11-03 18:27:56 -05:00
mpc8360emds powerpc/mpc83xx: Add 512MB DDR support for mpc8360emds 2011-11-03 18:27:56 -05:00
mpc8360erdk punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8536ds punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8540ads punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8541cds punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8544ds punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8548cds powerpc/mpc8548cds: Fix network initialization 2011-11-08 08:30:47 -06:00
mpc8555cds punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8560ads punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8568mds punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8569mds punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mpc8572ds powerpc/85xx: Fix MPC8572DS NAND build 2011-11-08 11:03:54 -06:00
mpc8610hpcd GCC4.6: Squash warnings in mpc8610hpcd.c 2011-10-27 23:54:01 +02:00
mpc8641hpcn punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mx25pdk punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
mx31ads imx: fix coding style 2011-10-27 21:56:32 +02:00
mx31pdk mx31pdk: Enable D and I caches 2011-11-04 22:06:37 +01:00
mx35pdk MX35: added ESDC structure to imx-regs 2011-11-03 22:56:17 +01:00
mx51evk mx51evk: Remove unused get_board_rev function 2011-11-03 22:56:19 +01:00
mx53ard mx53ard: Remove unused get_board_rev function 2011-11-04 22:06:37 +01:00
mx53evk mx53evk: Remove unused get_board_rev function 2011-11-04 22:06:37 +01:00
mx53loco mx53loco: Remove unused get_board_rev function 2011-11-04 22:06:37 +01:00
mx53smd mx53smd: Remove unused get_board_rev function 2011-11-04 22:06:37 +01:00
p1_p2_rdb powerpc/85xx: Make inclusion of USB device fixup conditional 2011-11-08 08:36:04 -06:00
p1_p2_rdb_pc powerpc/85xx: Make inclusion of USB device fixup conditional 2011-11-08 08:36:04 -06:00
p1010rdb powerpc/85xx: Make inclusion of USB device fixup conditional 2011-11-08 08:36:04 -06:00
p1022ds GCC4.6: Squash warnings in diu.c 2011-10-27 23:54:01 +02:00
p1023rds build: add missing $(AR)->$(cmd_link_o_target) update 2011-10-22 01:18:41 +02:00
p2020ds powerpc/85xx: Fix P2020DS booting 2011-10-18 01:31:08 -05:00
p2041rdb powerpc/QorIQ: fix network frame manager TBI PHY address settings 2011-11-08 08:18:16 -06:00