]> nv-tegra.nvidia Code Review - linux-2.6.git/blob - arch/arm/mach-tegra/fuse.h
ARM: tegra: cardhu: pass ac present interrupt and gpio to bq27x00
[linux-2.6.git] / arch / arm / mach-tegra / fuse.h
1 /*
2  * arch/arm/mach-tegra/fuse.h
3  *
4  * Copyright (C) 2010 Google, Inc.
5  * Copyright (C) 2010-2011 NVIDIA Corp.
6  *
7  * Author:
8  *      Colin Cross <ccross@android.com>
9  *
10  * This software is licensed under the terms of the GNU General Public
11  * License version 2, as published by the Free Software Foundation, and
12  * may be copied, distributed, and modified under those terms.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  */
20
21 #include <mach/hardware.h>
22
23 #define INVALID_PROCESS_ID      99 /* don't expect to have 100 process id's */
24
25 unsigned long long tegra_chip_uid(void);
26 unsigned int tegra_spare_fuse(int bit);
27 int tegra_sku_id(void);
28 void tegra_init_fuse(void);
29 u32 tegra_fuse_readl(unsigned long offset);
30 void tegra_fuse_writel(u32 value, unsigned long offset);
31 const char *tegra_get_revision_name(void);
32
33 #ifdef CONFIG_TEGRA_SILICON_PLATFORM
34
35 int tegra_cpu_process_id(void);
36 int tegra_core_process_id(void);
37 int tegra_soc_speedo_id(void);
38 void tegra_init_speedo_data(void);
39
40 #ifndef CONFIG_ARCH_TEGRA_2x_SOC
41 int tegra_package_id(void);
42 int tegra_cpu_speedo_id(void);
43 int tegra_cpu_speedo_mv(void);
44 int tegra_core_speedo_mv(void);
45 #else
46 static inline int tegra_package_id(void) { return -1; }
47 static inline int tegra_cpu_speedo_id(void) { return 0; }
48 static inline int tegra_cpu_speedo_mv(void) { return 1000; }
49 static inline int tegra_core_speedo_mv(void) { return 1200; }
50 #endif
51
52 #else
53
54 static inline int tegra_cpu_process_id(void) { return 0; }
55 static inline int tegra_core_process_id(void) { return 0; }
56 static inline int tegra_cpu_speedo_id(void) { return 0; }
57 static inline int tegra_soc_speedo_id(void) { return 0; }
58 static inline int tegra_package_id(void) { return -1; }
59 static inline int tegra_cpu_speedo_mv(void) { return 1000; }
60 static inline int tegra_core_speedo_mv(void) { return 1200; }
61 static inline void tegra_init_speedo_data(void) { }
62
63 #endif