]> git.baikalelectronics.ru Git - kernel.git/commit
arm/tegra: pinmux: ioremap registers
authorStephen Warren <swarren@nvidia.com>
Wed, 12 Oct 2011 15:54:27 +0000 (09:54 -0600)
committerOlof Johansson <olof@lixom.net>
Thu, 13 Oct 2011 22:04:53 +0000 (15:04 -0700)
commit5048c7811d4a8fdb84e70dfd4bd8d79b35a7a54e
tree80ecd64222b3c06f0369c17cedaf400e2cda6832
parent8c23cb9062158cabb2e3fdfd1f4e06445f4a260e
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>
arch/arm/mach-tegra/include/mach/pinmux.h
arch/arm/mach-tegra/pinmux-t2-tables.c
arch/arm/mach-tegra/pinmux.c