All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: "bhupesh.sharma@freescale.com" <bhupesh.sharma@freescale.com>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Cc: "arnd@arndb.de" <arnd@arndb.de>,
	"bhupesh.linux@gmail.com" <bhupesh.linux@gmail.com>,
	"Sakar.Arora@freescale.com" <Sakar.Arora@freescale.com>
Subject: Re: [PATCH 3/3] can: flexcan: Add support for non RX-FIFO mode and ERRATA ERR005829
Date: Mon, 27 Apr 2015 09:10:10 +0200	[thread overview]
Message-ID: <553DE0D2.8090504@pengutronix.de> (raw)
In-Reply-To: <BY1PR0301MB1303C0A7F5733B45719E05AE82E90@BY1PR0301MB1303.namprd03.prod.outlook.com>

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

On 04/27/2015 08:51 AM, bhupesh.sharma@freescale.com wrote:

>>> The errata list is not available for public access on www.freescale.com
>> so far.
>>> The next version of LS1021A SoC, is fixing this bug and since both are
>>> supposed to be used by customers, the kconfig trick is required to
>>> turn-off this handling for one version, while keeping it intact for the
>> other.
>>
>> Sorry, a compile time switch is not an option here. Please configure it
>> during runtime via the device tree. This can be done by different
>> compatibles, one for the broken another one for the fixed SoC.
>  
> Well, most of the code is written to handle this on run-time (on basis
> of the dts). Maybe I can create two versions of fsl_ls1021a_devtype_data rather
> than using the kConfig:
> 
> For the broken- SoC:
> static struct flexcan_devtype_data fsl_ls1021a_devtype_data = {
> 	.features = FLEXCAN_HAS_V10_FEATURES | FLEXCAN_HAS_MECR_FEATURES
> 	| FLEXCAN_USES_RX_MB
> 	,
> };
> 
> and for the new-SoC:
> static struct flexcan_devtype_data fsl_ls1021a_devtype_data = {
> 	.features = FLEXCAN_HAS_V10_FEATURES | FLEXCAN_HAS_MECR_FEATURES
> 	,
> };

Yes - use two different variables for this and assign them to two
compatible entries.

> Note that the legacy (non-RX FIFO mode) should work on all the FlexCAN variants,
> so this a feature which some-one can expose/hide as per their use-case, as long
> as the driver supports both the Rx-FIFO and non-RX-FIFO mode legs.

Sure, but not via a compile time switch.

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: 801 bytes --]

  reply	other threads:[~2015-04-27  7:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 15:24 [PATCH 1/3] can: flexcan: Add ls1021a flexcan device entry Bhupesh Sharma
2015-04-09 15:24 ` [PATCH 2/3] net: can: Remodel FlexCAN register read/write APIs for BE instances Bhupesh Sharma
2015-04-09 15:24 ` [PATCH 3/3] can: flexcan: Add support for non RX-FIFO mode and ERRATA ERR005829 Bhupesh Sharma
2015-04-09 15:40   ` Marc Kleine-Budde
2015-04-09 15:45     ` bhupesh.sharma
2015-04-09 15:46       ` Marc Kleine-Budde
2015-04-09 15:53         ` bhupesh.sharma
2015-04-09 16:12           ` Marc Kleine-Budde
2015-04-09 16:17             ` bhupesh.sharma
2015-04-09 16:33               ` Marc Kleine-Budde
2015-04-27  6:38                 ` bhupesh.sharma
2015-04-27  6:45                   ` Marc Kleine-Budde
2015-04-27  6:51                     ` bhupesh.sharma
2015-04-27  7:10                       ` Marc Kleine-Budde [this message]
2015-04-27  7:11                         ` bhupesh.sharma

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=553DE0D2.8090504@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=Sakar.Arora@freescale.com \
    --cc=arnd@arndb.de \
    --cc=bhupesh.linux@gmail.com \
    --cc=bhupesh.sharma@freescale.com \
    --cc=linux-can@vger.kernel.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.