mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 08:44:14 +08:00
Revert "mfd: syscon: Remove repetition of the regmap_get_val_endian()"
This reverts commit72a9585972
. It broke reboots on big-endian MIPS and MIPS64 malta QEMU instances, which use the syscon driver. Little-endian is not effected, which means likely it's important to handle regmap_get_val_endian() in this function after all. Fixes:72a9585972
("mfd: syscon: Remove repetition of the regmap_get_val_endian()") Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Lee Jones <lee@kernel.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
52826d3b2d
commit
ca4582c286
@ -66,6 +66,14 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_clk)
|
||||
goto err_map;
|
||||
}
|
||||
|
||||
/* Parse the device's DT node for an endianness specification */
|
||||
if (of_property_read_bool(np, "big-endian"))
|
||||
syscon_config.val_format_endian = REGMAP_ENDIAN_BIG;
|
||||
else if (of_property_read_bool(np, "little-endian"))
|
||||
syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE;
|
||||
else if (of_property_read_bool(np, "native-endian"))
|
||||
syscon_config.val_format_endian = REGMAP_ENDIAN_NATIVE;
|
||||
|
||||
/*
|
||||
* search for reg-io-width property in DT. If it is not provided,
|
||||
* default to 4 bytes. regmap_init_mmio will return an error if values
|
||||
|
Loading…
Reference in New Issue
Block a user