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

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-attachm...). 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=f2b047... 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
participants (1)
-
Yegor Yefremov