Skip to content

Commit 3b2b9ea

Browse files
bebarinogregkh
authored andcommitted
nvmem: qfprom: Specify LE device endianness
The qfprom is a little endian device, but so far we've been relying on the regmap mmio bus handling this for us without explicitly stating that fact. After commit 4a98da2164cf (regmap-mmio: Use native endianness for read/write, 2015-10-29), the regmap mmio bus will read/write with the __raw_*() IO accessors, instead of using the readl/writel() APIs that do proper byte swapping for little endian devices. So if we're running on a big endian processor and haven't specified the endianness explicitly in the regmap config or in DT, we're going to switch from doing little endian byte swapping to big endian accesses without byte swapping, leading to some confusing results. Specify the endianness explicitly so that the regmap core properly byte swaps the accesses for us. Cc: Rajendra Nayak <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Tyler Baker <[email protected]> Cc: Simon Arlott <[email protected]> Cc: Mark Brown <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2f9ba5b commit 3b2b9ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/nvmem/qfprom.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ static struct regmap_config qfprom_regmap_config = {
2121
.reg_bits = 32,
2222
.val_bits = 8,
2323
.reg_stride = 1,
24+
.val_format_endian = REGMAP_ENDIAN_LITTLE,
2425
};
2526

2627
static struct nvmem_config econfig = {

0 commit comments

Comments
 (0)