Re: Linux 2.6.3-rc3

From: Benjamin Herrenschmidt
Date: Sun Feb 15 2004 - 21:42:03 EST


On Mon, 2004-02-16 at 13:35, jdow wrote:

> > - do_div(vclk, 1000);
> > - xtal = (xtal * denom) / num;
> > + vclk *= denom;
> > + do_div(vclk, 1000 * num);
> > + xtal = vclk;
> >
> > if ((xtal > 26900) && (xtal < 27100))
> > xtal = 2700;
> ^^^^
>
> Is that right or a typo for 27100?

No, it's right. Weird but right :)

Look at the whole thing

if ((xtal > 26900) && (xtal < 27100))
xtal = 2700;
else if ((xtal > 14200) && (xtal < 14400))
xtal = 1432;
else if ((xtal > 29400) && (xtal < 29600))
xtal = 2950;
else {
printk(KERN_WARNING "xtal calculation failed: %ld\n", xtal);
return -1;
}

Ohhh, and I know it's ugly, it comes straight from XFree through.

Don't bother too much with that code, I'm not even sure it works
properly at this point, I need to test it by intentionally disabling
the BIOS detection to check it actually picks the right values.

Ben.

-
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/