linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Andrejs Cainikovs <Andrejs.Cainikovs@netmodule.com>,
	Wolfgang Grandegger <wg@grandegger.com>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Patrick Zysset <Patrick.Zysset@netmodule.com>
Subject: Re: [PATCH 1/2] can: c_can: support 64 message objects for D_CAN
Date: Wed, 24 Jul 2019 11:48:19 +0200	[thread overview]
Message-ID: <080346c5-eace-f0bc-ef3a-0354988b9fb4@pengutronix.de> (raw)
In-Reply-To: <20190208131738.27668-2-andrejs.cainikovs@netmodule.com>


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

On 2/8/19 2:17 PM, Andrejs Cainikovs wrote:
> D_CAN supports up to 128 message objects, comparing to 32 on C_CAN.
> However, some CPUs with D_CAN controller have their own limits:
> TI AM335x Sitara CPU, for example, supports max of 64 message objects.
> 
> This patch extends max D_CAN message objects up to 64.

Please don't make this a kconfig option.

According to you description this is a HW feature, so please add the max
number of messe objects to "struct c_can_driver_data" and adjust the
drvdata accordingly.

> static const struct of_device_id c_can_of_table[] = {
> 	{ .compatible = "bosch,c_can", .data = &c_can_drvdata },
> 	{ .compatible = "bosch,d_can", .data = &d_can_drvdata },
> 	{ .compatible = "ti,dra7-d_can", .data = &dra7_dcan_drvdata },
> 	{ .compatible = "ti,am3352-d_can", .data = &am3352_dcan_drvdata },
> 	{ .compatible = "ti,am4372-d_can", .data = &am3352_dcan_drvdata },
> 	{ /* sentinel */ },
> };

You probably have to pass it via "struct c_can_priv" so that it's
available in the c_can.c

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

  reply	other threads:[~2019-07-24  9:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190208131738.27668-1-andrejs.cainikovs@netmodule.com>
2019-02-08 13:17 ` [PATCH 1/2] can: c_can: support 64 message objects for D_CAN Andrejs Cainikovs
2019-07-24  9:48   ` Marc Kleine-Budde [this message]
2021-01-13 18:49     ` Ezequiel Garcia
2021-01-13 19:37       ` Marc Kleine-Budde
2019-02-08 13:17 ` [PATCH 2/2] can: c_can: configurable amount of D_CAN RX objects Andrejs Cainikovs
2019-02-08 13:31 [PATCH 0/2] D_CAN RX buffer size improvements Andrejs Cainikovs
2019-02-08 13:31 ` [PATCH 1/2] can: c_can: support 64 message objects for D_CAN Andrejs Cainikovs

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=080346c5-eace-f0bc-ef3a-0354988b9fb4@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=Andrejs.Cainikovs@netmodule.com \
    --cc=Patrick.Zysset@netmodule.com \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 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).