+++ /dev/null
-From 233638cf845332de3f12c566962e8b31d91d9acb Mon Sep 17 00:00:00 2001
-From: Arnd Bergmann <arnd@arndb.de>
-Date: Mon, 10 Dec 2018 21:43:01 +0100
-Subject: ARM: mmp: fix timer_init calls
-
-[ Upstream commit 12d3a30db4a3b3df5fbadf5974b9cf50544a9950 ]
-
-The change to passing the timer frequency as a function argument
-was a good idea, but caused a build failure for one user that
-was missed in the update:
-
-arch/arm/mach-mmp/time.c: In function 'mmp_dt_init_timer':
-arch/arm/mach-mmp/time.c:242:2: error: implicit declaration of function 'timer_init'; did you mean 'hrtimer_init'? [-Werror=implicit-function-declaration]
-
-Change that as well to fix the build error, and rename the
-function to put it into a proper namespace and make it clearer
-what is actually going on.
-
-I saw that the high 6500000 HZ frequency was previously only
-set with CONFIG_MMP2, but is now also used with MMP (pxa910),
-so I'm changing that back here. Please make sure that the
-frequencies are all correct now.
-
-Fixes: f36797ee4380 ("ARM: mmp/mmp2: dt: enable the clock")
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm/mach-mmp/common.h | 2 +-
- arch/arm/mach-mmp/mmp2.c | 2 +-
- arch/arm/mach-mmp/pxa168.c | 2 +-
- arch/arm/mach-mmp/pxa910.c | 2 +-
- arch/arm/mach-mmp/time.c | 4 ++--
- 5 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
-index 69c7eec6d1e0..10779ab9d55f 100644
---- a/arch/arm/mach-mmp/common.h
-+++ b/arch/arm/mach-mmp/common.h
-@@ -1,7 +1,7 @@
- #include <linux/reboot.h>
- #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
-
--extern void timer_init(int irq, unsigned long rate);
-+extern void mmp_timer_init(int irq, unsigned long rate);
-
- extern void __init mmp_map_io(void);
- extern void mmp_restart(enum reboot_mode, const char *);
-diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
-index 90a0d8114af2..c02a1f14aa02 100644
---- a/arch/arm/mach-mmp/mmp2.c
-+++ b/arch/arm/mach-mmp/mmp2.c
-@@ -133,7 +133,7 @@ void __init mmp2_timer_init(void)
- clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
- __raw_writel(clk_rst, APBC_TIMERS);
-
-- timer_init(IRQ_MMP2_TIMER1, 6500000);
-+ mmp_timer_init(IRQ_MMP2_TIMER1, 6500000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
-index 5a616db7f392..94230041ec8f 100644
---- a/arch/arm/mach-mmp/pxa168.c
-+++ b/arch/arm/mach-mmp/pxa168.c
-@@ -78,7 +78,7 @@ void __init pxa168_timer_init(void)
- /* 3.25MHz, bus/functional clock enabled, release reset */
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA168_TIMER1, 6500000);
-+ mmp_timer_init(IRQ_PXA168_TIMER1, 3250000);
- }
-
- void pxa168_clear_keypad_wakeup(void)
-diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c
-index eb57ee196842..6b002763721d 100644
---- a/arch/arm/mach-mmp/pxa910.c
-+++ b/arch/arm/mach-mmp/pxa910.c
-@@ -114,7 +114,7 @@ void __init pxa910_timer_init(void)
- __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS);
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA910_AP1_TIMER1);
-+ mmp_timer_init(IRQ_PXA910_AP1_TIMER1, 3250000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
-index b66ea443f154..2c59bb0f0e59 100644
---- a/arch/arm/mach-mmp/time.c
-+++ b/arch/arm/mach-mmp/time.c
-@@ -192,7 +192,7 @@ static struct irqaction timer_irq = {
- .dev_id = &ckevt,
- };
-
--void __init timer_init(int irq, unsigned long rate)
-+void __init mmp_timer_init(int irq, unsigned long rate)
- {
- timer_config();
-
-@@ -247,7 +247,7 @@ void __init mmp_dt_init_timer(void)
- ret = -ENOMEM;
- goto out;
- }
-- timer_init(irq, rate);
-+ mmp_timer_init(irq, rate);
- return;
- out:
- pr_err("Failed to get timer from device tree with error:%d\n", ret);
---
-2.19.1
-
+++ /dev/null
-From 35514917b569152232f712866107ab693819860b Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Wed, 28 Nov 2018 18:53:20 +0100
-Subject: ARM: mmp/mmp2: dt: enable the clock
-
-[ Upstream commit f36797ee43802b367e59f0f9a9805304a4ff0c98 ]
-
-The device-tree booted MMP2 needs to enable the timer clock, otherwise
-it would stop ticking when the boot finishes.
-
-It can also use the clock rate from the clk, the non-DT boards need to
-keep using the hardcoded rates.
-
-Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
-Acked-by: Pavel Machek <pavel@ucw.cz>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm/mach-mmp/common.h | 2 +-
- arch/arm/mach-mmp/mmp2.c | 2 +-
- arch/arm/mach-mmp/pxa168.c | 2 +-
- arch/arm/mach-mmp/time.c | 32 ++++++++++++++++++++------------
- 4 files changed, 23 insertions(+), 15 deletions(-)
-
-diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
-index cf445bae6d77..69c7eec6d1e0 100644
---- a/arch/arm/mach-mmp/common.h
-+++ b/arch/arm/mach-mmp/common.h
-@@ -1,7 +1,7 @@
- #include <linux/reboot.h>
- #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
-
--extern void timer_init(int irq);
-+extern void timer_init(int irq, unsigned long rate);
-
- extern void __init mmp_map_io(void);
- extern void mmp_restart(enum reboot_mode, const char *);
-diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
-index a70b5530bd42..90a0d8114af2 100644
---- a/arch/arm/mach-mmp/mmp2.c
-+++ b/arch/arm/mach-mmp/mmp2.c
-@@ -133,7 +133,7 @@ void __init mmp2_timer_init(void)
- clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
- __raw_writel(clk_rst, APBC_TIMERS);
-
-- timer_init(IRQ_MMP2_TIMER1);
-+ timer_init(IRQ_MMP2_TIMER1, 6500000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
-index 144e997624c0..5a616db7f392 100644
---- a/arch/arm/mach-mmp/pxa168.c
-+++ b/arch/arm/mach-mmp/pxa168.c
-@@ -78,7 +78,7 @@ void __init pxa168_timer_init(void)
- /* 3.25MHz, bus/functional clock enabled, release reset */
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA168_TIMER1);
-+ timer_init(IRQ_PXA168_TIMER1, 6500000);
- }
-
- void pxa168_clear_keypad_wakeup(void)
-diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
-index 2756351dbb35..b66ea443f154 100644
---- a/arch/arm/mach-mmp/time.c
-+++ b/arch/arm/mach-mmp/time.c
-@@ -22,6 +22,7 @@
- #include <linux/kernel.h>
- #include <linux/interrupt.h>
- #include <linux/clockchips.h>
-+#include <linux/clk.h>
-
- #include <linux/io.h>
- #include <linux/irq.h>
-@@ -39,12 +40,6 @@
-
- #include "clock.h"
-
--#ifdef CONFIG_CPU_MMP2
--#define MMP_CLOCK_FREQ 6500000
--#else
--#define MMP_CLOCK_FREQ 3250000
--#endif
--
- #define TIMERS_VIRT_BASE TIMERS1_VIRT_BASE
-
- #define MAX_DELTA (0xfffffffe)
-@@ -197,19 +192,18 @@ static struct irqaction timer_irq = {
- .dev_id = &ckevt,
- };
-
--void __init timer_init(int irq)
-+void __init timer_init(int irq, unsigned long rate)
- {
- timer_config();
-
-- sched_clock_register(mmp_read_sched_clock, 32, MMP_CLOCK_FREQ);
-+ sched_clock_register(mmp_read_sched_clock, 32, rate);
-
- ckevt.cpumask = cpumask_of(0);
-
- setup_irq(irq, &timer_irq);
-
-- clocksource_register_hz(&cksrc, MMP_CLOCK_FREQ);
-- clockevents_config_and_register(&ckevt, MMP_CLOCK_FREQ,
-- MIN_DELTA, MAX_DELTA);
-+ clocksource_register_hz(&cksrc, rate);
-+ clockevents_config_and_register(&ckevt, rate, MIN_DELTA, MAX_DELTA);
- }
-
- #ifdef CONFIG_OF
-@@ -221,7 +215,9 @@ static struct of_device_id mmp_timer_dt_ids[] = {
- void __init mmp_dt_init_timer(void)
- {
- struct device_node *np;
-+ struct clk *clk;
- int irq, ret;
-+ unsigned long rate;
-
- np = of_find_matching_node(NULL, mmp_timer_dt_ids);
- if (!np) {
-@@ -229,6 +225,18 @@ void __init mmp_dt_init_timer(void)
- goto out;
- }
-
-+ clk = of_clk_get(np, 0);
-+ if (!IS_ERR(clk)) {
-+ ret = clk_prepare_enable(clk);
-+ if (ret)
-+ goto out;
-+ rate = clk_get_rate(clk) / 2;
-+ } else if (cpu_is_pj4()) {
-+ rate = 6500000;
-+ } else {
-+ rate = 3250000;
-+ }
-+
- irq = irq_of_parse_and_map(np, 0);
- if (!irq) {
- ret = -EINVAL;
-@@ -239,7 +247,7 @@ void __init mmp_dt_init_timer(void)
- ret = -ENOMEM;
- goto out;
- }
-- timer_init(irq);
-+ timer_init(irq, rate);
- return;
- out:
- pr_err("Failed to get timer from device tree with error:%d\n", ret);
---
-2.19.1
-
f2fs-move-dir-data-flush-to-write-checkpoint-process.patch
nfsd4-fix-crash-on-writing-v4_end_grace-before-nfsd-.patch
arm64-ftrace-don-t-adjust-the-lr-value.patch
-arm-mmp-mmp2-dt-enable-the-clock.patch
media-davinci-vpbe-fix-error-handling-in-vpbe_initia.patch
smack-fix-access-permissions-for-keyring.patch
usb-hub-delay-hub-autosuspend-if-usb3-port-is-still-.patch
udf-fix-bug-on-corrupted-inode.patch
arm-pxa-avoid-section-mismatch-warning.patch
asoc-fsl-fix-snd_soc_eukrea_tlv320-build-error-on-i..patch
-arm-mmp-fix-timer_init-calls.patch
memstick-prevent-memstick-host-from-getting-runtime-.patch
tty-serial-samsung-properly-set-flags-in-autocts-mod.patch
arm64-kvm-skip-mmio-insn-after-emulation.patch
+++ /dev/null
-From 37505999896141fee397b0ba93c3dc98b8c4a9e5 Mon Sep 17 00:00:00 2001
-From: Arnd Bergmann <arnd@arndb.de>
-Date: Mon, 10 Dec 2018 21:43:01 +0100
-Subject: ARM: mmp: fix timer_init calls
-
-[ Upstream commit 12d3a30db4a3b3df5fbadf5974b9cf50544a9950 ]
-
-The change to passing the timer frequency as a function argument
-was a good idea, but caused a build failure for one user that
-was missed in the update:
-
-arch/arm/mach-mmp/time.c: In function 'mmp_dt_init_timer':
-arch/arm/mach-mmp/time.c:242:2: error: implicit declaration of function 'timer_init'; did you mean 'hrtimer_init'? [-Werror=implicit-function-declaration]
-
-Change that as well to fix the build error, and rename the
-function to put it into a proper namespace and make it clearer
-what is actually going on.
-
-I saw that the high 6500000 HZ frequency was previously only
-set with CONFIG_MMP2, but is now also used with MMP (pxa910),
-so I'm changing that back here. Please make sure that the
-frequencies are all correct now.
-
-Fixes: f36797ee4380 ("ARM: mmp/mmp2: dt: enable the clock")
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm/mach-mmp/common.h | 2 +-
- arch/arm/mach-mmp/mmp2.c | 2 +-
- arch/arm/mach-mmp/pxa168.c | 2 +-
- arch/arm/mach-mmp/pxa910.c | 2 +-
- arch/arm/mach-mmp/time.c | 4 ++--
- 5 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
-index 5ac2851ef5d3..483b8b6d3005 100644
---- a/arch/arm/mach-mmp/common.h
-+++ b/arch/arm/mach-mmp/common.h
-@@ -2,7 +2,7 @@
- #include <linux/reboot.h>
- #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
-
--extern void timer_init(int irq, unsigned long rate);
-+extern void mmp_timer_init(int irq, unsigned long rate);
-
- extern void __init mmp_map_io(void);
- extern void mmp_restart(enum reboot_mode, const char *);
-diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
-index fb3e7e32c882..726c1a642dea 100644
---- a/arch/arm/mach-mmp/mmp2.c
-+++ b/arch/arm/mach-mmp/mmp2.c
-@@ -134,7 +134,7 @@ void __init mmp2_timer_init(void)
- clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
- __raw_writel(clk_rst, APBC_TIMERS);
-
-- timer_init(IRQ_MMP2_TIMER1, 6500000);
-+ mmp_timer_init(IRQ_MMP2_TIMER1, 6500000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
-index 77a358165a56..cdcf65ace3f9 100644
---- a/arch/arm/mach-mmp/pxa168.c
-+++ b/arch/arm/mach-mmp/pxa168.c
-@@ -79,7 +79,7 @@ void __init pxa168_timer_init(void)
- /* 3.25MHz, bus/functional clock enabled, release reset */
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA168_TIMER1, 6500000);
-+ mmp_timer_init(IRQ_PXA168_TIMER1, 3250000);
- }
-
- void pxa168_clear_keypad_wakeup(void)
-diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c
-index 1ccbba9ac495..d30a7d12bc98 100644
---- a/arch/arm/mach-mmp/pxa910.c
-+++ b/arch/arm/mach-mmp/pxa910.c
-@@ -116,7 +116,7 @@ void __init pxa910_timer_init(void)
- __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS);
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA910_AP1_TIMER1);
-+ mmp_timer_init(IRQ_PXA910_AP1_TIMER1, 3250000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
-index eab0fd8a7343..f9c295154b94 100644
---- a/arch/arm/mach-mmp/time.c
-+++ b/arch/arm/mach-mmp/time.c
-@@ -184,7 +184,7 @@ static struct irqaction timer_irq = {
- .dev_id = &ckevt,
- };
-
--void __init timer_init(int irq, unsigned long rate)
-+void __init mmp_timer_init(int irq, unsigned long rate)
- {
- timer_config();
-
-@@ -239,7 +239,7 @@ void __init mmp_dt_init_timer(void)
- ret = -ENOMEM;
- goto out;
- }
-- timer_init(irq, rate);
-+ mmp_timer_init(irq, rate);
- return;
- out:
- pr_err("Failed to get timer from device tree with error:%d\n", ret);
---
-2.19.1
-
+++ /dev/null
-From 81bd1f5159f8bac885757894d9b85070f75c9b9a Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Wed, 28 Nov 2018 18:53:20 +0100
-Subject: ARM: mmp/mmp2: dt: enable the clock
-
-[ Upstream commit f36797ee43802b367e59f0f9a9805304a4ff0c98 ]
-
-The device-tree booted MMP2 needs to enable the timer clock, otherwise
-it would stop ticking when the boot finishes.
-
-It can also use the clock rate from the clk, the non-DT boards need to
-keep using the hardcoded rates.
-
-Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
-Acked-by: Pavel Machek <pavel@ucw.cz>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm/mach-mmp/common.h | 2 +-
- arch/arm/mach-mmp/mmp2.c | 2 +-
- arch/arm/mach-mmp/pxa168.c | 2 +-
- arch/arm/mach-mmp/time.c | 32 ++++++++++++++++++++------------
- 4 files changed, 23 insertions(+), 15 deletions(-)
-
-diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
-index 7e284d9c429f..5ac2851ef5d3 100644
---- a/arch/arm/mach-mmp/common.h
-+++ b/arch/arm/mach-mmp/common.h
-@@ -2,7 +2,7 @@
- #include <linux/reboot.h>
- #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
-
--extern void timer_init(int irq);
-+extern void timer_init(int irq, unsigned long rate);
-
- extern void __init mmp_map_io(void);
- extern void mmp_restart(enum reboot_mode, const char *);
-diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
-index afba5460cdaf..fb3e7e32c882 100644
---- a/arch/arm/mach-mmp/mmp2.c
-+++ b/arch/arm/mach-mmp/mmp2.c
-@@ -134,7 +134,7 @@ void __init mmp2_timer_init(void)
- clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
- __raw_writel(clk_rst, APBC_TIMERS);
-
-- timer_init(IRQ_MMP2_TIMER1);
-+ timer_init(IRQ_MMP2_TIMER1, 6500000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
-index 0f5f16fb8c66..77a358165a56 100644
---- a/arch/arm/mach-mmp/pxa168.c
-+++ b/arch/arm/mach-mmp/pxa168.c
-@@ -79,7 +79,7 @@ void __init pxa168_timer_init(void)
- /* 3.25MHz, bus/functional clock enabled, release reset */
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA168_TIMER1);
-+ timer_init(IRQ_PXA168_TIMER1, 6500000);
- }
-
- void pxa168_clear_keypad_wakeup(void)
-diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
-index 96ad1db0b04b..eab0fd8a7343 100644
---- a/arch/arm/mach-mmp/time.c
-+++ b/arch/arm/mach-mmp/time.c
-@@ -22,6 +22,7 @@
- #include <linux/kernel.h>
- #include <linux/interrupt.h>
- #include <linux/clockchips.h>
-+#include <linux/clk.h>
-
- #include <linux/io.h>
- #include <linux/irq.h>
-@@ -38,12 +39,6 @@
- #include "cputype.h"
- #include "clock.h"
-
--#ifdef CONFIG_CPU_MMP2
--#define MMP_CLOCK_FREQ 6500000
--#else
--#define MMP_CLOCK_FREQ 3250000
--#endif
--
- #define TIMERS_VIRT_BASE TIMERS1_VIRT_BASE
-
- #define MAX_DELTA (0xfffffffe)
-@@ -189,19 +184,18 @@ static struct irqaction timer_irq = {
- .dev_id = &ckevt,
- };
-
--void __init timer_init(int irq)
-+void __init timer_init(int irq, unsigned long rate)
- {
- timer_config();
-
-- sched_clock_register(mmp_read_sched_clock, 32, MMP_CLOCK_FREQ);
-+ sched_clock_register(mmp_read_sched_clock, 32, rate);
-
- ckevt.cpumask = cpumask_of(0);
-
- setup_irq(irq, &timer_irq);
-
-- clocksource_register_hz(&cksrc, MMP_CLOCK_FREQ);
-- clockevents_config_and_register(&ckevt, MMP_CLOCK_FREQ,
-- MIN_DELTA, MAX_DELTA);
-+ clocksource_register_hz(&cksrc, rate);
-+ clockevents_config_and_register(&ckevt, rate, MIN_DELTA, MAX_DELTA);
- }
-
- #ifdef CONFIG_OF
-@@ -213,7 +207,9 @@ static const struct of_device_id mmp_timer_dt_ids[] = {
- void __init mmp_dt_init_timer(void)
- {
- struct device_node *np;
-+ struct clk *clk;
- int irq, ret;
-+ unsigned long rate;
-
- np = of_find_matching_node(NULL, mmp_timer_dt_ids);
- if (!np) {
-@@ -221,6 +217,18 @@ void __init mmp_dt_init_timer(void)
- goto out;
- }
-
-+ clk = of_clk_get(np, 0);
-+ if (!IS_ERR(clk)) {
-+ ret = clk_prepare_enable(clk);
-+ if (ret)
-+ goto out;
-+ rate = clk_get_rate(clk) / 2;
-+ } else if (cpu_is_pj4()) {
-+ rate = 6500000;
-+ } else {
-+ rate = 3250000;
-+ }
-+
- irq = irq_of_parse_and_map(np, 0);
- if (!irq) {
- ret = -EINVAL;
-@@ -231,7 +239,7 @@ void __init mmp_dt_init_timer(void)
- ret = -ENOMEM;
- goto out;
- }
-- timer_init(irq);
-+ timer_init(irq, rate);
- return;
- out:
- pr_err("Failed to get timer from device tree with error:%d\n", ret);
---
-2.19.1
-
s390-zcrypt-improve-special-ap-message-cmd-handling.patch
arm64-ftrace-don-t-adjust-the-lr-value.patch
arm-dts-mmp2-fix-twsi2.patch
-arm-mmp-mmp2-dt-enable-the-clock.patch
x86-fpu-add-might_fault-to-user_insn.patch
media-davinci-vpbe-fix-error-handling-in-vpbe_initia.patch
smack-fix-access-permissions-for-keyring.patch
selftests-bpf-use-__bpf_constant_htons-in-test_prog..patch
arm-pxa-avoid-section-mismatch-warning.patch
asoc-fsl-fix-snd_soc_eukrea_tlv320-build-error-on-i..patch
-arm-mmp-fix-timer_init-calls.patch
kvm-ppc-book3s-only-report-kvm_cap_spapr_tce_vfio-on.patch
mmc-bcm2835-recover-from-mmc_send_ext_csd.patch
mmc-bcm2835-reset-host-on-timeout.patch
+++ /dev/null
-From f4b56b8163f38144602bfdc9994f41d0e389a06a Mon Sep 17 00:00:00 2001
-From: Arnd Bergmann <arnd@arndb.de>
-Date: Mon, 10 Dec 2018 21:43:01 +0100
-Subject: ARM: mmp: fix timer_init calls
-
-[ Upstream commit 12d3a30db4a3b3df5fbadf5974b9cf50544a9950 ]
-
-The change to passing the timer frequency as a function argument
-was a good idea, but caused a build failure for one user that
-was missed in the update:
-
-arch/arm/mach-mmp/time.c: In function 'mmp_dt_init_timer':
-arch/arm/mach-mmp/time.c:242:2: error: implicit declaration of function 'timer_init'; did you mean 'hrtimer_init'? [-Werror=implicit-function-declaration]
-
-Change that as well to fix the build error, and rename the
-function to put it into a proper namespace and make it clearer
-what is actually going on.
-
-I saw that the high 6500000 HZ frequency was previously only
-set with CONFIG_MMP2, but is now also used with MMP (pxa910),
-so I'm changing that back here. Please make sure that the
-frequencies are all correct now.
-
-Fixes: f36797ee4380 ("ARM: mmp/mmp2: dt: enable the clock")
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm/mach-mmp/common.h | 2 +-
- arch/arm/mach-mmp/mmp2.c | 2 +-
- arch/arm/mach-mmp/pxa168.c | 2 +-
- arch/arm/mach-mmp/pxa910.c | 2 +-
- arch/arm/mach-mmp/time.c | 4 ++--
- 5 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
-index 5ac2851ef5d3..483b8b6d3005 100644
---- a/arch/arm/mach-mmp/common.h
-+++ b/arch/arm/mach-mmp/common.h
-@@ -2,7 +2,7 @@
- #include <linux/reboot.h>
- #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
-
--extern void timer_init(int irq, unsigned long rate);
-+extern void mmp_timer_init(int irq, unsigned long rate);
-
- extern void __init mmp_map_io(void);
- extern void mmp_restart(enum reboot_mode, const char *);
-diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
-index fb3e7e32c882..726c1a642dea 100644
---- a/arch/arm/mach-mmp/mmp2.c
-+++ b/arch/arm/mach-mmp/mmp2.c
-@@ -134,7 +134,7 @@ void __init mmp2_timer_init(void)
- clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
- __raw_writel(clk_rst, APBC_TIMERS);
-
-- timer_init(IRQ_MMP2_TIMER1, 6500000);
-+ mmp_timer_init(IRQ_MMP2_TIMER1, 6500000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
-index 77a358165a56..cdcf65ace3f9 100644
---- a/arch/arm/mach-mmp/pxa168.c
-+++ b/arch/arm/mach-mmp/pxa168.c
-@@ -79,7 +79,7 @@ void __init pxa168_timer_init(void)
- /* 3.25MHz, bus/functional clock enabled, release reset */
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA168_TIMER1, 6500000);
-+ mmp_timer_init(IRQ_PXA168_TIMER1, 3250000);
- }
-
- void pxa168_clear_keypad_wakeup(void)
-diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c
-index 1ccbba9ac495..d30a7d12bc98 100644
---- a/arch/arm/mach-mmp/pxa910.c
-+++ b/arch/arm/mach-mmp/pxa910.c
-@@ -116,7 +116,7 @@ void __init pxa910_timer_init(void)
- __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS);
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA910_AP1_TIMER1);
-+ mmp_timer_init(IRQ_PXA910_AP1_TIMER1, 3250000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
-index eab0fd8a7343..f9c295154b94 100644
---- a/arch/arm/mach-mmp/time.c
-+++ b/arch/arm/mach-mmp/time.c
-@@ -184,7 +184,7 @@ static struct irqaction timer_irq = {
- .dev_id = &ckevt,
- };
-
--void __init timer_init(int irq, unsigned long rate)
-+void __init mmp_timer_init(int irq, unsigned long rate)
- {
- timer_config();
-
-@@ -239,7 +239,7 @@ void __init mmp_dt_init_timer(void)
- ret = -ENOMEM;
- goto out;
- }
-- timer_init(irq, rate);
-+ mmp_timer_init(irq, rate);
- return;
- out:
- pr_err("Failed to get timer from device tree with error:%d\n", ret);
---
-2.19.1
-
+++ /dev/null
-From 598c978ea6ed63a729eea356b420a965cbc1a3ea Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Wed, 28 Nov 2018 18:53:20 +0100
-Subject: ARM: mmp/mmp2: dt: enable the clock
-
-[ Upstream commit f36797ee43802b367e59f0f9a9805304a4ff0c98 ]
-
-The device-tree booted MMP2 needs to enable the timer clock, otherwise
-it would stop ticking when the boot finishes.
-
-It can also use the clock rate from the clk, the non-DT boards need to
-keep using the hardcoded rates.
-
-Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
-Acked-by: Pavel Machek <pavel@ucw.cz>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm/mach-mmp/common.h | 2 +-
- arch/arm/mach-mmp/mmp2.c | 2 +-
- arch/arm/mach-mmp/pxa168.c | 2 +-
- arch/arm/mach-mmp/time.c | 32 ++++++++++++++++++++------------
- 4 files changed, 23 insertions(+), 15 deletions(-)
-
-diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
-index 7e284d9c429f..5ac2851ef5d3 100644
---- a/arch/arm/mach-mmp/common.h
-+++ b/arch/arm/mach-mmp/common.h
-@@ -2,7 +2,7 @@
- #include <linux/reboot.h>
- #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
-
--extern void timer_init(int irq);
-+extern void timer_init(int irq, unsigned long rate);
-
- extern void __init mmp_map_io(void);
- extern void mmp_restart(enum reboot_mode, const char *);
-diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
-index afba5460cdaf..fb3e7e32c882 100644
---- a/arch/arm/mach-mmp/mmp2.c
-+++ b/arch/arm/mach-mmp/mmp2.c
-@@ -134,7 +134,7 @@ void __init mmp2_timer_init(void)
- clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
- __raw_writel(clk_rst, APBC_TIMERS);
-
-- timer_init(IRQ_MMP2_TIMER1);
-+ timer_init(IRQ_MMP2_TIMER1, 6500000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
-index 0f5f16fb8c66..77a358165a56 100644
---- a/arch/arm/mach-mmp/pxa168.c
-+++ b/arch/arm/mach-mmp/pxa168.c
-@@ -79,7 +79,7 @@ void __init pxa168_timer_init(void)
- /* 3.25MHz, bus/functional clock enabled, release reset */
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA168_TIMER1);
-+ timer_init(IRQ_PXA168_TIMER1, 6500000);
- }
-
- void pxa168_clear_keypad_wakeup(void)
-diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
-index 96ad1db0b04b..eab0fd8a7343 100644
---- a/arch/arm/mach-mmp/time.c
-+++ b/arch/arm/mach-mmp/time.c
-@@ -22,6 +22,7 @@
- #include <linux/kernel.h>
- #include <linux/interrupt.h>
- #include <linux/clockchips.h>
-+#include <linux/clk.h>
-
- #include <linux/io.h>
- #include <linux/irq.h>
-@@ -38,12 +39,6 @@
- #include "cputype.h"
- #include "clock.h"
-
--#ifdef CONFIG_CPU_MMP2
--#define MMP_CLOCK_FREQ 6500000
--#else
--#define MMP_CLOCK_FREQ 3250000
--#endif
--
- #define TIMERS_VIRT_BASE TIMERS1_VIRT_BASE
-
- #define MAX_DELTA (0xfffffffe)
-@@ -189,19 +184,18 @@ static struct irqaction timer_irq = {
- .dev_id = &ckevt,
- };
-
--void __init timer_init(int irq)
-+void __init timer_init(int irq, unsigned long rate)
- {
- timer_config();
-
-- sched_clock_register(mmp_read_sched_clock, 32, MMP_CLOCK_FREQ);
-+ sched_clock_register(mmp_read_sched_clock, 32, rate);
-
- ckevt.cpumask = cpumask_of(0);
-
- setup_irq(irq, &timer_irq);
-
-- clocksource_register_hz(&cksrc, MMP_CLOCK_FREQ);
-- clockevents_config_and_register(&ckevt, MMP_CLOCK_FREQ,
-- MIN_DELTA, MAX_DELTA);
-+ clocksource_register_hz(&cksrc, rate);
-+ clockevents_config_and_register(&ckevt, rate, MIN_DELTA, MAX_DELTA);
- }
-
- #ifdef CONFIG_OF
-@@ -213,7 +207,9 @@ static const struct of_device_id mmp_timer_dt_ids[] = {
- void __init mmp_dt_init_timer(void)
- {
- struct device_node *np;
-+ struct clk *clk;
- int irq, ret;
-+ unsigned long rate;
-
- np = of_find_matching_node(NULL, mmp_timer_dt_ids);
- if (!np) {
-@@ -221,6 +217,18 @@ void __init mmp_dt_init_timer(void)
- goto out;
- }
-
-+ clk = of_clk_get(np, 0);
-+ if (!IS_ERR(clk)) {
-+ ret = clk_prepare_enable(clk);
-+ if (ret)
-+ goto out;
-+ rate = clk_get_rate(clk) / 2;
-+ } else if (cpu_is_pj4()) {
-+ rate = 6500000;
-+ } else {
-+ rate = 3250000;
-+ }
-+
- irq = irq_of_parse_and_map(np, 0);
- if (!irq) {
- ret = -EINVAL;
-@@ -231,7 +239,7 @@ void __init mmp_dt_init_timer(void)
- ret = -ENOMEM;
- goto out;
- }
-- timer_init(irq);
-+ timer_init(irq, rate);
- return;
- out:
- pr_err("Failed to get timer from device tree with error:%d\n", ret);
---
-2.19.1
-
arm64-ftrace-don-t-adjust-the-lr-value.patch
drm-v3d-fix-prime-imports-of-buffers-from-other-driv.patch
arm-dts-mmp2-fix-twsi2.patch
-arm-mmp-mmp2-dt-enable-the-clock.patch
arm-dts-aspeed-add-missing-memory-unit-address.patch
x86-fpu-add-might_fault-to-user_insn.patch
media-i2c-tda1997x-select-config_hdmi.patch
selftests-bpf-use-__bpf_constant_htons-in-test_prog..patch
arm-pxa-avoid-section-mismatch-warning.patch
asoc-fsl-fix-snd_soc_eukrea_tlv320-build-error-on-i..patch
-arm-mmp-fix-timer_init-calls.patch
kvm-ppc-book3s-only-report-kvm_cap_spapr_tce_vfio-on.patch
mmc-bcm2835-recover-from-mmc_send_ext_csd.patch
mmc-bcm2835-reset-host-on-timeout.patch
+++ /dev/null
-From 48b14d36de26e61a479a22e34efdd9fdb21d1708 Mon Sep 17 00:00:00 2001
-From: Arnd Bergmann <arnd@arndb.de>
-Date: Mon, 10 Dec 2018 21:43:01 +0100
-Subject: ARM: mmp: fix timer_init calls
-
-[ Upstream commit 12d3a30db4a3b3df5fbadf5974b9cf50544a9950 ]
-
-The change to passing the timer frequency as a function argument
-was a good idea, but caused a build failure for one user that
-was missed in the update:
-
-arch/arm/mach-mmp/time.c: In function 'mmp_dt_init_timer':
-arch/arm/mach-mmp/time.c:242:2: error: implicit declaration of function 'timer_init'; did you mean 'hrtimer_init'? [-Werror=implicit-function-declaration]
-
-Change that as well to fix the build error, and rename the
-function to put it into a proper namespace and make it clearer
-what is actually going on.
-
-I saw that the high 6500000 HZ frequency was previously only
-set with CONFIG_MMP2, but is now also used with MMP (pxa910),
-so I'm changing that back here. Please make sure that the
-frequencies are all correct now.
-
-Fixes: f36797ee4380 ("ARM: mmp/mmp2: dt: enable the clock")
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm/mach-mmp/common.h | 2 +-
- arch/arm/mach-mmp/mmp2.c | 2 +-
- arch/arm/mach-mmp/pxa168.c | 2 +-
- arch/arm/mach-mmp/pxa910.c | 2 +-
- arch/arm/mach-mmp/time.c | 4 ++--
- 5 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
-index 5ac2851ef5d3..483b8b6d3005 100644
---- a/arch/arm/mach-mmp/common.h
-+++ b/arch/arm/mach-mmp/common.h
-@@ -2,7 +2,7 @@
- #include <linux/reboot.h>
- #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
-
--extern void timer_init(int irq, unsigned long rate);
-+extern void mmp_timer_init(int irq, unsigned long rate);
-
- extern void __init mmp_map_io(void);
- extern void mmp_restart(enum reboot_mode, const char *);
-diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
-index fb3e7e32c882..726c1a642dea 100644
---- a/arch/arm/mach-mmp/mmp2.c
-+++ b/arch/arm/mach-mmp/mmp2.c
-@@ -134,7 +134,7 @@ void __init mmp2_timer_init(void)
- clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
- __raw_writel(clk_rst, APBC_TIMERS);
-
-- timer_init(IRQ_MMP2_TIMER1, 6500000);
-+ mmp_timer_init(IRQ_MMP2_TIMER1, 6500000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
-index 77a358165a56..cdcf65ace3f9 100644
---- a/arch/arm/mach-mmp/pxa168.c
-+++ b/arch/arm/mach-mmp/pxa168.c
-@@ -79,7 +79,7 @@ void __init pxa168_timer_init(void)
- /* 3.25MHz, bus/functional clock enabled, release reset */
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA168_TIMER1, 6500000);
-+ mmp_timer_init(IRQ_PXA168_TIMER1, 3250000);
- }
-
- void pxa168_clear_keypad_wakeup(void)
-diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c
-index 1ccbba9ac495..d30a7d12bc98 100644
---- a/arch/arm/mach-mmp/pxa910.c
-+++ b/arch/arm/mach-mmp/pxa910.c
-@@ -116,7 +116,7 @@ void __init pxa910_timer_init(void)
- __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS);
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA910_AP1_TIMER1);
-+ mmp_timer_init(IRQ_PXA910_AP1_TIMER1, 3250000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
-index eab0fd8a7343..f9c295154b94 100644
---- a/arch/arm/mach-mmp/time.c
-+++ b/arch/arm/mach-mmp/time.c
-@@ -184,7 +184,7 @@ static struct irqaction timer_irq = {
- .dev_id = &ckevt,
- };
-
--void __init timer_init(int irq, unsigned long rate)
-+void __init mmp_timer_init(int irq, unsigned long rate)
- {
- timer_config();
-
-@@ -239,7 +239,7 @@ void __init mmp_dt_init_timer(void)
- ret = -ENOMEM;
- goto out;
- }
-- timer_init(irq, rate);
-+ mmp_timer_init(irq, rate);
- return;
- out:
- pr_err("Failed to get timer from device tree with error:%d\n", ret);
---
-2.19.1
-
+++ /dev/null
-From 34ed2fa16180c38b85f398809e6a02defa3a247c Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Wed, 28 Nov 2018 18:53:20 +0100
-Subject: ARM: mmp/mmp2: dt: enable the clock
-
-[ Upstream commit f36797ee43802b367e59f0f9a9805304a4ff0c98 ]
-
-The device-tree booted MMP2 needs to enable the timer clock, otherwise
-it would stop ticking when the boot finishes.
-
-It can also use the clock rate from the clk, the non-DT boards need to
-keep using the hardcoded rates.
-
-Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
-Acked-by: Pavel Machek <pavel@ucw.cz>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm/mach-mmp/common.h | 2 +-
- arch/arm/mach-mmp/mmp2.c | 2 +-
- arch/arm/mach-mmp/pxa168.c | 2 +-
- arch/arm/mach-mmp/time.c | 32 ++++++++++++++++++++------------
- 4 files changed, 23 insertions(+), 15 deletions(-)
-
-diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
-index 7e284d9c429f..5ac2851ef5d3 100644
---- a/arch/arm/mach-mmp/common.h
-+++ b/arch/arm/mach-mmp/common.h
-@@ -2,7 +2,7 @@
- #include <linux/reboot.h>
- #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
-
--extern void timer_init(int irq);
-+extern void timer_init(int irq, unsigned long rate);
-
- extern void __init mmp_map_io(void);
- extern void mmp_restart(enum reboot_mode, const char *);
-diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
-index afba5460cdaf..fb3e7e32c882 100644
---- a/arch/arm/mach-mmp/mmp2.c
-+++ b/arch/arm/mach-mmp/mmp2.c
-@@ -134,7 +134,7 @@ void __init mmp2_timer_init(void)
- clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
- __raw_writel(clk_rst, APBC_TIMERS);
-
-- timer_init(IRQ_MMP2_TIMER1);
-+ timer_init(IRQ_MMP2_TIMER1, 6500000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
-index 0f5f16fb8c66..77a358165a56 100644
---- a/arch/arm/mach-mmp/pxa168.c
-+++ b/arch/arm/mach-mmp/pxa168.c
-@@ -79,7 +79,7 @@ void __init pxa168_timer_init(void)
- /* 3.25MHz, bus/functional clock enabled, release reset */
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA168_TIMER1);
-+ timer_init(IRQ_PXA168_TIMER1, 6500000);
- }
-
- void pxa168_clear_keypad_wakeup(void)
-diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
-index 96ad1db0b04b..eab0fd8a7343 100644
---- a/arch/arm/mach-mmp/time.c
-+++ b/arch/arm/mach-mmp/time.c
-@@ -22,6 +22,7 @@
- #include <linux/kernel.h>
- #include <linux/interrupt.h>
- #include <linux/clockchips.h>
-+#include <linux/clk.h>
-
- #include <linux/io.h>
- #include <linux/irq.h>
-@@ -38,12 +39,6 @@
- #include "cputype.h"
- #include "clock.h"
-
--#ifdef CONFIG_CPU_MMP2
--#define MMP_CLOCK_FREQ 6500000
--#else
--#define MMP_CLOCK_FREQ 3250000
--#endif
--
- #define TIMERS_VIRT_BASE TIMERS1_VIRT_BASE
-
- #define MAX_DELTA (0xfffffffe)
-@@ -189,19 +184,18 @@ static struct irqaction timer_irq = {
- .dev_id = &ckevt,
- };
-
--void __init timer_init(int irq)
-+void __init timer_init(int irq, unsigned long rate)
- {
- timer_config();
-
-- sched_clock_register(mmp_read_sched_clock, 32, MMP_CLOCK_FREQ);
-+ sched_clock_register(mmp_read_sched_clock, 32, rate);
-
- ckevt.cpumask = cpumask_of(0);
-
- setup_irq(irq, &timer_irq);
-
-- clocksource_register_hz(&cksrc, MMP_CLOCK_FREQ);
-- clockevents_config_and_register(&ckevt, MMP_CLOCK_FREQ,
-- MIN_DELTA, MAX_DELTA);
-+ clocksource_register_hz(&cksrc, rate);
-+ clockevents_config_and_register(&ckevt, rate, MIN_DELTA, MAX_DELTA);
- }
-
- #ifdef CONFIG_OF
-@@ -213,7 +207,9 @@ static const struct of_device_id mmp_timer_dt_ids[] = {
- void __init mmp_dt_init_timer(void)
- {
- struct device_node *np;
-+ struct clk *clk;
- int irq, ret;
-+ unsigned long rate;
-
- np = of_find_matching_node(NULL, mmp_timer_dt_ids);
- if (!np) {
-@@ -221,6 +217,18 @@ void __init mmp_dt_init_timer(void)
- goto out;
- }
-
-+ clk = of_clk_get(np, 0);
-+ if (!IS_ERR(clk)) {
-+ ret = clk_prepare_enable(clk);
-+ if (ret)
-+ goto out;
-+ rate = clk_get_rate(clk) / 2;
-+ } else if (cpu_is_pj4()) {
-+ rate = 6500000;
-+ } else {
-+ rate = 3250000;
-+ }
-+
- irq = irq_of_parse_and_map(np, 0);
- if (!irq) {
- ret = -EINVAL;
-@@ -231,7 +239,7 @@ void __init mmp_dt_init_timer(void)
- ret = -ENOMEM;
- goto out;
- }
-- timer_init(irq);
-+ timer_init(irq, rate);
- return;
- out:
- pr_err("Failed to get timer from device tree with error:%d\n", ret);
---
-2.19.1
-
arm64-ftrace-don-t-adjust-the-lr-value.patch
drm-v3d-fix-prime-imports-of-buffers-from-other-driv.patch
arm-dts-mmp2-fix-twsi2.patch
-arm-mmp-mmp2-dt-enable-the-clock.patch
arm-dts-aspeed-add-missing-memory-unit-address.patch
spi-fix-spi-at91-usart.c-build-errors-when-pinctrl-i.patch
x86-fpu-add-might_fault-to-user_insn.patch
selftests-bpf-use-__bpf_constant_htons-in-test_prog..patch
arm-pxa-avoid-section-mismatch-warning.patch
asoc-fsl-fix-snd_soc_eukrea_tlv320-build-error-on-i..patch
-arm-mmp-fix-timer_init-calls.patch
fix-dma-buf-udmabuf-selftest.patch
clk-qcom-leave-mmss-noc-on-for-8998.patch
f2fs-fix-to-reorder-set_page_dirty-and-wait_on_page_.patch
+++ /dev/null
-From 95180d9a3dc00d5e738a282497ff7291cf0701db Mon Sep 17 00:00:00 2001
-From: Arnd Bergmann <arnd@arndb.de>
-Date: Mon, 10 Dec 2018 21:43:01 +0100
-Subject: ARM: mmp: fix timer_init calls
-
-[ Upstream commit 12d3a30db4a3b3df5fbadf5974b9cf50544a9950 ]
-
-The change to passing the timer frequency as a function argument
-was a good idea, but caused a build failure for one user that
-was missed in the update:
-
-arch/arm/mach-mmp/time.c: In function 'mmp_dt_init_timer':
-arch/arm/mach-mmp/time.c:242:2: error: implicit declaration of function 'timer_init'; did you mean 'hrtimer_init'? [-Werror=implicit-function-declaration]
-
-Change that as well to fix the build error, and rename the
-function to put it into a proper namespace and make it clearer
-what is actually going on.
-
-I saw that the high 6500000 HZ frequency was previously only
-set with CONFIG_MMP2, but is now also used with MMP (pxa910),
-so I'm changing that back here. Please make sure that the
-frequencies are all correct now.
-
-Fixes: f36797ee4380 ("ARM: mmp/mmp2: dt: enable the clock")
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm/mach-mmp/common.h | 2 +-
- arch/arm/mach-mmp/mmp2.c | 2 +-
- arch/arm/mach-mmp/pxa168.c | 2 +-
- arch/arm/mach-mmp/pxa910.c | 2 +-
- arch/arm/mach-mmp/time.c | 4 ++--
- 5 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
-index 69c7eec6d1e0..10779ab9d55f 100644
---- a/arch/arm/mach-mmp/common.h
-+++ b/arch/arm/mach-mmp/common.h
-@@ -1,7 +1,7 @@
- #include <linux/reboot.h>
- #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
-
--extern void timer_init(int irq, unsigned long rate);
-+extern void mmp_timer_init(int irq, unsigned long rate);
-
- extern void __init mmp_map_io(void);
- extern void mmp_restart(enum reboot_mode, const char *);
-diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
-index 90a0d8114af2..c02a1f14aa02 100644
---- a/arch/arm/mach-mmp/mmp2.c
-+++ b/arch/arm/mach-mmp/mmp2.c
-@@ -133,7 +133,7 @@ void __init mmp2_timer_init(void)
- clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
- __raw_writel(clk_rst, APBC_TIMERS);
-
-- timer_init(IRQ_MMP2_TIMER1, 6500000);
-+ mmp_timer_init(IRQ_MMP2_TIMER1, 6500000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
-index 5a616db7f392..94230041ec8f 100644
---- a/arch/arm/mach-mmp/pxa168.c
-+++ b/arch/arm/mach-mmp/pxa168.c
-@@ -78,7 +78,7 @@ void __init pxa168_timer_init(void)
- /* 3.25MHz, bus/functional clock enabled, release reset */
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA168_TIMER1, 6500000);
-+ mmp_timer_init(IRQ_PXA168_TIMER1, 3250000);
- }
-
- void pxa168_clear_keypad_wakeup(void)
-diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c
-index eb57ee196842..6b002763721d 100644
---- a/arch/arm/mach-mmp/pxa910.c
-+++ b/arch/arm/mach-mmp/pxa910.c
-@@ -114,7 +114,7 @@ void __init pxa910_timer_init(void)
- __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS);
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA910_AP1_TIMER1);
-+ mmp_timer_init(IRQ_PXA910_AP1_TIMER1, 3250000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
-index 7e7520a9eddb..a9bc5a739e63 100644
---- a/arch/arm/mach-mmp/time.c
-+++ b/arch/arm/mach-mmp/time.c
-@@ -185,7 +185,7 @@ static struct irqaction timer_irq = {
- .dev_id = &ckevt,
- };
-
--void __init timer_init(int irq, unsigned long rate)
-+void __init mmp_timer_init(int irq, unsigned long rate)
- {
- timer_config();
-
-@@ -240,7 +240,7 @@ void __init mmp_dt_init_timer(void)
- ret = -ENOMEM;
- goto out;
- }
-- timer_init(irq, rate);
-+ mmp_timer_init(irq, rate);
- return;
- out:
- pr_err("Failed to get timer from device tree with error:%d\n", ret);
---
-2.19.1
-
+++ /dev/null
-From c089c1797e57bb9d449e0bab50ed2f38d1ce7357 Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Wed, 28 Nov 2018 18:53:20 +0100
-Subject: ARM: mmp/mmp2: dt: enable the clock
-
-[ Upstream commit f36797ee43802b367e59f0f9a9805304a4ff0c98 ]
-
-The device-tree booted MMP2 needs to enable the timer clock, otherwise
-it would stop ticking when the boot finishes.
-
-It can also use the clock rate from the clk, the non-DT boards need to
-keep using the hardcoded rates.
-
-Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
-Acked-by: Pavel Machek <pavel@ucw.cz>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm/mach-mmp/common.h | 2 +-
- arch/arm/mach-mmp/mmp2.c | 2 +-
- arch/arm/mach-mmp/pxa168.c | 2 +-
- arch/arm/mach-mmp/time.c | 32 ++++++++++++++++++++------------
- 4 files changed, 23 insertions(+), 15 deletions(-)
-
-diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
-index cf445bae6d77..69c7eec6d1e0 100644
---- a/arch/arm/mach-mmp/common.h
-+++ b/arch/arm/mach-mmp/common.h
-@@ -1,7 +1,7 @@
- #include <linux/reboot.h>
- #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
-
--extern void timer_init(int irq);
-+extern void timer_init(int irq, unsigned long rate);
-
- extern void __init mmp_map_io(void);
- extern void mmp_restart(enum reboot_mode, const char *);
-diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
-index a70b5530bd42..90a0d8114af2 100644
---- a/arch/arm/mach-mmp/mmp2.c
-+++ b/arch/arm/mach-mmp/mmp2.c
-@@ -133,7 +133,7 @@ void __init mmp2_timer_init(void)
- clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
- __raw_writel(clk_rst, APBC_TIMERS);
-
-- timer_init(IRQ_MMP2_TIMER1);
-+ timer_init(IRQ_MMP2_TIMER1, 6500000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
-index 144e997624c0..5a616db7f392 100644
---- a/arch/arm/mach-mmp/pxa168.c
-+++ b/arch/arm/mach-mmp/pxa168.c
-@@ -78,7 +78,7 @@ void __init pxa168_timer_init(void)
- /* 3.25MHz, bus/functional clock enabled, release reset */
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA168_TIMER1);
-+ timer_init(IRQ_PXA168_TIMER1, 6500000);
- }
-
- void pxa168_clear_keypad_wakeup(void)
-diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
-index dbc697b2fda1..7e7520a9eddb 100644
---- a/arch/arm/mach-mmp/time.c
-+++ b/arch/arm/mach-mmp/time.c
-@@ -22,6 +22,7 @@
- #include <linux/kernel.h>
- #include <linux/interrupt.h>
- #include <linux/clockchips.h>
-+#include <linux/clk.h>
-
- #include <linux/io.h>
- #include <linux/irq.h>
-@@ -39,12 +40,6 @@
-
- #include "clock.h"
-
--#ifdef CONFIG_CPU_MMP2
--#define MMP_CLOCK_FREQ 6500000
--#else
--#define MMP_CLOCK_FREQ 3250000
--#endif
--
- #define TIMERS_VIRT_BASE TIMERS1_VIRT_BASE
-
- #define MAX_DELTA (0xfffffffe)
-@@ -190,19 +185,18 @@ static struct irqaction timer_irq = {
- .dev_id = &ckevt,
- };
-
--void __init timer_init(int irq)
-+void __init timer_init(int irq, unsigned long rate)
- {
- timer_config();
-
-- sched_clock_register(mmp_read_sched_clock, 32, MMP_CLOCK_FREQ);
-+ sched_clock_register(mmp_read_sched_clock, 32, rate);
-
- ckevt.cpumask = cpumask_of(0);
-
- setup_irq(irq, &timer_irq);
-
-- clocksource_register_hz(&cksrc, MMP_CLOCK_FREQ);
-- clockevents_config_and_register(&ckevt, MMP_CLOCK_FREQ,
-- MIN_DELTA, MAX_DELTA);
-+ clocksource_register_hz(&cksrc, rate);
-+ clockevents_config_and_register(&ckevt, rate, MIN_DELTA, MAX_DELTA);
- }
-
- #ifdef CONFIG_OF
-@@ -214,7 +208,9 @@ static const struct of_device_id mmp_timer_dt_ids[] = {
- void __init mmp_dt_init_timer(void)
- {
- struct device_node *np;
-+ struct clk *clk;
- int irq, ret;
-+ unsigned long rate;
-
- np = of_find_matching_node(NULL, mmp_timer_dt_ids);
- if (!np) {
-@@ -222,6 +218,18 @@ void __init mmp_dt_init_timer(void)
- goto out;
- }
-
-+ clk = of_clk_get(np, 0);
-+ if (!IS_ERR(clk)) {
-+ ret = clk_prepare_enable(clk);
-+ if (ret)
-+ goto out;
-+ rate = clk_get_rate(clk) / 2;
-+ } else if (cpu_is_pj4()) {
-+ rate = 6500000;
-+ } else {
-+ rate = 3250000;
-+ }
-+
- irq = irq_of_parse_and_map(np, 0);
- if (!irq) {
- ret = -EINVAL;
-@@ -232,7 +240,7 @@ void __init mmp_dt_init_timer(void)
- ret = -ENOMEM;
- goto out;
- }
-- timer_init(irq);
-+ timer_init(irq, rate);
- return;
- out:
- pr_err("Failed to get timer from device tree with error:%d\n", ret);
---
-2.19.1
-
nfsd4-fix-crash-on-writing-v4_end_grace-before-nfsd-.patch
arm64-ftrace-don-t-adjust-the-lr-value.patch
arm-dts-mmp2-fix-twsi2.patch
-arm-mmp-mmp2-dt-enable-the-clock.patch
x86-fpu-add-might_fault-to-user_insn.patch
media-davinci-vpbe-fix-error-handling-in-vpbe_initia.patch
smack-fix-access-permissions-for-keyring.patch
udf-fix-bug-on-corrupted-inode.patch
arm-pxa-avoid-section-mismatch-warning.patch
asoc-fsl-fix-snd_soc_eukrea_tlv320-build-error-on-i..patch
-arm-mmp-fix-timer_init-calls.patch
memstick-prevent-memstick-host-from-getting-runtime-.patch
tty-serial-samsung-properly-set-flags-in-autocts-mod.patch
arm64-kvm-skip-mmio-insn-after-emulation.patch
+++ /dev/null
-From 422047616e6f15c3944834c9447c6c6f260db73e Mon Sep 17 00:00:00 2001
-From: Arnd Bergmann <arnd@arndb.de>
-Date: Mon, 10 Dec 2018 21:43:01 +0100
-Subject: ARM: mmp: fix timer_init calls
-
-[ Upstream commit 12d3a30db4a3b3df5fbadf5974b9cf50544a9950 ]
-
-The change to passing the timer frequency as a function argument
-was a good idea, but caused a build failure for one user that
-was missed in the update:
-
-arch/arm/mach-mmp/time.c: In function 'mmp_dt_init_timer':
-arch/arm/mach-mmp/time.c:242:2: error: implicit declaration of function 'timer_init'; did you mean 'hrtimer_init'? [-Werror=implicit-function-declaration]
-
-Change that as well to fix the build error, and rename the
-function to put it into a proper namespace and make it clearer
-what is actually going on.
-
-I saw that the high 6500000 HZ frequency was previously only
-set with CONFIG_MMP2, but is now also used with MMP (pxa910),
-so I'm changing that back here. Please make sure that the
-frequencies are all correct now.
-
-Fixes: f36797ee4380 ("ARM: mmp/mmp2: dt: enable the clock")
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm/mach-mmp/common.h | 2 +-
- arch/arm/mach-mmp/mmp2.c | 2 +-
- arch/arm/mach-mmp/pxa168.c | 2 +-
- arch/arm/mach-mmp/pxa910.c | 2 +-
- arch/arm/mach-mmp/time.c | 4 ++--
- 5 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
-index 9ffc0e4a87bf..f0f5170cacf0 100644
---- a/arch/arm/mach-mmp/common.h
-+++ b/arch/arm/mach-mmp/common.h
-@@ -1,7 +1,7 @@
- #include <linux/reboot.h>
- #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
-
--extern void timer_init(int irq, unsigned long rate);
-+extern void mmp_timer_init(int irq, unsigned long rate);
-
- extern void __init mmp_map_io(void);
- extern void mmp_restart(enum reboot_mode, const char *);
-diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
-index fb3e7e32c882..726c1a642dea 100644
---- a/arch/arm/mach-mmp/mmp2.c
-+++ b/arch/arm/mach-mmp/mmp2.c
-@@ -134,7 +134,7 @@ void __init mmp2_timer_init(void)
- clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
- __raw_writel(clk_rst, APBC_TIMERS);
-
-- timer_init(IRQ_MMP2_TIMER1, 6500000);
-+ mmp_timer_init(IRQ_MMP2_TIMER1, 6500000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
-index 77a358165a56..cdcf65ace3f9 100644
---- a/arch/arm/mach-mmp/pxa168.c
-+++ b/arch/arm/mach-mmp/pxa168.c
-@@ -79,7 +79,7 @@ void __init pxa168_timer_init(void)
- /* 3.25MHz, bus/functional clock enabled, release reset */
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA168_TIMER1, 6500000);
-+ mmp_timer_init(IRQ_PXA168_TIMER1, 3250000);
- }
-
- void pxa168_clear_keypad_wakeup(void)
-diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c
-index 1ccbba9ac495..d30a7d12bc98 100644
---- a/arch/arm/mach-mmp/pxa910.c
-+++ b/arch/arm/mach-mmp/pxa910.c
-@@ -116,7 +116,7 @@ void __init pxa910_timer_init(void)
- __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS);
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA910_AP1_TIMER1);
-+ mmp_timer_init(IRQ_PXA910_AP1_TIMER1, 3250000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
-index 5f849cb996c7..c03ca8ffb92f 100644
---- a/arch/arm/mach-mmp/time.c
-+++ b/arch/arm/mach-mmp/time.c
-@@ -184,7 +184,7 @@ static struct irqaction timer_irq = {
- .dev_id = &ckevt,
- };
-
--void __init timer_init(int irq, unsigned long rate)
-+void __init mmp_timer_init(int irq, unsigned long rate)
- {
- timer_config();
-
-@@ -239,7 +239,7 @@ void __init mmp_dt_init_timer(void)
- ret = -ENOMEM;
- goto out;
- }
-- timer_init(irq, rate);
-+ mmp_timer_init(irq, rate);
- return;
- out:
- pr_err("Failed to get timer from device tree with error:%d\n", ret);
---
-2.19.1
-
+++ /dev/null
-From 48332f50eff0c3102d2d16630934515e705358f7 Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Wed, 28 Nov 2018 18:53:20 +0100
-Subject: ARM: mmp/mmp2: dt: enable the clock
-
-[ Upstream commit f36797ee43802b367e59f0f9a9805304a4ff0c98 ]
-
-The device-tree booted MMP2 needs to enable the timer clock, otherwise
-it would stop ticking when the boot finishes.
-
-It can also use the clock rate from the clk, the non-DT boards need to
-keep using the hardcoded rates.
-
-Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
-Acked-by: Pavel Machek <pavel@ucw.cz>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/arm/mach-mmp/common.h | 2 +-
- arch/arm/mach-mmp/mmp2.c | 2 +-
- arch/arm/mach-mmp/pxa168.c | 2 +-
- arch/arm/mach-mmp/time.c | 32 ++++++++++++++++++++------------
- 4 files changed, 23 insertions(+), 15 deletions(-)
-
-diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
-index 7453a90c34bd..9ffc0e4a87bf 100644
---- a/arch/arm/mach-mmp/common.h
-+++ b/arch/arm/mach-mmp/common.h
-@@ -1,7 +1,7 @@
- #include <linux/reboot.h>
- #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
-
--extern void timer_init(int irq);
-+extern void timer_init(int irq, unsigned long rate);
-
- extern void __init mmp_map_io(void);
- extern void mmp_restart(enum reboot_mode, const char *);
-diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
-index afba5460cdaf..fb3e7e32c882 100644
---- a/arch/arm/mach-mmp/mmp2.c
-+++ b/arch/arm/mach-mmp/mmp2.c
-@@ -134,7 +134,7 @@ void __init mmp2_timer_init(void)
- clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
- __raw_writel(clk_rst, APBC_TIMERS);
-
-- timer_init(IRQ_MMP2_TIMER1);
-+ timer_init(IRQ_MMP2_TIMER1, 6500000);
- }
-
- /* on-chip devices */
-diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
-index 0f5f16fb8c66..77a358165a56 100644
---- a/arch/arm/mach-mmp/pxa168.c
-+++ b/arch/arm/mach-mmp/pxa168.c
-@@ -79,7 +79,7 @@ void __init pxa168_timer_init(void)
- /* 3.25MHz, bus/functional clock enabled, release reset */
- __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
-
-- timer_init(IRQ_PXA168_TIMER1);
-+ timer_init(IRQ_PXA168_TIMER1, 6500000);
- }
-
- void pxa168_clear_keypad_wakeup(void)
-diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
-index 3c2c92aaa0ae..5f849cb996c7 100644
---- a/arch/arm/mach-mmp/time.c
-+++ b/arch/arm/mach-mmp/time.c
-@@ -22,6 +22,7 @@
- #include <linux/kernel.h>
- #include <linux/interrupt.h>
- #include <linux/clockchips.h>
-+#include <linux/clk.h>
-
- #include <linux/io.h>
- #include <linux/irq.h>
-@@ -38,12 +39,6 @@
- #include "cputype.h"
- #include "clock.h"
-
--#ifdef CONFIG_CPU_MMP2
--#define MMP_CLOCK_FREQ 6500000
--#else
--#define MMP_CLOCK_FREQ 3250000
--#endif
--
- #define TIMERS_VIRT_BASE TIMERS1_VIRT_BASE
-
- #define MAX_DELTA (0xfffffffe)
-@@ -189,19 +184,18 @@ static struct irqaction timer_irq = {
- .dev_id = &ckevt,
- };
-
--void __init timer_init(int irq)
-+void __init timer_init(int irq, unsigned long rate)
- {
- timer_config();
-
-- sched_clock_register(mmp_read_sched_clock, 32, MMP_CLOCK_FREQ);
-+ sched_clock_register(mmp_read_sched_clock, 32, rate);
-
- ckevt.cpumask = cpumask_of(0);
-
- setup_irq(irq, &timer_irq);
-
-- clocksource_register_hz(&cksrc, MMP_CLOCK_FREQ);
-- clockevents_config_and_register(&ckevt, MMP_CLOCK_FREQ,
-- MIN_DELTA, MAX_DELTA);
-+ clocksource_register_hz(&cksrc, rate);
-+ clockevents_config_and_register(&ckevt, rate, MIN_DELTA, MAX_DELTA);
- }
-
- #ifdef CONFIG_OF
-@@ -213,7 +207,9 @@ static const struct of_device_id mmp_timer_dt_ids[] = {
- void __init mmp_dt_init_timer(void)
- {
- struct device_node *np;
-+ struct clk *clk;
- int irq, ret;
-+ unsigned long rate;
-
- np = of_find_matching_node(NULL, mmp_timer_dt_ids);
- if (!np) {
-@@ -221,6 +217,18 @@ void __init mmp_dt_init_timer(void)
- goto out;
- }
-
-+ clk = of_clk_get(np, 0);
-+ if (!IS_ERR(clk)) {
-+ ret = clk_prepare_enable(clk);
-+ if (ret)
-+ goto out;
-+ rate = clk_get_rate(clk) / 2;
-+ } else if (cpu_is_pj4()) {
-+ rate = 6500000;
-+ } else {
-+ rate = 3250000;
-+ }
-+
- irq = irq_of_parse_and_map(np, 0);
- if (!irq) {
- ret = -EINVAL;
-@@ -231,7 +239,7 @@ void __init mmp_dt_init_timer(void)
- ret = -ENOMEM;
- goto out;
- }
-- timer_init(irq);
-+ timer_init(irq, rate);
- return;
- out:
- pr_err("Failed to get timer from device tree with error:%d\n", ret);
---
-2.19.1
-
firmware-efi-add-null-pointer-checks-in-efivars-api-.patch
arm64-ftrace-don-t-adjust-the-lr-value.patch
arm-dts-mmp2-fix-twsi2.patch
-arm-mmp-mmp2-dt-enable-the-clock.patch
x86-fpu-add-might_fault-to-user_insn.patch
media-davinci-vpbe-fix-error-handling-in-vpbe_initia.patch
smack-fix-access-permissions-for-keyring.patch
udf-fix-bug-on-corrupted-inode.patch
arm-pxa-avoid-section-mismatch-warning.patch
asoc-fsl-fix-snd_soc_eukrea_tlv320-build-error-on-i..patch
-arm-mmp-fix-timer_init-calls.patch
memstick-prevent-memstick-host-from-getting-runtime-.patch
tty-serial-samsung-properly-set-flags-in-autocts-mod.patch
perf-header-fix-unchecked-usage-of-strncpy.patch