[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <897fe294-d268-409e-a772-2bcbd3db2d64@oss.nxp.com>
Date: Fri, 1 Aug 2025 10:33:51 +0300
From: Ghennadi Procopciuc <ghennadi.procopciuc@....nxp.com>
To: Daniel Lezcano <daniel.lezcano@...aro.org>, tglx@...utronix.de
Cc: S32@....com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 10/20] clocksource/drivers/vf-pit: Encapsulate the
macros
On 7/30/2025 11:27 AM, Daniel Lezcano wrote:
> Pass the base address to the macro, so we can use the macro with
> multiple instances of the timer because we deal with different base
> address. At the same time, change writes to the register to the
> existing corresponding functions.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
> ---
> drivers/clocksource/timer-vf-pit.c | 35 ++++++++++++++++--------------
> 1 file changed, 19 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/clocksource/timer-vf-pit.c b/drivers/clocksource/timer-vf-pit.c
> index 6a4043801eeb..8f0e26c0512d 100644
> --- a/drivers/clocksource/timer-vf-pit.c
> +++ b/drivers/clocksource/timer-vf-pit.c
> @@ -16,18 +16,21 @@
> #define PITMCR 0x00
> #define PIT0_OFFSET 0x100
> #define PIT_CH(n) (PIT0_OFFSET + 0x10 * (n))
> -#define PITLDVAL 0x00
> +
> #define PITCVAL 0x04
> -#define PITTCTRL 0x08
> -#define PITTFLG 0x0c
>
> #define PITMCR_MDIS BIT(1)
>
> -#define PITTCTRL_TEN BIT(0)
> -#define PITTCTRL_TIE BIT(1)
> -#define PITCTRL_CHN BIT(2)
> +#define PITLDVAL(__base) (__base)
> +#define PITTCTRL(__base) ((__base) + 0x08)
> +
> +
> +#define PITTCTRL_TEN BIT(0)
> +#define PITTCTRL_TIE BIT(1)
Checkpatch:
--------------------------------------------------------------------------
Commit eedb32b08f7f ("clocksource/drivers/vf-pit: Encapsulate the macros")
--------------------------------------------------------------------------
CHECK: Please don't use multiple blank lines
#38: FILE: drivers/clocksource/timer-vf-pit.c:27:
+
+
total: 0 errors, 0 warnings, 1 checks, 79 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or
--fix-inplace.
--
Regards,
Ghennadi
Powered by blists - more mailing lists