[Uboot-stm32] [PATCH] ARM: stm32mp: correctly handle Silicon revision

Patrice CHOTARD patrice.chotard at foss.st.com
Tue May 10 09:42:27 CEST 2022



On 4/22/22 09:49, Patrice CHOTARD wrote:
> Hi Patrick
> 
> On 4/15/22 15:00, Patrick Delaunay wrote:
>> Handle correctly the silicon revision = REV_ID[15:0] of Device Version
>> and the associated device marking, A to Z on STMicroelectronics STM32MP
>> SOCs.
>>
>> This patch prepare the introduction of next STM32MP family,
>> with STM32MP13x Rev.Z for REV_ID = 1.1.
>>
>> Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
>> ---
>>
>>  arch/arm/mach-stm32mp/cpu.c                    | 6 +++---
>>  arch/arm/mach-stm32mp/include/mach/sys_proto.h | 9 +++++----
>>  2 files changed, 8 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
>> index 325d710100..0ad5f307db 100644
>> --- a/arch/arm/mach-stm32mp/cpu.c
>> +++ b/arch/arm/mach-stm32mp/cpu.c
>> @@ -432,13 +432,13 @@ static void get_cpu_string_offsets(unsigned int *type, unsigned int *pkg,
>>  
>>  	/* Revision */
>>  	switch (get_cpu_rev()) {
>> -	case CPU_REVA:
>> +	case CPU_REV1:
>>  		*rev = 1;
>>  		break;
>> -	case CPU_REVB:
>> +	case CPU_REV2:
>>  		*rev = 2;
>>  		break;
>> -	case CPU_REVZ:
>> +	case CPU_REV2_1:
>>  		*rev = 3;
>>  		break;
>>  	default:
>> diff --git a/arch/arm/mach-stm32mp/include/mach/sys_proto.h b/arch/arm/mach-stm32mp/include/mach/sys_proto.h
>> index 4149d3a133..b91f98eb45 100644
>> --- a/arch/arm/mach-stm32mp/include/mach/sys_proto.h
>> +++ b/arch/arm/mach-stm32mp/include/mach/sys_proto.h
>> @@ -25,11 +25,12 @@ u32 get_cpu_type(void);
>>  /* return CPU_DEV constants */
>>  u32 get_cpu_dev(void);
>>  
>> -#define CPU_REVA	0x1000
>> -#define CPU_REVB	0x2000
>> -#define CPU_REVZ	0x2001
>> +#define CPU_REV1	0x1000
>> +#define CPU_REV1_1	0x1001
>> +#define CPU_REV2	0x2000
>> +#define CPU_REV2_1	0x2001
>>  
>> -/* return CPU_REV constants */
>> +/* return Silicon revision = REV_ID[15:0] of Device Version */
>>  u32 get_cpu_rev(void);
>>  
>>  /* Get Package options from OTP */
> 
> Reviewed-by: Patrice Chotard <patrice.chotard at foss.st.com>
> 
> Thanks
> Patrice
> _______________________________________________
> Uboot-stm32 mailing list
> Uboot-stm32 at st-md-mailman.stormreply.com
> https://st-md-mailman.stormreply.com/mailman/listinfo/uboot-stm32

Applied to u-boot-stm32

Thanks
Patrice


More information about the U-Boot mailing list