From: Greg Kroah-Hartman Date: Tue, 12 Feb 2019 09:00:11 +0000 (+0100) Subject: drop arm-mmp-mmp2-dt-enable-the-clock.patch and it's fixup from everywhere X-Git-Tag: v4.9.156~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4fb95498a922b3669feb96cc49d0eb60d3458d16;p=thirdparty%2Fkernel%2Fstable-queue.git drop arm-mmp-mmp2-dt-enable-the-clock.patch and it's fixup from everywhere --- diff --git a/queue-3.18/arm-mmp-fix-timer_init-calls.patch b/queue-3.18/arm-mmp-fix-timer_init-calls.patch deleted file mode 100644 index 4c3b6b3c6e6..00000000000 --- a/queue-3.18/arm-mmp-fix-timer_init-calls.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 233638cf845332de3f12c566962e8b31d91d9acb Mon Sep 17 00:00:00 2001 -From: Arnd Bergmann -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 -Signed-off-by: Olof Johansson -Signed-off-by: Sasha Levin ---- - 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 - #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 - diff --git a/queue-3.18/arm-mmp-mmp2-dt-enable-the-clock.patch b/queue-3.18/arm-mmp-mmp2-dt-enable-the-clock.patch deleted file mode 100644 index 57a13f97793..00000000000 --- a/queue-3.18/arm-mmp-mmp2-dt-enable-the-clock.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 35514917b569152232f712866107ab693819860b Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 -Acked-by: Pavel Machek -Signed-off-by: Olof Johansson -Signed-off-by: Sasha Levin ---- - 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 - #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 - #include - #include -+#include - - #include - #include -@@ -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 - diff --git a/queue-3.18/series b/queue-3.18/series index 18e198d6cd2..671e22ff05a 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -13,7 +13,6 @@ soc-tegra-don-t-leak-device-tree-node-reference.patch 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 @@ -26,7 +25,6 @@ cpuidle-big.little-fix-refcount-leak.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 diff --git a/queue-4.14/arm-mmp-fix-timer_init-calls.patch b/queue-4.14/arm-mmp-fix-timer_init-calls.patch deleted file mode 100644 index 43de4af8c13..00000000000 --- a/queue-4.14/arm-mmp-fix-timer_init-calls.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 37505999896141fee397b0ba93c3dc98b8c4a9e5 Mon Sep 17 00:00:00 2001 -From: Arnd Bergmann -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 -Signed-off-by: Olof Johansson -Signed-off-by: Sasha Levin ---- - 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 - #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 - diff --git a/queue-4.14/arm-mmp-mmp2-dt-enable-the-clock.patch b/queue-4.14/arm-mmp-mmp2-dt-enable-the-clock.patch deleted file mode 100644 index b4182be0e29..00000000000 --- a/queue-4.14/arm-mmp-mmp2-dt-enable-the-clock.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 81bd1f5159f8bac885757894d9b85070f75c9b9a Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 -Acked-by: Pavel Machek -Signed-off-by: Olof Johansson -Signed-off-by: Sasha Levin ---- - 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 - #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 - #include - #include -+#include - - #include - #include -@@ -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 - diff --git a/queue-4.14/series b/queue-4.14/series index 8c7903516d4..bdf513b6324 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -54,7 +54,6 @@ firmware-efi-add-null-pointer-checks-in-efivars-api-.patch 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 @@ -88,7 +87,6 @@ switchtec-fix-switchtec_ioctl_event_idx_all-flags-ov.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 diff --git a/queue-4.19/arm-mmp-fix-timer_init-calls.patch b/queue-4.19/arm-mmp-fix-timer_init-calls.patch deleted file mode 100644 index 642920b9fc5..00000000000 --- a/queue-4.19/arm-mmp-fix-timer_init-calls.patch +++ /dev/null @@ -1,112 +0,0 @@ -From f4b56b8163f38144602bfdc9994f41d0e389a06a Mon Sep 17 00:00:00 2001 -From: Arnd Bergmann -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 -Signed-off-by: Olof Johansson -Signed-off-by: Sasha Levin ---- - 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 - #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 - diff --git a/queue-4.19/arm-mmp-mmp2-dt-enable-the-clock.patch b/queue-4.19/arm-mmp-mmp2-dt-enable-the-clock.patch deleted file mode 100644 index ddbb36234d6..00000000000 --- a/queue-4.19/arm-mmp-mmp2-dt-enable-the-clock.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 598c978ea6ed63a729eea356b420a965cbc1a3ea Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 -Acked-by: Pavel Machek -Signed-off-by: Olof Johansson -Signed-off-by: Sasha Levin ---- - 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 - #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 - #include - #include -+#include - - #include - #include -@@ -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 - diff --git a/queue-4.19/series b/queue-4.19/series index 4d1d29db7e4..dbe8adbef75 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -83,7 +83,6 @@ mt76x0-dfs-fix-ibi_r11-configuration-on-non-radar-ch.patch 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 @@ -135,7 +134,6 @@ switchtec-fix-switchtec_ioctl_event_idx_all-flags-ov.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 diff --git a/queue-4.20/arm-mmp-fix-timer_init-calls.patch b/queue-4.20/arm-mmp-fix-timer_init-calls.patch deleted file mode 100644 index b514aae3faf..00000000000 --- a/queue-4.20/arm-mmp-fix-timer_init-calls.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 48b14d36de26e61a479a22e34efdd9fdb21d1708 Mon Sep 17 00:00:00 2001 -From: Arnd Bergmann -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 -Signed-off-by: Olof Johansson -Signed-off-by: Sasha Levin ---- - 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 - #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 - diff --git a/queue-4.20/arm-mmp-mmp2-dt-enable-the-clock.patch b/queue-4.20/arm-mmp-mmp2-dt-enable-the-clock.patch deleted file mode 100644 index d7fff9c8cdd..00000000000 --- a/queue-4.20/arm-mmp-mmp2-dt-enable-the-clock.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 34ed2fa16180c38b85f398809e6a02defa3a247c Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 -Acked-by: Pavel Machek -Signed-off-by: Olof Johansson -Signed-off-by: Sasha Levin ---- - 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 - #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 - #include - #include -+#include - - #include - #include -@@ -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 - diff --git a/queue-4.20/series b/queue-4.20/series index 9dd6153fa53..6b5c46bb15f 100644 --- a/queue-4.20/series +++ b/queue-4.20/series @@ -95,7 +95,6 @@ mt76x0-dfs-fix-ibi_r11-configuration-on-non-radar-ch.patch 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 @@ -157,7 +156,6 @@ switchtec-fix-switchtec_ioctl_event_idx_all-flags-ov.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 diff --git a/queue-4.4/arm-mmp-fix-timer_init-calls.patch b/queue-4.4/arm-mmp-fix-timer_init-calls.patch deleted file mode 100644 index bb14e2e6be1..00000000000 --- a/queue-4.4/arm-mmp-fix-timer_init-calls.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 95180d9a3dc00d5e738a282497ff7291cf0701db Mon Sep 17 00:00:00 2001 -From: Arnd Bergmann -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 -Signed-off-by: Olof Johansson -Signed-off-by: Sasha Levin ---- - 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 - #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 - diff --git a/queue-4.4/arm-mmp-mmp2-dt-enable-the-clock.patch b/queue-4.4/arm-mmp-mmp2-dt-enable-the-clock.patch deleted file mode 100644 index fbc593a66e8..00000000000 --- a/queue-4.4/arm-mmp-mmp2-dt-enable-the-clock.patch +++ /dev/null @@ -1,153 +0,0 @@ -From c089c1797e57bb9d449e0bab50ed2f38d1ce7357 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 -Acked-by: Pavel Machek -Signed-off-by: Olof Johansson -Signed-off-by: Sasha Levin ---- - 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 - #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 - #include - #include -+#include - - #include - #include -@@ -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 - diff --git a/queue-4.4/series b/queue-4.4/series index 25630be5b5b..1574b223b5b 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -20,7 +20,6 @@ sunvdc-do-not-spin-in-an-infinite-loop-when-vio_ldc_.patch 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 @@ -36,7 +35,6 @@ i2c-axxia-check-for-error-conditions-first.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 diff --git a/queue-4.9/arm-mmp-fix-timer_init-calls.patch b/queue-4.9/arm-mmp-fix-timer_init-calls.patch deleted file mode 100644 index fba8f427637..00000000000 --- a/queue-4.9/arm-mmp-fix-timer_init-calls.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 422047616e6f15c3944834c9447c6c6f260db73e Mon Sep 17 00:00:00 2001 -From: Arnd Bergmann -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 -Signed-off-by: Olof Johansson -Signed-off-by: Sasha Levin ---- - 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 - #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 - diff --git a/queue-4.9/arm-mmp-mmp2-dt-enable-the-clock.patch b/queue-4.9/arm-mmp-mmp2-dt-enable-the-clock.patch deleted file mode 100644 index 3add9682f2c..00000000000 --- a/queue-4.9/arm-mmp-mmp2-dt-enable-the-clock.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 48332f50eff0c3102d2d16630934515e705358f7 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -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 -Acked-by: Pavel Machek -Signed-off-by: Olof Johansson -Signed-off-by: Sasha Levin ---- - 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 - #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 - #include - #include -+#include - - #include - #include -@@ -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 - diff --git a/queue-4.9/series b/queue-4.9/series index 5705864eca3..de961eb00d0 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -30,7 +30,6 @@ thermal-do-not-clear-passive-state-during-system-sle.patch 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 @@ -49,7 +48,6 @@ i2c-axxia-check-for-error-conditions-first.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