devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] clk: sunxi: Fix sun8i-a23-apb0-clk divider flags
@ 2016-02-15  9:40 Chen-Yu Tsai
  2016-02-16  8:47 ` Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Chen-Yu Tsai @ 2016-02-15  9:40 UTC (permalink / raw)
  To: Maxime Ripard, Michael Turquette, Stephen Boyd
  Cc: Chen-Yu Tsai, linux-clk, linux-arm-kernel, linux-kernel,
	linux-sunxi, devicetree, Vishnu Patekar

The APB0 clock on A23 is a zero-based divider, not a power-of-two based
divider.

Note that this patch does not apply cleanly to kernels before 4.5-rc1,
which added CLK_OF_DECLARE support to this driver.

Fixes: 57a1fbf28424 ("clk: sunxi: Add A23 APB0 divider clock support")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

Vishnu pointed out that A23 is in fact a zero-based divider. This
version corrects the whole driver, now that we know this clock is
compatible between A23 and A80.

---
 drivers/clk/sunxi/clk-sun8i-apb0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/sunxi/clk-sun8i-apb0.c b/drivers/clk/sunxi/clk-sun8i-apb0.c
index 7ba61103a6f5..2ea61debffc1 100644
--- a/drivers/clk/sunxi/clk-sun8i-apb0.c
+++ b/drivers/clk/sunxi/clk-sun8i-apb0.c
@@ -36,7 +36,7 @@ static struct clk *sun8i_a23_apb0_register(struct device_node *node,
 
 	/* The A23 APB0 clock is a standard 2 bit wide divider clock */
 	clk = clk_register_divider(NULL, clk_name, clk_parent, 0, reg,
-				   0, 2, CLK_DIVIDER_POWER_OF_TWO, NULL);
+				   0, 2, 0, NULL);
 	if (IS_ERR(clk))
 		return clk;
 
-- 
2.7.0


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

* Re: [PATCH v3] clk: sunxi: Fix sun8i-a23-apb0-clk divider flags
  2016-02-15  9:40 [PATCH v3] clk: sunxi: Fix sun8i-a23-apb0-clk divider flags Chen-Yu Tsai
@ 2016-02-16  8:47 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2016-02-16  8:47 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Michael Turquette, Stephen Boyd, linux-clk, linux-arm-kernel,
	linux-kernel, linux-sunxi, devicetree, Vishnu Patekar

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]

On Mon, Feb 15, 2016 at 05:40:19PM +0800, Chen-Yu Tsai wrote:
> The APB0 clock on A23 is a zero-based divider, not a power-of-two based
> divider.
> 
> Note that this patch does not apply cleanly to kernels before 4.5-rc1,
> which added CLK_OF_DECLARE support to this driver.
> 
> Fixes: 57a1fbf28424 ("clk: sunxi: Add A23 APB0 divider clock support")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2016-02-16  8:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15  9:40 [PATCH v3] clk: sunxi: Fix sun8i-a23-apb0-clk divider flags Chen-Yu Tsai
2016-02-16  8:47 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).