Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326369
b: refs/heads/master
c: b48d6aa
h: refs/heads/master
i:
  326367: caccfdd
v: v3
  • Loading branch information
Peter De Schrijver authored and Stephen Warren committed Sep 6, 2012
1 parent 65f90b4 commit 4c07b01
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f858b6f21fc3381cd9f490dd63bf5f519002d3e2
refs/heads/master: b48d6aab37403fb34fe18dd90791cb60f3265f13
40 changes: 35 additions & 5 deletions trunk/arch/arm/mach-tegra/powergate.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ int __init tegra_powergate_init(void)

#ifdef CONFIG_DEBUG_FS

static const char * const powergate_name[] = {
static const char * const *powergate_name;

static const char * const powergate_name_t20[] = {
[TEGRA_POWERGATE_CPU] = "cpu",
[TEGRA_POWERGATE_3D] = "3d",
[TEGRA_POWERGATE_VENC] = "venc",
Expand All @@ -209,6 +211,23 @@ static const char * const powergate_name[] = {
[TEGRA_POWERGATE_MPE] = "mpe",
};

static const char * const powergate_name_t30[] = {
[TEGRA_POWERGATE_CPU] = "cpu0",
[TEGRA_POWERGATE_3D] = "3d0",
[TEGRA_POWERGATE_VENC] = "venc",
[TEGRA_POWERGATE_VDEC] = "vdec",
[TEGRA_POWERGATE_PCIE] = "pcie",
[TEGRA_POWERGATE_L2] = "l2",
[TEGRA_POWERGATE_MPE] = "mpe",
[TEGRA_POWERGATE_HEG] = "heg",
[TEGRA_POWERGATE_SATA] = "sata",
[TEGRA_POWERGATE_CPU1] = "cpu1",
[TEGRA_POWERGATE_CPU2] = "cpu2",
[TEGRA_POWERGATE_CPU3] = "cpu3",
[TEGRA_POWERGATE_CELP] = "celp",
[TEGRA_POWERGATE_3D1] = "3d1",
};

static int powergate_show(struct seq_file *s, void *data)
{
int i;
Expand Down Expand Up @@ -238,10 +257,21 @@ int __init tegra_powergate_debugfs_init(void)
{
struct dentry *d;

d = debugfs_create_file("powergate", S_IRUGO, NULL, NULL,
&powergate_fops);
if (!d)
return -ENOMEM;
switch (tegra_chip_id) {
case TEGRA20:
powergate_name = powergate_name_t20;
break;
case TEGRA30:
powergate_name = powergate_name_t30;
break;
}

if (powergate_name) {
d = debugfs_create_file("powergate", S_IRUGO, NULL, NULL,
&powergate_fops);
if (!d)
return -ENOMEM;
}

return 0;
}
Expand Down

0 comments on commit 4c07b01

Please sign in to comment.