diff options
Diffstat (limited to 'target/linux/brcm2708')
4 files changed, 8 insertions, 61 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0252-clk-bcm2835-add-a-round-up-ability-to-the-clock-divi.patch b/target/linux/brcm2708/patches-4.4/0252-clk-bcm2835-add-a-round-up-ability-to-the-clock-divi.patch index 99bb5dbfd3..55680acc95 100644 --- a/target/linux/brcm2708/patches-4.4/0252-clk-bcm2835-add-a-round-up-ability-to-the-clock-divi.patch +++ b/target/linux/brcm2708/patches-4.4/0252-clk-bcm2835-add-a-round-up-ability-to-the-clock-divi.patch @@ -17,7 +17,7 @@ Signed-off-by: Michael Turquette <mturquette@baylibre.com> --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1150,22 +1150,24 @@ static int bcm2835_clock_is_on(struct cl +@@ -1154,22 +1154,24 @@ static int bcm2835_clock_is_on(struct cl static u32 bcm2835_clock_choose_div(struct clk_hw *hw, unsigned long rate, @@ -50,7 +50,7 @@ Signed-off-by: Michael Turquette <mturquette@baylibre.com> /* Clamp to the limits. */ div = max(div, unused_frac_mask + 1); -@@ -1204,7 +1206,7 @@ static long bcm2835_clock_round_rate(str +@@ -1208,7 +1210,7 @@ static long bcm2835_clock_round_rate(str unsigned long *parent_rate) { struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); @@ -59,7 +59,7 @@ Signed-off-by: Michael Turquette <mturquette@baylibre.com> return bcm2835_clock_rate_from_divisor(clock, *parent_rate, div); } -@@ -1273,7 +1275,7 @@ static int bcm2835_clock_set_rate(struct +@@ -1277,7 +1279,7 @@ static int bcm2835_clock_set_rate(struct struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw); struct bcm2835_cprman *cprman = clock->cprman; const struct bcm2835_clock_data *data = clock->data; diff --git a/target/linux/brcm2708/patches-4.4/0253-clk-bcm2835-Support-for-clock-parent-selection.patch b/target/linux/brcm2708/patches-4.4/0253-clk-bcm2835-Support-for-clock-parent-selection.patch index 68af214691..629e5b2c6b 100644 --- a/target/linux/brcm2708/patches-4.4/0253-clk-bcm2835-Support-for-clock-parent-selection.patch +++ b/target/linux/brcm2708/patches-4.4/0253-clk-bcm2835-Support-for-clock-parent-selection.patch @@ -24,7 +24,7 @@ Signed-off-by: Michael Turquette <mturquette@baylibre.com> --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1201,16 +1201,6 @@ static long bcm2835_clock_rate_from_divi +@@ -1205,16 +1205,6 @@ static long bcm2835_clock_rate_from_divi return temp; } @@ -41,7 +41,7 @@ Signed-off-by: Michael Turquette <mturquette@baylibre.com> static unsigned long bcm2835_clock_get_rate(struct clk_hw *hw, unsigned long parent_rate) { -@@ -1282,13 +1272,75 @@ static int bcm2835_clock_set_rate(struct +@@ -1286,13 +1276,75 @@ static int bcm2835_clock_set_rate(struct return 0; } @@ -118,7 +118,7 @@ Signed-off-by: Michael Turquette <mturquette@baylibre.com> }; static int bcm2835_vpu_clock_is_on(struct clk_hw *hw) -@@ -1304,7 +1356,9 @@ static const struct clk_ops bcm2835_vpu_ +@@ -1308,7 +1360,9 @@ static const struct clk_ops bcm2835_vpu_ .is_prepared = bcm2835_vpu_clock_is_on, .recalc_rate = bcm2835_clock_get_rate, .set_rate = bcm2835_clock_set_rate, @@ -129,7 +129,7 @@ Signed-off-by: Michael Turquette <mturquette@baylibre.com> }; static struct clk *bcm2835_register_pll(struct bcm2835_cprman *cprman, -@@ -1398,45 +1452,23 @@ static struct clk *bcm2835_register_cloc +@@ -1402,45 +1456,23 @@ static struct clk *bcm2835_register_cloc { struct bcm2835_clock *clock; struct clk_init_data init; diff --git a/target/linux/brcm2708/patches-4.4/0254-clk-bcm2835-Add-PWM-clock-support.patch b/target/linux/brcm2708/patches-4.4/0254-clk-bcm2835-Add-PWM-clock-support.patch index 1f79e88d0f..0465e49aee 100644 --- a/target/linux/brcm2708/patches-4.4/0254-clk-bcm2835-Add-PWM-clock-support.patch +++ b/target/linux/brcm2708/patches-4.4/0254-clk-bcm2835-Add-PWM-clock-support.patch @@ -33,7 +33,7 @@ Signed-off-by: Michael Turquette <mturquette@baylibre.com> struct bcm2835_pll { struct clk_hw hw; struct bcm2835_cprman *cprman; -@@ -1586,6 +1596,9 @@ static int bcm2835_clk_probe(struct plat +@@ -1590,6 +1600,9 @@ static int bcm2835_clk_probe(struct plat cprman->regs + CM_PERIICTL, CM_GATE_BIT, 0, &cprman->regs_lock); diff --git a/target/linux/brcm2708/patches-4.4/0257-clk-bcm2835-add-locking-to-pll-_on-off-methods.patch b/target/linux/brcm2708/patches-4.4/0257-clk-bcm2835-add-locking-to-pll-_on-off-methods.patch deleted file mode 100644 index 29f45529e8..0000000000 --- a/target/linux/brcm2708/patches-4.4/0257-clk-bcm2835-add-locking-to-pll-_on-off-methods.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 39c3c0d0a8d038a692b95cc13e7d6acf2d04cf14 Mon Sep 17 00:00:00 2001 -From: Martin Sperl <kernel@martin.sperl.org> -Date: Mon, 29 Feb 2016 11:39:18 +0000 -Subject: [PATCH 257/304] clk: bcm2835: add locking to pll*_on/off methods - -Add missing locking to: -* bcm2835_pll_divider_on -* bcm2835_pll_divider_off -to protect the read modify write cycle for the -register access protecting both cm_reg and a2w_reg -registers. - -Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the -audio domain clocks") - -Signed-off-by: Martin Sperl <kernel@martin.sperl.org> -Signed-off-by: Eric Anholt <eric@anholt.net> -Reviewed-by: Eric Anholt <eric@anholt.net> -(cherry picked from commit ec36a5c6682fdd5328abf15c3c67281bed0241d7) ---- - drivers/clk/bcm/clk-bcm2835.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/drivers/clk/bcm/clk-bcm2835.c -+++ b/drivers/clk/bcm/clk-bcm2835.c -@@ -1097,10 +1097,12 @@ static void bcm2835_pll_divider_off(stru - struct bcm2835_cprman *cprman = divider->cprman; - const struct bcm2835_pll_divider_data *data = divider->data; - -+ spin_lock(&cprman->regs_lock); - cprman_write(cprman, data->cm_reg, - (cprman_read(cprman, data->cm_reg) & - ~data->load_mask) | data->hold_mask); - cprman_write(cprman, data->a2w_reg, A2W_PLL_CHANNEL_DISABLE); -+ spin_unlock(&cprman->regs_lock); - } - - static int bcm2835_pll_divider_on(struct clk_hw *hw) -@@ -1109,12 +1111,14 @@ static int bcm2835_pll_divider_on(struct - struct bcm2835_cprman *cprman = divider->cprman; - const struct bcm2835_pll_divider_data *data = divider->data; - -+ spin_lock(&cprman->regs_lock); - cprman_write(cprman, data->a2w_reg, - cprman_read(cprman, data->a2w_reg) & - ~A2W_PLL_CHANNEL_DISABLE); - - cprman_write(cprman, data->cm_reg, - cprman_read(cprman, data->cm_reg) & ~data->hold_mask); -+ spin_unlock(&cprman->regs_lock); - - return 0; - } |