Subject: Re: [PATCH 33/46] ARM: pxa: pcmcia: move smemc configuration back to arch

From: Robert Jarzmik <[email-masked]>
Date: Mon, 28 Oct 2019 22:57:43 +0100

Arnd Bergmann <[email-masked]> 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 <[email-masked]>
> Signed-off-by: Arnd Bergmann <[email-masked]>
> -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

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel