[PATCH] pxa2xx/cpufreq: Fix DRI computation
Robert Jarzmik
robert.jarzmik at free.fr
Tue Jun 8 07:23:06 EDT 2010
Marek Vasut <marek.vasut at gmail.com> writes:
> The DRI field was incorrectly computed, causing various hangs and weird
> behaviour on PXA2xx machines. This patch introduces the DRI computation
> according to the PXA255 (January 2004) and PXA270 (MV-S301039-00 Rev. A)
> datasheets.
>
> NOTE: The CPU type is checked only once, so the code is a little bit faster now.
>
> Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
> ---
> arch/arm/mach-pxa/cpufreq-pxa2xx.c | 33 +++++++++++++++++++++++++++++----
> 1 files changed, 29 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/cpufreq-pxa2xx.c b/arch/arm/mach-pxa/cpufreq-pxa2xx.c
> index 9e4d981..5373db0 100644
> --- a/arch/arm/mach-pxa/cpufreq-pxa2xx.c
> +++ b/arch/arm/mach-pxa/cpufreq-pxa2xx.c
> @@ -251,17 +251,42 @@ static void init_sdram_rows(void)
> if (mdcnfg & (MDCNFG_DE0 | MDCNFG_DE1))
> drac0 = MDCNFG_DRAC0(mdcnfg);
>
> - sdram_rows = 1 << (11 + max(drac0, drac2));
> + sdram_rows = 11 + max(drac0, drac2);
I don't think that's correct.
More information about the linux-arm-kernel
mailing list