All of lore.kernel.org
 help / color / mirror / Atom feed
From: Faiz Abbas <faiz_abbas@ti.com>
To: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-omap@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-clk@vger.kernel.org>
Cc: <robh+dt@kernel.org>, <bcousson@baylibre.com>, <tony@atomide.com>,
	<paul@pwsan.com>, <t-kristo@ti.com>, <faiz_abbas@ti.com>
Subject: [PATCH v2 4/6] bus: ti-sysc: Add support for using ti-sysc for MCAN on dra76x
Date: Wed, 30 May 2018 19:41:31 +0530	[thread overview]
Message-ID: <20180530141133.3711-5-faiz_abbas@ti.com> (raw)
In-Reply-To: <20180530141133.3711-1-faiz_abbas@ti.com>

The dra76x MCAN generic interconnect module has a its own
format for the bits in the control registers.

Therefore add a new module type, new regbits and new capabilities
specific to the MCAN module.

CC: Tony Lindgren <tony@atomide.com>
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
---
 .../devicetree/bindings/bus/ti-sysc.txt         |  1 +
 drivers/bus/ti-sysc.c                           | 17 +++++++++++++++++
 include/dt-bindings/bus/ti-sysc.h               |  2 ++
 include/linux/platform_data/ti-sysc.h           |  1 +
 4 files changed, 21 insertions(+)

diff --git a/Documentation/devicetree/bindings/bus/ti-sysc.txt b/Documentation/devicetree/bindings/bus/ti-sysc.txt
index 2957a9ae291f..ebbb11144b7b 100644
--- a/Documentation/devicetree/bindings/bus/ti-sysc.txt
+++ b/Documentation/devicetree/bindings/bus/ti-sysc.txt
@@ -36,6 +36,7 @@ Required standard properties:
 		"ti,sysc-omap-aes"
 		"ti,sysc-mcasp"
 		"ti,sysc-usb-host-fs"
+		"ti,sysc-dra7-mcan"
 
 - reg		shall have register areas implemented for the interconnect
 		target module in question such as revision, sysc and syss
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 7cd2fd04b212..83b47974567a 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -1262,6 +1262,22 @@ static const struct sysc_capabilities sysc_omap4_usb_host_fs = {
 	.regbits = &sysc_regbits_omap4_usb_host_fs,
 };
 
+static const struct sysc_regbits sysc_regbits_dra7_mcan = {
+	.dmadisable_shift = -ENODEV,
+	.midle_shift = -ENODEV,
+	.sidle_shift = -ENODEV,
+	.clkact_shift = -ENODEV,
+	.enwkup_shift = 4,
+	.srst_shift = 0,
+	.emufree_shift = -ENODEV,
+	.autoidle_shift = -ENODEV,
+};
+
+static const struct sysc_capabilities sysc_dra7_mcan = {
+	.type = TI_SYSC_DRA7_MCAN,
+	.regbits = &sysc_regbits_dra7_mcan,
+};
+
 static int sysc_init_pdata(struct sysc *ddata)
 {
 	struct ti_sysc_platform_data *pdata = dev_get_platdata(ddata->dev);
@@ -1441,6 +1457,7 @@ static const struct of_device_id sysc_match[] = {
 	{ .compatible = "ti,sysc-mcasp", .data = &sysc_omap4_mcasp, },
 	{ .compatible = "ti,sysc-usb-host-fs",
 	  .data = &sysc_omap4_usb_host_fs, },
+	{ .compatible = "ti,sysc-dra7-mcan", .data = &sysc_dra7_mcan, },
 	{  },
 };
 MODULE_DEVICE_TABLE(of, sysc_match);
diff --git a/include/dt-bindings/bus/ti-sysc.h b/include/dt-bindings/bus/ti-sysc.h
index 2c005376ac0e..7138384e2ef9 100644
--- a/include/dt-bindings/bus/ti-sysc.h
+++ b/include/dt-bindings/bus/ti-sysc.h
@@ -15,6 +15,8 @@
 /* SmartReflex sysc found on 36xx and later */
 #define SYSC_OMAP3_SR_ENAWAKEUP		(1 << 26)
 
+#define SYSC_DRA7_MCAN_ENAWAKEUP	(1 << 4)
+
 /* SYSCONFIG STANDBYMODE/MIDLEMODE/SIDLEMODE supported by hardware */
 #define SYSC_IDLE_FORCE			0
 #define SYSC_IDLE_NO			1
diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h
index 80ce28d40832..1ea3aab972b4 100644
--- a/include/linux/platform_data/ti-sysc.h
+++ b/include/linux/platform_data/ti-sysc.h
@@ -14,6 +14,7 @@ enum ti_sysc_module_type {
 	TI_SYSC_OMAP4_SR,
 	TI_SYSC_OMAP4_MCASP,
 	TI_SYSC_OMAP4_USB_HOST_FS,
+	TI_SYSC_DRA7_MCAN,
 };
 
 struct ti_sysc_cookie {
-- 
2.17.0

WARNING: multiple messages have this Message-ID (diff)
From: Faiz Abbas <faiz_abbas@ti.com>
To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-clk@vger.kernel.org
Cc: robh+dt@kernel.org, bcousson@baylibre.com, tony@atomide.com,
	paul@pwsan.com, t-kristo@ti.com, faiz_abbas@ti.com
Subject: [PATCH v2 4/6] bus: ti-sysc: Add support for using ti-sysc for MCAN on dra76x
Date: Wed, 30 May 2018 19:41:31 +0530	[thread overview]
Message-ID: <20180530141133.3711-5-faiz_abbas@ti.com> (raw)
In-Reply-To: <20180530141133.3711-1-faiz_abbas@ti.com>

The dra76x MCAN generic interconnect module has a its own
format for the bits in the control registers.

Therefore add a new module type, new regbits and new capabilities
specific to the MCAN module.

CC: Tony Lindgren <tony@atomide.com>
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
---
 .../devicetree/bindings/bus/ti-sysc.txt         |  1 +
 drivers/bus/ti-sysc.c                           | 17 +++++++++++++++++
 include/dt-bindings/bus/ti-sysc.h               |  2 ++
 include/linux/platform_data/ti-sysc.h           |  1 +
 4 files changed, 21 insertions(+)

diff --git a/Documentation/devicetree/bindings/bus/ti-sysc.txt b/Documentation/devicetree/bindings/bus/ti-sysc.txt
index 2957a9ae291f..ebbb11144b7b 100644
--- a/Documentation/devicetree/bindings/bus/ti-sysc.txt
+++ b/Documentation/devicetree/bindings/bus/ti-sysc.txt
@@ -36,6 +36,7 @@ Required standard properties:
 		"ti,sysc-omap-aes"
 		"ti,sysc-mcasp"
 		"ti,sysc-usb-host-fs"
+		"ti,sysc-dra7-mcan"
 
 - reg		shall have register areas implemented for the interconnect
 		target module in question such as revision, sysc and syss
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 7cd2fd04b212..83b47974567a 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -1262,6 +1262,22 @@ static const struct sysc_capabilities sysc_omap4_usb_host_fs = {
 	.regbits = &sysc_regbits_omap4_usb_host_fs,
 };
 
+static const struct sysc_regbits sysc_regbits_dra7_mcan = {
+	.dmadisable_shift = -ENODEV,
+	.midle_shift = -ENODEV,
+	.sidle_shift = -ENODEV,
+	.clkact_shift = -ENODEV,
+	.enwkup_shift = 4,
+	.srst_shift = 0,
+	.emufree_shift = -ENODEV,
+	.autoidle_shift = -ENODEV,
+};
+
+static const struct sysc_capabilities sysc_dra7_mcan = {
+	.type = TI_SYSC_DRA7_MCAN,
+	.regbits = &sysc_regbits_dra7_mcan,
+};
+
 static int sysc_init_pdata(struct sysc *ddata)
 {
 	struct ti_sysc_platform_data *pdata = dev_get_platdata(ddata->dev);
@@ -1441,6 +1457,7 @@ static const struct of_device_id sysc_match[] = {
 	{ .compatible = "ti,sysc-mcasp", .data = &sysc_omap4_mcasp, },
 	{ .compatible = "ti,sysc-usb-host-fs",
 	  .data = &sysc_omap4_usb_host_fs, },
+	{ .compatible = "ti,sysc-dra7-mcan", .data = &sysc_dra7_mcan, },
 	{  },
 };
 MODULE_DEVICE_TABLE(of, sysc_match);
diff --git a/include/dt-bindings/bus/ti-sysc.h b/include/dt-bindings/bus/ti-sysc.h
index 2c005376ac0e..7138384e2ef9 100644
--- a/include/dt-bindings/bus/ti-sysc.h
+++ b/include/dt-bindings/bus/ti-sysc.h
@@ -15,6 +15,8 @@
 /* SmartReflex sysc found on 36xx and later */
 #define SYSC_OMAP3_SR_ENAWAKEUP		(1 << 26)
 
+#define SYSC_DRA7_MCAN_ENAWAKEUP	(1 << 4)
+
 /* SYSCONFIG STANDBYMODE/MIDLEMODE/SIDLEMODE supported by hardware */
 #define SYSC_IDLE_FORCE			0
 #define SYSC_IDLE_NO			1
diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h
index 80ce28d40832..1ea3aab972b4 100644
--- a/include/linux/platform_data/ti-sysc.h
+++ b/include/linux/platform_data/ti-sysc.h
@@ -14,6 +14,7 @@ enum ti_sysc_module_type {
 	TI_SYSC_OMAP4_SR,
 	TI_SYSC_OMAP4_MCASP,
 	TI_SYSC_OMAP4_USB_HOST_FS,
+	TI_SYSC_DRA7_MCAN,
 };
 
 struct ti_sysc_cookie {
-- 
2.17.0

WARNING: multiple messages have this Message-ID (diff)
From: faiz_abbas@ti.com (Faiz Abbas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/6] bus: ti-sysc: Add support for using ti-sysc for MCAN on dra76x
Date: Wed, 30 May 2018 19:41:31 +0530	[thread overview]
Message-ID: <20180530141133.3711-5-faiz_abbas@ti.com> (raw)
In-Reply-To: <20180530141133.3711-1-faiz_abbas@ti.com>

The dra76x MCAN generic interconnect module has a its own
format for the bits in the control registers.

Therefore add a new module type, new regbits and new capabilities
specific to the MCAN module.

CC: Tony Lindgren <tony@atomide.com>
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
---
 .../devicetree/bindings/bus/ti-sysc.txt         |  1 +
 drivers/bus/ti-sysc.c                           | 17 +++++++++++++++++
 include/dt-bindings/bus/ti-sysc.h               |  2 ++
 include/linux/platform_data/ti-sysc.h           |  1 +
 4 files changed, 21 insertions(+)

diff --git a/Documentation/devicetree/bindings/bus/ti-sysc.txt b/Documentation/devicetree/bindings/bus/ti-sysc.txt
index 2957a9ae291f..ebbb11144b7b 100644
--- a/Documentation/devicetree/bindings/bus/ti-sysc.txt
+++ b/Documentation/devicetree/bindings/bus/ti-sysc.txt
@@ -36,6 +36,7 @@ Required standard properties:
 		"ti,sysc-omap-aes"
 		"ti,sysc-mcasp"
 		"ti,sysc-usb-host-fs"
+		"ti,sysc-dra7-mcan"
 
 - reg		shall have register areas implemented for the interconnect
 		target module in question such as revision, sysc and syss
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 7cd2fd04b212..83b47974567a 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -1262,6 +1262,22 @@ static const struct sysc_capabilities sysc_omap4_usb_host_fs = {
 	.regbits = &sysc_regbits_omap4_usb_host_fs,
 };
 
+static const struct sysc_regbits sysc_regbits_dra7_mcan = {
+	.dmadisable_shift = -ENODEV,
+	.midle_shift = -ENODEV,
+	.sidle_shift = -ENODEV,
+	.clkact_shift = -ENODEV,
+	.enwkup_shift = 4,
+	.srst_shift = 0,
+	.emufree_shift = -ENODEV,
+	.autoidle_shift = -ENODEV,
+};
+
+static const struct sysc_capabilities sysc_dra7_mcan = {
+	.type = TI_SYSC_DRA7_MCAN,
+	.regbits = &sysc_regbits_dra7_mcan,
+};
+
 static int sysc_init_pdata(struct sysc *ddata)
 {
 	struct ti_sysc_platform_data *pdata = dev_get_platdata(ddata->dev);
@@ -1441,6 +1457,7 @@ static const struct of_device_id sysc_match[] = {
 	{ .compatible = "ti,sysc-mcasp", .data = &sysc_omap4_mcasp, },
 	{ .compatible = "ti,sysc-usb-host-fs",
 	  .data = &sysc_omap4_usb_host_fs, },
+	{ .compatible = "ti,sysc-dra7-mcan", .data = &sysc_dra7_mcan, },
 	{  },
 };
 MODULE_DEVICE_TABLE(of, sysc_match);
diff --git a/include/dt-bindings/bus/ti-sysc.h b/include/dt-bindings/bus/ti-sysc.h
index 2c005376ac0e..7138384e2ef9 100644
--- a/include/dt-bindings/bus/ti-sysc.h
+++ b/include/dt-bindings/bus/ti-sysc.h
@@ -15,6 +15,8 @@
 /* SmartReflex sysc found on 36xx and later */
 #define SYSC_OMAP3_SR_ENAWAKEUP		(1 << 26)
 
+#define SYSC_DRA7_MCAN_ENAWAKEUP	(1 << 4)
+
 /* SYSCONFIG STANDBYMODE/MIDLEMODE/SIDLEMODE supported by hardware */
 #define SYSC_IDLE_FORCE			0
 #define SYSC_IDLE_NO			1
diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h
index 80ce28d40832..1ea3aab972b4 100644
--- a/include/linux/platform_data/ti-sysc.h
+++ b/include/linux/platform_data/ti-sysc.h
@@ -14,6 +14,7 @@ enum ti_sysc_module_type {
 	TI_SYSC_OMAP4_SR,
 	TI_SYSC_OMAP4_MCASP,
 	TI_SYSC_OMAP4_USB_HOST_FS,
+	TI_SYSC_DRA7_MCAN,
 };
 
 struct ti_sysc_cookie {
-- 
2.17.0

  parent reply	other threads:[~2018-05-30 14:11 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30 14:11 [PATCH v2 0/6] Add MCAN Support for dra76x Faiz Abbas
2018-05-30 14:11 ` Faiz Abbas
2018-05-30 14:11 ` Faiz Abbas
2018-05-30 14:11 ` [PATCH v2 1/6] ARM: dra762: hwmod: Add MCAN support Faiz Abbas
2018-05-30 14:11   ` Faiz Abbas
2018-05-30 14:11   ` Faiz Abbas
2018-05-30 14:50   ` Tony Lindgren
2018-05-30 14:50     ` Tony Lindgren
2018-05-30 15:15     ` Tero Kristo
2018-05-30 15:15       ` Tero Kristo
2018-05-30 15:15       ` Tero Kristo
2018-05-30 15:28       ` Tony Lindgren
2018-05-30 15:28         ` Tony Lindgren
2018-05-30 15:41         ` Tero Kristo
2018-05-30 15:41           ` Tero Kristo
2018-05-30 15:41           ` Tero Kristo
2018-05-30 15:54           ` Tony Lindgren
2018-05-30 15:54             ` Tony Lindgren
2018-05-31  6:15             ` Tero Kristo
2018-05-31  6:15               ` Tero Kristo
2018-05-31  6:15               ` Tero Kristo
2018-05-31 15:26               ` Tony Lindgren
2018-05-31 15:26                 ` Tony Lindgren
2018-05-31 16:35                 ` Faiz Abbas
2018-05-31 16:35                   ` Faiz Abbas
2018-05-31 16:35                   ` Faiz Abbas
2018-05-31 16:39                   ` Tony Lindgren
2018-05-31 16:39                     ` Tony Lindgren
2018-05-30 14:11 ` [PATCH v2 2/6] ARM: dts: dra762: Add MCAN clock support Faiz Abbas
2018-05-30 14:11   ` Faiz Abbas
2018-05-30 14:11   ` Faiz Abbas
2018-05-30 14:11 ` [PATCH v2 3/6] clk: ti: dra7: Add clkctrl clock data for the mcan clocks Faiz Abbas
2018-05-30 14:11   ` Faiz Abbas
2018-05-30 14:11   ` Faiz Abbas
2018-05-31  4:03   ` Rob Herring
2018-05-31  4:03     ` Rob Herring
2018-05-31 10:14     ` Faiz Abbas
2018-05-31 10:14       ` Faiz Abbas
2018-05-31 10:14       ` Faiz Abbas
2018-05-31 13:29       ` Tero Kristo
2018-05-31 13:29         ` Tero Kristo
2018-05-31 13:29         ` Tero Kristo
2018-06-01  6:48         ` Faiz Abbas
2018-06-01  6:48           ` Faiz Abbas
2018-06-01  6:48           ` Faiz Abbas
2018-06-01 14:26           ` Tony Lindgren
2018-06-01 14:26             ` Tony Lindgren
2018-06-04 13:58             ` Faiz Abbas
2018-06-04 13:58               ` Faiz Abbas
2018-06-04 13:58               ` Faiz Abbas
2018-05-30 14:11 ` Faiz Abbas [this message]
2018-05-30 14:11   ` [PATCH v2 4/6] bus: ti-sysc: Add support for using ti-sysc for MCAN on dra76x Faiz Abbas
2018-05-30 14:11   ` Faiz Abbas
2018-05-30 14:57   ` Tony Lindgren
2018-05-30 14:57     ` Tony Lindgren
2018-05-31 10:16     ` Faiz Abbas
2018-05-31 10:16       ` Faiz Abbas
2018-05-31 10:16       ` Faiz Abbas
2018-05-31 13:50       ` Tony Lindgren
2018-05-31 13:50         ` Tony Lindgren
2018-05-31  4:08   ` Rob Herring
2018-05-31  4:08     ` Rob Herring
2018-05-30 14:11 ` [PATCH v2 5/6] ARM: dts: Add generic interconnect target module node for MCAN Faiz Abbas
2018-05-30 14:11   ` Faiz Abbas
2018-05-30 14:11   ` Faiz Abbas
2018-05-30 15:04   ` Tony Lindgren
2018-05-30 15:04     ` Tony Lindgren
2018-05-31 10:21     ` Faiz Abbas
2018-05-31 10:21       ` Faiz Abbas
2018-05-31 10:21       ` Faiz Abbas
2018-05-31 13:45       ` Tony Lindgren
2018-05-31 13:45         ` Tony Lindgren
2018-05-31 16:38         ` Faiz Abbas
2018-05-31 16:38           ` Faiz Abbas
2018-05-31 16:38           ` Faiz Abbas
2018-05-31  4:06   ` Rob Herring
2018-05-31  4:06     ` Rob Herring
2018-05-31 11:26     ` Faiz Abbas
2018-05-31 11:26       ` Faiz Abbas
2018-05-31 11:26       ` Faiz Abbas
2018-05-31 13:41       ` Tony Lindgren
2018-05-31 13:41         ` Tony Lindgren
2018-06-02  6:32   ` Stephen Boyd
2018-06-02  6:32     ` Stephen Boyd
2018-06-02  6:32     ` Stephen Boyd
2018-06-02  6:32     ` Stephen Boyd
2018-06-04  5:49     ` Faiz Abbas
2018-06-04  5:49       ` Faiz Abbas
2018-06-04  5:49       ` Faiz Abbas
2018-05-30 14:11 ` [PATCH v2 6/6] ARM: dts: dra76x: Add MCAN node Faiz Abbas
2018-05-30 14:11   ` Faiz Abbas
2018-05-30 14:11   ` Faiz Abbas
2018-05-30 15:07   ` Tony Lindgren
2018-05-30 15:07     ` Tony Lindgren

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=20180530141133.3711-5-faiz_abbas@ti.com \
    --to=faiz_abbas@ti.com \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=robh+dt@kernel.org \
    --cc=t-kristo@ti.com \
    --cc=tony@atomide.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.