linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: linux-can@vger.kernel.org
Cc: wsa@the-dreams.de, linux-omap@vger.kernel.org, rogerq@ti.com,
	kernel@pengutronix.de, Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH v8 7/8] can: c_can: Add support for TI DRA7 DCAN
Date: Fri, 14 Nov 2014 19:09:50 +0100	[thread overview]
Message-ID: <1415988591-6032-8-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1415988591-6032-1-git-send-email-mkl@pengutronix.de>

From: Roger Quadros <rogerq@ti.com>

DRA7 SoC has 2 CAN IPs. Provide compatible IDs and RAMINIT
register data for both.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 Documentation/devicetree/bindings/net/can/c_can.txt |  1 +
 drivers/net/can/c_can/c_can_platform.c              | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/can/c_can.txt b/Documentation/devicetree/bindings/net/can/c_can.txt
index a3ca3ee53546..f682fdb6d921 100644
--- a/Documentation/devicetree/bindings/net/can/c_can.txt
+++ b/Documentation/devicetree/bindings/net/can/c_can.txt
@@ -4,6 +4,7 @@ Bosch C_CAN/D_CAN controller Device Tree Bindings
 Required properties:
 - compatible		: Should be "bosch,c_can" for C_CAN controllers and
 			  "bosch,d_can" for D_CAN controllers.
+			  Can be "ti,dra7-d_can".
 - reg			: physical base address and size of the C_CAN/D_CAN
 			  registers map
 - interrupts		: property with a value describing the interrupt
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
index 41fa460c3592..570da5f56aae 100644
--- a/drivers/net/can/c_can/c_can_platform.c
+++ b/drivers/net/can/c_can/c_can_platform.c
@@ -190,6 +190,18 @@ static const struct c_can_driver_data d_can_drvdata = {
 	.id = BOSCH_D_CAN,
 };
 
+static const struct raminit_bits dra7_raminit_bits[] = {
+	[0] = { .start = 3, .done = 1, },
+	[1] = { .start = 5, .done = 2, },
+};
+
+static const struct c_can_driver_data dra7_dcan_drvdata = {
+	.id = BOSCH_D_CAN,
+	.raminit_num = ARRAY_SIZE(dra7_raminit_bits),
+	.raminit_bits = dra7_raminit_bits,
+	.raminit_pulse = true,
+};
+
 static struct platform_device_id c_can_id_table[] = {
 	{
 		.name = KBUILD_MODNAME,
@@ -210,6 +222,7 @@ MODULE_DEVICE_TABLE(platform, c_can_id_table);
 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 },
 	{ /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, c_can_of_table);
-- 
2.1.1


  parent reply	other threads:[~2014-11-14 18:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-14 18:09 [PATCH v8 0/8] can: c_can: Use syscon regmap for TI specific RAMINIT register Marc Kleine-Budde
2014-11-14 18:09 ` [PATCH v8 1/8] can: c_can: Add timeout to c_can_hw_raminit_ti() Marc Kleine-Budde
2014-11-14 18:09 ` [PATCH v8 2/8] can: c_can: Introduce c_can_driver_data structure Marc Kleine-Budde
2014-11-14 18:09 ` [PATCH v8 3/8] can: c_can: Add RAMINIT register information to driver data Marc Kleine-Budde
2014-11-14 18:09 ` [PATCH v8 4/8] can: c_can: Add syscon/regmap RAMINIT mechanism Marc Kleine-Budde
2015-01-05  9:18   ` Tomi Valkeinen
2015-01-07  9:56     ` Roger Quadros
2014-11-14 18:09 ` [PATCH v8 5/8] can: c_can: Add support for START pulse in RAMINIT sequence Marc Kleine-Budde
2014-11-14 18:09 ` [PATCH v8 6/8] can: c_can: Disable pins when CAN interface is down Marc Kleine-Budde
2014-11-14 18:09 ` Marc Kleine-Budde [this message]
2014-11-14 18:09 ` [PATCH v8 8/8] can: c_can: Add support for TI am3352 DCAN Marc Kleine-Budde
2014-11-17 12:07 ` [PATCH v8 0/8] can: c_can: Use syscon regmap for TI specific RAMINIT register Roger Quadros
2014-11-17 12:09 ` [PATCH v8 9/9] net: can: c_can: Add support for TI am4372 DCAN Roger Quadros
2014-11-17 12:12   ` Marc Kleine-Budde
2014-11-17 12:31     ` Roger Quadros
2014-11-17 14:19       ` Roger Quadros
2014-11-17 14:31         ` Marc Kleine-Budde

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=1415988591-6032-8-git-send-email-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=rogerq@ti.com \
    --cc=wsa@the-dreams.de \
    /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).