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 0c6a5a4266f43879debe909e2a01130f00306782..e9e48022f6316fcfec89307e36ad433a0b5a2414 100644 (file)
 
        lcd: lcd-controller@13050000 {
                compatible = "ingenic,jz4725b-lcd";
-               reg = <0x13050000 0x1000>;
+               reg = <0x13050000 0x130>; /* tbc */
 
                interrupt-parent = <&intc>;
                interrupts = <31>;
index 772542e1f266a1941d51c567755c8986a47c62ca..7f76cba03a089bcc7e241fa7a048f808d50042fc 100644 (file)
 
        lcd: lcd-controller@13050000 {
                compatible = "ingenic,jz4740-lcd";
-               reg = <0x13050000 0x1000>;
+               reg = <0x13050000 0x60>; /* LCDCMD1+4 */
 
                interrupt-parent = <&intc>;
                interrupts = <30>;
index dfe74328ae5dca450947b87e3659dc916bc63391..bda0a3a86ed5f30ddfb414b973fc1a30517e4c2f 100644 (file)
 
        lcd: lcd-controller@13050000 {
                compatible = "ingenic,jz4770-lcd";
-               reg = <0x13050000 0x300>;
+               reg = <0x13050000 0x130>; /* tbc */
 
                interrupt-parent = <&intc>;
                interrupts = <31>;