[PATCH 02/25] tegra: lowlevel: add function to fetch chipid
Lucas Stach
dev at lynxeye.de
Mon May 12 00:07:43 PDT 2014
This is needed as a safe way to flush the ABP bus.
Signed-off-by: Lucas Stach <dev at lynxeye.de>
---
arch/arm/mach-tegra/include/mach/lowlevel.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/mach-tegra/include/mach/lowlevel.h b/arch/arm/mach-tegra/include/mach/lowlevel.h
index 52b405d..1026518 100644
--- a/arch/arm/mach-tegra/include/mach/lowlevel.h
+++ b/arch/arm/mach-tegra/include/mach/lowlevel.h
@@ -70,6 +70,12 @@ enum tegra_chiptype {
};
static __always_inline
+u32 tegra_read_chipid(void)
+{
+ return readl(TEGRA_APB_MISC_BASE + APB_MISC_HIDREV);
+}
+
+static __always_inline
enum tegra_chiptype tegra_get_chiptype(void)
{
u32 hidrev;
--
1.9.0
More information about the barebox
mailing list