Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

atyfb: reorganize clock init

Reorganize atyfb clock init code so command line clock overrides are effective
for all chips. The old code would silently ignore some of the command line
clock overrides with some chips.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ville Syrjala and committed by
Linus Torvalds
b4e124c1 94f45bcd

+18 -14
+18 -14
drivers/video/aty/atyfb_base.c
··· 2297 2297 par->pll_limits.xclk = 53; 2298 2298 } 2299 2299 #endif 2300 - if (pll) 2301 - par->pll_limits.pll_max = pll; 2302 - if (mclk) 2303 - par->pll_limits.mclk = mclk; 2304 - if (xclk) 2305 - par->pll_limits.xclk = xclk; 2306 - 2307 - aty_calc_mem_refresh(par, par->pll_limits.xclk); 2308 - par->pll_per = 1000000/par->pll_limits.pll_max; 2309 - par->mclk_per = 1000000/par->pll_limits.mclk; 2310 - par->xclk_per = 1000000/par->pll_limits.xclk; 2311 - 2312 - par->ref_clk_per = 1000000000000ULL / 14318180; 2313 - xtal = "14.31818"; 2314 2300 2315 2301 #ifdef CONFIG_FB_ATY_GX 2316 2302 if (!M64_HAS(INTEGRATED)) { ··· 2378 2392 if (par->pll_limits.mclk == 67 && par->ram_type < SDRAM) 2379 2393 par->pll_limits.mclk = 63; 2380 2394 } 2395 + #endif 2381 2396 2397 + /* Allow command line to override clocks. */ 2398 + if (pll) 2399 + par->pll_limits.pll_max = pll; 2400 + if (mclk) 2401 + par->pll_limits.mclk = mclk; 2402 + if (xclk) 2403 + par->pll_limits.xclk = xclk; 2404 + 2405 + aty_calc_mem_refresh(par, par->pll_limits.xclk); 2406 + par->pll_per = 1000000/par->pll_limits.pll_max; 2407 + par->mclk_per = 1000000/par->pll_limits.mclk; 2408 + par->xclk_per = 1000000/par->pll_limits.xclk; 2409 + 2410 + par->ref_clk_per = 1000000000000ULL / 14318180; 2411 + xtal = "14.31818"; 2412 + 2413 + #ifdef CONFIG_FB_ATY_CT 2382 2414 if (M64_HAS(GTB_DSP)) { 2383 2415 u8 pll_ref_div = aty_ld_pll_ct(PLL_REF_DIV, par); 2384 2416