Thread (16 messages) 16 messages, 6 authors, 2015-01-02

[PATCH v8 1/4] irqchip: gic: Support hierarchy irq domain.

From: geert@linux-m68k.org (Geert Uytterhoeven)
Date: 2014-12-02 13:55:19
Also in: linux-devicetree, linux-sh, lkml

Hi Marc,

On Tue, Dec 2, 2014 at 2:37 PM, Marc Zyngier [off-list ref] wrote:
On 02/12/14 13:27, Geert Uytterhoeven wrote:
quoted
On Tue, Nov 25, 2014 at 9:04 AM, Yingjoe Chen [off-list ref] wrote:
quoted
Add support to use gic as a parent for stacked irq domain.

Signed-off-by: Yingjoe Chen <redacted>
This change (which is now in -next as commit 9a1091ef0017c40a) breaks
booting on r8a7740/armadillo-legacy.

It hangs because the timers cannot get their interrupts:

console [tty0] enabled
 sh-tmu.0: ch0: used for clock events
 sh-tmu.0: ch0: used for periodic clock events
 sh-tmu.0: ch0: failed to request irq 230
 sh-tmu.0: ch1: used as clock source
 sh-cmt-48.1: ch0: failed to request irq 90
 sh-cmt-48.1: ch0: registration failed
earlytimer: unable to probe sh-cmt-48 early.
Calibrating delay loop...
Grmbl... Are you, by any (lack of) chance, using a setup where the GIC
is probed via DT, but the timers have their IRQs hardcoded?
Yes, the GIC is declared in arch/arm/boot/dts/r8a7740.dtsi:

        gic: interrupt-controller at c2800000 {
                compatible = "arm,cortex-a9-gic";
                #interrupt-cells = <3>;
                interrupt-controller;
                reg = <0xc2800000 0x1000>,
                      <0xc2000000 0x1000>;
        };

The timers come from legacy C board code in
arch/arm/mach-shmobile/setup-r8a7740.c:

/* CMT */
static struct sh_timer_config cmt1_platform_data = {
        .channels_mask = 0x3f,
};

static struct resource cmt1_resources[] = {
        DEFINE_RES_MEM(0xe6138000, 0x170),
        DEFINE_RES_IRQ(gic_spi(58)),
};

static struct platform_device cmt1_device = {
        .name           = "sh-cmt-48",
        .id             = 1,
        .dev = {
                .platform_data  = &cmt1_platform_data,
        },
        .resource       = cmt1_resources,
        .num_resources  = ARRAY_SIZE(cmt1_resources),
};

/* TMU */
static struct sh_timer_config tmu0_platform_data = {
        .channels_mask = 7,
};

static struct resource tmu0_resources[] = {
        DEFINE_RES_MEM(0xfff80000, 0x2c),
        DEFINE_RES_IRQ(gic_spi(198)),
        DEFINE_RES_IRQ(gic_spi(199)),
        DEFINE_RES_IRQ(gic_spi(200)),
};

static struct platform_device tmu0_device = {
        .name           = "sh-tmu",
        .id             = 0,
        .dev = {
                .platform_data  = &tmu0_platform_data,
        },
        .resource       = tmu0_resources,
        .num_resources  = ARRAY_SIZE(tmu0_resources),
};

The corresponding r8a7740/armadillo-multiplatform works fine.

Still, I'm wondering why sh73a0/kzm9g-legacy is not impacted by this
change...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help