public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp•net>
To: Dong Aisheng <b29396@freescale•com>, linux-can@vger•kernel.org
Cc: netdev@vger•kernel.org, wg@grandegger•com, mkl@pengutronix•de,
	devicetree@vger•kernel.org
Subject: Re: [PATCH 1/3] can: m_can: add Bosch M_CAN controller support
Date: Fri, 27 Jun 2014 20:03:20 +0200	[thread overview]
Message-ID: <53ADB1E8.1030504@hartkopp.net> (raw)
In-Reply-To: <1403863246-18822-2-git-send-email-b29396@freescale.com>

Hello Dong,

some general remarks from my side ...

On 27.06.2014 12:00, Dong Aisheng wrote:
>
> M_CAN also supports CANFD protocol features like data payload up to 64 bytes
> and bitrate switch at runtime, however, this patch still does not add the
> support for these features.

What is the reason for not supporting CAN FD?
The infrastructure is ready for it since Linux 3.15.

http://www.can-newsletter.org/engineering/standardization/140513_can-fd-linux-tools-and-driver-infrastructure_peak_vw/

For details see my commits for Linux 3.15.

> +  The left cell are all the number of each elements inside the message ram.
> +  Please refer to 2.4.1 Message RAM Con.guration in Bosch M_CAN user mannual
                                         ^^^
typo.

> +  for each elements definition.
> +
> +Example:
> +canfd1: canfd@020e8000 {
   ^^^^^^  ^^^^^

There's no reason to name this canfd. The fact that the controller supports
CAN FD is provided by priv->ctrlmode_supported and the CAN_CTRLMODE_FD bit.

Just write

can1: can@020e8000 {

> +	compatible = "bosch,m_can";
> +	reg = <0x020e8000 0x4000>, <0x02298000 0x4000>;
> +	reg-names = "canfd", "message_ram";
                     ^^^^^
dito.

> +	interrupts = <0 114 0x04>;
> +	clocks = <&clks IMX6SX_CLK_CANFD>;
                                   ^^^^^
dito.

> --- a/drivers/net/can/Kconfig
> +++ b/drivers/net/can/Kconfig
> @@ -137,6 +137,11 @@ config CAN_XILINXCAN
>  	  Xilinx CAN driver. This driver supports both soft AXI CAN IP and
>  	  Zynq CANPS IP.
>  
> +config CAN_M_CAN
> +	tristate "Bosch M_CAN devices"
> +	---help---
> +	  Say Y here if you want to support for Bosch M_CAN controller.
> +

source "drivers/net/can/m_can/Kconfig"

>  source "drivers/net/can/mscan/Kconfig"
>  
>  source "drivers/net/can/sja1000/Kconfig"
> diff --git a/drivers/net/can/Makefile b/drivers/net/can/Makefile
> index 1697f22..69dee2c 100644
> --- a/drivers/net/can/Makefile
> +++ b/drivers/net/can/Makefile
> @@ -17,6 +17,7 @@ obj-y				+= softing/
>  obj-$(CONFIG_CAN_SJA1000)	+= sja1000/
>  obj-$(CONFIG_CAN_MSCAN)		+= mscan/
>  obj-$(CONFIG_CAN_C_CAN)		+= c_can/
> +obj-$(CONFIG_CAN_M_CAN)		+= m_can.o

Please create a new m_can directory and a Kconfig in this directory analogue
to the c_can IP core approach.

>  obj-$(CONFIG_CAN_CC770)		+= cc770/
>  obj-$(CONFIG_CAN_AT91)		+= at91_can.o
>  obj-$(CONFIG_CAN_TI_HECC)	+= ti_hecc.o

Thanks for your contribution,
Oliver


  parent reply	other threads:[~2014-06-27 18:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-27 10:00 [PATCH 0/3] can: m_can: add Bosch M_CAN controller support Dong Aisheng
2014-06-27 10:00 ` [PATCH 1/3] " Dong Aisheng
2014-06-27 12:35   ` Mark Rutland
2014-06-30  8:03     ` Dong Aisheng
2014-06-27 18:03   ` Oliver Hartkopp [this message]
2014-06-30  8:26     ` Dong Aisheng
2014-07-01 10:29   ` Marc Kleine-Budde
2014-07-02  6:20     ` Dong Aisheng
2014-07-02  7:57       ` Marc Kleine-Budde
2014-07-02  6:33         ` Dong Aisheng
2014-07-01 10:33   ` Marc Kleine-Budde
2014-06-27 10:00 ` [PATCH 2/3] can: m_can: add bus error handling Dong Aisheng
2014-07-01 10:37   ` Marc Kleine-Budde
2014-07-02  6:31     ` Dong Aisheng
2014-06-27 10:00 ` [PATCH 3/3] can: m_can: add loopback and monitor mode support Dong Aisheng
2014-07-01 10:38   ` Marc Kleine-Budde
2014-07-02  6:32     ` Dong Aisheng

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=53ADB1E8.1030504@hartkopp.net \
    --to=socketcan@hartkopp$(echo .)net \
    --cc=b29396@freescale$(echo .)com \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=linux-can@vger$(echo .)kernel.org \
    --cc=mkl@pengutronix$(echo .)de \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=wg@grandegger$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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