summaryrefslogtreecommitdiff
path: root/arch/arm/mach-uniphier
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-uniphier')
-rw-r--r--arch/arm/mach-uniphier/include/mach/soc_info.h3
-rw-r--r--arch/arm/mach-uniphier/soc_info.c12
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-uniphier/include/mach/soc_info.h b/arch/arm/mach-uniphier/include/mach/soc_info.h
index 623e7ef..6e25baa 100644
--- a/arch/arm/mach-uniphier/include/mach/soc_info.h
+++ b/arch/arm/mach-uniphier/include/mach/soc_info.h
@@ -60,4 +60,7 @@ static inline enum uniphier_soc_id uniphier_get_soc_type(void)
}
#endif
+int uniphier_get_soc_model(void);
+int uniphier_get_soc_revision(void);
+
#endif /* __MACH_SOC_INFO_H__ */
diff --git a/arch/arm/mach-uniphier/soc_info.c b/arch/arm/mach-uniphier/soc_info.c
index 3e8e7f4..a4010eb 100644
--- a/arch/arm/mach-uniphier/soc_info.c
+++ b/arch/arm/mach-uniphier/soc_info.c
@@ -59,3 +59,15 @@ enum uniphier_soc_id uniphier_get_soc_type(void)
return ret;
}
#endif
+
+int uniphier_get_soc_model(void)
+{
+ return (readl(SG_REVISION) & SG_REVISION_MODEL_MASK) >>
+ SG_REVISION_MODEL_SHIFT;
+}
+
+int uniphier_get_soc_revision(void)
+{
+ return (readl(SG_REVISION) & SG_REVISION_REV_MASK) >>
+ SG_REVISION_REV_SHIFT;
+}