On July 13, 2023 thus sayeth Nishanth Menon: > On 17:08-20230713, Ravi Gunasekaran wrote: > > > > > > On 7/13/23 12:50 PM, Nishanth Menon wrote: > > > From: Sjoerd Simons <sjo...@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 <sjo...@collabora.com> > > > Reviewed-by: Tom Rini <tr...@konsulko.com> > > > Tested-by: Ravi Gunasekaran <r-gunaseka...@ti.com> > > > Tested-by: Mattijs Korpershoek <mkorpersh...@baylibre.com> > > > Cc: Francesco Dolcini <france...@dolcini.it> > > > Cc: Wadim Egorov <w.ego...@phytec.de> > > > [n...@ti.com: Fixup num_devices] > > > Signed-off-by: Nishanth Menon <n...@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-sjo...@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()? > > That makes sense, I think.. Bryan: maybe the generator can be improved? > .num_psc = ARRAY_SIZE(soc_psc_list), > .num_pds = ARRAY_SIZE(soc_pd_list), > .num_lpsc = ARRAY_SIZE(soc_lpsc_list), > .num_devs = ARRAY_SIZE(soc_dev_list), > > Across the files? > > Any reasons why we should'nt do that?
Nope :) That's a good idea, I can make the changes to the scripts now ~Bryan