From patchwork Fri Jul 11 12:16:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 369137 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CCCFD1400D6 for ; Fri, 11 Jul 2014 22:16:32 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752160AbaGKMQc (ORCPT ); Fri, 11 Jul 2014 08:16:32 -0400 Received: from mail-we0-f175.google.com ([74.125.82.175]:41975 "EHLO mail-we0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751879AbaGKMQc (ORCPT ); Fri, 11 Jul 2014 08:16:32 -0400 Received: by mail-we0-f175.google.com with SMTP id k48so959858wev.6 for ; Fri, 11 Jul 2014 05:16:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ElJItDWgF5UJhLz1dHLxvDVczZmxjKGAcJ46tP0NxrU=; b=kXSByuVXYjfkL8ogjbB0k8a2gqrEmjdXFCGC+Ysg0OY1bxZbeA8QyROaT5vvCtfl2h ThJ9WoexpFFMTA3H5CIbU0CSNPkkn4YEfo0puAZ0dk/Lbf8YT3zvNg66GOu38p+Y4uoG x9GroqqwXFbfwEYlHrdYWuPJeBoeNBoOw04vfJ00o9cYNYQA3BWAe6wndoctFNOKsnQO 7UI2r79n+029v9elviJqBRUj31u/ZVRwXh7evAUr0g1LFcpTih58lILlk4QDn6QDNTZJ 3c2vhhTrQ8f8nZxl8nIlNZC1m6t9fEU+aGsJGMh4QmilvD6oQTW7Zfncdk/SP4w+gltQ cPag== X-Received: by 10.194.84.101 with SMTP id x5mr64933274wjy.52.1405080986633; Fri, 11 Jul 2014 05:16:26 -0700 (PDT) Received: from localhost (port-3164.pppoe.wtnet.de. [84.46.12.104]) by mx.google.com with ESMTPSA id fg1sm6843296wic.17.2014.07.11.05.16.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Jul 2014 05:16:26 -0700 (PDT) From: Thierry Reding To: Stephen Warren , Olof Johansson , Arnd Bergmann Cc: linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/12] ARM: tegra: move fuse exports to tegra-soc.h Date: Fri, 11 Jul 2014 14:16:03 +0200 Message-Id: <1405080971-7609-5-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1405080971-7609-1-git-send-email-thierry.reding@gmail.com> References: <1405080971-7609-1-git-send-email-thierry.reding@gmail.com> Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org From: Peter De Schrijver All fuse related functionality will move to a driver in the following patches. To prepare for this, export all the required functionality in a global header file and move all users of fuse.h to tegra-soc.h. While we're at it, remove tegra_bct_strapping, as its only user was removed in Commit a7cbe92cef27 ("ARM: tegra: remove tegra EMC scaling driver"). Signed-off-by: Peter De Schrijver Signed-off-by: Stephen Warren Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/fuse.h | 13 ------------- arch/arm/mach-tegra/tegra.c | 1 - arch/arm/mach-tegra/tegra114_speedo.c | 1 + arch/arm/mach-tegra/tegra20_speedo.c | 1 + arch/arm/mach-tegra/tegra30_speedo.c | 1 + include/linux/tegra-soc.h | 16 ++++++++++++++++ 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-tegra/fuse.h b/arch/arm/mach-tegra/fuse.h index 7a08b4b70c8d..48a48861c19b 100644 --- a/arch/arm/mach-tegra/fuse.h +++ b/arch/arm/mach-tegra/fuse.h @@ -27,27 +27,14 @@ #define SKU_ID_T25E 28 #ifndef __ASSEMBLY__ -enum tegra_revision { - TEGRA_REVISION_UNKNOWN = 0, - TEGRA_REVISION_A01, - TEGRA_REVISION_A02, - TEGRA_REVISION_A03, - TEGRA_REVISION_A03p, - TEGRA_REVISION_A04, - TEGRA_REVISION_MAX, -}; extern int tegra_sku_id; extern int tegra_cpu_process_id; extern int tegra_core_process_id; extern int tegra_cpu_speedo_id; /* only exist in Tegra30 and later */ extern int tegra_soc_speedo_id; -extern enum tegra_revision tegra_revision; - -extern int tegra_bct_strapping; unsigned long long tegra_chip_uid(void); -void tegra_init_fuse(void); bool tegra_spare_fuse(int bit); u32 tegra_fuse_readl(unsigned long offset); diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index e36b81870e66..f4c5f6469ee4 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c @@ -47,7 +47,6 @@ #include "board.h" #include "common.h" #include "cpuidle.h" -#include "fuse.h" #include "iomap.h" #include "irq.h" #include "pmc.h" diff --git a/arch/arm/mach-tegra/tegra114_speedo.c b/arch/arm/mach-tegra/tegra114_speedo.c index 86eca17e5286..f086a3ea291e 100644 --- a/arch/arm/mach-tegra/tegra114_speedo.c +++ b/arch/arm/mach-tegra/tegra114_speedo.c @@ -16,6 +16,7 @@ #include #include +#include #include "fuse.h" diff --git a/arch/arm/mach-tegra/tegra20_speedo.c b/arch/arm/mach-tegra/tegra20_speedo.c index dcd29a0b0187..83431011a23c 100644 --- a/arch/arm/mach-tegra/tegra20_speedo.c +++ b/arch/arm/mach-tegra/tegra20_speedo.c @@ -16,6 +16,7 @@ #include #include +#include #include "fuse.h" diff --git a/arch/arm/mach-tegra/tegra30_speedo.c b/arch/arm/mach-tegra/tegra30_speedo.c index 7c0038326cf5..4dda681bdaf9 100644 --- a/arch/arm/mach-tegra/tegra30_speedo.c +++ b/arch/arm/mach-tegra/tegra30_speedo.c @@ -16,6 +16,7 @@ #include #include +#include #include "fuse.h" diff --git a/include/linux/tegra-soc.h b/include/linux/tegra-soc.h index 5b419760ff5f..3a00b3419594 100644 --- a/include/linux/tegra-soc.h +++ b/include/linux/tegra-soc.h @@ -27,6 +27,22 @@ u32 tegra_read_chipid(void); u8 tegra_get_chip_id(void); +enum tegra_revision { + TEGRA_REVISION_UNKNOWN = 0, + TEGRA_REVISION_A01, + TEGRA_REVISION_A02, + TEGRA_REVISION_A03, + TEGRA_REVISION_A03p, + TEGRA_REVISION_A04, + TEGRA_REVISION_MAX, +}; + +u32 tegra_read_straps(void); +u32 tegra_read_chipid(void); +void tegra_init_fuse(void); + +extern enum tegra_revision tegra_revision; + #if defined(CONFIG_TEGRA20_APB_DMA) int tegra_apb_readl_using_dma(unsigned long offset, u32 *value); int tegra_apb_writel_using_dma(u32 value, unsigned long offset);