]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mach-k3: j721e: Add detection for j721e
authorLokesh Vutla <lokeshvutla@ti.com>
Wed, 5 Aug 2020 17:14:19 +0000 (22:44 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Tue, 11 Aug 2020 15:04:46 +0000 (20:34 +0530)
Add an api soc_is_j721e(), and use it to enable certain functionality
that is available only on j721e. This detection is needed when DT is not
available.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
arch/arm/mach-k3/common.c
arch/arm/mach-k3/common.h
arch/arm/mach-k3/include/mach/hardware.h
arch/arm/mach-k3/include/mach/sys_proto.h
arch/arm/mach-k3/j721e_init.c

index 178dc210c357333a1b310aaeafeaebca63cd1bd5..4e366f8fffa6164e86cf87ab66ec3f51a095842a 100644 (file)
@@ -345,6 +345,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;
+}
+
 #ifdef CONFIG_ARM64
 void board_prep_linux(bootm_headers_t *images)
 {
index 44cf94a17461c7fb390c11ec9318553e319c1c9d..9c6c3595a28dc582826cb6b78339fd06e9418c4e 100644 (file)
@@ -8,6 +8,8 @@
 
 #include <asm/armv7_mpu.h>
 
+#define J721E  0xbb64
+
 struct fwl_data {
        const char *name;
        u16 fwl_id;
index f2ca80af1a9b2ca49bbd1e1e0ce8b28914964109..0ad761418bb7e04b157a4b5b421b3b025cc8a574 100644 (file)
@@ -15,6 +15,7 @@
 #endif
 
 /* Assuming these addresses and definitions stay common across K3 devices */
+#define CTRLMMR_WKUP_JTAG_ID   0x43000014
 #define JTAG_ID_VARIANT_SHIFT  28
 #define JTAG_ID_VARIANT_MASK   (0xf << 28)
 #define JTAG_ID_PARTNO_SHIFT   12
index 3c825aa3d1f979251146a6232a291f2e335f570b..48b11178c372abdf57ab657d56e30ed7df7a7b7c 100644 (file)
@@ -16,4 +16,6 @@ int do_board_detect(void);
 void release_resources_for_core_shutdown(void);
 int fdt_disable_node(void *blob, char *node_path);
 
+bool soc_is_j721e(void);
+
 #endif
index 461a9d7f8f6807339642f18b61b4cca6ee80c2e8..3b15da2d7cdf68fd67fb16a63dfb7765d8f8ead4 100644 (file)
@@ -361,6 +361,9 @@ void start_non_linux_remote_cores(void)
        int size = 0, ret;
        u32 loadaddr = 0;
 
+       if (!soc_is_j721e())
+               return;
+
        size = load_firmware("name_mainr5f0_0fw", "addr_mainr5f0_0load",
                             &loadaddr);
        if (size <= 0)