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.
Unified · Split
| @@ -66,6 +66,14 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_clk) · 65 unmodified lines | ||
| 66 | 66 | goto err_map; |
| 67 | 67 | } |
| 68 | 68 | |
| 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 | + | |
| 69 | 77 | /* |
| 70 | 78 | * search for reg-io-width property in DT. If it is not provided, |
| 71 | 79 | * default to 4 bytes. regmap_init_mmio will return an error if values |