]> git.baikalelectronics.ru Git - kernel.git/commit
regmap: mmio: Fix MMIO accessors to avoid talking to IO port
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 8 Aug 2022 20:34:00 +0000 (23:34 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 15 Aug 2022 00:20:11 +0000 (01:20 +0100)
commit7acbb812af9c981652ae508da9fd4f83f0b581f9
treec94eec5beaa80d03d846bf4c26882a870e33acfe
parent664e2caa697b0e552dc67523e2ca9cc7f33ab9ee
regmap: mmio: Fix MMIO accessors to avoid talking to IO port

Currently regmap MMIO is inconsistent with IO accessors. I.e.
the Big Endian counterparts are using ioreadXXbe() / iowriteXXbe()
which are not clean implementations of readXXbe().

That said, reimplement current Big Endian MMIO accessors by replacing
ioread()/iowrite() with respective read()/write() and swab() calls.

Note, there are no current in-kernel users that may utilize the
functionality of the IO ports on Big Endian hardware. All drivers
that use regmap MMIO either Little Endian, or they don't map IO
ports in a way that ioreadXX()/iowriteXX() may be utilized.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/20220808203401.35153-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap-mmio.c