public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] sunxi factors clock predivider handling
@ 2016-04-16 18:55 Vishnu Patekar
  2016-04-16 18:55 ` [PATCH 1/2] clk: sunxi: add predivider handling for factors clock Vishnu Patekar
  2016-04-16 18:55 ` [PATCH 2/2] clk: sunxi: add prediv table for a31 ahb1 clock Vishnu Patekar
  0 siblings, 2 replies; 7+ messages in thread
From: Vishnu Patekar @ 2016-04-16 18:55 UTC (permalink / raw)
  To: maxime.ripard, emilio, wens
  Cc: sboyd, linux-arm-kernel, linux-kernel, linux-sunxi

For allwinner A31 ahb1 and a83t ahb1 clocks have predivider for certain parent.

Currently, it's being handled in clock specific functions. 

A83t ahb1 and a31 ahb1 are similar clocks except a83t parent index 0b10 and 0b11
are pll6/prediv and a31 ahb1 parent index 0x11 is pll6/prediv.
with only this change, code duplication was needed.

To handle this, this patch adds predivider table with parent index, prediv 
shift and width, parents with predivider will have nonzero width.

Rate adjustment is moved from clock specific recalc function to generic factors
recalc. clock specific recalc was currently used only by a31 ahb1.

For getter, it differentiates parents with prediv, with non-zero prediv width.

I've tested this patch on a83t bpi-m3 board. I do not have a31 device.
a83t changes are not included in this patch, It'll be included in separate patch.

Vishnu Patekar (2):
  clk: sunxi: add predivider handling for factors clock
  clk: sunxi: add prediv table for a31 ahb1 clock

 drivers/clk/sunxi/clk-factors.c | 31 +++++++++++++++----------------
 drivers/clk/sunxi/clk-factors.h | 10 +++++++++-
 drivers/clk/sunxi/clk-sunxi.c   | 31 +++++++++----------------------
 3 files changed, 33 insertions(+), 39 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2016-04-19 15:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-16 18:55 [PATCH 0/2] sunxi factors clock predivider handling Vishnu Patekar
2016-04-16 18:55 ` [PATCH 1/2] clk: sunxi: add predivider handling for factors clock Vishnu Patekar
2016-04-17  1:25   ` kbuild test robot
     [not found]     ` <CAEzqOZuhwDL7VfBD+ph+PdAhBu2asnxg=hOPpV0E=VqNr8ojdw@mail.gmail.com>
2016-04-19 10:22       ` Philip Li
2016-04-19 14:16         ` Chen-Yu Tsai
2016-04-19 15:42           ` Vishnu Patekar
2016-04-16 18:55 ` [PATCH 2/2] clk: sunxi: add prediv table for a31 ahb1 clock Vishnu Patekar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox