diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2011-05-28 19:42:54 +0530 |
---|---|---|
committer | Niket Sirsi <nsirsi@nvidia.com> | 2011-06-01 12:02:11 -0700 |
commit | 1514d457b5672b10c14fd28139ba624f46c72ff0 (patch) | |
tree | 7dd2b84332c0bce451e6f6bbf5df3baa1a4176d6 | |
parent | a2287a12ac5fbfe1f7ef92c0825726e2cbe04b1a (diff) |
arm: tegra: pinmux: debugfs: Handling INVALID pinmux option
When any pinmux is selected as INVALID option, may be POR, taking
dump of pinmux through debugfs interface is displaying junk character/
crashing the kernel.
Fixing this issue by handling correctly the INVALID option.
Change-Id: I32c0ad0ba12ea44bc8fd1e2ec2ccb50269210f67
Reviewed-on: http://git-master/r/34429
Reviewed-by: Niket Sirsi <nsirsi@nvidia.com>
Tested-by: Niket Sirsi <nsirsi@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/pinmux.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/pinmux.c b/arch/arm/mach-tegra/pinmux.c index ed2c79abd77b..e16797d3b420 100644 --- a/arch/arm/mach-tegra/pinmux.c +++ b/arch/arm/mach-tegra/pinmux.c @@ -959,7 +959,10 @@ static int dbg_pinmux_show(struct seq_file *s, void *unused) mux = (pg_readl(pingroups[i].mux_reg) >> pingroups[i].mux_bit) & 0x3; BUG_ON(pingroups[i].funcs[mux] == 0); - if (pingroups[i].funcs[mux] & TEGRA_MUX_RSVD) { + if (pingroups[i].funcs[mux] == TEGRA_MUX_INVALID) { + seq_printf(s, "TEGRA_MUX_INVALID"); + len = 7; + } else if (pingroups[i].funcs[mux] & TEGRA_MUX_RSVD) { seq_printf(s, "TEGRA_MUX_RSVD%1lu", mux+1); len = 5; } else { |