Colin Cross | 73625e3 | 2010-06-23 15:49:17 -0700 | [diff] [blame] | 1 | /* |
Colin Cross | 73625e3 | 2010-06-23 15:49:17 -0700 | [diff] [blame] | 2 | * Copyright (C) 2010 Google, Inc. |
| 3 | * |
| 4 | * Author: |
| 5 | * Colin Cross <ccross@android.com> |
| 6 | * |
| 7 | * This software is licensed under the terms of the GNU General Public |
| 8 | * License version 2, as published by the Free Software Foundation, and |
| 9 | * may be copied, distributed, and modified under those terms. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | */ |
| 17 | |
Olof Johansson | 9a1086d | 2011-10-13 00:31:20 -0700 | [diff] [blame] | 18 | #ifndef __MACH_TEGRA_FUSE_H |
| 19 | #define __MACH_TEGRA_FUSE_H |
| 20 | |
| 21 | enum tegra_revision { |
| 22 | TEGRA_REVISION_UNKNOWN = 0, |
| 23 | TEGRA_REVISION_A01, |
| 24 | TEGRA_REVISION_A02, |
| 25 | TEGRA_REVISION_A03, |
| 26 | TEGRA_REVISION_A03p, |
| 27 | TEGRA_REVISION_A04, |
| 28 | TEGRA_REVISION_MAX, |
| 29 | }; |
| 30 | |
| 31 | #define SKU_ID_T20 8 |
| 32 | #define SKU_ID_T25SE 20 |
| 33 | #define SKU_ID_AP25 23 |
| 34 | #define SKU_ID_T25 24 |
| 35 | #define SKU_ID_AP25E 27 |
| 36 | #define SKU_ID_T25E 28 |
| 37 | |
Peter De Schrijver | 35b1498 | 2012-02-10 01:47:41 +0200 | [diff] [blame] | 38 | #define TEGRA20 0x20 |
| 39 | #define TEGRA30 0x30 |
| 40 | |
Olof Johansson | 9a1086d | 2011-10-13 00:31:20 -0700 | [diff] [blame] | 41 | extern int tegra_sku_id; |
| 42 | extern int tegra_cpu_process_id; |
| 43 | extern int tegra_core_process_id; |
Peter De Schrijver | 4c4ad66 | 2012-02-10 01:47:42 +0200 | [diff] [blame] | 44 | extern int tegra_chip_id; |
Danny Huang | f8ddda7 | 2012-11-15 15:42:34 +0800 | [diff] [blame^] | 45 | extern int tegra_cpu_speedo_id; /* only exist in Tegra30 and later */ |
Danny Huang | 25cd5a3 | 2012-11-15 15:42:33 +0800 | [diff] [blame] | 46 | extern int tegra_soc_speedo_id; |
Olof Johansson | 9a1086d | 2011-10-13 00:31:20 -0700 | [diff] [blame] | 47 | extern enum tegra_revision tegra_revision; |
| 48 | |
Olof Johansson | dee4718 | 2011-10-17 16:39:24 -0700 | [diff] [blame] | 49 | extern int tegra_bct_strapping; |
| 50 | |
Colin Cross | 73625e3 | 2010-06-23 15:49:17 -0700 | [diff] [blame] | 51 | unsigned long long tegra_chip_uid(void); |
Colin Cross | 73625e3 | 2010-06-23 15:49:17 -0700 | [diff] [blame] | 52 | void tegra_init_fuse(void); |
Danny Huang | 1f851a2 | 2012-11-15 15:42:32 +0800 | [diff] [blame] | 53 | bool tegra_spare_fuse(int bit); |
| 54 | u32 tegra_fuse_readl(unsigned long offset); |
Olof Johansson | 9a1086d | 2011-10-13 00:31:20 -0700 | [diff] [blame] | 55 | |
Danny Huang | 25cd5a3 | 2012-11-15 15:42:33 +0800 | [diff] [blame] | 56 | #ifdef CONFIG_ARCH_TEGRA_2x_SOC |
| 57 | void tegra20_init_speedo_data(void); |
| 58 | #else |
| 59 | static inline void tegra20_init_speedo_data(void) {} |
| 60 | #endif |
| 61 | |
Danny Huang | f8ddda7 | 2012-11-15 15:42:34 +0800 | [diff] [blame^] | 62 | #ifdef CONFIG_ARCH_TEGRA_3x_SOC |
| 63 | void tegra30_init_speedo_data(void); |
| 64 | #else |
| 65 | static inline void tegra30_init_speedo_data(void) {} |
| 66 | #endif |
| 67 | |
Olof Johansson | 9a1086d | 2011-10-13 00:31:20 -0700 | [diff] [blame] | 68 | #endif |