From: Roger Quadros <rogerq@ti.com>
To: <tony@atomide.com>
Cc: <nsekhar@ti.com>, <s-anna@ti.com>, <linux-kernel@vger.kernel.org>,
Roger Quadros <rogerq@ti.com>
Subject: [RFC PATCH 3/4] bus: ti-sysc: Add support for PRU-ICSS type
Date: Tue, 2 Apr 2019 16:37:51 +0300 [thread overview]
Message-ID: <20190402133752.6912-4-rogerq@ti.com> (raw)
In-Reply-To: <20190402133752.6912-1-rogerq@ti.com>
The PRU-ICSS moduels has a SYSCONFIG register that is
similar to omap4-simple but with 2 speacial register bits.
Let's add a new type for that so we can deal with any
PRU-ICSS specific details if required.
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
.../devicetree/bindings/bus/ti-sysc.txt | 1 +
drivers/bus/ti-sysc.c | 21 +++++++++++++++++++
include/linux/platform_data/ti-sysc.h | 7 ++++++-
3 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/bus/ti-sysc.txt b/Documentation/devicetree/bindings/bus/ti-sysc.txt
index f200f45572ae..f9716c841ecd 100644
--- a/Documentation/devicetree/bindings/bus/ti-sysc.txt
+++ b/Documentation/devicetree/bindings/bus/ti-sysc.txt
@@ -38,6 +38,7 @@ Required standard properties:
"ti,sysc-dra7-mcasp"
"ti,sysc-usb-host-fs"
"ti,sysc-dra7-mcan"
+ "ti,sysc-pruss"
- 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 1e63b6265764..e4ab4d422ea5 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -1993,6 +1993,26 @@ static const struct sysc_capabilities sysc_dra7_mcan = {
.regbits = &sysc_regbits_dra7_mcan,
};
+/*
+ * PRU-ICSS, similar to omap4-simple but has special bits
+ */
+static const struct sysc_regbits sysc_regbits_pruss = {
+ .dmadisable_shift = -ENODEV,
+ .midle_shift = 2,
+ .sidle_shift = 0,
+ .clkact_shift = -ENODEV,
+ .enwkup_shift = -ENODEV,
+ .srst_shift = -ENODEV,
+ .emufree_shift = -ENODEV,
+ .autoidle_shift = -ENODEV,
+ .standby_init_shift = 4,
+ .sub_mwait_shift = 5,
+};
+
+static const struct sysc_capabilities sysc_pruss = {
+ .type = TI_SYSC_PRUSS,
+ .regbits = &sysc_regbits_pruss,
+};
static int sysc_init_pdata(struct sysc *ddata)
{
struct ti_sysc_platform_data *pdata = dev_get_platdata(ddata->dev);
@@ -2186,6 +2206,7 @@ static const struct of_device_id sysc_match[] = {
{ .compatible = "ti,sysc-usb-host-fs",
.data = &sysc_omap4_usb_host_fs, },
{ .compatible = "ti,sysc-dra7-mcan", .data = &sysc_dra7_mcan, },
+ { .compatible = "ti,sysc-pruss", .data = &sysc_pruss, },
{ },
};
MODULE_DEVICE_TABLE(of, sysc_match);
diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h
index 9256c0305968..bb95ae7da56c 100644
--- a/include/linux/platform_data/ti-sysc.h
+++ b/include/linux/platform_data/ti-sysc.h
@@ -15,6 +15,7 @@ enum ti_sysc_module_type {
TI_SYSC_OMAP4_MCASP,
TI_SYSC_OMAP4_USB_HOST_FS,
TI_SYSC_DRA7_MCAN,
+ TI_SYSC_PRUSS,
};
struct ti_sysc_cookie {
@@ -30,7 +31,9 @@ struct ti_sysc_cookie {
* @srst_shift: Offset of the softreset bit
* @autoidle_shift: Offset of the autoidle bit
* @dmadisable_shift: Offset of the dmadisable bit
- * @emufree_shift; Offset of the emufree bit
+ * @emufree_shift: Offset of the emufree bit
+ * @standby_init_shift: Offset to standby_init bit
+ * @sub_mwait_shift: Offset to sub_mwait bit
*
* Note that 0 is a valid shift, and for ti-sysc.c -ENODEV can be used if a
* feature is not available.
@@ -44,6 +47,8 @@ struct sysc_regbits {
s8 autoidle_shift;
s8 dmadisable_shift;
s8 emufree_shift;
+ s8 standby_init_shift;
+ s8 sub_mwait_shift;
};
#define SYSC_QUIRK_SWSUP_MSTANDBY BIT(13)
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2019-04-02 13:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 13:37 [RFC PATCH 0/4] bus: ti-sysc: Add generic enable/disable & PRUSS Roger Quadros
2019-04-02 13:37 ` [RFC PATCH 1/4] ARM: dts: dra7: Keep usb_otg_ss3 and usb_otg_ss4 disabled Roger Quadros
2019-04-02 16:22 ` Tony Lindgren
2019-04-03 8:38 ` Roger Quadros
2019-04-03 14:53 ` Roger Quadros
2019-04-03 15:09 ` Tony Lindgren
2019-04-02 13:37 ` [RFC PATCH 2/4] bus: ti-sysc: Add generic enable/disable functions Roger Quadros
2019-04-02 17:14 ` Tony Lindgren
2019-04-02 13:37 ` Roger Quadros [this message]
2019-04-02 13:37 ` [RFC PATCH 4/4] bus: ti-sysc: Ensure PRU-ICSS doesn't break suspend/resume Roger Quadros
2019-04-02 16:57 ` Tony Lindgren
2019-04-03 8:46 ` Roger Quadros
2019-04-02 13:39 ` [RFC PATCH 0/4] bus: ti-sysc: Add generic enable/disable & PRUSS Roger Quadros
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=20190402133752.6912-4-rogerq@ti.com \
--to=rogerq@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=s-anna@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome