layerscape interrupt-map warning problem, may be dtb.py bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rob:
	I am trying to fix the below issue

arch/arm64/boot/dts/freescale/fsl-ls2080a-rdb.dtb: syscon@1f70000: interrupt-controller@14:interrupt-map: [[0, 0, 1, 0, 0, 4, 1, 0], [1, 0, 1, 4, 2, 0, 1, 0], [2, 4, 3, 0, 1, 0, 3, 4], [4, 0, 1, 0, 4, 4, 5, 0], [1, 0, 5, 4, 6, 0, 1, 0], [6, 4, 7, 0, 1, 0, 7, 4], [8, 0, 1, 0, 8, 4, 9, 0], [1, 0, 9, 4, 10, 0, 1, 0], [10, 4, 11, 0, 1, 0, 11, 4]] is too short

gic: interrupt-controller@6000000 {
                compatible = "arm,gic-v3";
                reg = <0x0 0x06000000 0 0x10000>, /* GIC Dist */
                        <0x0 0x06100000 0 0x100000>, /* GICR (RD_base + SGI_base) */
                        <0x0 0x0c0c0000 0 0x2000>, /* GICC */
                        <0x0 0x0c0d0000 0 0x1000>, /* GICH */
                        <0x0 0x0c0e0000 0 0x20000>; /* GICV */
                #interrupt-cells = <3>;
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;
                interrupt-controller;
                interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;

                its: msi-controller@6020000 {
                        compatible = "arm,gic-v3-its";
                        msi-controller;
                        #msi-cells = <1>;
                        reg = <0x0 0x6020000 0 0x20000>;
                };
};

extirq: interrupt-controller@14 {
	compatible = "fsl,ls2080a-extirq", "fsl,ls1088a-extirq";
        #interrupt-cells = <2>;
        #address-cells = <0>;
        interrupt-controller;
        reg = <0x14 4>;
        interrupt-map =
        	<0 0 &gic GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
                <1 0 &gic GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
                <2 0 &gic GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
                <3 0 &gic GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>,
                <4 0 &gic GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
                <5 0 &gic GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
                <6 0 &gic GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
                <7 0 &gic GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
                <8 0 &gic GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
                <9 0 &gic GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
                <10 0 &gic GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
                <11 0 &gic GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
                interrupt-map-mask = <0xf 0x0>;
        };

the binding doc
interrupt-map:
          minItems: 12
          maxItems: 12

*The key problem is wrong split matrix

[0, 0, 1, 0, 0, 4, 1, 0]
                   ^^^^, there are *two* data more than expected 6.


in def fixup_interrupts(dt, icells) of dtb.py

if '#address-cells' in phandles[phandle]:
      p_ac = _get_cells_size(phandles[phandle], '#address-cells')
else:
      p_ac = 0


I am not sure why need check '#address-ceslls' in here. If set
#address-cells = <0>, or remove #address-ceslls in gic, this problem can be
fixed.

But I think it possible dtb.py bugs, '#address-cells' should descript
child node's address size.

Frank







[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux