Re: [PATCH 33/46] ARM: pxa: pcmcia: move smemc configuration back to arch
From: Robert Jarzmik
Date: Mon Oct 28 2019 - 17:57:47 EST
Arnd Bergmann <arnd@xxxxxxxx> writes:
> Rather than poking at the smemc registers directly from the
> pcmcia/pxa2xx_base driver, move those bits into machine file
> to have a cleaner interface.
>
> Cc: Dominik Brodowski <linux@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> -static int pxa2xx_pcmcia_set_mcxx(struct soc_pcmcia_socket *skt, unsigned int clk)
> +static int pxa2xx_pcmcia_set_timing(struct soc_pcmcia_socket *skt)
> {
> + unsigned long clk = clk_get_rate(skt->clk) / 1000;
> struct soc_pcmcia_timing timing;
> int sock = skt->nr;
>
> soc_common_pcmcia_get_timing(skt, &timing);
>
> - pxa2xx_pcmcia_set_mcmem(sock, timing.mem, clk);
> - pxa2xx_pcmcia_set_mcatt(sock, timing.attr, clk);
> - pxa2xx_pcmcia_set_mcio(sock, timing.io, clk);
> + pxa_smemc_set_pcmcia_timing(sock,
> + pxa2xx_pcmcia_mcmem(sock, timing.mem, clk),
> + pxa2xx_pcmcia_mcatt(sock, timing.attr, clk),
> + pxa2xx_pcmcia_mcio(sock, timing.io, clk));
>
> return 0;
> }
>
> -static int pxa2xx_pcmcia_set_timing(struct soc_pcmcia_socket *skt)
> -{
> - unsigned long clk = clk_get_rate(skt->clk);
> - return pxa2xx_pcmcia_set_mcxx(skt, clk / 10000);
That curious, because you divide here by 10^4, while in the old
pxa2xx_pcmcia_set_mcxx() that was 10^3 ... is that a fix I don't see ?
Cheers.
--
Robert