diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-02-17 05:54:29 -0500 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-03-01 07:38:48 -0500 |
commit | 986c265729cb798bb8414bd5d6c6006240a1011c (patch) | |
tree | c248b980f0e1c2b4364fca3055a560e178e67b92 /arch | |
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')
-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 5d71476a2832..a94758b42737 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) | |||
174 | 174 | ||
175 | /* Get the interrupts property */ | 175 | /* Get the interrupts property */ |
176 | ret = irq_of_parse_and_map(np, 0); | 176 | ret = irq_of_parse_and_map(np, 0); |
177 | if (!ret) | 177 | if (!ret) { |
178 | pr_crit("AT91: PIT: Unable to get IRQ from DT\n"); | ||
178 | goto ioremap_err; | 179 | goto ioremap_err; |
180 | } | ||
179 | at91sam926x_pit_irq.irq = ret; | 181 | at91sam926x_pit_irq.irq = ret; |
180 | 182 | ||
181 | of_node_put(np); | 183 | of_node_put(np); |
@@ -203,6 +205,7 @@ static void __init at91sam926x_pit_init(void) | |||
203 | { | 205 | { |
204 | unsigned long pit_rate; | 206 | unsigned long pit_rate; |
205 | unsigned bits; | 207 | unsigned bits; |
208 | int ret; | ||
206 | 209 | ||
207 | /* For device tree enabled device: initialize here */ | 210 | /* For device tree enabled device: initialize here */ |
208 | of_at91sam926x_pit_init(); | 211 | of_at91sam926x_pit_init(); |
@@ -227,7 +230,9 @@ static void __init at91sam926x_pit_init(void) | |||
227 | clocksource_register_hz(&pit_clk, pit_rate); | 230 | clocksource_register_hz(&pit_clk, pit_rate); |
228 | 231 | ||
229 | /* Set up irq handler */ | 232 | /* Set up irq handler */ |
230 | setup_irq(at91sam926x_pit_irq.irq, &at91sam926x_pit_irq); | 233 | ret = setup_irq(at91sam926x_pit_irq.irq, &at91sam926x_pit_irq); |
234 | if (ret) | ||
235 | pr_crit("AT91: PIT: Unable to setup IRQ\n"); | ||
231 | 236 | ||
232 | /* Set up and register clockevents */ | 237 | /* Set up and register clockevents */ |
233 | pit_clkevt.mult = div_sc(pit_rate, NSEC_PER_SEC, pit_clkevt.shift); | 238 | pit_clkevt.mult = div_sc(pit_rate, NSEC_PER_SEC, pit_clkevt.shift); |