All of lore.kernel.org
 help / color / mirror / Atom feed
From: jonas@microbit.se (Jonas Andersson)
To: linux-arm-kernel@lists.infradead.org
Subject: imx53 cspi clock problem
Date: Wed, 22 May 2013 08:52:45 +0200	[thread overview]
Message-ID: <519C6B3D.3030106@microbit.se> (raw)

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

             reply	other threads:[~2013-05-22  6:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22  6:52 Jonas Andersson [this message]
2013-05-22 16:47 ` imx53 cspi clock problem Sascha Hauer
2013-05-23  8:08   ` Jonas Andersson
2013-05-23  8:33     ` Sascha Hauer
2013-05-23  8:44       ` Jonas Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=519C6B3D.3030106@microbit.se \
    --to=jonas@microbit.se \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.