History

Revert "mfd: syscon: Remove repetition of the regmap_get_val_endian()"

This reverts commit 72a95859728a7866522e6633818bebc1c2519b17. 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.

Jason A. Donenfeld committed 4 years ago

Commit ca4582c1 parent 52826d31 file · +8 −0Browse files

Unified · Split

drivers/mfd/syscon.c+8−0
@@ -66,6 +66,14 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_clk) · 65 unmodified lines
6666 goto err_map;
6767 }
6868
69+ /* Parse the device's DT node for an endianness specification */
70+ if (of_property_read_bool(np, "big-endian"))
71+ syscon_config.val_format_endian = REGMAP_ENDIAN_BIG;
72+ else if (of_property_read_bool(np, "little-endian"))
73+ syscon_config.val_format_endian = REGMAP_ENDIAN_LITTLE;
74+ else if (of_property_read_bool(np, "native-endian"))
75+ syscon_config.val_format_endian = REGMAP_ENDIAN_NATIVE;
76+
6977 /*
7078 * search for reg-io-width property in DT. If it is not provided,
7179 * default to 4 bytes. regmap_init_mmio will return an error if values