From e09b41010ba33a20a87472ee821fa407a5b8da36 Mon Sep 17 00:00:00 2001 From: José Pekkarinen Date: Mon, 11 Apr 2016 10:41:07 +0300 Subject: These changes are the raw update to linux-4.4.6-rt14. Kernel sources are taken from kernel.org, and rt patch from the rt wiki download page. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen --- kernel/drivers/clk/mxs/clk-div.c | 1 - kernel/drivers/clk/mxs/clk-frac.c | 13 +++++++++---- kernel/drivers/clk/mxs/clk-imx23.c | 15 +++++++-------- kernel/drivers/clk/mxs/clk-imx28.c | 20 ++++++++++---------- kernel/drivers/clk/mxs/clk-pll.c | 1 - kernel/drivers/clk/mxs/clk-ref.c | 1 - kernel/drivers/clk/mxs/clk.h | 5 +++-- 7 files changed, 29 insertions(+), 27 deletions(-) (limited to 'kernel/drivers/clk/mxs') diff --git a/kernel/drivers/clk/mxs/clk-div.c b/kernel/drivers/clk/mxs/clk-div.c index 90e1da938..049ee27d5 100644 --- a/kernel/drivers/clk/mxs/clk-div.c +++ b/kernel/drivers/clk/mxs/clk-div.c @@ -9,7 +9,6 @@ * http://www.gnu.org/copyleft/gpl.html */ -#include #include #include #include diff --git a/kernel/drivers/clk/mxs/clk-frac.c b/kernel/drivers/clk/mxs/clk-frac.c index e6aa6b567..f8dd10f6d 100644 --- a/kernel/drivers/clk/mxs/clk-frac.c +++ b/kernel/drivers/clk/mxs/clk-frac.c @@ -9,7 +9,6 @@ * http://www.gnu.org/copyleft/gpl.html */ -#include #include #include #include @@ -42,11 +41,13 @@ static unsigned long clk_frac_recalc_rate(struct clk_hw *hw, { struct clk_frac *frac = to_clk_frac(hw); u32 div; + u64 tmp_rate; div = readl_relaxed(frac->reg) >> frac->shift; div &= (1 << frac->width) - 1; - return (parent_rate >> frac->width) * div; + tmp_rate = (u64)parent_rate * div; + return tmp_rate >> frac->width; } static long clk_frac_round_rate(struct clk_hw *hw, unsigned long rate, @@ -55,7 +56,7 @@ static long clk_frac_round_rate(struct clk_hw *hw, unsigned long rate, struct clk_frac *frac = to_clk_frac(hw); unsigned long parent_rate = *prate; u32 div; - u64 tmp; + u64 tmp, tmp_rate, result; if (rate > parent_rate) return -EINVAL; @@ -68,7 +69,11 @@ static long clk_frac_round_rate(struct clk_hw *hw, unsigned long rate, if (!div) return -EINVAL; - return (parent_rate >> frac->width) * div; + tmp_rate = (u64)parent_rate * div; + result = tmp_rate >> frac->width; + if ((result << frac->width) < tmp_rate) + result += 1; + return result; } static int clk_frac_set_rate(struct clk_hw *hw, unsigned long rate, diff --git a/kernel/drivers/clk/mxs/clk-imx23.c b/kernel/drivers/clk/mxs/clk-imx23.c index 22d136aa6..f01876af6 100644 --- a/kernel/drivers/clk/mxs/clk-imx23.c +++ b/kernel/drivers/clk/mxs/clk-imx23.c @@ -9,9 +9,8 @@ * http://www.gnu.org/copyleft/gpl.html */ -#include #include -#include +#include #include #include #include @@ -77,12 +76,12 @@ static void __init clk_misc_init(void) writel_relaxed(30 << BP_FRAC_IOFRAC, FRAC + SET); } -static const char *sel_pll[] __initdata = { "pll", "ref_xtal", }; -static const char *sel_cpu[] __initdata = { "ref_cpu", "ref_xtal", }; -static const char *sel_pix[] __initdata = { "ref_pix", "ref_xtal", }; -static const char *sel_io[] __initdata = { "ref_io", "ref_xtal", }; -static const char *cpu_sels[] __initdata = { "cpu_pll", "cpu_xtal", }; -static const char *emi_sels[] __initdata = { "emi_pll", "emi_xtal", }; +static const char *const sel_pll[] __initconst = { "pll", "ref_xtal", }; +static const char *const sel_cpu[] __initconst = { "ref_cpu", "ref_xtal", }; +static const char *const sel_pix[] __initconst = { "ref_pix", "ref_xtal", }; +static const char *const sel_io[] __initconst = { "ref_io", "ref_xtal", }; +static const char *const cpu_sels[] __initconst = { "cpu_pll", "cpu_xtal", }; +static const char *const emi_sels[] __initconst = { "emi_pll", "emi_xtal", }; enum imx23_clk { ref_xtal, pll, ref_cpu, ref_emi, ref_pix, ref_io, saif_sel, diff --git a/kernel/drivers/clk/mxs/clk-imx28.c b/kernel/drivers/clk/mxs/clk-imx28.c index b1be3746c..6b572b759 100644 --- a/kernel/drivers/clk/mxs/clk-imx28.c +++ b/kernel/drivers/clk/mxs/clk-imx28.c @@ -9,9 +9,9 @@ * http://www.gnu.org/copyleft/gpl.html */ -#include #include #include +#include #include #include #include @@ -125,15 +125,15 @@ static void __init clk_misc_init(void) writel_relaxed(val, FRAC0); } -static const char *sel_cpu[] __initdata = { "ref_cpu", "ref_xtal", }; -static const char *sel_io0[] __initdata = { "ref_io0", "ref_xtal", }; -static const char *sel_io1[] __initdata = { "ref_io1", "ref_xtal", }; -static const char *sel_pix[] __initdata = { "ref_pix", "ref_xtal", }; -static const char *sel_gpmi[] __initdata = { "ref_gpmi", "ref_xtal", }; -static const char *sel_pll0[] __initdata = { "pll0", "ref_xtal", }; -static const char *cpu_sels[] __initdata = { "cpu_pll", "cpu_xtal", }; -static const char *emi_sels[] __initdata = { "emi_pll", "emi_xtal", }; -static const char *ptp_sels[] __initdata = { "ref_xtal", "pll0", }; +static const char *const sel_cpu[] __initconst = { "ref_cpu", "ref_xtal", }; +static const char *const sel_io0[] __initconst = { "ref_io0", "ref_xtal", }; +static const char *const sel_io1[] __initconst = { "ref_io1", "ref_xtal", }; +static const char *const sel_pix[] __initconst = { "ref_pix", "ref_xtal", }; +static const char *const sel_gpmi[] __initconst = { "ref_gpmi", "ref_xtal", }; +static const char *const sel_pll0[] __initconst = { "pll0", "ref_xtal", }; +static const char *const cpu_sels[] __initconst = { "cpu_pll", "cpu_xtal", }; +static const char *const emi_sels[] __initconst = { "emi_pll", "emi_xtal", }; +static const char *const ptp_sels[] __initconst = { "ref_xtal", "pll0", }; enum imx28_clk { ref_xtal, pll0, pll1, pll2, ref_cpu, ref_emi, ref_io0, ref_io1, diff --git a/kernel/drivers/clk/mxs/clk-pll.c b/kernel/drivers/clk/mxs/clk-pll.c index fadae4183..d4ca79a86 100644 --- a/kernel/drivers/clk/mxs/clk-pll.c +++ b/kernel/drivers/clk/mxs/clk-pll.c @@ -9,7 +9,6 @@ * http://www.gnu.org/copyleft/gpl.html */ -#include #include #include #include diff --git a/kernel/drivers/clk/mxs/clk-ref.c b/kernel/drivers/clk/mxs/clk-ref.c index 4adeed6c2..495f99b79 100644 --- a/kernel/drivers/clk/mxs/clk-ref.c +++ b/kernel/drivers/clk/mxs/clk-ref.c @@ -9,7 +9,6 @@ * http://www.gnu.org/copyleft/gpl.html */ -#include #include #include #include diff --git a/kernel/drivers/clk/mxs/clk.h b/kernel/drivers/clk/mxs/clk.h index ef10ad9b5..a4590956d 100644 --- a/kernel/drivers/clk/mxs/clk.h +++ b/kernel/drivers/clk/mxs/clk.h @@ -12,7 +12,8 @@ #ifndef __MXS_CLK_H #define __MXS_CLK_H -#include +struct clk; + #include #include @@ -49,7 +50,7 @@ static inline struct clk *mxs_clk_gate(const char *name, } static inline struct clk *mxs_clk_mux(const char *name, void __iomem *reg, - u8 shift, u8 width, const char **parent_names, int num_parents) + u8 shift, u8 width, const char *const *parent_names, int num_parents) { return clk_register_mux(NULL, name, parent_names, num_parents, CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, -- cgit 1.2.3-korg