* [PATCH] clocksource: sirf: Remove unused variable
@ 2014-12-15 15:59 ` Thierry Reding
0 siblings, 0 replies; 22+ messages in thread
From: Thierry Reding @ 2014-12-15 15:59 UTC (permalink / raw
To: Daniel Lezcano, Thomas Gleixner
Cc: Barry Song, linux-arm-kernel, linux-kernel
From: Thierry Reding <treding@nvidia.com>
Commit ef89af1f4380 ("clocksource: sirf: Remove hard-coded clock rate")
removes all uses of the timer_div variable. Since the variable is no
longer used it should be removed.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/clocksource/timer-marco.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c
index 361a789d4bee..3ddb81f7ee66 100644
--- a/drivers/clocksource/timer-marco.c
+++ b/drivers/clocksource/timer-marco.c
@@ -257,7 +257,6 @@ static void __init sirfsoc_clockevent_init(void)
/* initialize the kernel jiffy timer source */
static void __init sirfsoc_marco_timer_init(struct device_node *np)
{
- u32 timer_div;
struct clk *clk;
clk = of_clk_get(np, 0);
--
2.1.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH] clocksource: sirf: Remove unused variable
@ 2014-12-15 15:59 ` Thierry Reding
0 siblings, 0 replies; 22+ messages in thread
From: Thierry Reding @ 2014-12-15 15:59 UTC (permalink / raw
To: linux-arm-kernel
From: Thierry Reding <treding@nvidia.com>
Commit ef89af1f4380 ("clocksource: sirf: Remove hard-coded clock rate")
removes all uses of the timer_div variable. Since the variable is no
longer used it should be removed.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/clocksource/timer-marco.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c
index 361a789d4bee..3ddb81f7ee66 100644
--- a/drivers/clocksource/timer-marco.c
+++ b/drivers/clocksource/timer-marco.c
@@ -257,7 +257,6 @@ static void __init sirfsoc_clockevent_init(void)
/* initialize the kernel jiffy timer source */
static void __init sirfsoc_marco_timer_init(struct device_node *np)
{
- u32 timer_div;
struct clk *clk;
clk = of_clk_get(np, 0);
--
2.1.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH] clocksource: sirf: Remove unused variable
2014-12-15 15:59 ` Thierry Reding
@ 2014-12-15 16:17 ` Daniel Lezcano
-1 siblings, 0 replies; 22+ messages in thread
From: Daniel Lezcano @ 2014-12-15 16:17 UTC (permalink / raw
To: Thierry Reding, Thomas Gleixner
Cc: Barry Song, linux-arm-kernel, linux-kernel
On 12/15/2014 04:59 PM, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> Commit ef89af1f4380 ("clocksource: sirf: Remove hard-coded clock rate")
> removes all uses of the timer_div variable. Since the variable is no
> longer used it should be removed.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
Applied to my tree. Thanks!
-- Daniel
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH] clocksource: sirf: Remove unused variable
@ 2014-12-15 16:17 ` Daniel Lezcano
0 siblings, 0 replies; 22+ messages in thread
From: Daniel Lezcano @ 2014-12-15 16:17 UTC (permalink / raw
To: linux-arm-kernel
On 12/15/2014 04:59 PM, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> Commit ef89af1f4380 ("clocksource: sirf: Remove hard-coded clock rate")
> removes all uses of the timer_div variable. Since the variable is no
> longer used it should be removed.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
Applied to my tree. Thanks!
-- Daniel
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH] clocksource: sirf: Remove unused variable
@ 2014-12-23 21:33 Fabio Estevam
2015-01-11 14:45 ` Barry Song
0 siblings, 1 reply; 22+ messages in thread
From: Fabio Estevam @ 2014-12-23 21:33 UTC (permalink / raw
To: daniel.lezcano; +Cc: baohua, linux-kernel, Fabio Estevam
Remove 'timer_div' variable to fix the following build warning:
drivers/clocksource/timer-marco.c: In function 'sirfsoc_marco_timer_init':
drivers/clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div' [-Wunused-variable]
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/clocksource/timer-marco.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c
index 361a789..3ddb81f 100644
--- a/drivers/clocksource/timer-marco.c
+++ b/drivers/clocksource/timer-marco.c
@@ -257,7 +257,6 @@ static void __init sirfsoc_clockevent_init(void)
/* initialize the kernel jiffy timer source */
static void __init sirfsoc_marco_timer_init(struct device_node *np)
{
- u32 timer_div;
struct clk *clk;
clk = of_clk_get(np, 0);
--
1.9.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH] clocksource: sirf: Remove unused variable
2014-12-23 21:33 Fabio Estevam
@ 2015-01-11 14:45 ` Barry Song
0 siblings, 0 replies; 22+ messages in thread
From: Barry Song @ 2015-01-11 14:45 UTC (permalink / raw
To: Fabio Estevam; +Cc: Daniel Lezcano, LKML
2014-12-24 5:33 GMT+08:00 Fabio Estevam <festevam@gmail.com>:
> Remove 'timer_div' variable to fix the following build warning:
>
> drivers/clocksource/timer-marco.c: In function 'sirfsoc_marco_timer_init':
> drivers/clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div' [-Wunused-variable]
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
thanks. but this has been handled by:
http://permalink.gmane.org/gmane.linux.ports.arm.kernel/382514
> ---
> drivers/clocksource/timer-marco.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c
> index 361a789..3ddb81f 100644
> --- a/drivers/clocksource/timer-marco.c
> +++ b/drivers/clocksource/timer-marco.c
> @@ -257,7 +257,6 @@ static void __init sirfsoc_clockevent_init(void)
> /* initialize the kernel jiffy timer source */
> static void __init sirfsoc_marco_timer_init(struct device_node *np)
> {
> - u32 timer_div;
> struct clk *clk;
>
> clk = of_clk_get(np, 0);
> --
> 1.9.1
>
-barry
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] clocksource: sirf: Remove unused variable
2014-12-15 16:17 ` Daniel Lezcano
@ 2015-01-11 15:58 ` Barry Song
-1 siblings, 0 replies; 22+ messages in thread
From: Barry Song @ 2015-01-11 15:58 UTC (permalink / raw
To: Daniel Lezcano
Cc: Thierry Reding, Thomas Gleixner,
linux-arm-kernel@lists.infradead.org, LKML, DL-SHA-WorkGroupLinux
[-- Attachment #1: Type: text/plain, Size: 760 bytes --]
2014-12-16 0:17 GMT+08:00 Daniel Lezcano <daniel.lezcano@linaro.org>:
> On 12/15/2014 04:59 PM, Thierry Reding wrote:
>>
>> From: Thierry Reding <treding@nvidia.com>
>>
>> Commit ef89af1f4380 ("clocksource: sirf: Remove hard-coded clock rate")
>> removes all uses of the timer_div variable. Since the variable is no
>> longer used it should be removed.
>>
>> Signed-off-by: Thierry Reding <treding@nvidia.com>
>> ---
>
>
> Applied to my tree. Thanks!
Daniel,
i didn't find this commit in any tree in kernel.org. am i missing something?
so i manually rebased "clocksource: marco: rename marco to atlas7"
against this commit.
can you help to apply the attached patch to your tree? i guess pulling
by arm-soc will cause conflicts.
>
> -- Daniel
>
-barry
[-- Attachment #2: 0001-clocksource-marco-rename-marco-to-atlas7.patch --]
[-- Type: text/x-patch, Size: 20190 bytes --]
From ffdf7a8a348cf3301fade30cc86398c80be3d1bd Mon Sep 17 00:00:00 2001
From: Barry Song <Baohua.Song@csr.com>
Date: Sun, 11 Jan 2015 23:52:13 +0800
Subject: [PATCH] clocksource: marco: rename marco to atlas7
marco project is replaced by atlas7 and we should obliterate
its all traces.
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/clocksource/Makefile | 2 +-
drivers/clocksource/timer-atlas7.c | 306 ++++++++++++++++++++++++++++++++++++
drivers/clocksource/timer-marco.c | 306 ------------------------------------
3 files changed, 307 insertions(+), 307 deletions(-)
create mode 100644 drivers/clocksource/timer-atlas7.c
delete mode 100644 drivers/clocksource/timer-marco.c
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index 94d90b2..306bc47 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -18,7 +18,7 @@ obj-$(CONFIG_ARMADA_370_XP_TIMER) += time-armada-370-xp.o
obj-$(CONFIG_ORION_TIMER) += time-orion.o
obj-$(CONFIG_ARCH_BCM2835) += bcm2835_timer.o
obj-$(CONFIG_ARCH_CLPS711X) += clps711x-timer.o
-obj-$(CONFIG_ARCH_MARCO) += timer-marco.o
+obj-$(CONFIG_ARCH_ATLAS7) += timer-atlas7.o
obj-$(CONFIG_ARCH_MOXART) += moxart_timer.o
obj-$(CONFIG_ARCH_MXS) += mxs_timer.o
obj-$(CONFIG_ARCH_PXA) += pxa_timer.o
diff --git a/drivers/clocksource/timer-atlas7.c b/drivers/clocksource/timer-atlas7.c
new file mode 100644
index 0000000..60f9de3
--- /dev/null
+++ b/drivers/clocksource/timer-atlas7.c
@@ -0,0 +1,306 @@
+/*
+ * System timer for CSR SiRFprimaII
+ *
+ * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+#include <linux/kernel.h>
+#include <linux/interrupt.h>
+#include <linux/clockchips.h>
+#include <linux/clocksource.h>
+#include <linux/cpu.h>
+#include <linux/bitops.h>
+#include <linux/irq.h>
+#include <linux/clk.h>
+#include <linux/slab.h>
+#include <linux/of.h>
+#include <linux/of_irq.h>
+#include <linux/of_address.h>
+#include <linux/sched_clock.h>
+
+#define SIRFSOC_TIMER_32COUNTER_0_CTRL 0x0000
+#define SIRFSOC_TIMER_32COUNTER_1_CTRL 0x0004
+#define SIRFSOC_TIMER_MATCH_0 0x0018
+#define SIRFSOC_TIMER_MATCH_1 0x001c
+#define SIRFSOC_TIMER_COUNTER_0 0x0048
+#define SIRFSOC_TIMER_COUNTER_1 0x004c
+#define SIRFSOC_TIMER_INTR_STATUS 0x0060
+#define SIRFSOC_TIMER_WATCHDOG_EN 0x0064
+#define SIRFSOC_TIMER_64COUNTER_CTRL 0x0068
+#define SIRFSOC_TIMER_64COUNTER_LO 0x006c
+#define SIRFSOC_TIMER_64COUNTER_HI 0x0070
+#define SIRFSOC_TIMER_64COUNTER_LOAD_LO 0x0074
+#define SIRFSOC_TIMER_64COUNTER_LOAD_HI 0x0078
+#define SIRFSOC_TIMER_64COUNTER_RLATCHED_LO 0x007c
+#define SIRFSOC_TIMER_64COUNTER_RLATCHED_HI 0x0080
+
+#define SIRFSOC_TIMER_REG_CNT 6
+
+static unsigned long atlas7_timer_rate;
+
+static const u32 sirfsoc_timer_reg_list[SIRFSOC_TIMER_REG_CNT] = {
+ SIRFSOC_TIMER_WATCHDOG_EN,
+ SIRFSOC_TIMER_32COUNTER_0_CTRL,
+ SIRFSOC_TIMER_32COUNTER_1_CTRL,
+ SIRFSOC_TIMER_64COUNTER_CTRL,
+ SIRFSOC_TIMER_64COUNTER_RLATCHED_LO,
+ SIRFSOC_TIMER_64COUNTER_RLATCHED_HI,
+};
+
+static u32 sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT];
+
+static void __iomem *sirfsoc_timer_base;
+
+/* disable count and interrupt */
+static inline void sirfsoc_timer_count_disable(int idx)
+{
+ writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx) & ~0x7,
+ sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx);
+}
+
+/* enable count and interrupt */
+static inline void sirfsoc_timer_count_enable(int idx)
+{
+ writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx) | 0x3,
+ sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx);
+}
+
+/* timer interrupt handler */
+static irqreturn_t sirfsoc_timer_interrupt(int irq, void *dev_id)
+{
+ struct clock_event_device *ce = dev_id;
+ int cpu = smp_processor_id();
+
+ /* clear timer interrupt */
+ writel_relaxed(BIT(cpu), sirfsoc_timer_base + SIRFSOC_TIMER_INTR_STATUS);
+
+ if (ce->mode == CLOCK_EVT_MODE_ONESHOT)
+ sirfsoc_timer_count_disable(cpu);
+
+ ce->event_handler(ce);
+
+ return IRQ_HANDLED;
+}
+
+/* read 64-bit timer counter */
+static cycle_t sirfsoc_timer_read(struct clocksource *cs)
+{
+ u64 cycles;
+
+ writel_relaxed((readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL) |
+ BIT(0)) & ~BIT(1), sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
+
+ cycles = readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_RLATCHED_HI);
+ cycles = (cycles << 32) | readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_RLATCHED_LO);
+
+ return cycles;
+}
+
+static int sirfsoc_timer_set_next_event(unsigned long delta,
+ struct clock_event_device *ce)
+{
+ int cpu = smp_processor_id();
+
+ /* disable timer first, then modify the related registers */
+ sirfsoc_timer_count_disable(cpu);
+
+ writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_0 +
+ 4 * cpu);
+ writel_relaxed(delta, sirfsoc_timer_base + SIRFSOC_TIMER_MATCH_0 +
+ 4 * cpu);
+
+ /* enable the tick */
+ sirfsoc_timer_count_enable(cpu);
+
+ return 0;
+}
+
+static void sirfsoc_timer_set_mode(enum clock_event_mode mode,
+ struct clock_event_device *ce)
+{
+ switch (mode) {
+ case CLOCK_EVT_MODE_ONESHOT:
+ /* enable in set_next_event */
+ break;
+ default:
+ break;
+ }
+
+ sirfsoc_timer_count_disable(smp_processor_id());
+}
+
+static void sirfsoc_clocksource_suspend(struct clocksource *cs)
+{
+ int i;
+
+ for (i = 0; i < SIRFSOC_TIMER_REG_CNT; i++)
+ sirfsoc_timer_reg_val[i] = readl_relaxed(sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);
+}
+
+static void sirfsoc_clocksource_resume(struct clocksource *cs)
+{
+ int i;
+
+ for (i = 0; i < SIRFSOC_TIMER_REG_CNT - 2; i++)
+ writel_relaxed(sirfsoc_timer_reg_val[i], sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);
+
+ writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 2],
+ sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_LO);
+ writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 1],
+ sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_HI);
+
+ writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL) |
+ BIT(1) | BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
+}
+
+static struct clock_event_device __percpu *sirfsoc_clockevent;
+
+static struct clocksource sirfsoc_clocksource = {
+ .name = "sirfsoc_clocksource",
+ .rating = 200,
+ .mask = CLOCKSOURCE_MASK(64),
+ .flags = CLOCK_SOURCE_IS_CONTINUOUS,
+ .read = sirfsoc_timer_read,
+ .suspend = sirfsoc_clocksource_suspend,
+ .resume = sirfsoc_clocksource_resume,
+};
+
+static struct irqaction sirfsoc_timer_irq = {
+ .name = "sirfsoc_timer0",
+ .flags = IRQF_TIMER | IRQF_NOBALANCING,
+ .handler = sirfsoc_timer_interrupt,
+};
+
+static struct irqaction sirfsoc_timer1_irq = {
+ .name = "sirfsoc_timer1",
+ .flags = IRQF_TIMER | IRQF_NOBALANCING,
+ .handler = sirfsoc_timer_interrupt,
+};
+
+static int sirfsoc_local_timer_setup(struct clock_event_device *ce)
+{
+ int cpu = smp_processor_id();
+ struct irqaction *action;
+
+ if (cpu == 0)
+ action = &sirfsoc_timer_irq;
+ else
+ action = &sirfsoc_timer1_irq;
+
+ ce->irq = action->irq;
+ ce->name = "local_timer";
+ ce->features = CLOCK_EVT_FEAT_ONESHOT;
+ ce->rating = 200;
+ ce->set_mode = sirfsoc_timer_set_mode;
+ ce->set_next_event = sirfsoc_timer_set_next_event;
+ clockevents_calc_mult_shift(ce, atlas7_timer_rate, 60);
+ ce->max_delta_ns = clockevent_delta2ns(-2, ce);
+ ce->min_delta_ns = clockevent_delta2ns(2, ce);
+ ce->cpumask = cpumask_of(cpu);
+
+ action->dev_id = ce;
+ BUG_ON(setup_irq(ce->irq, action));
+ irq_force_affinity(action->irq, cpumask_of(cpu));
+
+ clockevents_register_device(ce);
+ return 0;
+}
+
+static void sirfsoc_local_timer_stop(struct clock_event_device *ce)
+{
+ int cpu = smp_processor_id();
+
+ sirfsoc_timer_count_disable(1);
+
+ if (cpu == 0)
+ remove_irq(sirfsoc_timer_irq.irq, &sirfsoc_timer_irq);
+ else
+ remove_irq(sirfsoc_timer1_irq.irq, &sirfsoc_timer1_irq);
+}
+
+static int sirfsoc_cpu_notify(struct notifier_block *self,
+ unsigned long action, void *hcpu)
+{
+ /*
+ * Grab cpu pointer in each case to avoid spurious
+ * preemptible warnings
+ */
+ switch (action & ~CPU_TASKS_FROZEN) {
+ case CPU_STARTING:
+ sirfsoc_local_timer_setup(this_cpu_ptr(sirfsoc_clockevent));
+ break;
+ case CPU_DYING:
+ sirfsoc_local_timer_stop(this_cpu_ptr(sirfsoc_clockevent));
+ break;
+ }
+
+ return NOTIFY_OK;
+}
+
+static struct notifier_block sirfsoc_cpu_nb = {
+ .notifier_call = sirfsoc_cpu_notify,
+};
+
+static void __init sirfsoc_clockevent_init(void)
+{
+ sirfsoc_clockevent = alloc_percpu(struct clock_event_device);
+ BUG_ON(!sirfsoc_clockevent);
+
+ BUG_ON(register_cpu_notifier(&sirfsoc_cpu_nb));
+
+ /* Immediately configure the timer on the boot CPU */
+ sirfsoc_local_timer_setup(this_cpu_ptr(sirfsoc_clockevent));
+}
+
+/* initialize the kernel jiffy timer source */
+static void __init sirfsoc_atlas7_timer_init(struct device_node *np)
+{
+ struct clk *clk;
+
+ clk = of_clk_get(np, 0);
+ BUG_ON(IS_ERR(clk));
+
+ BUG_ON(clk_prepare_enable(clk));
+
+ atlas7_timer_rate = clk_get_rate(clk);
+
+ /* timer dividers: 0, not divided */
+ writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
+ writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL);
+ writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_1_CTRL);
+
+ /* Initialize timer counters to 0 */
+ writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_LO);
+ writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_HI);
+ writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL) |
+ BIT(1) | BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
+ writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_0);
+ writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_1);
+
+ /* Clear all interrupts */
+ writel_relaxed(0xFFFF, sirfsoc_timer_base + SIRFSOC_TIMER_INTR_STATUS);
+
+ BUG_ON(clocksource_register_hz(&sirfsoc_clocksource, atlas7_timer_rate));
+
+ sirfsoc_clockevent_init();
+}
+
+static void __init sirfsoc_of_timer_init(struct device_node *np)
+{
+ sirfsoc_timer_base = of_iomap(np, 0);
+ if (!sirfsoc_timer_base)
+ panic("unable to map timer cpu registers\n");
+
+ sirfsoc_timer_irq.irq = irq_of_parse_and_map(np, 0);
+ if (!sirfsoc_timer_irq.irq)
+ panic("No irq passed for timer0 via DT\n");
+
+ sirfsoc_timer1_irq.irq = irq_of_parse_and_map(np, 1);
+ if (!sirfsoc_timer1_irq.irq)
+ panic("No irq passed for timer1 via DT\n");
+
+ sirfsoc_atlas7_timer_init(np);
+}
+CLOCKSOURCE_OF_DECLARE(sirfsoc_atlas7_timer, "sirf,atlas7-tick", sirfsoc_of_timer_init);
diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c
deleted file mode 100644
index 3ddb81f..0000000
--- a/drivers/clocksource/timer-marco.c
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * System timer for CSR SiRFprimaII
- *
- * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
- *
- * Licensed under GPLv2 or later.
- */
-
-#include <linux/kernel.h>
-#include <linux/interrupt.h>
-#include <linux/clockchips.h>
-#include <linux/clocksource.h>
-#include <linux/cpu.h>
-#include <linux/bitops.h>
-#include <linux/irq.h>
-#include <linux/clk.h>
-#include <linux/slab.h>
-#include <linux/of.h>
-#include <linux/of_irq.h>
-#include <linux/of_address.h>
-#include <linux/sched_clock.h>
-
-#define SIRFSOC_TIMER_32COUNTER_0_CTRL 0x0000
-#define SIRFSOC_TIMER_32COUNTER_1_CTRL 0x0004
-#define SIRFSOC_TIMER_MATCH_0 0x0018
-#define SIRFSOC_TIMER_MATCH_1 0x001c
-#define SIRFSOC_TIMER_COUNTER_0 0x0048
-#define SIRFSOC_TIMER_COUNTER_1 0x004c
-#define SIRFSOC_TIMER_INTR_STATUS 0x0060
-#define SIRFSOC_TIMER_WATCHDOG_EN 0x0064
-#define SIRFSOC_TIMER_64COUNTER_CTRL 0x0068
-#define SIRFSOC_TIMER_64COUNTER_LO 0x006c
-#define SIRFSOC_TIMER_64COUNTER_HI 0x0070
-#define SIRFSOC_TIMER_64COUNTER_LOAD_LO 0x0074
-#define SIRFSOC_TIMER_64COUNTER_LOAD_HI 0x0078
-#define SIRFSOC_TIMER_64COUNTER_RLATCHED_LO 0x007c
-#define SIRFSOC_TIMER_64COUNTER_RLATCHED_HI 0x0080
-
-#define SIRFSOC_TIMER_REG_CNT 6
-
-static unsigned long marco_timer_rate;
-
-static const u32 sirfsoc_timer_reg_list[SIRFSOC_TIMER_REG_CNT] = {
- SIRFSOC_TIMER_WATCHDOG_EN,
- SIRFSOC_TIMER_32COUNTER_0_CTRL,
- SIRFSOC_TIMER_32COUNTER_1_CTRL,
- SIRFSOC_TIMER_64COUNTER_CTRL,
- SIRFSOC_TIMER_64COUNTER_RLATCHED_LO,
- SIRFSOC_TIMER_64COUNTER_RLATCHED_HI,
-};
-
-static u32 sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT];
-
-static void __iomem *sirfsoc_timer_base;
-
-/* disable count and interrupt */
-static inline void sirfsoc_timer_count_disable(int idx)
-{
- writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx) & ~0x7,
- sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx);
-}
-
-/* enable count and interrupt */
-static inline void sirfsoc_timer_count_enable(int idx)
-{
- writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx) | 0x3,
- sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL + 4 * idx);
-}
-
-/* timer interrupt handler */
-static irqreturn_t sirfsoc_timer_interrupt(int irq, void *dev_id)
-{
- struct clock_event_device *ce = dev_id;
- int cpu = smp_processor_id();
-
- /* clear timer interrupt */
- writel_relaxed(BIT(cpu), sirfsoc_timer_base + SIRFSOC_TIMER_INTR_STATUS);
-
- if (ce->mode == CLOCK_EVT_MODE_ONESHOT)
- sirfsoc_timer_count_disable(cpu);
-
- ce->event_handler(ce);
-
- return IRQ_HANDLED;
-}
-
-/* read 64-bit timer counter */
-static cycle_t sirfsoc_timer_read(struct clocksource *cs)
-{
- u64 cycles;
-
- writel_relaxed((readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL) |
- BIT(0)) & ~BIT(1), sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
-
- cycles = readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_RLATCHED_HI);
- cycles = (cycles << 32) | readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_RLATCHED_LO);
-
- return cycles;
-}
-
-static int sirfsoc_timer_set_next_event(unsigned long delta,
- struct clock_event_device *ce)
-{
- int cpu = smp_processor_id();
-
- /* disable timer first, then modify the related registers */
- sirfsoc_timer_count_disable(cpu);
-
- writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_0 +
- 4 * cpu);
- writel_relaxed(delta, sirfsoc_timer_base + SIRFSOC_TIMER_MATCH_0 +
- 4 * cpu);
-
- /* enable the tick */
- sirfsoc_timer_count_enable(cpu);
-
- return 0;
-}
-
-static void sirfsoc_timer_set_mode(enum clock_event_mode mode,
- struct clock_event_device *ce)
-{
- switch (mode) {
- case CLOCK_EVT_MODE_ONESHOT:
- /* enable in set_next_event */
- break;
- default:
- break;
- }
-
- sirfsoc_timer_count_disable(smp_processor_id());
-}
-
-static void sirfsoc_clocksource_suspend(struct clocksource *cs)
-{
- int i;
-
- for (i = 0; i < SIRFSOC_TIMER_REG_CNT; i++)
- sirfsoc_timer_reg_val[i] = readl_relaxed(sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);
-}
-
-static void sirfsoc_clocksource_resume(struct clocksource *cs)
-{
- int i;
-
- for (i = 0; i < SIRFSOC_TIMER_REG_CNT - 2; i++)
- writel_relaxed(sirfsoc_timer_reg_val[i], sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);
-
- writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 2],
- sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_LO);
- writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 1],
- sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_HI);
-
- writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL) |
- BIT(1) | BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
-}
-
-static struct clock_event_device __percpu *sirfsoc_clockevent;
-
-static struct clocksource sirfsoc_clocksource = {
- .name = "sirfsoc_clocksource",
- .rating = 200,
- .mask = CLOCKSOURCE_MASK(64),
- .flags = CLOCK_SOURCE_IS_CONTINUOUS,
- .read = sirfsoc_timer_read,
- .suspend = sirfsoc_clocksource_suspend,
- .resume = sirfsoc_clocksource_resume,
-};
-
-static struct irqaction sirfsoc_timer_irq = {
- .name = "sirfsoc_timer0",
- .flags = IRQF_TIMER | IRQF_NOBALANCING,
- .handler = sirfsoc_timer_interrupt,
-};
-
-static struct irqaction sirfsoc_timer1_irq = {
- .name = "sirfsoc_timer1",
- .flags = IRQF_TIMER | IRQF_NOBALANCING,
- .handler = sirfsoc_timer_interrupt,
-};
-
-static int sirfsoc_local_timer_setup(struct clock_event_device *ce)
-{
- int cpu = smp_processor_id();
- struct irqaction *action;
-
- if (cpu == 0)
- action = &sirfsoc_timer_irq;
- else
- action = &sirfsoc_timer1_irq;
-
- ce->irq = action->irq;
- ce->name = "local_timer";
- ce->features = CLOCK_EVT_FEAT_ONESHOT;
- ce->rating = 200;
- ce->set_mode = sirfsoc_timer_set_mode;
- ce->set_next_event = sirfsoc_timer_set_next_event;
- clockevents_calc_mult_shift(ce, marco_timer_rate, 60);
- ce->max_delta_ns = clockevent_delta2ns(-2, ce);
- ce->min_delta_ns = clockevent_delta2ns(2, ce);
- ce->cpumask = cpumask_of(cpu);
-
- action->dev_id = ce;
- BUG_ON(setup_irq(ce->irq, action));
- irq_force_affinity(action->irq, cpumask_of(cpu));
-
- clockevents_register_device(ce);
- return 0;
-}
-
-static void sirfsoc_local_timer_stop(struct clock_event_device *ce)
-{
- int cpu = smp_processor_id();
-
- sirfsoc_timer_count_disable(1);
-
- if (cpu == 0)
- remove_irq(sirfsoc_timer_irq.irq, &sirfsoc_timer_irq);
- else
- remove_irq(sirfsoc_timer1_irq.irq, &sirfsoc_timer1_irq);
-}
-
-static int sirfsoc_cpu_notify(struct notifier_block *self,
- unsigned long action, void *hcpu)
-{
- /*
- * Grab cpu pointer in each case to avoid spurious
- * preemptible warnings
- */
- switch (action & ~CPU_TASKS_FROZEN) {
- case CPU_STARTING:
- sirfsoc_local_timer_setup(this_cpu_ptr(sirfsoc_clockevent));
- break;
- case CPU_DYING:
- sirfsoc_local_timer_stop(this_cpu_ptr(sirfsoc_clockevent));
- break;
- }
-
- return NOTIFY_OK;
-}
-
-static struct notifier_block sirfsoc_cpu_nb = {
- .notifier_call = sirfsoc_cpu_notify,
-};
-
-static void __init sirfsoc_clockevent_init(void)
-{
- sirfsoc_clockevent = alloc_percpu(struct clock_event_device);
- BUG_ON(!sirfsoc_clockevent);
-
- BUG_ON(register_cpu_notifier(&sirfsoc_cpu_nb));
-
- /* Immediately configure the timer on the boot CPU */
- sirfsoc_local_timer_setup(this_cpu_ptr(sirfsoc_clockevent));
-}
-
-/* initialize the kernel jiffy timer source */
-static void __init sirfsoc_marco_timer_init(struct device_node *np)
-{
- struct clk *clk;
-
- clk = of_clk_get(np, 0);
- BUG_ON(IS_ERR(clk));
-
- BUG_ON(clk_prepare_enable(clk));
-
- marco_timer_rate = clk_get_rate(clk);
-
- /* timer dividers: 0, not divided */
- writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
- writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_0_CTRL);
- writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_32COUNTER_1_CTRL);
-
- /* Initialize timer counters to 0 */
- writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_LO);
- writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_LOAD_HI);
- writel_relaxed(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL) |
- BIT(1) | BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_64COUNTER_CTRL);
- writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_0);
- writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_1);
-
- /* Clear all interrupts */
- writel_relaxed(0xFFFF, sirfsoc_timer_base + SIRFSOC_TIMER_INTR_STATUS);
-
- BUG_ON(clocksource_register_hz(&sirfsoc_clocksource, marco_timer_rate));
-
- sirfsoc_clockevent_init();
-}
-
-static void __init sirfsoc_of_timer_init(struct device_node *np)
-{
- sirfsoc_timer_base = of_iomap(np, 0);
- if (!sirfsoc_timer_base)
- panic("unable to map timer cpu registers\n");
-
- sirfsoc_timer_irq.irq = irq_of_parse_and_map(np, 0);
- if (!sirfsoc_timer_irq.irq)
- panic("No irq passed for timer0 via DT\n");
-
- sirfsoc_timer1_irq.irq = irq_of_parse_and_map(np, 1);
- if (!sirfsoc_timer1_irq.irq)
- panic("No irq passed for timer1 via DT\n");
-
- sirfsoc_marco_timer_init(np);
-}
-CLOCKSOURCE_OF_DECLARE(sirfsoc_marco_timer, "sirf,marco-tick", sirfsoc_of_timer_init );
--
1.7.9.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH] clocksource: sirf: Remove unused variable
@ 2015-01-11 15:58 ` Barry Song
0 siblings, 0 replies; 22+ messages in thread
From: Barry Song @ 2015-01-11 15:58 UTC (permalink / raw
To: linux-arm-kernel
2014-12-16 0:17 GMT+08:00 Daniel Lezcano <daniel.lezcano@linaro.org>:
> On 12/15/2014 04:59 PM, Thierry Reding wrote:
>>
>> From: Thierry Reding <treding@nvidia.com>
>>
>> Commit ef89af1f4380 ("clocksource: sirf: Remove hard-coded clock rate")
>> removes all uses of the timer_div variable. Since the variable is no
>> longer used it should be removed.
>>
>> Signed-off-by: Thierry Reding <treding@nvidia.com>
>> ---
>
>
> Applied to my tree. Thanks!
Daniel,
i didn't find this commit in any tree in kernel.org. am i missing something?
so i manually rebased "clocksource: marco: rename marco to atlas7"
against this commit.
can you help to apply the attached patch to your tree? i guess pulling
by arm-soc will cause conflicts.
>
> -- Daniel
>
-barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-clocksource-marco-rename-marco-to-atlas7.patch
Type: text/x-patch
Size: 20190 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150111/d2680e92/attachment-0001.bin>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] clocksource: sirf: Remove unused variable
2015-01-11 15:58 ` Barry Song
@ 2015-01-11 20:51 ` Daniel Lezcano
-1 siblings, 0 replies; 22+ messages in thread
From: Daniel Lezcano @ 2015-01-11 20:51 UTC (permalink / raw
To: Barry Song
Cc: Thierry Reding, Thomas Gleixner,
linux-arm-kernel@lists.infradead.org, LKML, DL-SHA-WorkGroupLinux
On 01/11/2015 04:58 PM, Barry Song wrote:
> 2014-12-16 0:17 GMT+08:00 Daniel Lezcano <daniel.lezcano@linaro.org>:
>> On 12/15/2014 04:59 PM, Thierry Reding wrote:
>>>
>>> From: Thierry Reding <treding@nvidia.com>
>>>
>>> Commit ef89af1f4380 ("clocksource: sirf: Remove hard-coded clock rate")
>>> removes all uses of the timer_div variable. Since the variable is no
>>> longer used it should be removed.
>>>
>>> Signed-off-by: Thierry Reding <treding@nvidia.com>
>>> ---
>>
>>
>> Applied to my tree. Thanks!
>
> Daniel,
>
> i didn't find this commit in any tree in kernel.org. am i missing something?
Nope, I did probably something wrong.
> so i manually rebased "clocksource: marco: rename marco to atlas7"
> against this commit.
>
> can you help to apply the attached patch to your tree? i guess pulling
> by arm-soc will cause conflicts.
Ok, done. Both patches are in my tree [1].
Thanks
-- Daniel
[1]
https://git.linaro.org/people/daniel.lezcano/linux.git/shortlog/refs/heads/clockevents/3.20
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH] clocksource: sirf: Remove unused variable
@ 2015-01-11 20:51 ` Daniel Lezcano
0 siblings, 0 replies; 22+ messages in thread
From: Daniel Lezcano @ 2015-01-11 20:51 UTC (permalink / raw
To: linux-arm-kernel
On 01/11/2015 04:58 PM, Barry Song wrote:
> 2014-12-16 0:17 GMT+08:00 Daniel Lezcano <daniel.lezcano@linaro.org>:
>> On 12/15/2014 04:59 PM, Thierry Reding wrote:
>>>
>>> From: Thierry Reding <treding@nvidia.com>
>>>
>>> Commit ef89af1f4380 ("clocksource: sirf: Remove hard-coded clock rate")
>>> removes all uses of the timer_div variable. Since the variable is no
>>> longer used it should be removed.
>>>
>>> Signed-off-by: Thierry Reding <treding@nvidia.com>
>>> ---
>>
>>
>> Applied to my tree. Thanks!
>
> Daniel,
>
> i didn't find this commit in any tree in kernel.org. am i missing something?
Nope, I did probably something wrong.
> so i manually rebased "clocksource: marco: rename marco to atlas7"
> against this commit.
>
> can you help to apply the attached patch to your tree? i guess pulling
> by arm-soc will cause conflicts.
Ok, done. Both patches are in my tree [1].
Thanks
-- Daniel
[1]
https://git.linaro.org/people/daniel.lezcano/linux.git/shortlog/refs/heads/clockevents/3.20
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH] clocksource: sirf: remove unused variable
@ 2015-01-13 14:22 ` Arnd Bergmann
0 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2015-01-13 14:22 UTC (permalink / raw
To: Daniel Lezcano
Cc: linux-arm-kernel, linux-kernel, Yanchang Li, Barry Song,
Thomas Gleixner
A recent rework of the driver left an obviously unused variable
around, and now the compiler complains:
clocksource/timer-marco.c: In function 'sirfsoc_marco_timer_init':
clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div' [-Wunused-variable]
Remove it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: ef89af1f4380b92 ("clocksource: sirf: Remove hard-coded clock rate")
diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c
index 361a789d4bee..3ddb81f7ee66 100644
--- a/drivers/clocksource/timer-marco.c
+++ b/drivers/clocksource/timer-marco.c
@@ -257,7 +257,6 @@ static void __init sirfsoc_clockevent_init(void)
/* initialize the kernel jiffy timer source */
static void __init sirfsoc_marco_timer_init(struct device_node *np)
{
- u32 timer_div;
struct clk *clk;
clk = of_clk_get(np, 0);
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH] clocksource: sirf: remove unused variable
@ 2015-01-13 14:22 ` Arnd Bergmann
0 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2015-01-13 14:22 UTC (permalink / raw
To: linux-arm-kernel
A recent rework of the driver left an obviously unused variable
around, and now the compiler complains:
clocksource/timer-marco.c: In function 'sirfsoc_marco_timer_init':
clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div' [-Wunused-variable]
Remove it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: ef89af1f4380b92 ("clocksource: sirf: Remove hard-coded clock rate")
diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c
index 361a789d4bee..3ddb81f7ee66 100644
--- a/drivers/clocksource/timer-marco.c
+++ b/drivers/clocksource/timer-marco.c
@@ -257,7 +257,6 @@ static void __init sirfsoc_clockevent_init(void)
/* initialize the kernel jiffy timer source */
static void __init sirfsoc_marco_timer_init(struct device_node *np)
{
- u32 timer_div;
struct clk *clk;
clk = of_clk_get(np, 0);
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH] clocksource: sirf: remove unused variable
2015-01-13 14:22 ` Arnd Bergmann
@ 2015-01-13 14:27 ` Daniel Lezcano
-1 siblings, 0 replies; 22+ messages in thread
From: Daniel Lezcano @ 2015-01-13 14:27 UTC (permalink / raw
To: Arnd Bergmann
Cc: linux-arm-kernel, linux-kernel, Yanchang Li, Barry Song,
Thomas Gleixner
On 01/13/2015 03:22 PM, Arnd Bergmann wrote:
> A recent rework of the driver left an obviously unused variable
> around, and now the compiler complains:
>
> clocksource/timer-marco.c: In function 'sirfsoc_marco_timer_init':
> clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div' [-Wunused-variable]
>
> Remove it.
Hi Arnd,
thanks for the fix. But this has been already fixed and merged in my
tree [1].
-- Daniel
[1]
https://git.linaro.org/people/daniel.lezcano/linux.git/commitdiff/2a016d694f36fc31f7f9fede902346c5895702bb?hp=89de77a8c557f14d2713a1f43fbc33980e639b98
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: ef89af1f4380b92 ("clocksource: sirf: Remove hard-coded clock rate")
>
> diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c
> index 361a789d4bee..3ddb81f7ee66 100644
> --- a/drivers/clocksource/timer-marco.c
> +++ b/drivers/clocksource/timer-marco.c
> @@ -257,7 +257,6 @@ static void __init sirfsoc_clockevent_init(void)
> /* initialize the kernel jiffy timer source */
> static void __init sirfsoc_marco_timer_init(struct device_node *np)
> {
> - u32 timer_div;
> struct clk *clk;
>
> clk = of_clk_get(np, 0);
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH] clocksource: sirf: remove unused variable
@ 2015-01-13 14:27 ` Daniel Lezcano
0 siblings, 0 replies; 22+ messages in thread
From: Daniel Lezcano @ 2015-01-13 14:27 UTC (permalink / raw
To: linux-arm-kernel
On 01/13/2015 03:22 PM, Arnd Bergmann wrote:
> A recent rework of the driver left an obviously unused variable
> around, and now the compiler complains:
>
> clocksource/timer-marco.c: In function 'sirfsoc_marco_timer_init':
> clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div' [-Wunused-variable]
>
> Remove it.
Hi Arnd,
thanks for the fix. But this has been already fixed and merged in my
tree [1].
-- Daniel
[1]
https://git.linaro.org/people/daniel.lezcano/linux.git/commitdiff/2a016d694f36fc31f7f9fede902346c5895702bb?hp=89de77a8c557f14d2713a1f43fbc33980e639b98
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: ef89af1f4380b92 ("clocksource: sirf: Remove hard-coded clock rate")
>
> diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c
> index 361a789d4bee..3ddb81f7ee66 100644
> --- a/drivers/clocksource/timer-marco.c
> +++ b/drivers/clocksource/timer-marco.c
> @@ -257,7 +257,6 @@ static void __init sirfsoc_clockevent_init(void)
> /* initialize the kernel jiffy timer source */
> static void __init sirfsoc_marco_timer_init(struct device_node *np)
> {
> - u32 timer_div;
> struct clk *clk;
>
> clk = of_clk_get(np, 0);
>
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] clocksource: sirf: remove unused variable
2015-01-13 14:27 ` Daniel Lezcano
@ 2015-01-13 15:24 ` Arnd Bergmann
-1 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2015-01-13 15:24 UTC (permalink / raw
To: Daniel Lezcano
Cc: linux-arm-kernel, linux-kernel, Yanchang Li, Barry Song,
Thomas Gleixner
On Tuesday 13 January 2015 15:27:05 Daniel Lezcano wrote:
> On 01/13/2015 03:22 PM, Arnd Bergmann wrote:
> > A recent rework of the driver left an obviously unused variable
> > around, and now the compiler complains:
> >
> > clocksource/timer-marco.c: In function 'sirfsoc_marco_timer_init':
> > clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div' [-Wunused-variable]
> >
> > Remove it.
>
> Hi Arnd,
>
> thanks for the fix. But this has been already fixed and merged in my
> tree [1].
Ok, thanks. For some reason it has not shown up in Linux-next yet.
Is this branch supposed to be part of -next?
Arnd
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH] clocksource: sirf: remove unused variable
@ 2015-01-13 15:24 ` Arnd Bergmann
0 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2015-01-13 15:24 UTC (permalink / raw
To: linux-arm-kernel
On Tuesday 13 January 2015 15:27:05 Daniel Lezcano wrote:
> On 01/13/2015 03:22 PM, Arnd Bergmann wrote:
> > A recent rework of the driver left an obviously unused variable
> > around, and now the compiler complains:
> >
> > clocksource/timer-marco.c: In function 'sirfsoc_marco_timer_init':
> > clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div' [-Wunused-variable]
> >
> > Remove it.
>
> Hi Arnd,
>
> thanks for the fix. But this has been already fixed and merged in my
> tree [1].
Ok, thanks. For some reason it has not shown up in Linux-next yet.
Is this branch supposed to be part of -next?
Arnd
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] clocksource: sirf: remove unused variable
2015-01-13 14:27 ` Daniel Lezcano
@ 2015-01-13 15:24 ` Barry Song
-1 siblings, 0 replies; 22+ messages in thread
From: Barry Song @ 2015-01-13 15:24 UTC (permalink / raw
To: Daniel Lezcano
Cc: Arnd Bergmann, Yanchang Li, Thomas Gleixner, LKML,
linux-arm-kernel@lists.infradead.org, Barry Song,
DL-SHA-WorkGroupLinux
2015-01-13 22:27 GMT+08:00 Daniel Lezcano <daniel.lezcano@linaro.org>:
> On 01/13/2015 03:22 PM, Arnd Bergmann wrote:
>>
>> A recent rework of the driver left an obviously unused variable
>> around, and now the compiler complains:
>>
>> clocksource/timer-marco.c: In function 'sirfsoc_marco_timer_init':
>> clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div'
>> [-Wunused-variable]
>>
>> Remove it.
>
>
> Hi Arnd,
>
> thanks for the fix. But this has been already fixed and merged in my tree
> [1].
>
> -- Daniel
>
> [1]
> https://git.linaro.org/people/daniel.lezcano/linux.git/commitdiff/2a016d694f36fc31f7f9fede902346c5895702bb?hp=89de77a8c557f14d2713a1f43fbc33980e639b98
>
yes, arnd. i also asked Daniel to apply "clocksource: marco: Rename
marco to atlas7" rebased on this fix here:
https://git.linaro.org/people/daniel.lezcano/linux.git/commit/81428bbe1d8a073bb3741678ef1d3c1016119c77
so this one is excluded from my pull request for atlas7. a
pull-request from arm-soc might cause merge conflicts?
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Fixes: ef89af1f4380b92 ("clocksource: sirf: Remove hard-coded clock rate")
-barry
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH] clocksource: sirf: remove unused variable
@ 2015-01-13 15:24 ` Barry Song
0 siblings, 0 replies; 22+ messages in thread
From: Barry Song @ 2015-01-13 15:24 UTC (permalink / raw
To: linux-arm-kernel
2015-01-13 22:27 GMT+08:00 Daniel Lezcano <daniel.lezcano@linaro.org>:
> On 01/13/2015 03:22 PM, Arnd Bergmann wrote:
>>
>> A recent rework of the driver left an obviously unused variable
>> around, and now the compiler complains:
>>
>> clocksource/timer-marco.c: In function 'sirfsoc_marco_timer_init':
>> clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div'
>> [-Wunused-variable]
>>
>> Remove it.
>
>
> Hi Arnd,
>
> thanks for the fix. But this has been already fixed and merged in my tree
> [1].
>
> -- Daniel
>
> [1]
> https://git.linaro.org/people/daniel.lezcano/linux.git/commitdiff/2a016d694f36fc31f7f9fede902346c5895702bb?hp=89de77a8c557f14d2713a1f43fbc33980e639b98
>
yes, arnd. i also asked Daniel to apply "clocksource: marco: Rename
marco to atlas7" rebased on this fix here:
https://git.linaro.org/people/daniel.lezcano/linux.git/commit/81428bbe1d8a073bb3741678ef1d3c1016119c77
so this one is excluded from my pull request for atlas7. a
pull-request from arm-soc might cause merge conflicts?
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Fixes: ef89af1f4380b92 ("clocksource: sirf: Remove hard-coded clock rate")
-barry
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] clocksource: sirf: remove unused variable
2015-01-13 15:24 ` Arnd Bergmann
@ 2015-01-13 15:39 ` Daniel Lezcano
-1 siblings, 0 replies; 22+ messages in thread
From: Daniel Lezcano @ 2015-01-13 15:39 UTC (permalink / raw
To: Arnd Bergmann
Cc: linux-arm-kernel, linux-kernel, Yanchang Li, Barry Song,
Thomas Gleixner
On 01/13/2015 04:24 PM, Arnd Bergmann wrote:
> On Tuesday 13 January 2015 15:27:05 Daniel Lezcano wrote:
>> On 01/13/2015 03:22 PM, Arnd Bergmann wrote:
>>> A recent rework of the driver left an obviously unused variable
>>> around, and now the compiler complains:
>>>
>>> clocksource/timer-marco.c: In function 'sirfsoc_marco_timer_init':
>>> clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div' [-Wunused-variable]
>>>
>>> Remove it.
>>
>> Hi Arnd,
>>
>> thanks for the fix. But this has been already fixed and merged in my
>> tree [1].
>
> Ok, thanks. For some reason it has not shown up in Linux-next yet.
> Is this branch supposed to be part of -next?
Yes, I will update my next branch with these changes.
-- Daniel
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH] clocksource: sirf: remove unused variable
@ 2015-01-13 15:39 ` Daniel Lezcano
0 siblings, 0 replies; 22+ messages in thread
From: Daniel Lezcano @ 2015-01-13 15:39 UTC (permalink / raw
To: linux-arm-kernel
On 01/13/2015 04:24 PM, Arnd Bergmann wrote:
> On Tuesday 13 January 2015 15:27:05 Daniel Lezcano wrote:
>> On 01/13/2015 03:22 PM, Arnd Bergmann wrote:
>>> A recent rework of the driver left an obviously unused variable
>>> around, and now the compiler complains:
>>>
>>> clocksource/timer-marco.c: In function 'sirfsoc_marco_timer_init':
>>> clocksource/timer-marco.c:260:6: warning: unused variable 'timer_div' [-Wunused-variable]
>>>
>>> Remove it.
>>
>> Hi Arnd,
>>
>> thanks for the fix. But this has been already fixed and merged in my
>> tree [1].
>
> Ok, thanks. For some reason it has not shown up in Linux-next yet.
> Is this branch supposed to be part of -next?
Yes, I will update my next branch with these changes.
-- Daniel
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH] clocksource: sirf: remove unused variable
2015-01-13 15:24 ` Barry Song
@ 2015-01-13 16:22 ` Arnd Bergmann
-1 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2015-01-13 16:22 UTC (permalink / raw
To: linux-arm-kernel
Cc: Barry Song, Daniel Lezcano, Yanchang Li, LKML,
DL-SHA-WorkGroupLinux, Barry Song, Thomas Gleixner
On Tuesday 13 January 2015 23:24:24 Barry Song wrote:
>
> yes, arnd. i also asked Daniel to apply "clocksource: marco: Rename
> marco to atlas7" rebased on this fix here:
> https://git.linaro.org/people/daniel.lezcano/linux.git/commit/81428bbe1d8a073bb3741678ef1d3c1016119c77
Ok
> so this one is excluded from my pull request for atlas7. a
> pull-request from arm-soc might cause merge conflicts?
I was just doing build-tests on linux-next today and submitted patches
for each new warning or error I saw. Nothing to worry about as it's already
fixed and I'm dropping my version as soon as the other fix makes it into
next.
Arnd
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH] clocksource: sirf: remove unused variable
@ 2015-01-13 16:22 ` Arnd Bergmann
0 siblings, 0 replies; 22+ messages in thread
From: Arnd Bergmann @ 2015-01-13 16:22 UTC (permalink / raw
To: linux-arm-kernel
On Tuesday 13 January 2015 23:24:24 Barry Song wrote:
>
> yes, arnd. i also asked Daniel to apply "clocksource: marco: Rename
> marco to atlas7" rebased on this fix here:
> https://git.linaro.org/people/daniel.lezcano/linux.git/commit/81428bbe1d8a073bb3741678ef1d3c1016119c77
Ok
> so this one is excluded from my pull request for atlas7. a
> pull-request from arm-soc might cause merge conflicts?
I was just doing build-tests on linux-next today and submitted patches
for each new warning or error I saw. Nothing to worry about as it's already
fixed and I'm dropping my version as soon as the other fix makes it into
next.
Arnd
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2015-01-13 16:23 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-15 15:59 [PATCH] clocksource: sirf: Remove unused variable Thierry Reding
2014-12-15 15:59 ` Thierry Reding
2014-12-15 16:17 ` Daniel Lezcano
2014-12-15 16:17 ` Daniel Lezcano
2015-01-11 15:58 ` Barry Song
2015-01-11 15:58 ` Barry Song
2015-01-11 20:51 ` Daniel Lezcano
2015-01-11 20:51 ` Daniel Lezcano
-- strict thread matches above, loose matches on Subject: below --
2014-12-23 21:33 Fabio Estevam
2015-01-11 14:45 ` Barry Song
2015-01-13 14:22 [PATCH] clocksource: sirf: remove " Arnd Bergmann
2015-01-13 14:22 ` Arnd Bergmann
2015-01-13 14:27 ` Daniel Lezcano
2015-01-13 14:27 ` Daniel Lezcano
2015-01-13 15:24 ` Arnd Bergmann
2015-01-13 15:24 ` Arnd Bergmann
2015-01-13 15:39 ` Daniel Lezcano
2015-01-13 15:39 ` Daniel Lezcano
2015-01-13 15:24 ` Barry Song
2015-01-13 15:24 ` Barry Song
2015-01-13 16:22 ` Arnd Bergmann
2015-01-13 16:22 ` Arnd Bergmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.