From: mkl@pengutronix.de (Marc Kleine-Budde)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: mach-imx: CAN clock fix for i.MX53
Date: Fri, 26 Oct 2012 16:05:32 +0200 [thread overview]
Message-ID: <508A98AC.1000000@pengutronix.de> (raw)
In-Reply-To: <508A95B3.3010306@antcom.de>
On 10/26/2012 03:52 PM, Roland Stigge wrote:
> On 10/26/2012 01:05 PM, Roland Stigge wrote:
>> On 10/26/2012 12:30 PM, Marc Kleine-Budde wrote:
>>>>>> + clk[can1_serial_gate] = imx_clk_gate2("can1_serial_gate",
>>>>>> "can_sel", MXC_CCM_CCGR4, 6); + clk[can1_ipg_gate] =
>>>>>> imx_clk_gate2("can1_ipg_gate", "ipg", MXC_CCM_CCGR4, 8); +
>>>>>> clk[can2_serial_gate] = imx_clk_gate2("can2_serial_gate",
>>>>>> "can_sel", MXC_CCM_CCGR4, 6); + clk[can2_ipg_gate] =
>>>>>> imx_clk_gate2("can2_ipg_gate", "ipg", MXC_CCM_CCGR4, 8);
>>>>>
>>>>> This doesn't.
>>>>
>>>> This may be right, but unfortunately, since the introduction of
>>>> your can1 + can2 clocking change, the first block stopped working
>>>> for me.
>>>
>>> You are effectively using can2's clock for can1. Are you sure you
>>> haven't mixed up can1 and can2?
>>
>> Just using the above patch and patch 1/2 from this series (missing can
>> pinmuxing), doing like this in custom .dts:
>>
>> + can1: can at 53fc8000 {
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&pinctrl_can1_1>;
>> + clock-frequency = <66500000>;
>
> That was the problem, since in flexcan.c probe():
>
>
> if (pdev->dev.of_node)
> of_property_read_u32(pdev->dev.of_node,
> "clock-frequency", &clock_freq);
>
> if (!clock_freq) {
> clk_ipg = devm_clk_get(&pdev->dev, "ipg");
> if (IS_ERR(clk_ipg)) {
> dev_err(&pdev->dev, "no ipg clock defined\n");
> err = PTR_ERR(clk_ipg);
> goto failed_clock;
> }
> clock_freq = clk_get_rate(clk_ipg);
>
> clk_per = devm_clk_get(&pdev->dev, "per");
> if (IS_ERR(clk_per)) {
> dev_err(&pdev->dev, "no per clock defined\n");
> err = PTR_ERR(clk_per);
> goto failed_clock;
> }
> }
>
> Sorry for the noise.
We have the possibility to specify the clock frequency in the device
tree as the power pc has no support for generic clock yet.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121026/641db69d/attachment.sig>
next prev parent reply other threads:[~2012-10-26 14:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-25 11:26 [PATCH 1/2] ARM: mach-imx: imx53.dtsi: pinctl update Roland Stigge
2012-10-25 11:26 ` [PATCH 2/2] ARM: mach-imx: CAN clock fix for i.MX53 Roland Stigge
2012-10-26 8:59 ` Sascha Hauer
2012-10-26 9:16 ` Roland Stigge
2012-10-26 10:30 ` Marc Kleine-Budde
2012-10-26 11:05 ` Roland Stigge
2012-10-26 13:52 ` Roland Stigge
2012-10-26 14:05 ` Marc Kleine-Budde [this message]
2012-10-29 21:20 ` Sascha Hauer
2012-10-29 21:31 ` Roland Stigge
2012-10-29 21:13 ` [PATCH 1/2] ARM: mach-imx: imx53.dtsi: pinctl update Sascha Hauer
2012-10-30 2:46 ` Shawn Guo
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=508A98AC.1000000@pengutronix.de \
--to=mkl@pengutronix.de \
--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 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).