summaryrefslogtreecommitdiffstats
path: root/kernel/arch/arm/mach-spear
diff options
context:
space:
mode:
authorJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-11 10:41:07 +0300
committerJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-13 08:17:18 +0300
commite09b41010ba33a20a87472ee821fa407a5b8da36 (patch)
treed10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/arch/arm/mach-spear
parentf93b97fd65072de626c074dbe099a1fff05ce060 (diff)
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page. During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/arch/arm/mach-spear')
-rw-r--r--kernel/arch/arm/mach-spear/generic.h2
-rw-r--r--kernel/arch/arm/mach-spear/hotplug.c2
-rw-r--r--kernel/arch/arm/mach-spear/include/mach/irqs.h2
-rw-r--r--kernel/arch/arm/mach-spear/include/mach/misc_regs.h2
-rw-r--r--kernel/arch/arm/mach-spear/include/mach/spear.h2
-rw-r--r--kernel/arch/arm/mach-spear/include/mach/uncompress.h2
-rw-r--r--kernel/arch/arm/mach-spear/pl080.c2
-rw-r--r--kernel/arch/arm/mach-spear/pl080.h2
-rw-r--r--kernel/arch/arm/mach-spear/restart.c2
-rw-r--r--kernel/arch/arm/mach-spear/spear1310.c2
-rw-r--r--kernel/arch/arm/mach-spear/spear1340.c2
-rw-r--r--kernel/arch/arm/mach-spear/spear13xx.c4
-rw-r--r--kernel/arch/arm/mach-spear/spear300.c2
-rw-r--r--kernel/arch/arm/mach-spear/spear310.c2
-rw-r--r--kernel/arch/arm/mach-spear/spear320.c2
-rw-r--r--kernel/arch/arm/mach-spear/spear3xx.c2
-rw-r--r--kernel/arch/arm/mach-spear/time.c91
17 files changed, 68 insertions, 57 deletions
diff --git a/kernel/arch/arm/mach-spear/generic.h b/kernel/arch/arm/mach-spear/generic.h
index a99d90a4d..06640914d 100644
--- a/kernel/arch/arm/mach-spear/generic.h
+++ b/kernel/arch/arm/mach-spear/generic.h
@@ -3,7 +3,7 @@
*
* Copyright (C) 2009-2012 ST Microelectronics
* Rajeev Kumar <rajeev-dlh.kumar@st.com>
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/hotplug.c b/kernel/arch/arm/mach-spear/hotplug.c
index d97749c64..12edd1cf8 100644
--- a/kernel/arch/arm/mach-spear/hotplug.c
+++ b/kernel/arch/arm/mach-spear/hotplug.c
@@ -80,7 +80,7 @@ static inline void spear13xx_do_lowpower(unsigned int cpu, int *spurious)
*
* Called with IRQs disabled
*/
-void __ref spear13xx_cpu_die(unsigned int cpu)
+void spear13xx_cpu_die(unsigned int cpu)
{
int spurious = 0;
diff --git a/kernel/arch/arm/mach-spear/include/mach/irqs.h b/kernel/arch/arm/mach-spear/include/mach/irqs.h
index 92da0a8c6..7058720c5 100644
--- a/kernel/arch/arm/mach-spear/include/mach/irqs.h
+++ b/kernel/arch/arm/mach-spear/include/mach/irqs.h
@@ -3,7 +3,7 @@
*
* Copyright (C) 2009-2012 ST Microelectronics
* Rajeev Kumar <rajeev-dlh.kumar@st.com>
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/include/mach/misc_regs.h b/kernel/arch/arm/mach-spear/include/mach/misc_regs.h
index 935639ce5..cfaf7c665 100644
--- a/kernel/arch/arm/mach-spear/include/mach/misc_regs.h
+++ b/kernel/arch/arm/mach-spear/include/mach/misc_regs.h
@@ -4,7 +4,7 @@
* Miscellaneous registers definitions for SPEAr3xx machine family
*
* Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/include/mach/spear.h b/kernel/arch/arm/mach-spear/include/mach/spear.h
index f2d6a0176..5ed841ccf 100644
--- a/kernel/arch/arm/mach-spear/include/mach/spear.h
+++ b/kernel/arch/arm/mach-spear/include/mach/spear.h
@@ -3,7 +3,7 @@
*
* Copyright (C) 2009,2012 ST Microelectronics
* Rajeev Kumar<rajeev-dlh.kumar@st.com>
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/include/mach/uncompress.h b/kernel/arch/arm/mach-spear/include/mach/uncompress.h
index 51b2dc93e..8439b9c12 100644
--- a/kernel/arch/arm/mach-spear/include/mach/uncompress.h
+++ b/kernel/arch/arm/mach-spear/include/mach/uncompress.h
@@ -4,7 +4,7 @@
* Serial port stubs for kernel decompress status messages
*
* Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/pl080.c b/kernel/arch/arm/mach-spear/pl080.c
index cfa1199d0..b4529f3e0 100644
--- a/kernel/arch/arm/mach-spear/pl080.c
+++ b/kernel/arch/arm/mach-spear/pl080.c
@@ -4,7 +4,7 @@
* DMAC pl080 definitions for SPEAr platform
*
* Copyright (C) 2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/pl080.h b/kernel/arch/arm/mach-spear/pl080.h
index eb6590ded..608dec672 100644
--- a/kernel/arch/arm/mach-spear/pl080.h
+++ b/kernel/arch/arm/mach-spear/pl080.h
@@ -4,7 +4,7 @@
* DMAC pl080 definitions for SPEAr platform
*
* Copyright (C) 2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/restart.c b/kernel/arch/arm/mach-spear/restart.c
index ce5e098c4..b4342155a 100644
--- a/kernel/arch/arm/mach-spear/restart.c
+++ b/kernel/arch/arm/mach-spear/restart.c
@@ -4,7 +4,7 @@
* SPEAr platform specific restart functions
*
* Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/spear1310.c b/kernel/arch/arm/mach-spear/spear1310.c
index d9ce4d800..cd5d375d9 100644
--- a/kernel/arch/arm/mach-spear/spear1310.c
+++ b/kernel/arch/arm/mach-spear/spear1310.c
@@ -4,7 +4,7 @@
* SPEAr1310 machine source file
*
* Copyright (C) 2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/spear1340.c b/kernel/arch/arm/mach-spear/spear1340.c
index 3f3c0f124..94594d5a4 100644
--- a/kernel/arch/arm/mach-spear/spear1340.c
+++ b/kernel/arch/arm/mach-spear/spear1340.c
@@ -4,7 +4,7 @@
* SPEAr1340 machine source file
*
* Copyright (C) 2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/spear13xx.c b/kernel/arch/arm/mach-spear/spear13xx.c
index 2e463a934..ca2f6a82a 100644
--- a/kernel/arch/arm/mach-spear/spear13xx.c
+++ b/kernel/arch/arm/mach-spear/spear13xx.c
@@ -4,7 +4,7 @@
* SPEAr13XX machines common source file
*
* Copyright (C) 2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
@@ -124,5 +124,5 @@ void __init spear13xx_timer_init(void)
clk_put(pclk);
spear_setup_of_timer();
- clocksource_of_init();
+ clocksource_probe();
}
diff --git a/kernel/arch/arm/mach-spear/spear300.c b/kernel/arch/arm/mach-spear/spear300.c
index b52e48f34..5b32edda2 100644
--- a/kernel/arch/arm/mach-spear/spear300.c
+++ b/kernel/arch/arm/mach-spear/spear300.c
@@ -4,7 +4,7 @@
* SPEAr300 machine source file
*
* Copyright (C) 2009-2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/spear310.c b/kernel/arch/arm/mach-spear/spear310.c
index ed2029db3..86a44ac7f 100644
--- a/kernel/arch/arm/mach-spear/spear310.c
+++ b/kernel/arch/arm/mach-spear/spear310.c
@@ -4,7 +4,7 @@
* SPEAr310 machine source file
*
* Copyright (C) 2009-2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/spear320.c b/kernel/arch/arm/mach-spear/spear320.c
index bf634b32a..d45d75192 100644
--- a/kernel/arch/arm/mach-spear/spear320.c
+++ b/kernel/arch/arm/mach-spear/spear320.c
@@ -4,7 +4,7 @@
* SPEAr320 machine source file
*
* Copyright (C) 2009-2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/spear3xx.c b/kernel/arch/arm/mach-spear/spear3xx.c
index bf3b1fd8c..23394ac76 100644
--- a/kernel/arch/arm/mach-spear/spear3xx.c
+++ b/kernel/arch/arm/mach-spear/spear3xx.c
@@ -4,7 +4,7 @@
* SPEAr3XX machines common source file
*
* Copyright (C) 2009-2012 ST Microelectronics
- * Viresh Kumar <viresh.linux@gmail.com>
+ * Viresh Kumar <vireshk@kernel.org>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
diff --git a/kernel/arch/arm/mach-spear/time.c b/kernel/arch/arm/mach-spear/time.c
index 26fda4ed4..9ccffc1d0 100644
--- a/kernel/arch/arm/mach-spear/time.c
+++ b/kernel/arch/arm/mach-spear/time.c
@@ -66,8 +66,6 @@
static __iomem void *gpt_base;
static struct clk *gpt_clk;
-static void clockevent_set_mode(enum clock_event_mode mode,
- struct clock_event_device *clk_event_dev);
static int clockevent_next_event(unsigned long evt,
struct clock_event_device *clk_event_dev);
@@ -95,54 +93,67 @@ static void __init spear_clocksource_init(void)
200, 16, clocksource_mmio_readw_up);
}
-static struct clock_event_device clkevt = {
- .name = "tmr0",
- .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
- .set_mode = clockevent_set_mode,
- .set_next_event = clockevent_next_event,
- .shift = 0, /* to be computed */
-};
+static inline void timer_shutdown(struct clock_event_device *evt)
+{
+ u16 val = readw(gpt_base + CR(CLKEVT));
+
+ /* stop the timer */
+ val &= ~CTRL_ENABLE;
+ writew(val, gpt_base + CR(CLKEVT));
+}
+
+static int spear_shutdown(struct clock_event_device *evt)
+{
+ timer_shutdown(evt);
+
+ return 0;
+}
+
+static int spear_set_oneshot(struct clock_event_device *evt)
+{
+ u16 val;
-static void clockevent_set_mode(enum clock_event_mode mode,
- struct clock_event_device *clk_event_dev)
+ /* stop the timer */
+ timer_shutdown(evt);
+
+ val = readw(gpt_base + CR(CLKEVT));
+ val |= CTRL_ONE_SHOT;
+ writew(val, gpt_base + CR(CLKEVT));
+
+ return 0;
+}
+
+static int spear_set_periodic(struct clock_event_device *evt)
{
u32 period;
u16 val;
/* stop the timer */
+ timer_shutdown(evt);
+
+ period = clk_get_rate(gpt_clk) / HZ;
+ period >>= CTRL_PRESCALER16;
+ writew(period, gpt_base + LOAD(CLKEVT));
+
val = readw(gpt_base + CR(CLKEVT));
- val &= ~CTRL_ENABLE;
+ val &= ~CTRL_ONE_SHOT;
+ val |= CTRL_ENABLE | CTRL_INT_ENABLE;
writew(val, gpt_base + CR(CLKEVT));
- switch (mode) {
- case CLOCK_EVT_MODE_PERIODIC:
- period = clk_get_rate(gpt_clk) / HZ;
- period >>= CTRL_PRESCALER16;
- writew(period, gpt_base + LOAD(CLKEVT));
-
- val = readw(gpt_base + CR(CLKEVT));
- val &= ~CTRL_ONE_SHOT;
- val |= CTRL_ENABLE | CTRL_INT_ENABLE;
- writew(val, gpt_base + CR(CLKEVT));
-
- break;
- case CLOCK_EVT_MODE_ONESHOT:
- val = readw(gpt_base + CR(CLKEVT));
- val |= CTRL_ONE_SHOT;
- writew(val, gpt_base + CR(CLKEVT));
-
- break;
- case CLOCK_EVT_MODE_UNUSED:
- case CLOCK_EVT_MODE_SHUTDOWN:
- case CLOCK_EVT_MODE_RESUME:
-
- break;
- default:
- pr_err("Invalid mode requested\n");
- break;
- }
+ return 0;
}
+static struct clock_event_device clkevt = {
+ .name = "tmr0",
+ .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
+ .set_state_shutdown = spear_shutdown,
+ .set_state_periodic = spear_set_periodic,
+ .set_state_oneshot = spear_set_oneshot,
+ .tick_resume = spear_shutdown,
+ .set_next_event = clockevent_next_event,
+ .shift = 0, /* to be computed */
+};
+
static int clockevent_next_event(unsigned long cycles,
struct clock_event_device *clk_event_dev)
{
@@ -193,7 +204,7 @@ static void __init spear_clockevent_init(int irq)
setup_irq(irq, &spear_timer_irq);
}
-const static struct of_device_id timer_of_match[] __initconst = {
+static const struct of_device_id const timer_of_match[] __initconst = {
{ .compatible = "st,spear-timer", },
{ },
};