Re: [PATCH 2/2] clocksource/drivers/renesas-ostm: Add OSTM support for RZ/V2H(P) SoC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Prabhakar,

Thanks for your patch!

On Mon, Mar 18, 2024 at 5:08 PM Prabhakar <prabhakar.csengg@xxxxxxxxx> wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
>
> RZ/V2H(P) (R9A09G057) SoC has Generic Timer Module(a.k.a OSTM) which
> needs to deassert the reset line before accessing any registers just
> like the RZ/G2L SoC.
>
> Enable the entry point for RZ/V2H(P) SoC so that we can deassert
> the reset line in probe callback.

This is not really what is happening.
As OSTM on RZ/V2H has a reset specified, the early call to ostm_init()
through TIMER_OF_DECLARE() always fails with -EPROBE_DEFER, as resets
are not available that early in the boot process.  Hence the driver
needs to be reprobed later through the platform driver probe.

> While at it use IS_ENABLED() macro instead of open coding.

I don't see how the code was open-coding IS_ENABLED()?

>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>

> --- a/drivers/clocksource/renesas-ostm.c
> +++ b/drivers/clocksource/renesas-ostm.c
> @@ -224,7 +224,7 @@ static int __init ostm_init(struct device_node *np)
>
>  TIMER_OF_DECLARE(ostm, "renesas,ostm", ostm_init);
>
> -#ifdef CONFIG_ARCH_RZG2L
> +#if IS_ENABLED(CONFIG_ARCH_RZG2L) || IS_ENABLED(CONFIG_ARCH_R9A09G057)

I think you want to use "defined()" instead of "IS_ENABLED()"?

>  static int __init ostm_probe(struct platform_device *pdev)
>  {
>         struct device *dev = &pdev->dev;

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux