MIPS: DTS: Ingenic: adjust register size to available registers
authorH. Nikolaus Schaller <hns@goldelico.com>
Thu, 2 Dec 2021 18:39:53 +0000 (19:39 +0100)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 9 Dec 2021 17:10:00 +0000 (18:10 +0100)
After getting the regmap size from the device tree we should
reduce the ranges to the really available registers. This
allows to read only existing registers from the debug fs
and makes the regmap check out-of-bounds access.

For the jz4780 we have done this already.

Suggested-for: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/boot/dts/ingenic/jz4725b.dtsi
arch/mips/boot/dts/ingenic/jz4740.dtsi
arch/mips/boot/dts/ingenic/jz4770.dtsi

index 0c6a5a4..e9e4802 100644 (file)
 
        lcd: lcd-controller@13050000 {
                compatible = "ingenic,jz4725b-lcd";
-               reg = <0x13050000 0x1000>;
+               reg = <0x13050000 0x130>; /* tbc */
 
                interrupt-parent = <&intc>;
                interrupts = <31>;
index 772542e..7f76cba 100644 (file)
 
        lcd: lcd-controller@13050000 {
                compatible = "ingenic,jz4740-lcd";
-               reg = <0x13050000 0x1000>;
+               reg = <0x13050000 0x60>; /* LCDCMD1+4 */
 
                interrupt-parent = <&intc>;
                interrupts = <30>;
index dfe7432..bda0a3a 100644 (file)
 
        lcd: lcd-controller@13050000 {
                compatible = "ingenic,jz4770-lcd";
-               reg = <0x13050000 0x300>;
+               reg = <0x13050000 0x130>; /* tbc */
 
                interrupt-parent = <&intc>;
                interrupts = <31>;