linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* imx53 cspi clock problem
@ 2013-05-22  6:52 Jonas Andersson
  2013-05-22 16:47 ` Sascha Hauer
  0 siblings, 1 reply; 5+ messages in thread
From: Jonas Andersson @ 2013-05-22  6:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

i have found a problem when using the cspi port in a imx53 soc. I am 
using kernel 3.10-rc2. This is the dts defenition:

cspi: cspi at 63fc0000 {
	#address-cells = <1>;
	#size-cells = <0>;
	compatible = "fsl,imx53-cspi", "fsl,imx35-cspi";
	reg = <0x63fc0000 0x4000>;
	interrupts = <38>;
	clocks = <&clks 55>, <&clks 0>;
	clock-names = "ipg", "per";
	status = "disabled";
};

then in the driver spi-imx.c:

spi_imx->spi_clk = clk_get_rate(spi_imx->clk_per);

clk_get_rate() will return the rate 0. In function mx31_config, this line:

reg |= spi_imx_clkdiv_2(spi_imx->spi_clk, config->speed_hz) <<
	MX31_CSPICTRL_DR_SHIFT;

will always configure the port for full speed (16.7 MHz in my system).

This "per" clock rate should be around 67MHz.

Jonas

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-23  8:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-22  6:52 imx53 cspi clock problem Jonas Andersson
2013-05-22 16:47 ` Sascha Hauer
2013-05-23  8:08   ` Jonas Andersson
2013-05-23  8:33     ` Sascha Hauer
2013-05-23  8:44       ` Jonas Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).