public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH v2 13/13] WIP: ARM: tegra: Add Tegra114 powergate support
Date: Tue, 15 Oct 2013 17:28:03 +0200	[thread overview]
Message-ID: <1381850883-12722-14-git-send-email-treding@nvidia.com> (raw)
In-Reply-To: <1381850883-12722-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Extend the list of power gates found on Tegra114. Note that there are
now holes in the list, so perhaps a simple array is no longer the best
data structure to represent it. But perhaps this is good enough for now
and can be cleaned up in a follow up patch?

Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/mach-tegra/powergate.c | 41 +++++++++++++++++++++++++++++++++++++++++
 include/linux/tegra-powergate.h |  9 ++++++++-
 2 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c
index f076f0f..8d9ab20 100644
--- a/arch/arm/mach-tegra/powergate.c
+++ b/arch/arm/mach-tegra/powergate.c
@@ -44,6 +44,13 @@ static int tegra_num_powerdomains;
 static int tegra_num_cpu_domains;
 static u8 *tegra_cpu_domains;
 static u8 tegra30_cpu_domains[] = {
+	TEGRA_POWERGATE_CPU,
+	TEGRA_POWERGATE_CPU1,
+	TEGRA_POWERGATE_CPU2,
+	TEGRA_POWERGATE_CPU3,
+};
+
+static u8 tegra114_cpu_domains[] = {
 	TEGRA_POWERGATE_CPU0,
 	TEGRA_POWERGATE_CPU1,
 	TEGRA_POWERGATE_CPU2,
@@ -189,6 +196,11 @@ int __init tegra_powergate_init(void)
 		tegra_num_cpu_domains = 4;
 		tegra_cpu_domains = tegra30_cpu_domains;
 		break;
+	case TEGRA114:
+		tegra_num_powerdomains = 23;
+		tegra_num_cpu_domains = 4;
+		tegra_cpu_domains = tegra114_cpu_domains;
+		break;
 	default:
 		/* Unknown Tegra variant. Disable powergating */
 		tegra_num_powerdomains = 0;
@@ -229,6 +241,32 @@ static const char * const powergate_name_t30[] = {
 	[TEGRA_POWERGATE_3D1]	= "3d1",
 };
 
+static const char * const powergate_name_t114[] = {
+	[TEGRA_POWERGATE_CPU]	= "cpu0",
+	[TEGRA_POWERGATE_3D]	= "3d",
+	[TEGRA_POWERGATE_VENC]	= "venc",
+	[TEGRA_POWERGATE_VDEC]	= "vdec",
+	[TEGRA_POWERGATE_PCIE]	= "n/a",
+	[TEGRA_POWERGATE_L2]	= "n/a",
+	[TEGRA_POWERGATE_MPE]	= "mpe",
+	[TEGRA_POWERGATE_HEG]	= "heg",
+	[TEGRA_POWERGATE_SATA]	= "n/a",
+	[TEGRA_POWERGATE_CPU1]	= "cpu1",
+	[TEGRA_POWERGATE_CPU2]	= "cpu2",
+	[TEGRA_POWERGATE_CPU3]	= "cpu3",
+	[TEGRA_POWERGATE_CELP]	= "celp",
+	[TEGRA_POWERGATE_3D1]	= "n/a",
+	[TEGRA_POWERGATE_CPU0]	= "cpu0",
+	[TEGRA_POWERGATE_C0NC]	= "c0nc",
+	[TEGRA_POWERGATE_C1NC]	= "c1nc",
+	[17]			= "n/a",
+	[TEGRA_POWERGATE_DISA]	= "disa",
+	[TEGRA_POWERGATE_DISB]	= "disb",
+	[TEGRA_POWERGATE_XUSBA]	= "xusba",
+	[TEGRA_POWERGATE_XUSBB]	= "xusbb",
+	[TEGRA_POWERGATE_XUSBC]	= "xusbc",
+};
+
 static int powergate_show(struct seq_file *s, void *data)
 {
 	int i;
@@ -265,6 +303,9 @@ int __init tegra_powergate_debugfs_init(void)
 	case TEGRA30:
 		powergate_name = powergate_name_t30;
 		break;
+	case TEGRA114:
+		powergate_name = powergate_name_t114;
+		break;
 	}
 
 	if (powergate_name) {
diff --git a/include/linux/tegra-powergate.h b/include/linux/tegra-powergate.h
index 55c29a8..b2df1c6 100644
--- a/include/linux/tegra-powergate.h
+++ b/include/linux/tegra-powergate.h
@@ -34,8 +34,15 @@ struct clk;
 #define TEGRA_POWERGATE_CPU3	11
 #define TEGRA_POWERGATE_CELP	12
 #define TEGRA_POWERGATE_3D1	13
+#define TEGRA_POWERGATE_CPU0	14
+#define TEGRA_POWERGATE_C0NC	15
+#define TEGRA_POWERGATE_C1NC	16
+#define TEGRA_POWERGATE_DISA	18
+#define TEGRA_POWERGATE_DISB	19
+#define TEGRA_POWERGATE_XUSBA	20
+#define TEGRA_POWERGATE_XUSBB	21
+#define TEGRA_POWERGATE_XUSBC	22
 
-#define TEGRA_POWERGATE_CPU0	TEGRA_POWERGATE_CPU
 #define TEGRA_POWERGATE_3D0	TEGRA_POWERGATE_3D
 
 int tegra_powergate_is_powered(int id);
-- 
1.8.4

  parent reply	other threads:[~2013-10-15 15:28 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 15:27 [PATCH v2 00/13] ARM: tegra: Enable DSI, panel and 3D support Thierry Reding
     [not found] ` <1381850883-12722-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-15 15:27   ` [PATCH v2 01/13] ARM: tegra: Mark Tegra30 display controller compatible with Tegra20 Thierry Reding
2013-10-15 15:27   ` [PATCH v2 02/13] ARM: tegra: Enable LVDS and HDMI on Cardhu Thierry Reding
     [not found]     ` <1381850883-12722-3-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-15 20:39       ` Stephen Warren
     [not found]         ` <525DA807.4010500-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-10-16 11:09           ` Thierry Reding
     [not found]             ` <20131016110911.GH21963-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-16 16:58               ` Stephen Warren
2013-10-15 15:27   ` [PATCH v2 03/13] ARM: tegra: Enable LVDS output on Harmony Thierry Reding
2013-10-15 15:27   ` [PATCH v2 04/13] ARM: tegra: Add MIPI calibration DT entries for Tegra114 Thierry Reding
     [not found]     ` <1381850883-12722-5-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-15 20:41       ` Stephen Warren
     [not found]         ` <525DA888.2060800-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-10-16 10:57           ` Thierry Reding
     [not found]             ` <20131016105743.GG21963-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-16 16:53               ` Stephen Warren
2013-10-16 16:56               ` Stephen Warren
2013-10-15 15:27   ` [PATCH v2 05/13] ARM: tegra: Add host1x, DC and HDMI to Tegra114 device tree Thierry Reding
2013-10-15 15:27   ` [PATCH v2 06/13] ARM: tegra: Add Tegra114 DSI support Thierry Reding
2013-10-15 15:27   ` [PATCH v2 07/13] ARM: tegra: Add Tegra114 gr2d support Thierry Reding
2013-10-15 15:27   ` [PATCH v2 08/13] ARM: tegra: Enable DSI support on Dalmore Thierry Reding
2013-10-15 15:27   ` [PATCH v2 09/13] ARM: tegra: Enable HDMI " Thierry Reding
2013-10-15 15:28   ` [PATCH v2 10/13] ARM: tegra: Enable DRM panel support Thierry Reding
2013-10-15 15:28   ` [PATCH v2 11/13] ARM: tegra: Add Tegra114 gr3d support Thierry Reding
2013-10-15 15:28   ` [PATCH v2 12/13] ARM: tegra: Use symbolic names for gr3d clocks Thierry Reding
2013-10-15 15:28   ` Thierry Reding [this message]
     [not found]     ` <1381850883-12722-14-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-15 21:50       ` [PATCH v2 13/13] WIP: ARM: tegra: Add Tegra114 powergate support Stephen Warren
     [not found]         ` <525DB8B2.2050203-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-10-16  2:31           ` Joseph Lo
     [not found]             ` <1381890671.11523.15.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>
2013-10-16 10:51               ` Thierry Reding
2013-10-16 19:12               ` Thierry Reding
     [not found]                 ` <20131016191225.GA660-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-17  2:39                   ` Joseph Lo
2013-10-16 10:48           ` Thierry Reding
     [not found]             ` <20131016104848.GE21963-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-16 16:47               ` Stephen Warren
2013-10-17  2:20               ` Joseph Lo
2013-10-17 17:37   ` [PATCH v2 00/13] ARM: tegra: Enable DSI, panel and 3D support Stephen Warren
     [not found]     ` <52602063.30501-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-10-17 17:45       ` Stephen Warren
     [not found]         ` <5260224F.6020509-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-10-17 19:38           ` Thierry Reding

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=1381850883-12722-14-git-send-email-treding@nvidia.com \
    --to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    /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