diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2016-12-02 11:50:26 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2016-12-04 12:32:04 +0100 |
commit | 011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e (patch) | |
tree | be53d4f11f7625508ee3aea9889e854ab5b5f263 /target/linux/brcm2708/patches-4.4/0521-clk-bcm2835-Clamp-the-PLL-s-requested-rate-to-the-ha.patch | |
parent | 4257f6548b9480cdb436115b63d5c134c5e91303 (diff) | |
download | upstream-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.tar.gz upstream-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.tar.bz2 upstream-011f2c26f1b62e309f2eac6a3101bfe0a3c76c7e.zip |
brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted and rebased from the raspberry pi repo:
https://github.com/raspberrypi/linux/tree/rpi-4.4.y
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0521-clk-bcm2835-Clamp-the-PLL-s-requested-rate-to-the-ha.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.4/0521-clk-bcm2835-Clamp-the-PLL-s-requested-rate-to-the-ha.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0521-clk-bcm2835-Clamp-the-PLL-s-requested-rate-to-the-ha.patch b/target/linux/brcm2708/patches-4.4/0521-clk-bcm2835-Clamp-the-PLL-s-requested-rate-to-the-ha.patch new file mode 100644 index 0000000000..7017152d7d --- /dev/null +++ b/target/linux/brcm2708/patches-4.4/0521-clk-bcm2835-Clamp-the-PLL-s-requested-rate-to-the-ha.patch @@ -0,0 +1,43 @@ +From 4d372013a839ae71582004fbc1aa1905c73d1497 Mon Sep 17 00:00:00 2001 +From: Eric Anholt <eric@anholt.net> +Date: Wed, 28 Sep 2016 17:58:52 -0700 +Subject: [PATCH] clk: bcm2835: Clamp the PLL's requested rate to the hardware + limits. + +Fixes setting low-resolution video modes on HDMI. Now the PLLH_PIX +divider adjusts itself until the PLLH is within bounds. + +Signed-off-by: Eric Anholt <eric@anholt.net> +--- + drivers/clk/bcm/clk-bcm2835.c | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -523,8 +523,12 @@ static long bcm2835_pll_rate_from_diviso + static long bcm2835_pll_round_rate(struct clk_hw *hw, unsigned long rate, + unsigned long *parent_rate) + { ++ struct bcm2835_pll *pll = container_of(hw, struct bcm2835_pll, hw); ++ const struct bcm2835_pll_data *data = pll->data; + u32 ndiv, fdiv; + ++ rate = clamp(rate, data->min_rate, data->max_rate); ++ + bcm2835_pll_choose_ndiv_and_fdiv(rate, *parent_rate, &ndiv, &fdiv); + + return bcm2835_pll_rate_from_divisors(*parent_rate, ndiv, fdiv, 1); +@@ -629,13 +633,6 @@ static int bcm2835_pll_set_rate(struct c + u32 ana[4]; + int i; + +- if (rate < data->min_rate || rate > data->max_rate) { +- dev_err(cprman->dev, "%s: rate out of spec: %lu vs (%lu, %lu)\n", +- clk_hw_get_name(hw), rate, +- data->min_rate, data->max_rate); +- return -EINVAL; +- } +- + if (rate > data->max_fb_rate) { + use_fb_prediv = true; + rate /= 2; |