summaryrefslogtreecommitdiff
path: root/src/soc/nvidia/tegra/apbmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/nvidia/tegra/apbmisc.c')
-rw-r--r--src/soc/nvidia/tegra/apbmisc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/soc/nvidia/tegra/apbmisc.c b/src/soc/nvidia/tegra/apbmisc.c
index 5983d546d2..3fc0ef7de1 100644
--- a/src/soc/nvidia/tegra/apbmisc.c
+++ b/src/soc/nvidia/tegra/apbmisc.c
@@ -33,3 +33,16 @@ void clamp_tristate_inputs(void)
{
write32(PP_PINMUX_CLAMP_INPUTS, &misc->pp_pinmux_global);
}
+
+void tegra_revision_info(struct tegra_revision *id)
+{
+ uintptr_t gp_hidrev= (uintptr_t)TEGRA_APB_MISC_BASE + MISC_GP_HIDREV;
+ uint32_t reg;
+
+ reg = read32((void *)(gp_hidrev));
+
+ id->hid_fam = (reg >> 0) & 0x0f;
+ id->chip_id = (reg >> 8) & 0xff;
+ id->major = (reg >> 4) & 0x0f;
+ id->minor = (reg >> 16) & 0x07;
+}