Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1526689
| From | Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Patch v7 6/7] irqchip: xilinx: Try to fall back if xlnx,kind-of-intr not provided |
| Date | 2016-11-21 15:10 +0100 |
| Message-ID | <sFXsd-2bv-9@gated-at.bofh.it> (permalink) |
| References | <sDooV-6ST-5@gated-at.bofh.it> <sDooX-6ST-43@gated-at.bofh.it> <sERyy-7GV-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
On 11/18/2016 01:29 PM, Thomas Gleixner wrote:
> On Mon, 14 Nov 2016, Zubair Lutfullah Kakakhel wrote:
>
>> The powerpc dts file does not have the xlnx,kind-of-intr property.
>> Instead of erroring out, give a warning instead. And attempt to
>> continue to probe the interrupt controller while assuming
>> kind-of-intr is 0x0 as a fall back.
>
> This is broken, really. On multiplatform kernels this will try to probe the
> chip no matter what.
I'm not sure I understand why this driver will probe on multi-platform kernels
if the compatible string isn't in the DT?
>
> Powerpc already has:
>
> static const struct of_device_id xilinx_intc_match[] __initconst = {
> { .compatible = "xlnx,opb-intc-1.00.c", },
> { .compatible = "xlnx,xps-intc-1.00.a", },
> {}
> };
>
> Unless I'm missing something important, then adding those compatible
> strings to the driver will just keep stuff working as expected instead of
> adding unsafe and broken heuristics.
>
The last two lines of the driver already specify the compatible strings.
"
IRQCHIP_DECLARE(xilinx_intc_xps, "xlnx,xps-intc-1.00.a", xilinx_intc_of_init);
IRQCHIP_DECLARE(xilinx_intc_opb, "xlnx,opb-intc-1.00.c", xilinx_intc_of_init);
"
I'll elaborate on the commit message.
The DT node in arch/powerpc for this driver is
intc_0: interrupt-controller@81800000 {
#interrupt-cells = <0x2>;
compatible = "xlnx,xps-intc-1.00.a";
interrupt-controller ;
reg = < 0x81800000 0x10000 >;
xlnx,num-intr-inputs = <0xc>;
} ;
The DT node in arch/microblaze for this driver is
intc_0: interrupt-controller@81800000 {
#interrupt-cells = <0x2>;
compatible = "xlnx,xps-intc-1.00.a";
interrupt-controller ;
reg = < 0x81800000 0x10000 >;
xlnx,kind-of-intr = <0x100>; //<Missing from ppc>!
xlnx,num-intr-inputs = <0x9>;
} ;
The PPC driver assumes the kind-of-intr value be 0x0 and doesn't specify it in DT.
This patch makes that a fall back case. Instead of completely error-ing out.
Regards,
ZubairLK
> Thanks,
>
> tglx
>
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[Patch v7 0/7] microblaze/PowerPC: Move irq-xilinx to irqchip Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> - 2016-11-14 13:20 +0100
[Patch v7 5/7] irqchip: xilinx: Add support for parent intc Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> - 2016-11-14 13:20 +0100
[Patch v7 1/7] microblaze: irqchip: Move intc driver to irqchip Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> - 2016-11-14 13:20 +0100
[Patch v7 2/7] irqchip: xilinx: clean up print messages Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> - 2016-11-14 13:20 +0100
[Patch v7 6/7] irqchip: xilinx: Try to fall back if xlnx,kind-of-intr not provided Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> - 2016-11-14 13:20 +0100
Re: [Patch v7 6/7] irqchip: xilinx: Try to fall back if xlnx,kind-of-intr not provided Thomas Gleixner <tglx@linutronix.de> - 2016-11-18 14:40 +0100
Re: [Patch v7 6/7] irqchip: xilinx: Try to fall back if xlnx,kind-of-intr not provided Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> - 2016-11-21 15:10 +0100
Re: [Patch v7 6/7] irqchip: xilinx: Try to fall back if xlnx,kind-of-intr not provided Marc Zyngier <marc.zyngier@arm.com> - 2016-11-21 15:20 +0100
Re: [Patch v7 6/7] irqchip: xilinx: Try to fall back if xlnx,kind-of-intr not provided Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> - 2016-11-21 15:40 +0100
Re: [Patch v7 6/7] irqchip: xilinx: Try to fall back if xlnx,kind-of-intr not provided Thomas Gleixner <tglx@linutronix.de> - 2016-11-21 17:00 +0100
[Patch v7 7/7] powerpc/virtex: Use generic xilinx irqchip driver Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> - 2016-11-14 13:20 +0100
[Patch v7 4/7] irqchip: xilinx: Rename get_irq to xintc_get_irq Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> - 2016-11-14 13:20 +0100
Re: [Patch v7 0/7] microblaze/PowerPC: Move irq-xilinx to irqchip Marc Zyngier <marc.zyngier@arm.com> - 2016-11-22 12:00 +0100
Re: [Patch v7 0/7] microblaze/PowerPC: Move irq-xilinx to irqchip Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> - 2016-11-22 12:20 +0100
csiph-web