[U-Boot] [RFC] am33xx: add spread spectrum clock (SSC) support

Yegor Yefremov yegorslists at googlemail.com
Thu Apr 10 11:44:27 CEST 2014


I've found following source code implementing SSC in kernel on TI's
forum (http://e2e.ti.com/support/arm/sitara_arm/f/791/t/198104.aspx
source file: http://e2e.ti.com/cfs-file.ashx/__key/telligent-evolution-components-attachments/00-791-01-00-01-12-33-83/AM335x_5F00_Spread_5F00_Spectrum.c).
Now I'm trying to port it to u-boot.

One of Siemens boards is already using it
(http://git.denx.de/?p=u-boot.git;a=blob;f=board/siemens/rut/board.c;h=f2b04768179533c2567212446e7057e4d0e03cfc;hb=c0dcece7d9925506a950e45028cbd25614aad791
DISPL_PLL_SPREAD_SPECTRUM macro). But this codes uses static values,
TI's kernel code calculates needed values dynamically.

So far I could convert all read/write calls using cmwkup structure.
The only part, that is not clear is

/* Calculate Fref */
clock = clk_get(NULL, "sys_clkin_ck");
f = clk_get_rate(clock);
f = f/(1+n);

What is u-boot analog for this code?

Second question is, when should one invoke spread_spectrum_setup() in
the board file? board_init()?

Regards,
Yegor


More information about the U-Boot mailing list