[PATCH v3 1/6] rockchip: move ROCKCHIP_STIMER_BASE to Kconfig

Johan Jonker jbx6244 at gmail.com
Sat Mar 12 11:01:15 CET 2022



On 3/12/22 09:51, Jagan Teki wrote:
> On Thu, Dec 30, 2021 at 10:18 PM Johan Jonker <jbx6244 at gmail.com> wrote:
>>
>> Move ROCKCHIP_STIMER_BASE to Kconfig.
>>
>> Signed-off-by: Johan Jonker <jbx6244 at gmail.com>
>> ---
>>
>> Changed V3:
>>   add ROCKCHIP_STIMER
>> ---
>>  arch/arm/mach-rockchip/Kconfig        | 22 ++++++++++++++++++++++
>>  arch/arm/mach-rockchip/px30/Kconfig   |  3 +++
>>  arch/arm/mach-rockchip/rk3036/Kconfig |  3 +++
>>  arch/arm/mach-rockchip/rk3128/Kconfig |  3 +++
>>  arch/arm/mach-rockchip/rk322x/Kconfig |  3 +++
>>  arch/arm/mach-rockchip/rk3288/Kconfig |  3 +++
>>  arch/arm/mach-rockchip/rk3308/Kconfig | 10 ++++++----
>>  arch/arm/mach-rockchip/rk3328/Kconfig |  3 +++
>>  arch/arm/mach-rockchip/rk3368/Kconfig |  3 +++
>>  arch/arm/mach-rockchip/rk3399/Kconfig |  3 +++
>>  arch/arm/mach-rockchip/rk3568/Kconfig |  3 +++
>>  include/configs/px30_common.h         |  1 -
>>  include/configs/rk3036_common.h       |  1 -
>>  include/configs/rk3128_common.h       |  1 -
>>  include/configs/rk322x_common.h       |  1 -
>>  include/configs/rk3288_common.h       |  1 -
>>  include/configs/rk3308_common.h       |  1 -
>>  include/configs/rk3328_common.h       |  1 -
>>  include/configs/rk3368_common.h       |  1 -
>>  include/configs/rk3399_common.h       |  1 -
>>  include/configs/rk3568_common.h       |  1 -
>>  21 files changed, 55 insertions(+), 14 deletions(-)
>>
>> diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
>> index da6871eb..7a624c64 100644
>> --- a/arch/arm/mach-rockchip/Kconfig
>> +++ b/arch/arm/mach-rockchip/Kconfig
>> @@ -343,6 +343,28 @@ config ROCKCHIP_BOOT_MODE_REG
>>           The Soc will enter to different boot mode(defined in asm/arch-rockchip/boot_mode.h)
>>           according to the value from this register.
>>
>> +config ROCKCHIP_STIMER
>> +       bool "Rockchip STIMER support"
>> +       default y
>> +       depends on (ROCKCHIP_PX30||   \
>> +                   ROCKCHIP_RK3036|| \
>> +                   ROCKCHIP_RK3128|| \
>> +                   ROCKCHIP_RK322X|| \
>> +                   ROCKCHIP_RK3288|| \
>> +                   ROCKCHIP_RK3308|| \
>> +                   ROCKCHIP_RK3328|| \
>> +                   ROCKCHIP_RK3368|| \
>> +                   ROCKCHIP_RK3399|| \
>> +                   ROCKCHIP_RK3568)
> 

> What if we select !(SOC-Which-don't-support-stimer). I believe the
> condition check here is much simpler.

The condition would be simpler that's correct, but this patch is made
with rk3066 in mind and there's no ROCKCHIP_RK3066 available yet.
The right approach is to only include SoC's that have a specific
property/functionality linked to there specific config tag.
U-boot should be generic. And we should not have to fix all dependencies
all over the place when a SoC doesn't have something.

Please advise how to support other SoC's like rk3066.

Johan

> 
> Jagan.


More information about the U-Boot mailing list