From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ns.lynxeye.de ([87.118.118.114] helo=lynxeye.de) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wkg4o-0000Ep-LX for barebox@lists.infradead.org; Wed, 14 May 2014 20:46:59 +0000 Received: from antimon.intern.lynxeye.de.intern.lynxeye.de (p548307D2.dip0.t-ipconnect.de [84.131.7.210]) by lynxeye.de (Postfix) with ESMTPA id 2C94918B425A for ; Wed, 14 May 2014 22:45:58 +0200 (CEST) From: Lucas Stach Date: Wed, 14 May 2014 22:45:29 +0200 Message-Id: <1400100352-13002-2-git-send-email-dev@lynxeye.de> In-Reply-To: <1400100352-13002-1-git-send-email-dev@lynxeye.de> References: <1400100352-13002-1-git-send-email-dev@lynxeye.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 02/25] tegra: lowlevel: add function to fetch chipid To: barebox@lists.infradead.org This is needed as a safe way to flush the ABP bus. Signed-off-by: Lucas Stach --- 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 52b405d5f859..10265183c10c 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 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox