mbox series

[v2,0/4] clk: zynqmp: fix CLK_FRAC and various cleanups

Message ID 20190319100147.4178-1-m.tretter@pengutronix.de (mailing list archive)
Headers show
Series clk: zynqmp: fix CLK_FRAC and various cleanups | expand

Message

Michael Tretter March 19, 2019, 10:01 a.m. UTC
Hello,

This is v2 of the patchset to cleanup the ZynqMP clock driver.

I introduced the new is_frac field in zynqmp_clk_divider. The driver uses this
field to flag fractional dividers instead of misusing the clk_hw::core::flags
field.

Furthermore, the driver uses structs for the query responses from the firmware
instead of passing arrays with implicit size.

Michael

v1 -> v2:
- remove export of zynqmp_clk_register_divider
- move CLK_FLAG to property in zynqmp_clk_divider
- merge and rewrite patches 4 and 5 to use structs for responses

Michael Tretter (4):
  clk: zynqmp: fix kerneldoc of __zynqmp_clock_get_parents
  clk: zynqmp: do not export zynqmp_clk_register_* functions
  clk: zynqmp: fix check for fractional clock
  clk: zynqmp: use structs for clk query responses

 drivers/clk/zynqmp/clk-mux-zynqmp.c |   1 -
 drivers/clk/zynqmp/clk-zynqmp.h     |   6 --
 drivers/clk/zynqmp/clkc.c           | 148 ++++++++++++++++------------
 drivers/clk/zynqmp/divider.c        |  10 +-
 4 files changed, 92 insertions(+), 73 deletions(-)

Comments

Michael Tretter April 4, 2019, 8:16 a.m. UTC | #1
On Tue, 19 Mar 2019 11:01:43 +0100, Michael Tretter wrote:
> This is v2 of the patchset to cleanup the ZynqMP clock driver.

Gentle ping.

Michael

> 
> I introduced the new is_frac field in zynqmp_clk_divider. The driver uses this
> field to flag fractional dividers instead of misusing the clk_hw::core::flags
> field.
> 
> Furthermore, the driver uses structs for the query responses from the firmware
> instead of passing arrays with implicit size.
> 
> Michael
> 
> v1 -> v2:
> - remove export of zynqmp_clk_register_divider
> - move CLK_FLAG to property in zynqmp_clk_divider
> - merge and rewrite patches 4 and 5 to use structs for responses
> 
> Michael Tretter (4):
>   clk: zynqmp: fix kerneldoc of __zynqmp_clock_get_parents
>   clk: zynqmp: do not export zynqmp_clk_register_* functions
>   clk: zynqmp: fix check for fractional clock
>   clk: zynqmp: use structs for clk query responses
> 
>  drivers/clk/zynqmp/clk-mux-zynqmp.c |   1 -
>  drivers/clk/zynqmp/clk-zynqmp.h     |   6 --
>  drivers/clk/zynqmp/clkc.c           | 148 ++++++++++++++++------------
>  drivers/clk/zynqmp/divider.c        |  10 +-
>  4 files changed, 92 insertions(+), 73 deletions(-)
>
Stephen Boyd April 11, 2019, 6:40 p.m. UTC | #2
Quoting Michael Tretter (2019-04-04 01:16:21)
> On Tue, 19 Mar 2019 11:01:43 +0100, Michael Tretter wrote:
> > This is v2 of the patchset to cleanup the ZynqMP clock driver.
> 
> Gentle ping.
> 

I could apply the first three, but the last one didn't work because
Jolly Shah sent some changes that wrecked it. Can you resend the last
patch reworked on top of it? You can use clk-zynq in clk.git if you need
something to base it upon.

 https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-zynq
Michael Tretter April 12, 2019, 9:36 a.m. UTC | #3
On Thu, 11 Apr 2019 11:40:58 -0700, Stephen Boyd wrote:
> Quoting Michael Tretter (2019-04-04 01:16:21)
> > On Tue, 19 Mar 2019 11:01:43 +0100, Michael Tretter wrote:  
> > > This is v2 of the patchset to cleanup the ZynqMP clock driver.  
> > 
> > Gentle ping.
> >   
> 
> I could apply the first three, but the last one didn't work because
> Jolly Shah sent some changes that wrecked it. Can you resend the last
> patch reworked on top of it? You can use clk-zynq in clk.git if you need
> something to base it upon.

Thanks. The changes in clk-zynq look really fragile to me, because the
fields from the firmware response are reused to build the clock id. I
will send a v3 of the patch anyway to properly get the fields of the
firmware responses.

Michael

> 
>  https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-zynq
>