Message ID | 20220824155113.286730-9-jean-philippe@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | hw/arm/virt: Fix dt-schema warnings | expand |
On Wed, 24 Aug 2022 at 16:51, Jean-Philippe Brucker <jean-philippe@linaro.org> wrote: > > The GPIO devicetree node is missing "interrupt-controller" and > "#interrupt-cells" properties: > > pl061@9030000: 'interrupt-controller' is a required property > From schema: linux/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml > pl061@9030000: '#interrupt-cells' is a required property > From schema: linux/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml Why? This is a GPIO controller, not an interrupt controller. It seems wrong to be advertising in the dtb that it is. thanks -- PMM
On Wed, Aug 24, 2022 at 08:48:26PM +0100, Peter Maydell wrote: > On Wed, 24 Aug 2022 at 16:51, Jean-Philippe Brucker > <jean-philippe@linaro.org> wrote: > > > > The GPIO devicetree node is missing "interrupt-controller" and > > "#interrupt-cells" properties: > > > > pl061@9030000: 'interrupt-controller' is a required property > > From schema: linux/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml > > pl061@9030000: '#interrupt-cells' is a required property > > From schema: linux/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml > > Why? This is a GPIO controller, not an interrupt controller. > It seems wrong to be advertising in the dtb that it is. pl061 can be used as an interrupt controller, and I think it's wired that way, with GPIO key acting as an interrupt source. I'll add this to the commit message. Thanks, Jean
diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 952af37935..779eb5ea31 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1012,6 +1012,8 @@ static void create_gpio_devices(const VirtMachineState *vms, int gpio, qemu_fdt_setprop_cell(ms->fdt, nodename, "clocks", vms->clock_phandle); qemu_fdt_setprop_string(ms->fdt, nodename, "clock-names", "apb_pclk"); qemu_fdt_setprop_cell(ms->fdt, nodename, "phandle", phandle); + qemu_fdt_setprop_cell(ms->fdt, nodename, "#interrupt-cells", 2); + qemu_fdt_setprop(ms->fdt, nodename, "interrupt-controller", NULL, 0); if (gpio != VIRT_GPIO) { /* Mark as not usable by the normal world */
The GPIO devicetree node is missing "interrupt-controller" and "#interrupt-cells" properties: pl061@9030000: 'interrupt-controller' is a required property From schema: linux/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml pl061@9030000: '#interrupt-cells' is a required property From schema: linux/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org> --- hw/arm/virt.c | 2 ++ 1 file changed, 2 insertions(+)