mbox series

[0/9] Clean-up timer-ti-dm a bit

Message ID 20220815131250.34603-1-tony@atomide.com (mailing list archive)
Headers show
Series Clean-up timer-ti-dm a bit | expand

Message

Tony Lindgren Aug. 15, 2022, 1:12 p.m. UTC
Hi all,

This series of changes cleans up timer-ti-dm a bit. After this series we
can start replacing the custom PWM related functions with standard
Linux frameworks and use things like clk_set_duty_cycle().

I have only tested this on K3 and omap2+ devices, I don't have any
omap1 devices online right now. Aaro & Janusz, if you could give this
series a quick boot test for omap1 that would be great.

The patches are against v6.0-rc1.

Regards,

Tony


Tony Lindgren (9):
  clocksource/drivers/timer-ti-dm: Drop unused functions
  clocksource/drivers/timer-ti-dm: Simplify register reads with
    dmtimer_read()
  clocksource/drivers/timer-ti-dm: Simplify register writes with
    dmtimer_write()
  clocksource/drivers/timer-ti-dm: Simplify register access further
  clocksource/drivers/timer-ti-dm: Move private defines to the driver
  clocksource/drivers/timer-ti-dm: Use runtime PM directly and check
    errors
  clocksource/drivers/timer-ti-dm: Move struct omap_dm_timer fields to
    driver
  clocksource/drivers/timer-ti-dm: Add flag to detect omap1
  clocksource/drivers/timer-ti-dm: Get clock in probe with
    devm_clk_get()

 drivers/clocksource/timer-ti-dm.c | 681 +++++++++++++++++++-----------
 include/clocksource/timer-ti-dm.h | 112 -----
 2 files changed, 429 insertions(+), 364 deletions(-)

Comments

Janusz Krzysztofik Aug. 22, 2022, 10:29 p.m. UTC | #1
Hi Tony,

On Monday, 15 August 2022 15:12:41 CEST Tony Lindgren wrote:
> Hi all,
>
> This series of changes cleans up timer-ti-dm a bit. After this series we
> can start replacing the custom PWM related functions with standard
> Linux frameworks and use things like clk_set_duty_cycle().
>
> I have only tested this on K3 and omap2+ devices, I don't have any
> omap1 devices online right now. Aaro & Janusz, if you could give this
> series a quick boot test for omap1 that would be great.

AFAICS, OMAP1 timer-ti-dm compatible "omap_timer" device requires OMAP16xx
at least, while I only have OMAP15xx.  Then, my testing (successful) was
limited to a single function -- omap_dm_timer_modify_idlect_mask() -- which
is called on any OMAP1 as long as CONFIG_OMAP_DM_TIMER is set (requires
CONFIG_COMPILE_TEST).  However, I've reviewed the series and it looks good
to me.  I'm only not sure if we may expect any external users of
omap_dm_timer_get_irq(), if not than we could make it local to the driver while
being at it.

For the whole series:
Reviewed-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>

Thanks,
Janusz


>
> The patches are against v6.0-rc1.
>
> Regards,
>
> Tony
>
>
> Tony Lindgren (9):
>   clocksource/drivers/timer-ti-dm: Drop unused functions
>   clocksource/drivers/timer-ti-dm: Simplify register reads with
>     dmtimer_read()
>   clocksource/drivers/timer-ti-dm: Simplify register writes with
>     dmtimer_write()
>   clocksource/drivers/timer-ti-dm: Simplify register access further
>   clocksource/drivers/timer-ti-dm: Move private defines to the driver
>   clocksource/drivers/timer-ti-dm: Use runtime PM directly and check
>     errors
>   clocksource/drivers/timer-ti-dm: Move struct omap_dm_timer fields to
>     driver
>   clocksource/drivers/timer-ti-dm: Add flag to detect omap1
>   clocksource/drivers/timer-ti-dm: Get clock in probe with
>     devm_clk_get()
>
>  drivers/clocksource/timer-ti-dm.c | 681 +++++++++++++++++++-----------
>  include/clocksource/timer-ti-dm.h | 112 -----
>  2 files changed, 429 insertions(+), 364 deletions(-)
>
>
Tony Lindgren Aug. 23, 2022, 6:02 a.m. UTC | #2
* Janusz Krzysztofik <jmkrzyszt@gmail.com> [220822 22:22]:
> Hi Tony,
> 
> On Monday, 15 August 2022 15:12:41 CEST Tony Lindgren wrote:
> > Hi all,
> >
> > This series of changes cleans up timer-ti-dm a bit. After this series we
> > can start replacing the custom PWM related functions with standard
> > Linux frameworks and use things like clk_set_duty_cycle().
> >
> > I have only tested this on K3 and omap2+ devices, I don't have any
> > omap1 devices online right now. Aaro & Janusz, if you could give this
> > series a quick boot test for omap1 that would be great.
> 
> AFAICS, OMAP1 timer-ti-dm compatible "omap_timer" device requires OMAP16xx
> at least, while I only have OMAP15xx.  Then, my testing (successful) was
> limited to a single function -- omap_dm_timer_modify_idlect_mask() -- which
> is called on any OMAP1 as long as CONFIG_OMAP_DM_TIMER is set (requires
> CONFIG_COMPILE_TEST).  However, I've reviewed the series and it looks good
> to me.  I'm only not sure if we may expect any external users of
> omap_dm_timer_get_irq(), if not than we could make it local to the driver while
> being at it.

OK thanks for testing. And thanks for spotting that omap_dm_timer_get_irq()
can be static, I'll post a separate patch for that.

Regards,

Tony