[PATCH 07/18] arm: mach-k3: j721e: Add detection for j721e

Lokesh Vutla lokeshvutla at ti.com
Fri Jul 24 15:10:18 CEST 2020



On 24/07/20 5:55 pm, Grygorii Strashko wrote:
> 
> 
> On 23/07/2020 11:47, Lokesh Vutla wrote:
>> Add an api soc_is_j721e(), and use it to enable certain functionality
>> that is available only on j721e.
>>
>> Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
>> Signed-off-by: Suman Anna <s-anna at ti.com>
>> ---
>>   arch/arm/mach-k3/common.c                 | 10 ++++++++++
>>   arch/arm/mach-k3/include/mach/sys_proto.h |  2 ++
>>   arch/arm/mach-k3/j721e_init.c             |  3 +++
>>   3 files changed, 15 insertions(+)
>>
>> diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
>> index eb72451d06..aec6c600b9 100644
>> --- a/arch/arm/mach-k3/common.c
>> +++ b/arch/arm/mach-k3/common.c
>> @@ -355,6 +355,16 @@ int print_cpuinfo(void)
>>   }
>>   #endif
>>   +bool soc_is_j721e(void)
>> +{
>> +    u32 soc;
>> +
>> +    soc = (readl(CTRLMMR_WKUP_JTAG_ID) &
>> +        JTAG_ID_PARTNO_MASK) >> JTAG_ID_PARTNO_SHIFT;
>> +
>> +    return soc == J721E;
>> +}
> 
> Shouldn't it be done using UCLASS_SOC introduce by Dave Gerlach <d-gerlach at ti.com>
> 
> https://patchwork.ozlabs.org/project/uboot/cover/20200716044004.6014-1-d-gerlach@ti.com/

SoC differentiation is needed before DT is available. So I had to use these apis.

Thanks and regards,
Lokesh



More information about the U-Boot mailing list