From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
kernel@pengutronix.de, Pankaj Sharma <pankj.sharma@samsung.com>,
Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [net 5/6] can: m_can: m_can_dev_setup(): add support for bosch mcan version 3.3.0
Date: Fri, 27 Nov 2020 11:03:00 +0100 [thread overview]
Message-ID: <20201127100301.512603-6-mkl@pengutronix.de> (raw)
In-Reply-To: <20201127100301.512603-1-mkl@pengutronix.de>
From: Pankaj Sharma <pankj.sharma@samsung.com>
Add support for mcan bit timing and control mode according to bosch mcan IP
version 3.3.0. The mcan version read from the Core Release field of CREL
register would be 33. Accordingly the properties are to be set for mcan v3.3.0
Signed-off-by: Pankaj Sharma <pankj.sharma@samsung.com>
Link: https://lore.kernel.org/r/1606366302-5520-1-git-send-email-pankj.sharma@samsung.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/m_can/m_can.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index d4030abad935..61a93b192037 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1385,6 +1385,8 @@ static int m_can_dev_setup(struct m_can_classdev *m_can_dev)
&m_can_data_bittiming_const_31X;
break;
case 32:
+ case 33:
+ /* Support both MCAN version v3.2.x and v3.3.0 */
m_can_dev->can.bittiming_const = m_can_dev->bit_timing ?
m_can_dev->bit_timing : &m_can_bittiming_const_31X;
--
2.29.2
next prev parent reply other threads:[~2020-11-27 10:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-27 10:02 pull-request: can 2020-11-27 Marc Kleine-Budde
2020-11-27 10:02 ` [net 1/6] can: gs_usb: fix endianess problem with candleLight firmware Marc Kleine-Budde
2020-11-27 10:02 ` [net 2/6] can: mcp251xfd: mcp251xfd_probe(): bail out if no IRQ was given Marc Kleine-Budde
2020-11-27 19:15 ` Jakub Kicinski
2020-11-27 10:02 ` [net 3/6] can: m_can: m_can_open(): remove IRQF_TRIGGER_FALLING from request_threaded_irq()'s flags Marc Kleine-Budde
2020-11-27 10:02 ` [net 4/6] can: m_can: fix nominal bitiming tseg2 min for version >= 3.1 Marc Kleine-Budde
2020-11-27 10:03 ` Marc Kleine-Budde [this message]
2020-11-27 10:03 ` [net 6/6] can: af_can: can_rx_unregister(): remove WARN() statement from list operation sanity check Marc Kleine-Budde
2020-11-27 19:16 ` pull-request: can 2020-11-27 Jakub Kicinski
2020-11-27 19:20 ` patchwork-bot+netdevbpf
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=20201127100301.512603-6-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pankj.sharma@samsung.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).