]> git.baikalelectronics.ru Git - kernel.git/commit
bus: ti-sysc: Fix module register ioremap for larger offsets
authorTony Lindgren <tony@atomide.com>
Wed, 8 Aug 2018 08:07:05 +0000 (01:07 -0700)
committerTony Lindgren <tony@atomide.com>
Fri, 17 Aug 2018 14:22:56 +0000 (07:22 -0700)
commit4840003535dbb291821752c7ac9dedfd4df6842a
treedd876e9f7a4d828dcb675656778db0103ae7435d
parentf1d2d38481dc3d33e1a901808c5763213b69413b
bus: ti-sysc: Fix module register ioremap for larger offsets

We can have the interconnect target module control registers pretty
much anywhere within the module range. The current code attempts an
incomplete optimization of the ioremap size but does it wrong and
it only works for registers at the beginning of the module.

Let's just use the largest control register to calculate the ioremap
size. The ioremapped range is for most part cached anyways so there
is no need for size optimization. Let's also update the comments
accordingly.

Fixes: f91fd64c1f8d ("bus: ti-sysc: Add minimal TI sysc interconnect
target driver")
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/bus/ti-sysc.c