All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Wolfgang Grandegger <wg@grandegger.com>
Cc: Hui Wang <jason77.wang@gmail.com>,
	davem@davemloft.net, shawn.guo@linaro.org,
	linux-can@vger.kernel.org,
	Devicetree Discussions <devicetree-discuss@lists.ozlabs.org>
Subject: Re: [PATCH 2/4] can: flexcan: add hardware controller version support
Date: Wed, 27 Jun 2012 11:51:52 +0200	[thread overview]
Message-ID: <4FEAD7B8.2000601@pengutronix.de> (raw)
In-Reply-To: <4FEAD5CF.9070601@grandegger.com>

[-- Attachment #1: Type: text/plain, Size: 2815 bytes --]

On 06/27/2012 11:43 AM, Wolfgang Grandegger wrote:
> Hi Marc,
> 
> On 06/27/2012 10:56 AM, Wolfgang Grandegger wrote:
>> On 06/27/2012 10:27 AM, Marc Kleine-Budde wrote:
>>> On 06/27/2012 10:19 AM, Hui Wang wrote:
>>>> At least in the i.MX series, the flexcan contrller divides into ver_3
>>>> and ver_10, current driver is for ver_3 controller.
>>>>
>>>> i.MX6 has ver_10 controller, it has more reigsters than ver_3 has.
>>>> The rxfgmask (Rx FIFO Global Mask) register is one of the new added.
>>>> Its reset value is 0xffffffff, this means ID Filter Table must be
>>>> checked when receive a packet, but the driver is designed to accept
>>>> everything during the chip start, we need to clear this register to
>>>> follow this design.
>>>>
>>>> Add a hw_ver entry in the device tree, this can let us distinguish
>>>> which version the controller is, if we don't set value to this entry,
>>>> the hw_ver is 3 by default, this is backward compatible for existing
>>>> platforms like powerpc and imx35.
>>>
>>> Is it possible to read this value from the hardware?
>>> Another possibility would be to introduce a new compatible device in the
>>> device tree.
>>
>> I vote for the latter. IIRC, in the past we already had some discussion
>> on how to handle version dependent Flexcan hardware, e.g. by using
>> flexcan-vX.X or being expicit using fsl,p1010-flexcan. Search for "Add
>> support for powerpc" in the netdev mailing list. I added the
>> devicetree-discuss ml for that reason.
> 
> I looked up the threads and found:
> 
>   http://marc.info/?w=4&r=1&s=Fix+up+fsl-flexcan+device+tree+bi&q=t
> 
> In the Flexcan driver we currently only have:
> 
>   static struct of_device_id flexcan_of_match[] = {
>         {
>                 .compatible = "fsl,p1010-flexcan",
>         },
>         {},
>   };
> 
> What compatible string do they actually use for the i.MX6Q board? Shawn
> or Hui? We need to fix that. From the discussion mentioned above I think
> "fsl,flexcan-v10" would be acceptable. Unfortunately, we do not known

As far as I understand the DT, the name should be something like

"fsl,${OLDEST_SOCK_THAT_HAS_THIS_VERSION_OF_FLEXCAN}-flexcan".

> the internal version of the Flexcan controllers used in the various
> PowerPC and ARM SOCs. We already realized some differences with
> interrupts and bus error handling between i.MX28 and i.MX35. Would be
> nice if someone (from Freescale?) could finally clarify that.

That information would be interesting.

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   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2012-06-27  9:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27  8:19 [PATCH 0/4] can: flexcan: upgrade the flexcan.c to support i.MX6 Hui Wang
2012-06-27  8:19 ` [PATCH 1/4] can: flexcan: use be32_to_cpup to handle the value of dt entry Hui Wang
2012-06-27  8:19   ` [PATCH 2/4] can: flexcan: add hardware controller version support Hui Wang
2012-06-27  8:19     ` [PATCH 3/4] can: flexcan: add ipg and ser clocks support Hui Wang
2012-06-27  8:19       ` [PATCH 4/4] can: flexcan: add transceiver switch support when use device tree Hui Wang
2012-06-27  8:26         ` Marc Kleine-Budde
2012-06-27  9:55           ` Hui Wang
2012-06-27 10:02             ` Marc Kleine-Budde
2012-06-27 11:22             ` Shawn Guo
2012-06-27 11:46               ` Marc Kleine-Budde
2012-06-28  1:53               ` Hui Wang
2012-06-27  8:45       ` [PATCH 3/4] can: flexcan: add ipg and ser clocks support Marc Kleine-Budde
2012-06-27  8:27     ` [PATCH 2/4] can: flexcan: add hardware controller version support Marc Kleine-Budde
2012-06-27  8:56       ` Wolfgang Grandegger
2012-06-27  9:43         ` Wolfgang Grandegger
2012-06-27  9:51           ` Marc Kleine-Budde [this message]
2012-06-27 10:13             ` Hui Wang
2012-06-27 10:24               ` Marc Kleine-Budde
2012-06-27 10:57               ` Wolfgang Grandegger
2012-06-27  8:38   ` [PATCH 1/4] can: flexcan: use be32_to_cpup to handle the value of dt entry Marc Kleine-Budde
2012-06-27  9:07   ` Wolfgang Grandegger

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=4FEAD7B8.2000601@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=jason77.wang@gmail.com \
    --cc=linux-can@vger.kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=wg@grandegger.com \
    /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.