aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@gmail.com>2013-12-13 11:31:03 -0500
committerStephen Warren <swarren@nvidia.com>2013-12-16 16:02:51 -0500
commit9a716579660aa87a4ab4b4d1cac0686fba3707ba (patch)
treec6f22248e1239d512b82bda825cb5baa30050484
parent201fc0f9163314d169bb6b9837f922a8a374f81b (diff)
ARM: tegra: Add Tegra124 powergate support
Three new gates have been added for Tegra124: SOR, VIC and IRAM. In addition, PCIe and SATA gates are again supported, like on Tegra20 and Tegra30. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/powergate.c42
-rw-r--r--include/linux/tegra-powergate.h3
2 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c
index a67c92acb4a6..a8ac634eda77 100644
--- a/arch/arm/mach-tegra/powergate.c
+++ b/arch/arm/mach-tegra/powergate.c
@@ -59,6 +59,13 @@ static const u8 tegra114_cpu_domains[] = {
59 TEGRA_POWERGATE_CPU3, 59 TEGRA_POWERGATE_CPU3,
60}; 60};
61 61
62static const u8 tegra124_cpu_domains[] = {
63 TEGRA_POWERGATE_CPU0,
64 TEGRA_POWERGATE_CPU1,
65 TEGRA_POWERGATE_CPU2,
66 TEGRA_POWERGATE_CPU3,
67};
68
62static DEFINE_SPINLOCK(tegra_powergate_lock); 69static DEFINE_SPINLOCK(tegra_powergate_lock);
63 70
64static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE); 71static void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
@@ -206,6 +213,11 @@ int __init tegra_powergate_init(void)
206 tegra_num_cpu_domains = 4; 213 tegra_num_cpu_domains = 4;
207 tegra_cpu_domains = tegra114_cpu_domains; 214 tegra_cpu_domains = tegra114_cpu_domains;
208 break; 215 break;
216 case TEGRA124:
217 tegra_num_powerdomains = 25;
218 tegra_num_cpu_domains = 4;
219 tegra_cpu_domains = tegra124_cpu_domains;
220 break;
209 default: 221 default:
210 /* Unknown Tegra variant. Disable powergating */ 222 /* Unknown Tegra variant. Disable powergating */
211 tegra_num_powerdomains = 0; 223 tegra_num_powerdomains = 0;
@@ -267,6 +279,33 @@ static const char * const powergate_name_t114[] = {
267 [TEGRA_POWERGATE_XUSBC] = "xusbc", 279 [TEGRA_POWERGATE_XUSBC] = "xusbc",
268}; 280};
269 281
282static const char * const powergate_name_t124[] = {
283 [TEGRA_POWERGATE_CPU] = "crail",
284 [TEGRA_POWERGATE_3D] = "3d",
285 [TEGRA_POWERGATE_VENC] = "venc",
286 [TEGRA_POWERGATE_PCIE] = "pcie",
287 [TEGRA_POWERGATE_VDEC] = "vdec",
288 [TEGRA_POWERGATE_L2] = "l2",
289 [TEGRA_POWERGATE_MPE] = "mpe",
290 [TEGRA_POWERGATE_HEG] = "heg",
291 [TEGRA_POWERGATE_SATA] = "sata",
292 [TEGRA_POWERGATE_CPU1] = "cpu1",
293 [TEGRA_POWERGATE_CPU2] = "cpu2",
294 [TEGRA_POWERGATE_CPU3] = "cpu3",
295 [TEGRA_POWERGATE_CELP] = "celp",
296 [TEGRA_POWERGATE_CPU0] = "cpu0",
297 [TEGRA_POWERGATE_C0NC] = "c0nc",
298 [TEGRA_POWERGATE_C1NC] = "c1nc",
299 [TEGRA_POWERGATE_SOR] = "sor",
300 [TEGRA_POWERGATE_DIS] = "dis",
301 [TEGRA_POWERGATE_DISB] = "disb",
302 [TEGRA_POWERGATE_XUSBA] = "xusba",
303 [TEGRA_POWERGATE_XUSBB] = "xusbb",
304 [TEGRA_POWERGATE_XUSBC] = "xusbc",
305 [TEGRA_POWERGATE_VIC] = "vic",
306 [TEGRA_POWERGATE_IRAM] = "iram",
307};
308
270static int powergate_show(struct seq_file *s, void *data) 309static int powergate_show(struct seq_file *s, void *data)
271{ 310{
272 int i; 311 int i;
@@ -311,6 +350,9 @@ int __init tegra_powergate_debugfs_init(void)
311 case TEGRA114: 350 case TEGRA114:
312 powergate_name = powergate_name_t114; 351 powergate_name = powergate_name_t114;
313 break; 352 break;
353 case TEGRA124:
354 powergate_name = powergate_name_t124;
355 break;
314 } 356 }
315 357
316 if (powergate_name) { 358 if (powergate_name) {
diff --git a/include/linux/tegra-powergate.h b/include/linux/tegra-powergate.h
index afe442d2629a..bccad3cfff87 100644
--- a/include/linux/tegra-powergate.h
+++ b/include/linux/tegra-powergate.h
@@ -38,11 +38,14 @@ struct reset_control;
38#define TEGRA_POWERGATE_CPU0 14 38#define TEGRA_POWERGATE_CPU0 14
39#define TEGRA_POWERGATE_C0NC 15 39#define TEGRA_POWERGATE_C0NC 15
40#define TEGRA_POWERGATE_C1NC 16 40#define TEGRA_POWERGATE_C1NC 16
41#define TEGRA_POWERGATE_SOR 17
41#define TEGRA_POWERGATE_DIS 18 42#define TEGRA_POWERGATE_DIS 18
42#define TEGRA_POWERGATE_DISB 19 43#define TEGRA_POWERGATE_DISB 19
43#define TEGRA_POWERGATE_XUSBA 20 44#define TEGRA_POWERGATE_XUSBA 20
44#define TEGRA_POWERGATE_XUSBB 21 45#define TEGRA_POWERGATE_XUSBB 21
45#define TEGRA_POWERGATE_XUSBC 22 46#define TEGRA_POWERGATE_XUSBC 22
47#define TEGRA_POWERGATE_VIC 23
48#define TEGRA_POWERGATE_IRAM 24
46 49
47#define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D 50#define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D
48 51