aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Redfearn <matt.redfearn@mips.com>2018-03-29 05:49:03 -0400
committerDaniel Lezcano <daniel.lezcano@linaro.org>2018-05-18 16:53:09 -0400
commit3ca5768de841bf204ab0e69f664b227bb2d47826 (patch)
treeb026edd8421f59a601ade2ca2ae0116f5704e0b1
parent8a1ece26d370e38817da5232195896b727dba3cd (diff)
clocksource/drivers/mips-gic-timer: Add pr_fmt and reword pr_* messages
Several messages from the MIPS GIC driver include the text "GIC", "GIC timer", etc, but the format is not standard. Add a pr_fmt of "mips-gic-timer: " and reword the messages now that they will be prefixed with the driver name. Signed-off-by: Matt Redfearn <matt.redfearn@mips.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--drivers/clocksource/mips-gic-timer.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c
index 986b6796b631..54f8a331b53a 100644
--- a/drivers/clocksource/mips-gic-timer.c
+++ b/drivers/clocksource/mips-gic-timer.c
@@ -5,6 +5,9 @@
5 * 5 *
6 * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. 6 * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
7 */ 7 */
8
9#define pr_fmt(fmt) "mips-gic-timer: " fmt
10
8#include <linux/clk.h> 11#include <linux/clk.h>
9#include <linux/clockchips.h> 12#include <linux/clockchips.h>
10#include <linux/cpu.h> 13#include <linux/cpu.h>
@@ -136,8 +139,7 @@ static int gic_clockevent_init(void)
136 139
137 ret = setup_percpu_irq(gic_timer_irq, &gic_compare_irqaction); 140 ret = setup_percpu_irq(gic_timer_irq, &gic_compare_irqaction);
138 if (ret < 0) { 141 if (ret < 0) {
139 pr_err("GIC timer IRQ %d setup failed: %d\n", 142 pr_err("IRQ %d setup failed (%d)\n", gic_timer_irq, ret);
140 gic_timer_irq, ret);
141 return ret; 143 return ret;
142 } 144 }
143 145
@@ -176,7 +178,7 @@ static int __init __gic_clocksource_init(void)
176 178
177 ret = clocksource_register_hz(&gic_clocksource, gic_frequency); 179 ret = clocksource_register_hz(&gic_clocksource, gic_frequency);
178 if (ret < 0) 180 if (ret < 0)
179 pr_warn("GIC: Unable to register clocksource\n"); 181 pr_warn("Unable to register clocksource\n");
180 182
181 return ret; 183 return ret;
182} 184}
@@ -188,7 +190,7 @@ static int __init gic_clocksource_of_init(struct device_node *node)
188 190
189 if (!mips_gic_present() || !node->parent || 191 if (!mips_gic_present() || !node->parent ||
190 !of_device_is_compatible(node->parent, "mti,gic")) { 192 !of_device_is_compatible(node->parent, "mti,gic")) {
191 pr_warn("No DT definition for the mips gic driver\n"); 193 pr_warn("No DT definition\n");
192 return -ENXIO; 194 return -ENXIO;
193 } 195 }
194 196
@@ -196,7 +198,7 @@ static int __init gic_clocksource_of_init(struct device_node *node)
196 if (!IS_ERR(clk)) { 198 if (!IS_ERR(clk)) {
197 ret = clk_prepare_enable(clk); 199 ret = clk_prepare_enable(clk);
198 if (ret < 0) { 200 if (ret < 0) {
199 pr_err("GIC failed to enable clock\n"); 201 pr_err("Failed to enable clock\n");
200 clk_put(clk); 202 clk_put(clk);
201 return ret; 203 return ret;
202 } 204 }
@@ -204,12 +206,12 @@ static int __init gic_clocksource_of_init(struct device_node *node)
204 gic_frequency = clk_get_rate(clk); 206 gic_frequency = clk_get_rate(clk);
205 } else if (of_property_read_u32(node, "clock-frequency", 207 } else if (of_property_read_u32(node, "clock-frequency",
206 &gic_frequency)) { 208 &gic_frequency)) {
207 pr_err("GIC frequency not specified.\n"); 209 pr_err("Frequency not specified\n");
208 return -EINVAL; 210 return -EINVAL;
209 } 211 }
210 gic_timer_irq = irq_of_parse_and_map(node, 0); 212 gic_timer_irq = irq_of_parse_and_map(node, 0);
211 if (!gic_timer_irq) { 213 if (!gic_timer_irq) {
212 pr_err("GIC timer IRQ not specified.\n"); 214 pr_err("IRQ not specified\n");
213 return -EINVAL; 215 return -EINVAL;
214 } 216 }
215 217
@@ -220,7 +222,7 @@ static int __init gic_clocksource_of_init(struct device_node *node)
220 ret = gic_clockevent_init(); 222 ret = gic_clockevent_init();
221 if (!ret && !IS_ERR(clk)) { 223 if (!ret && !IS_ERR(clk)) {
222 if (clk_notifier_register(clk, &gic_clk_nb) < 0) 224 if (clk_notifier_register(clk, &gic_clk_nb) < 0)
223 pr_warn("GIC: Unable to register clock notifier\n"); 225 pr_warn("Unable to register clock notifier\n");
224 } 226 }
225 227
226 /* And finally start the counter */ 228 /* And finally start the counter */