diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-02-17 11:54:29 +0100 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-03-01 13:38:48 +0100 |
commit | 986c265729cb798bb8414bd5d6c6006240a1011c (patch) | |
tree | c248b980f0e1c2b4364fca3055a560e178e67b92 /arch/arm/mach-at91/at91sam926x_time.c | |
parent | 23fa648fd32658ca295de3ef2b7c883c7b8a6120 (diff) |
ARM: at91/pit: add traces in case of error
Traces related to IRQ management are useful for timers in case of
non-working IRQ subsystem (switch to irq_domain for instance).
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/at91sam926x_time.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam926x_time.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c index 5d71476a283..a94758b4273 100644 --- a/arch/arm/mach-at91/at91sam926x_time.c +++ b/arch/arm/mach-at91/at91sam926x_time.c @@ -174,8 +174,10 @@ static int __init of_at91sam926x_pit_init(void) /* Get the interrupts property */ ret = irq_of_parse_and_map(np, 0); - if (!ret) + if (!ret) { + pr_crit("AT91: PIT: Unable to get IRQ from DT\n"); goto ioremap_err; + } at91sam926x_pit_irq.irq = ret; of_node_put(np); @@ -203,6 +205,7 @@ static void __init at91sam926x_pit_init(void) { unsigned long pit_rate; unsigned bits; + int ret; /* For device tree enabled device: initialize here */ of_at91sam926x_pit_init(); @@ -227,7 +230,9 @@ static void __init at91sam926x_pit_init(void) clocksource_register_hz(&pit_clk, pit_rate); /* Set up irq handler */ - setup_irq(at91sam926x_pit_irq.irq, &at91sam926x_pit_irq); + ret = setup_irq(at91sam926x_pit_irq.irq, &at91sam926x_pit_irq); + if (ret) + pr_crit("AT91: PIT: Unable to setup IRQ\n"); /* Set up and register clockevents */ pit_clkevt.mult = div_sc(pit_rate, NSEC_PER_SEC, pit_clkevt.shift); |