[PATCH 3/9] ARM: mmp: support DT in irq
Chris Ball
cjb at laptop.org
Thu May 31 05:38:51 EST 2012
Hi Haojian,
On Fri, Apr 27 2012, Haojian Zhuang wrote:
> Append new interrupt driver that could support both pxa168 and mmp2
> silicon. And this driver supports device tree.
>
> Since CONFIG_SPARSE_IRQ is enabled in arch-mmp, irq driver should
> handle reserved NR_IRQS_LEGACY in irq domain.
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang at gmail.com>
This patch (now in mainline) breaks boot on XO-1.75 (MMP2, non-DT).
I hit the error path below:
> + for (i = 1; i < max_icu_nr; i++) {
> + if (irq == icu_data[i].cascade_irq) {
> + domain = icu_data[i].domain;
> + data = (struct icu_chip_data *)domain->host_data;
> + break;
> + }
> + }
> + if (i >= max_icu_nr) {
> + pr_err("Spurious irq %d in MMP INTC\n", irq);
> + return;
> + }
This error path is hit because i=8 and max_icu_nr=8, which is because
we never matched (irq == icu_data[i].cascade_irq) in the for loop above.
This test is outside of a DT path, but cascade_irq appears to only ever
be set *inside* a DT path:
> + icu_data[i].cascade_irq = irq_of_parse_and_map(node, 0);
> + if (!icu_data[i].cascade_irq) {
> + ret = -EINVAL;
> + goto err;
> + }
Did you test non-DT boot with these changes?
Thanks,
- Chris.
--
Chris Ball <cjb at laptop.org> <http://printf.net/>
One Laptop Per Child
More information about the devicetree-discuss
mailing list