Commit d344a21a authored by Marek Vasut's avatar Marek Vasut Committed by Eric Miao

[ARM] pxa: fix frequency scaling for pcmcia/pxa2xx_base

The MCxx values must be based off memory clock, not CPU core clock.

This also fixes the bug where on some machines the LCD went crazy
while using PCMCIA.
Signed-off-by: default avatarMarek Vasut <marek.vasut@gmail.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
Reviewed-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent 3d3d0fbf
...@@ -178,7 +178,6 @@ pxa2xx_pcmcia_frequency_change(struct soc_pcmcia_socket *skt, ...@@ -178,7 +178,6 @@ pxa2xx_pcmcia_frequency_change(struct soc_pcmcia_socket *skt,
unsigned long val, unsigned long val,
struct cpufreq_freqs *freqs) struct cpufreq_freqs *freqs)
{ {
#warning "it's not clear if this is right since the core CPU (N) clock has no effect on the memory (L) clock"
switch (val) { switch (val) {
case CPUFREQ_PRECHANGE: case CPUFREQ_PRECHANGE:
if (freqs->new > freqs->old) { if (freqs->new > freqs->old) {
...@@ -186,7 +185,7 @@ pxa2xx_pcmcia_frequency_change(struct soc_pcmcia_socket *skt, ...@@ -186,7 +185,7 @@ pxa2xx_pcmcia_frequency_change(struct soc_pcmcia_socket *skt,
"pre-updating\n", "pre-updating\n",
freqs->new / 1000, (freqs->new / 100) % 10, freqs->new / 1000, (freqs->new / 100) % 10,
freqs->old / 1000, (freqs->old / 100) % 10); freqs->old / 1000, (freqs->old / 100) % 10);
pxa2xx_pcmcia_set_mcxx(skt, freqs->new); pxa2xx_pcmcia_set_timing(skt);
} }
break; break;
...@@ -196,7 +195,7 @@ pxa2xx_pcmcia_frequency_change(struct soc_pcmcia_socket *skt, ...@@ -196,7 +195,7 @@ pxa2xx_pcmcia_frequency_change(struct soc_pcmcia_socket *skt,
"post-updating\n", "post-updating\n",
freqs->new / 1000, (freqs->new / 100) % 10, freqs->new / 1000, (freqs->new / 100) % 10,
freqs->old / 1000, (freqs->old / 100) % 10); freqs->old / 1000, (freqs->old / 100) % 10);
pxa2xx_pcmcia_set_mcxx(skt, freqs->new); pxa2xx_pcmcia_set_timing(skt);
} }
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment