1
0
Fork 0
alistair23-linux/arch/mips/boot/dts
Mark Brown 25d6463e48 MIPS: dt: Explicitly specify native endian behaviour for syscon
On many MIPS systems the endianness of IP blocks is kept the same as
that of the CPU by the hardware.  This includes the system controllers
on these systems which are controlled via syscon which uses the regmap
API which used readl() and writel() to interact with the hardware,
meaning that all writes are converted to little endian when writing to
the hardware.  This caused a bad interaction with the regmap core in big
endian mode since it was not aware of the byte swapping and so ended up
performing little endian writes.

Unfortunately when this issue was noticed it was addressed by updating
the DT for the affected devices to specify them as little endian.  This
happened to work since it resulted in two endianness swaps which
cancelled each other out and gave little endian behaviour but meant that
the DT was clearly not accurately describing the hardware.

The intention of commit 29bb45f25f (regmap-mmio: Use native
endianness for read/write) was to fix this by making regmap default to
native endianness but this breaks most other MMIO users where the
hardware has a fixed endianness and the implementation uses the __raw
accessors which are not intended to be used outside of architecture
code.  Instead use the newly added native-endian DT property to say
exactly what we want for these systems.

Fixes: 29bb45f25f (regmap-mmio: Use native endianness for read/write)
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
2016-01-27 18:49:42 +00:00
..
brcm MIPS: dt: Explicitly specify native endian behaviour for syscon 2016-01-27 18:49:42 +00:00
cavium-octeon MIPS: OCTEON: add GPIO LED support for DSR-1000N 2015-04-01 17:22:10 +02:00
include MIPS: Fix invalid symbolic link file 2013-09-19 17:04:35 +02:00
ingenic MIPS: dts: jz4780/ci20: Add NEMC, BCH and NAND device tree nodes 2016-01-04 09:42:26 +01:00
lantiq MIPS: Move device-trees into vendor sub-directories 2015-04-01 17:21:34 +02:00
mti MIPS: Malta: Setup RAM regions via DT 2015-11-11 08:35:47 +01:00
netlogic MIPS: Netlogic: add device tree entry for XLP GPIO 2015-09-03 12:08:03 +02:00
pic32 MIPS: dts: Add initial DTS for the PIC32MZDA Starter Kit 2016-01-24 02:54:00 +01:00
qca MIPS: ath79: Enable the USB port on the TL-WR1043ND 2016-01-04 09:42:25 +01:00
ralink MIPS: Move device-trees into vendor sub-directories 2015-04-01 17:21:34 +02:00
xilfpga MIPS: xilfpga: Add xilfpga device tree files. 2015-11-11 08:38:42 +01:00
Makefile MIPS: dts: Add initial DTS for the PIC32MZDA Starter Kit 2016-01-24 02:54:00 +01:00