All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Pankaj Bansal <pankaj.bansal@nxp.com>,
	wg@grandegger.com, linux-can@vger.kernel.org
Cc: V.Sethi@nxp.com, poonam.aggrwal@nxp.com,
	Bhupesh Sharma <bhupesh.sharma@freescale.com>
Subject: Re: [PATCH v2 2/2] can: flexcan: adding platform specific details for LS1021A
Date: Tue, 14 Nov 2017 13:59:08 +0100	[thread overview]
Message-ID: <828fba89-66dc-a2c5-e095-8554b9dce5d5@pengutronix.de> (raw)
In-Reply-To: <1510660589-16125-2-git-send-email-pankaj.bansal@nxp.com>


[-- Attachment #1.1: Type: text/plain, Size: 2706 bytes --]

On 11/14/2017 12:56 PM, Pankaj Bansal wrote:
> This patch adds platform specific details for NXP SOC LS1021A to the
> flexcan driver code.
> 
> Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
> Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
> Reviewed-by: Poonam Aggrwal <poonam.aggrwal@nxp.com>
> ---
> Changes in v2:
>   - No change.
> 
>  drivers/net/can/flexcan.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
> index 100b451..fa2d4c9 100644
> --- a/drivers/net/can/flexcan.c
> +++ b/drivers/net/can/flexcan.c
> @@ -304,6 +304,11 @@ static const struct flexcan_devtype_data fsl_vf610_devtype_data = {
>  		FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP,
>  };
>  
> +/* LS1021A-Rev2 has functional RX-FIFO mode  */

How big is the RX-FIFO? If the normal mailboxes can receive RTR
messages, we definitely want to use FLEXCAN_QUIRK_USE_OFF_TIMESTAMP. As
you can buffer > 60 CAN frames compared to only 6 in FIFO mode.

Please add your IP core to the "FLEXCAN hardware feature flags" table
[1] in the driver. Also please test the transition interrupts for
changes in the CAN error state, see the commits of ZHU Yi
(ST-FIR/ENG1-Zhu) <Yi.Zhu5@cn.bosch.com> on the driver. [2]

> +static const struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = {
> +	.quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_DISABLE_MECR,
> +};
> +
>  static const struct can_bittiming_const flexcan_bittiming_const = {
>  	.name = DRV_NAME,
>  	.tseg1_min = 4,
> @@ -1245,6 +1250,8 @@ static const struct of_device_id flexcan_of_match[] = {
>  	{ .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, },
>  	{ .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, },
>  	{ .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, },
> +	{ .compatible = "fsl,ls1021ar2-flexcan",
> +	  .data = &fsl_ls1021a_r2_devtype_data, },

Please keep in in one line, even if it's more than 80 chars.

>  	{ /* sentinel */ },
>  };
>  MODULE_DEVICE_TABLE(of, flexcan_of_match);
> 

Marc

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/can/flexcan.c#n182
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/net/can/flexcan.c

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

  reply	other threads:[~2017-11-14 12:59 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10  9:59 [PATCH 1/2] can: flexcan: Remodel FlexCAN register r/w APIs for big endian FlexCAN controllers Pankaj Bansal
2017-11-10  9:59 ` [PATCH 2/2] can: flexcan: adding platform specific details for LS1021A Pankaj Bansal
2017-11-10 10:06 ` [PATCH 1/2] can: flexcan: Remodel FlexCAN register r/w APIs for big endian FlexCAN controllers Marc Kleine-Budde
2017-11-10 11:06   ` Pankaj Bansal
2017-11-10 11:09     ` Marc Kleine-Budde
2017-11-10 12:35       ` Pankaj Bansal
     [not found]         ` <AM0PR0402MB394051B0FAADBC45AF71439CF1540-mYCQpYF9suc3mfjNbz3WnI3W/0Ik+aLCnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-11-10 12:49           ` Marc Kleine-Budde
2017-11-10 16:32             ` Pankaj Bansal
     [not found]               ` <AM0PR0402MB3940DE05B2BA456D0FF54498F1540-mYCQpYF9suc3mfjNbz3WnI3W/0Ik+aLCnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-11-13 15:50                 ` Marc Kleine-Budde
2017-11-10 10:48 ` Marc Kleine-Budde
2017-11-14 11:56 ` [PATCH v2 " Pankaj Bansal
2017-11-14 11:56   ` [PATCH v2 2/2] can: flexcan: adding platform specific details for LS1021A Pankaj Bansal
2017-11-14 12:59     ` Marc Kleine-Budde [this message]
2017-11-16  5:34       ` Pankaj Bansal
2017-11-16  7:05         ` Wolfgang Grandegger
2017-11-16  7:23           ` ZHU Yi (ST-FIR/ENG1-Zhu)
2017-11-20 11:11             ` Pankaj Bansal
2017-11-21  2:13               ` ZHU Yi (ST-FIR/ENG1-Zhu)
2017-11-21  2:37                 ` Pankaj Bansal
2017-11-21  3:31                   ` ZHU Yi (ST-FIR/ENG1-Zhu)
2017-11-21 10:01                     ` Pankaj Bansal
2017-11-23  7:23                       ` ZHU Yi (ST-FIR/ENG1-Zhu)
2017-11-21 12:43                 ` Marc Kleine-Budde
2017-11-22  2:56                   ` ZHU Yi (ST-FIR/ENG1-Zhu)
2017-11-22  6:27                     ` Pankaj Bansal
2017-11-22 13:56                       ` Marc Kleine-Budde
2017-11-22 11:59                     ` Marc Kleine-Budde
2017-11-23  1:26                       ` ZHU Yi (ST-FIR/ENG1-Zhu)
     [not found]                       ` <CALw8SCUGuCmq+S_9-o-ZDYJuASveuj71WH97jYsEvNZX2N5ZXA@mail.gmail.com>
2017-11-23 20:17                         ` Mirza Krak
2017-11-23 21:05                           ` Wolfgang Grandegger
2017-11-24 16:02                             ` Mirza Krak
2017-11-24 19:19                               ` Wolfgang Grandegger
2017-11-26 21:11                                 ` Mirza Krak
2017-11-27 14:00                                   ` Marc Kleine-Budde
     [not found]                                     ` <CALw8SCVNqN0SM1e=bxXZFMVL0VN0iy0LgFj9Hv4BeRwAbb9Y6A@mail.gmail.com>
2017-11-28 22:11                                       ` Mirza Krak
2017-12-01 10:12                                         ` Mirza Krak
2017-12-01 10:32                                           ` Marc Kleine-Budde
2017-11-27 16:34                           ` Stefan Agner
2017-11-14 15:24   ` [PATCH v2 1/2] can: flexcan: Remodel FlexCAN register r/w APIs for big endian FlexCAN controllers Marc Kleine-Budde
2017-11-16  5:24     ` Pankaj Bansal
2017-11-16 12:04       ` Marc Kleine-Budde
2017-11-21 12:18     ` Pankaj Bansal
2017-11-21 12:38       ` Marc Kleine-Budde
2017-11-23  9:09   ` [PATCH v3 " Pankaj Bansal
2017-11-23  9:09     ` [PATCH v3 2/2] can: flexcan: adding platform specific details for LS1021A Pankaj Bansal
2017-11-23  9:16       ` Marc Kleine-Budde
2017-11-23 10:01         ` Pankaj Bansal
2017-11-23 10:07           ` Marc Kleine-Budde
2017-11-23 12:01             ` Pankaj Bansal
2017-11-23 12:33               ` Marc Kleine-Budde
2017-11-23  9:18     ` [PATCH v3 1/2] can: flexcan: Remodel FlexCAN register r/w APIs for big endian FlexCAN controllers Marc Kleine-Budde
2017-11-23  9:55       ` Pankaj Bansal

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=828fba89-66dc-a2c5-e095-8554b9dce5d5@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=V.Sethi@nxp.com \
    --cc=bhupesh.sharma@freescale.com \
    --cc=linux-can@vger.kernel.org \
    --cc=pankaj.bansal@nxp.com \
    --cc=poonam.aggrwal@nxp.com \
    --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.