summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/include
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-10-12 15:54:27 (GMT)
committerOlof Johansson <olof@lixom.net>2011-10-13 22:04:53 (GMT)
commit48f2eceefb9d1b79e4c37795d2121933fcbc34f5 (patch)
tree80ecd64222b3c06f0369c17cedaf400e2cda6832 /arch/arm/mach-tegra/include
parent88d8951e5896da908d31bc24735efae801566066 (diff)
downloadlinux-48f2eceefb9d1b79e4c37795d2121933fcbc34f5.tar.xz
arm/tegra: pinmux: ioremap registers
Use ioremap to obtain access to registers instead of using static mappings. This reduces the number of users of the static mappings, which will eventually allow them to be removed. Note that on Tegra30, the number of register "banks" will decrease to 2, and the packing of specific bits into registers will change significantly. That's why this change adds the "*_bank" fields to the pingroup tables, rather than implementing some more hard-coded scheme. Also, completely remove the implementation of suspend/resume; Tegra doesn't yet support suspend/resume, and the implementation is complex for the general pinmux driver: * Not all registers are used within each bank, so we probably shouldn't just iterate over every register in the bank, and save/restore it, since that would mean touching undefined registers. * Registers are shared between pingroups, so we can't simply iterate over each pingroup, and save/restore the registers it uses. It'd probably be best have probe() calculate a bitmask of actually-used registers for each bank, and have suspend/resume iterate over those bitmaps. Oh, and Real Soon Now, I should be looking into converting this driver to the new pinmux/pinctrl subsystem, so I didn't want to put too much work into the current incarnation. v2: s/space/bank/ to match comments on reg_* fields in pinmux.h. Re-order bank/reg parameters to pg_readl/pg_writel. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra/include')
-rw-r--r--arch/arm/mach-tegra/include/mach/pinmux.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/include/mach/pinmux.h b/arch/arm/mach-tegra/include/mach/pinmux.h
index defd877..bb7dfdb 100644
--- a/arch/arm/mach-tegra/include/mach/pinmux.h
+++ b/arch/arm/mach-tegra/include/mach/pinmux.h
@@ -199,6 +199,7 @@ struct tegra_drive_pingroup_config {
struct tegra_drive_pingroup_desc {
const char *name;
+ s16 reg_bank;
s16 reg;
};
@@ -207,6 +208,9 @@ struct tegra_pingroup_desc {
int funcs[4];
int func_safe;
int vddio;
+ s16 tri_bank; /* Register bank the tri_reg exists within */
+ s16 mux_bank; /* Register bank the mux_reg exists within */
+ s16 pupd_bank; /* Register bank the pupd_reg exists within */
s16 tri_reg; /* offset into the TRISTATE_REG_* register bank */
s16 mux_reg; /* offset into the PIN_MUX_CTL_* register bank */
s16 pupd_reg; /* offset into the PULL_UPDOWN_REG_* register bank */