]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: stm32mp: correctly handle Silicon revision
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Fri, 15 Apr 2022 13:00:43 +0000 (15:00 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Tue, 10 May 2022 08:56:39 +0000 (10:56 +0200)
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@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
arch/arm/mach-stm32mp/cpu.c
arch/arm/mach-stm32mp/include/mach/sys_proto.h

index 325d7101009d711c278d7fc330bdbb408257ff90..0ad5f307dba2c3d9455263ced6bc6567fa2f97c6 100644 (file)
@@ -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:
index 4149d3a13379d765f3af9d271bb3406865f4a925..b91f98eb4515a1486f35781e227de86a6581b45e 100644 (file)
@@ -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 */