All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] clk: bcm2835: Fix ana->maskX definitions
@ 2018-02-08 13:43 Boris Brezillon
  2018-02-08 13:43 ` [PATCH 2/4] clk: bcm2835: Protect sections updating shared registers Boris Brezillon
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Boris Brezillon @ 2018-02-08 13:43 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, Stephen Warren, Lee Jones, Eric Anholt,
	linux-rpi-kernel, Mike Turquette, Stephen Boyd, linux-clk
  Cc: Boris Brezillon, stable

ana->maskX values are already '~'-ed in bcm2835_pll_set_rate(). Remove
the '~' in the definition to fix ANA setup.

Note that this commit fixes a long standing bug preventing one from
using an HDMI display if it's plugged after the FW has booted Linux.
This is because PLLH is used by the HDMI encoder to generate the pixel
clock.

Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
---
 drivers/clk/bcm/clk-bcm2835.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
index 44301a3d9963..2108a274185a 100644
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -449,17 +449,17 @@ struct bcm2835_pll_ana_bits {
 static const struct bcm2835_pll_ana_bits bcm2835_ana_default = {
 	.mask0 = 0,
 	.set0 = 0,
-	.mask1 = (u32)~(A2W_PLL_KI_MASK | A2W_PLL_KP_MASK),
+	.mask1 = A2W_PLL_KI_MASK | A2W_PLL_KP_MASK,
 	.set1 = (2 << A2W_PLL_KI_SHIFT) | (8 << A2W_PLL_KP_SHIFT),
-	.mask3 = (u32)~A2W_PLL_KA_MASK,
+	.mask3 = A2W_PLL_KA_MASK,
 	.set3 = (2 << A2W_PLL_KA_SHIFT),
 	.fb_prediv_mask = BIT(14),
 };
 
 static const struct bcm2835_pll_ana_bits bcm2835_ana_pllh = {
-	.mask0 = (u32)~(A2W_PLLH_KA_MASK | A2W_PLLH_KI_LOW_MASK),
+	.mask0 = A2W_PLLH_KA_MASK | A2W_PLLH_KI_LOW_MASK,
 	.set0 = (2 << A2W_PLLH_KA_SHIFT) | (2 << A2W_PLLH_KI_LOW_SHIFT),
-	.mask1 = (u32)~(A2W_PLLH_KI_HIGH_MASK | A2W_PLLH_KP_MASK),
+	.mask1 = A2W_PLLH_KI_HIGH_MASK | A2W_PLLH_KP_MASK,
 	.set1 = (6 << A2W_PLLH_KP_SHIFT),
 	.mask3 = 0,
 	.set3 = 0,
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2018-03-22 16:38 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-08 13:43 [PATCH 1/4] clk: bcm2835: Fix ana->maskX definitions Boris Brezillon
2018-02-08 13:43 ` [PATCH 2/4] clk: bcm2835: Protect sections updating shared registers Boris Brezillon
2018-02-08 15:14   ` Eric Anholt
2018-02-09  9:34   ` Eric Anholt
2018-03-19 16:29   ` Stephen Boyd
2018-03-19 16:29     ` Stephen Boyd
2018-02-08 13:43 ` [PATCH 3/4] clk: bcm2835: De-assert/assert PLL reset signal when appropriate Boris Brezillon
2018-02-08 15:15   ` Eric Anholt
2018-02-08 17:49     ` Boris Brezillon
2018-02-14 10:37     ` Boris Brezillon
2018-02-22 20:18       ` Eric Anholt
2018-02-08 13:43 ` [PATCH 4/4] clk: bcm2835: Make sure the PLL is gated before changing its rate Boris Brezillon
2018-02-08 15:20   ` Eric Anholt
2018-02-08 17:56     ` Boris Brezillon
2018-02-09  9:32       ` Eric Anholt
2018-02-12  9:27         ` Boris Brezillon
2018-03-12 21:21           ` Stephen Boyd
2018-03-12 21:21             ` Stephen Boyd
2018-03-13 16:56             ` Eric Anholt
2018-03-19 16:26               ` Stephen Boyd
2018-03-19 16:26                 ` Stephen Boyd
2018-03-22  9:13             ` Boris Brezillon
2018-03-22 16:38               ` Eric Anholt
2018-03-19 16:29 ` [PATCH 1/4] clk: bcm2835: Fix ana->maskX definitions Stephen Boyd
2018-03-19 16:29   ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.