fuse.h 1.9 KB
Newer Older
1 2
/*
 * Copyright (C) 2010 Google, Inc.
3
 * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
 *
 * Author:
 *	Colin Cross <ccross@android.com>
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
#ifndef __MACH_TEGRA_FUSE_H
#define __MACH_TEGRA_FUSE_H

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,
};

#define SKU_ID_T20	8
#define SKU_ID_T25SE	20
#define SKU_ID_AP25	23
#define SKU_ID_T25	24
#define SKU_ID_AP25E	27
#define SKU_ID_T25E	28

39 40
#define TEGRA20		0x20
#define TEGRA30		0x30
41
#define TEGRA114	0x35
42

43 44 45
extern int tegra_sku_id;
extern int tegra_cpu_process_id;
extern int tegra_core_process_id;
46
extern int tegra_chip_id;
47
extern int tegra_cpu_speedo_id;		/* only exist in Tegra30 and later */
48
extern int tegra_soc_speedo_id;
49 50
extern enum tegra_revision tegra_revision;

51 52
extern int tegra_bct_strapping;

53 54
unsigned long long tegra_chip_uid(void);
void tegra_init_fuse(void);
55 56
bool tegra_spare_fuse(int bit);
u32 tegra_fuse_readl(unsigned long offset);
57

58 59 60 61 62 63
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
void tegra20_init_speedo_data(void);
#else
static inline void tegra20_init_speedo_data(void) {}
#endif

64 65 66 67 68 69
#ifdef CONFIG_ARCH_TEGRA_3x_SOC
void tegra30_init_speedo_data(void);
#else
static inline void tegra30_init_speedo_data(void) {}
#endif

70 71 72 73 74 75
#ifdef CONFIG_ARCH_TEGRA_114_SOC
void tegra114_init_speedo_data(void);
#else
static inline void tegra114_init_speedo_data(void) {}
#endif

76
#endif