aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter De Schrijver <pdeschrijver@nvidia.com>2014-06-12 11:36:36 -0400
committerThierry Reding <treding@nvidia.com>2014-07-17 08:32:51 -0400
commit35874f3617b38e0c1f72163407c41d554a8f5939 (patch)
tree4676fd03dc2ffa7aa00028549be7845dc74c80b5
parent3f394f80645bf0c38a30042ba605c71663331035 (diff)
ARM: tegra: move fuse exports to soc/tegra/fuse.h
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 soc/tegra/fuse.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 <pdeschrijver@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/fuse.h13
-rw-r--r--arch/arm/mach-tegra/tegra.c1
-rw-r--r--arch/arm/mach-tegra/tegra114_speedo.c2
-rw-r--r--arch/arm/mach-tegra/tegra20_speedo.c2
-rw-r--r--arch/arm/mach-tegra/tegra30_speedo.c2
-rw-r--r--include/soc/tegra/fuse.h16
6 files changed, 22 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 @@
27#define SKU_ID_T25E 28 27#define SKU_ID_T25E 28
28 28
29#ifndef __ASSEMBLY__ 29#ifndef __ASSEMBLY__
30enum tegra_revision {
31 TEGRA_REVISION_UNKNOWN = 0,
32 TEGRA_REVISION_A01,
33 TEGRA_REVISION_A02,
34 TEGRA_REVISION_A03,
35 TEGRA_REVISION_A03p,
36 TEGRA_REVISION_A04,
37 TEGRA_REVISION_MAX,
38};
39 30
40extern int tegra_sku_id; 31extern int tegra_sku_id;
41extern int tegra_cpu_process_id; 32extern int tegra_cpu_process_id;
42extern int tegra_core_process_id; 33extern int tegra_core_process_id;
43extern int tegra_cpu_speedo_id; /* only exist in Tegra30 and later */ 34extern int tegra_cpu_speedo_id; /* only exist in Tegra30 and later */
44extern int tegra_soc_speedo_id; 35extern int tegra_soc_speedo_id;
45extern enum tegra_revision tegra_revision;
46
47extern int tegra_bct_strapping;
48 36
49unsigned long long tegra_chip_uid(void); 37unsigned long long tegra_chip_uid(void);
50void tegra_init_fuse(void);
51bool tegra_spare_fuse(int bit); 38bool tegra_spare_fuse(int bit);
52u32 tegra_fuse_readl(unsigned long offset); 39u32 tegra_fuse_readl(unsigned long offset);
53 40
diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c
index 8be25c41249a..a359931c5952 100644
--- a/arch/arm/mach-tegra/tegra.c
+++ b/arch/arm/mach-tegra/tegra.c
@@ -48,7 +48,6 @@
48#include "board.h" 48#include "board.h"
49#include "common.h" 49#include "common.h"
50#include "cpuidle.h" 50#include "cpuidle.h"
51#include "fuse.h"
52#include "iomap.h" 51#include "iomap.h"
53#include "irq.h" 52#include "irq.h"
54#include "pmc.h" 53#include "pmc.h"
diff --git a/arch/arm/mach-tegra/tegra114_speedo.c b/arch/arm/mach-tegra/tegra114_speedo.c
index 86eca17e5286..d0a6d5925f5f 100644
--- a/arch/arm/mach-tegra/tegra114_speedo.c
+++ b/arch/arm/mach-tegra/tegra114_speedo.c
@@ -17,6 +17,8 @@
17#include <linux/bug.h> 17#include <linux/bug.h>
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19 19
20#include <soc/tegra/fuse.h>
21
20#include "fuse.h" 22#include "fuse.h"
21 23
22#define CORE_PROCESS_CORNERS_NUM 2 24#define CORE_PROCESS_CORNERS_NUM 2
diff --git a/arch/arm/mach-tegra/tegra20_speedo.c b/arch/arm/mach-tegra/tegra20_speedo.c
index dcd29a0b0187..2907cf8de2b1 100644
--- a/arch/arm/mach-tegra/tegra20_speedo.c
+++ b/arch/arm/mach-tegra/tegra20_speedo.c
@@ -17,6 +17,8 @@
17#include <linux/bug.h> 17#include <linux/bug.h>
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19 19
20#include <soc/tegra/fuse.h>
21
20#include "fuse.h" 22#include "fuse.h"
21 23
22#define CPU_SPEEDO_LSBIT 20 24#define CPU_SPEEDO_LSBIT 20
diff --git a/arch/arm/mach-tegra/tegra30_speedo.c b/arch/arm/mach-tegra/tegra30_speedo.c
index 7c0038326cf5..6f6102cd1e6b 100644
--- a/arch/arm/mach-tegra/tegra30_speedo.c
+++ b/arch/arm/mach-tegra/tegra30_speedo.c
@@ -17,6 +17,8 @@
17#include <linux/bug.h> 17#include <linux/bug.h>
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19 19
20#include <soc/tegra/fuse.h>
21
20#include "fuse.h" 22#include "fuse.h"
21 23
22#define CORE_PROCESS_CORNERS_NUM 1 24#define CORE_PROCESS_CORNERS_NUM 1
diff --git a/include/soc/tegra/fuse.h b/include/soc/tegra/fuse.h
index a43a750dd0a3..822eb348e107 100644
--- a/include/soc/tegra/fuse.h
+++ b/include/soc/tegra/fuse.h
@@ -27,6 +27,22 @@
27u32 tegra_read_chipid(void); 27u32 tegra_read_chipid(void);
28u8 tegra_get_chip_id(void); 28u8 tegra_get_chip_id(void);
29 29
30enum tegra_revision {
31 TEGRA_REVISION_UNKNOWN = 0,
32 TEGRA_REVISION_A01,
33 TEGRA_REVISION_A02,
34 TEGRA_REVISION_A03,
35 TEGRA_REVISION_A03p,
36 TEGRA_REVISION_A04,
37 TEGRA_REVISION_MAX,
38};
39
40u32 tegra_read_straps(void);
41u32 tegra_read_chipid(void);
42void tegra_init_fuse(void);
43
44extern enum tegra_revision tegra_revision;
45
30#if defined(CONFIG_TEGRA20_APB_DMA) 46#if defined(CONFIG_TEGRA20_APB_DMA)
31int tegra_apb_readl_using_dma(unsigned long offset, u32 *value); 47int tegra_apb_readl_using_dma(unsigned long offset, u32 *value);
32int tegra_apb_writel_using_dma(u32 value, unsigned long offset); 48int tegra_apb_writel_using_dma(u32 value, unsigned long offset);