Re: [PATCH] atyfb updates

From: Daniël Mantione
Date: Tue Sep 23 2003 - 02:00:26 EST




On Tue, 23 Sep 2003, Geert Uytterhoeven wrote:

> - aty_ld_pll() used to be global, but now it's defined for Mach64 CT only,
> causing a link failure if you don't enable Mach64 CT support.
> Since Mach64 GX never has a GTB-style DSP, make that part of the code
> Mach64 CT dependant.

Now I look at it, that code is suspicious:

> +#ifdef CONFIG_FB_ATY_CT
> + if (M64_HAS(GTB_DSP)) {
> + u8 pll_ref_div = aty_ld_pll(PLL_REF_DIV, info);
> + if (pll_ref_div) {
> + int diff1, diff2;
> + diff1 = 510*14/pll_ref_div-pll;
> + diff2 = 510*29/pll_ref_div-pll;
> + if (diff1 < 0)
> + diff1 = -diff1;
> + if (diff2 < 0)
> + diff2 = -diff2;
> + if (diff2 < diff1) {
> + info->ref_clk_per = 1000000000000ULL/29498928;
> + xtal = "29.498928";
> + }
> + }
> }
> +#endif /* CONFIG_FB_ATY_CT */

It's true that at_ld_pll should never be called on a GX boards, but only
boards with a GTB DSP can use a 29.49 XTALIN? For safety, I would also
remove the GTB_DSP check.

Daniël

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/