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>
}
#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)
{
#include <asm/armv7_mpu.h>
+#define J721E 0xbb64
+
struct fwl_data {
const char *name;
u16 fwl_id;
#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
void release_resources_for_core_shutdown(void);
int fdt_disable_node(void *blob, char *node_path);
+bool soc_is_j721e(void);
+
#endif
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)