From ea6dec5db62f2b3b9709f26bcf1c8afc71bd011c Mon Sep 17 00:00:00 2001 From: Varun Wadekar Date: Fri, 10 Mar 2017 09:53:37 -0800 Subject: [PATCH] Tegra: public interfaces to get the chip's major/minor versions This patch opens up the interfaces to read the chip's major/minor versions for all Tegra drivers to use. Signed-off-by: Varun Wadekar --- plat/nvidia/tegra/common/tegra_platform.c | 4 ++-- plat/nvidia/tegra/include/tegra_platform.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/plat/nvidia/tegra/common/tegra_platform.c b/plat/nvidia/tegra/common/tegra_platform.c index 5b96459c..0724b18e 100644 --- a/plat/nvidia/tegra/common/tegra_platform.c +++ b/plat/nvidia/tegra/common/tegra_platform.c @@ -82,7 +82,7 @@ static uint32_t tegra_get_chipid(void) /* * Read the chip's major version from chip ID value */ -static uint32_t tegra_get_chipid_major(void) +uint32_t tegra_get_chipid_major(void) { return (tegra_get_chipid() >> MAJOR_VERSION_SHIFT) & MAJOR_VERSION_MASK; } @@ -90,7 +90,7 @@ static uint32_t tegra_get_chipid_major(void) /* * Read the chip's minor version from the chip ID value */ -static uint32_t tegra_get_chipid_minor(void) +uint32_t tegra_get_chipid_minor(void) { return (tegra_get_chipid() >> MINOR_VERSION_SHIFT) & MINOR_VERSION_MASK; } diff --git a/plat/nvidia/tegra/include/tegra_platform.h b/plat/nvidia/tegra/include/tegra_platform.h index f9d7b60c..a2813a83 100644 --- a/plat/nvidia/tegra/include/tegra_platform.h +++ b/plat/nvidia/tegra/include/tegra_platform.h @@ -33,6 +33,12 @@ #include +/* + * Tegra chip major/minor version + */ +uint32_t tegra_get_chipid_major(void); +uint32_t tegra_get_chipid_minor(void); + /* * Tegra chip identifiers */ -- 2.30.2