aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-k3/common.c
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2020-08-05 22:44:19 +0530
committerLokesh Vutla <lokeshvutla@ti.com>2020-08-11 20:34:46 +0530
commit2a18be77def6ce8967cb24770a2c0838125d2da5 (patch)
treeabfdec3e278d6c0dfbe33ed2fe093fda76e8a768 /arch/arm/mach-k3/common.c
parentdc57a554a5af936f1127d2af03fa9281a6c1d4e1 (diff)
downloadu-boot-2a18be77def6ce8967cb24770a2c0838125d2da5.zip
u-boot-2a18be77def6ce8967cb24770a2c0838125d2da5.tar.gz
u-boot-2a18be77def6ce8967cb24770a2c0838125d2da5.tar.bz2
arm: mach-k3: j721e: Add detection for j721e
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>
Diffstat (limited to 'arch/arm/mach-k3/common.c')
-rw-r--r--arch/arm/mach-k3/common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 178dc21..4e366f8 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -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)
{