ARM: omap-common: Add device type to CPU string
authorDaniel Allred <d-allred@ti.com>
Fri, 20 May 2016 00:10:52 +0000 (19:10 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 27 May 2016 19:41:37 +0000 (15:41 -0400)
Update the CPU string output so that the device
type is now included as part of the CPU string that
is printed as the SPL or u-boot comes up. This update
adds a suffix of the form "-GP" or "-HS" for production
devices, so that general purpose (GP) and high security
(HS) can be distiguished. Applies to all OMAP5 variants.

Signed-off-by: Daniel Allred <d-allred@ti.com>
Signed-off-by: Madan Srinivas <madans@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/cpu/armv7/omap-common/hwinit-common.c
arch/arm/include/asm/arch-omap3/cpu.h
arch/arm/include/asm/omap_common.h

index 01c2d576c99ba5b5c088a55636f35141c2458a5c..078bdd800c750df57777bf289a8b331cdfb5e70a 100644 (file)
@@ -65,12 +65,30 @@ static void omap_rev_string(void)
        u32 major_rev = (omap_rev & 0x00000F00) >> 8;
        u32 minor_rev = (omap_rev & 0x000000F0) >> 4;
 
+       const char *sec_s;
+
+       switch (get_device_type()) {
+       case TST_DEVICE:
+               sec_s = "TST";
+               break;
+       case EMU_DEVICE:
+               sec_s = "EMU";
+               break;
+       case HS_DEVICE:
+               sec_s = "HS";
+               break;
+       case GP_DEVICE:
+               sec_s = "GP";
+               break;
+       default:
+               sec_s = "?";
+       }
+
        if (soc_variant)
                printf("OMAP");
        else
                printf("DRA");
-       printf("%x ES%x.%x\n", omap_variant, major_rev,
-              minor_rev);
+       printf("%x-%s ES%x.%x\n", omap_variant, sec_s, major_rev, minor_rev);
 }
 
 #ifdef CONFIG_SPL_BUILD
index 53cc2b098a0a4585a36629e0b9f0d08fb9b5cd55..e8aa786d2bb33b2c2e10f69f7a7e798b57140694 100644 (file)
@@ -59,13 +59,8 @@ struct ctrl_id {
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL_STRICT_NAMES */
 
-/* device type */
-#define DEVICE_MASK            (0x7 << 8)
+/* boot pin mask */
 #define SYSBOOT_MASK           0x1F
-#define TST_DEVICE             0x0
-#define EMU_DEVICE             0x1
-#define HS_DEVICE              0x2
-#define GP_DEVICE              0x3
 
 /* device speed */
 #define SKUID_CLK_MASK         0xf
index 8fb05e18b93fce6db629ca4a93f496ce828d4c3c..ac34b0e72ff83cc60470188e9fc0d13256b9f5e0 100644 (file)
@@ -716,6 +716,17 @@ static inline u8 is_dra72x(void)
 #define DRA722_ES1_0   0x07220100
 #define DRA722_ES2_0   0x07220200
 
+/*
+ * silicon device type
+ * Moving to common from cpu.h, since it is shared by various omap devices
+ */
+#define DEVICE_MASK         (BIT(8) | BIT(9) | BIT(10))
+#define TST_DEVICE          0x0
+#define EMU_DEVICE          0x1
+#define HS_DEVICE           0x2
+#define GP_DEVICE           0x3
+
+
 /*
  * SRAM scratch space entries
  */