summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-07-13 17:01:34 +0200
committerThomas Gleixner <tglx@linutronix.de>2016-07-13 17:01:51 +0200
commit54f54496779661678d906b57e4cba48239ab7c9b (patch)
treefeb06330bfa37391a5502e8dc6dfdd58b46b56fb /arch/mips
parent92d21ac74a9e3c09b0b01c764e530657e4c85c49 (diff)
parent1d661bf5327a2c059ec967f850e89362e637f4e6 (diff)
downloadblackbird-op-linux-54f54496779661678d906b57e4cba48239ab7c9b.tar.gz
blackbird-op-linux-54f54496779661678d906b57e4cba48239ab7c9b.zip
Merge branch 'timers/core' into smp/hotplug to pick up dependencies
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/ralink/cevt-rt3352.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/mips/ralink/cevt-rt3352.c b/arch/mips/ralink/cevt-rt3352.c
index 3ad0b0794f7d..f24eee04e16a 100644
--- a/arch/mips/ralink/cevt-rt3352.c
+++ b/arch/mips/ralink/cevt-rt3352.c
@@ -117,11 +117,13 @@ static int systick_set_oneshot(struct clock_event_device *evt)
return 0;
}
-static void __init ralink_systick_init(struct device_node *np)
+static int __init ralink_systick_init(struct device_node *np)
{
+ int ret;
+
systick.membase = of_iomap(np, 0);
if (!systick.membase)
- return;
+ return -ENXIO;
systick_irqaction.name = np->name;
systick.dev.name = np->name;
@@ -131,16 +133,21 @@ static void __init ralink_systick_init(struct device_node *np)
systick.dev.irq = irq_of_parse_and_map(np, 0);
if (!systick.dev.irq) {
pr_err("%s: request_irq failed", np->name);
- return;
+ return -EINVAL;
}
- clocksource_mmio_init(systick.membase + SYSTICK_COUNT, np->name,
- SYSTICK_FREQ, 301, 16, clocksource_mmio_readl_up);
+ ret = clocksource_mmio_init(systick.membase + SYSTICK_COUNT, np->name,
+ SYSTICK_FREQ, 301, 16,
+ clocksource_mmio_readl_up);
+ if (ret)
+ return ret;
clockevents_register_device(&systick.dev);
pr_info("%s: running - mult: %d, shift: %d\n",
np->name, systick.dev.mult, systick.dev.shift);
+
+ return 0;
}
CLOCKSOURCE_OF_DECLARE(systick, "ralink,cevt-systick", ralink_systick_init);
OpenPOWER on IntegriCloud