[RFC PATCH 2/4] arm: mach-k3: am62: Add timer0 id to the dev list

Ravi Gunasekaran r-gunasekaran at ti.com
Thu Jul 13 13:38:16 CEST 2023



On 7/13/23 12:50 PM, Nishanth Menon wrote:
> From: Sjoerd Simons <sjoerd at collabora.com>
> 
> Timer0 is used by u-boot as the tick timer; Add it to the soc devices
> list so it can be enabled via the k3 power controller.
> 
> Signed-off-by: Sjoerd Simons <sjoerd at collabora.com>
> Reviewed-by: Tom Rini <trini at konsulko.com>
> Tested-by: Ravi Gunasekaran <r-gunasekaran at ti.com>
> Tested-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>
> Cc: Francesco Dolcini <francesco at dolcini.it>
> Cc: Wadim Egorov <w.egorov at phytec.de>
> [nm at ti.com: Fixup num_devices]
> Signed-off-by: Nishanth Menon <nm at ti.com>
> ---
> Changes since Sjoerd's revision:
> I fixed up the num_devs to be 22.
> 
> V1: https://lore.kernel.org/r/20230406185542.1179073-3-sjoerd@collabora.com
>  arch/arm/mach-k3/am62x/dev-data.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-k3/am62x/dev-data.c b/arch/arm/mach-k3/am62x/dev-data.c
> index 616d0650b9c0..c747769cf05c 100644
> --- a/arch/arm/mach-k3/am62x/dev-data.c
> +++ b/arch/arm/mach-k3/am62x/dev-data.c
> @@ -58,6 +58,7 @@ static struct ti_dev soc_dev_list[] = {
>  	PSC_DEV(161, &soc_lpsc_list[8]),
>  	PSC_DEV(162, &soc_lpsc_list[9]),
>  	PSC_DEV(75, &soc_lpsc_list[10]),
> +	PSC_DEV(36, &soc_lpsc_list[11]),
>  	PSC_DEV(102, &soc_lpsc_list[11]),
>  	PSC_DEV(146, &soc_lpsc_list[11]),
>  	PSC_DEV(13, &soc_lpsc_list[12]),
> @@ -74,5 +75,5 @@ const struct ti_k3_pd_platdata am62x_pd_platdata = {
>  	.num_psc = 2,
>  	.num_pd = 5,
>  	.num_lpsc = 16,
> -	.num_devs = 21,
> +	.num_devs = 22,

How about using ARRAY_SIZE()?

>  };

-- 
Regards,
Ravi


More information about the U-Boot mailing list