diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2011-05-28 19:42:54 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:42:44 -0800 |
commit | e3e73f57bb147f84712398b12ed761d8606e0a99 (patch) | |
tree | 584d5a083d90e91ca36d402bd88b269ef5d81e84 /arch/arm/mach-tegra/pinmux.c | |
parent | ebbc7e01fe905ccc8a82b5c1037d8502897ba2df (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.
Original-Change-Id: I32c0ad0ba12ea44bc8fd1e2ec2ccb50269210f67
Reviewed-on: http://git-master/r/34429
Reviewed-by: Niket Sirsi <nsirsi@nvidia.com>
Tested-by: Niket Sirsi <nsirsi@nvidia.com>
Rebase-Id: R4f7f4f9af4640b0858c384ce4982317635b8b6ad
Diffstat (limited to 'arch/arm/mach-tegra/pinmux.c')
-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 8c86b7224d3e..aac8d5d5605e 100644 --- a/arch/arm/mach-tegra/pinmux.c +++ b/arch/arm/mach-tegra/pinmux.c @@ -964,7 +964,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 { |