]> git.karo-electronics.de Git - karo-tx-linux.git/commit
regmap-mmio: Use native endianness for read/write
authorSimon Arlott <simon@fire.lp0.eu>
Thu, 29 Oct 2015 19:58:47 +0000 (19:58 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 30 Oct 2015 02:18:41 +0000 (11:18 +0900)
commit4a98da2164cf514d2ae17d350a65bc76ee0a4823
tree26e2c092d342eca1586ef756a4639f024182cfd4
parent6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f
regmap-mmio: Use native endianness for read/write

The regmap API has an endianness setting for formatting reads and writes.
This can be set by the usual DT "little-endian" and "big-endian" properties.
To work properly the associated regmap_bus needs to read/write in native
endian.

The "syscon" DT device binding creates an mmio-based regmap_bus which
performs all reads/writes as little-endian. These values are then converted
again by regmap, which means that all of the MIPS BCM boards (which are
big-endian) have been declared as "little-endian" to get regmap to convert
them back to big-endian.

Modify regmap-mmio to use the native-endian functions __raw_read*() and
__raw_write*() instead of the little-endian functions read*() and
write*().

Modify the big-endian MIPS BCM boards to use what will now be the correct
endianness instead of pretending that the devices are little-endian.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Mark Brown <broonie@kernel.org>
arch/mips/boot/dts/brcm/bcm6328.dtsi
arch/mips/boot/dts/brcm/bcm7125.dtsi
arch/mips/boot/dts/brcm/bcm7346.dtsi
arch/mips/boot/dts/brcm/bcm7358.dtsi
arch/mips/boot/dts/brcm/bcm7360.dtsi
arch/mips/boot/dts/brcm/bcm7362.dtsi
arch/mips/boot/dts/brcm/bcm7420.dtsi
arch/mips/boot/dts/brcm/bcm7425.dtsi
arch/mips/boot/dts/brcm/bcm7435.dtsi
drivers/base/regmap/regmap-mmio.c