2 * Copyright (C) 2010 Google, Inc.
3 * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
6 * Colin Cross <ccross@android.com>
8 * This software is licensed under the terms of the GNU General Public
9 * License version 2, as published by the Free Software Foundation, and
10 * may be copied, distributed, and modified under those terms.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
19 #ifndef __DRIVERS_MISC_TEGRA_FUSE_H
20 #define __DRIVERS_MISC_TEGRA_FUSE_H
22 #define TEGRA_FUSE_BASE 0x7000f800
23 #define TEGRA_FUSE_SIZE 0x400
25 int tegra_fuse_create_sysfs(struct device *dev, int size,
26 u32 (*readl)(const unsigned int offset));
28 bool tegra30_spare_fuse(int bit);
29 u32 tegra30_fuse_readl(const unsigned int offset);
30 void tegra30_init_fuse_early(void);
31 void tegra_init_revision(void);
32 void tegra_init_apbmisc(void);
34 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
35 void tegra20_init_speedo_data(struct tegra_sku_info *sku_info);
36 bool tegra20_spare_fuse_early(int spare_bit);
37 void tegra20_init_fuse_early(void);
38 u32 tegra20_fuse_early(const unsigned int offset);
40 static inline void tegra20_init_speedo_data(struct tegra_sku_info *sku_info) {}
41 static inline bool tegra20_spare_fuse_early(int spare_bit)
45 static inline void tegra20_init_fuse_early(void) {}
46 static inline u32 tegra20_fuse_early(const unsigned int offset)
53 #ifdef CONFIG_ARCH_TEGRA_3x_SOC
54 void tegra30_init_speedo_data(struct tegra_sku_info *sku_info);
56 static inline void tegra30_init_speedo_data(struct tegra_sku_info *sku_info) {}
59 #ifdef CONFIG_ARCH_TEGRA_114_SOC
60 void tegra114_init_speedo_data(struct tegra_sku_info *sku_info);
62 static inline void tegra114_init_speedo_data(struct tegra_sku_info *sku_info) {}
65 #ifdef CONFIG_ARCH_TEGRA_124_SOC
66 void tegra124_init_speedo_data(struct tegra_sku_info *sku_info);
68 static inline void tegra124_init_speedo_data(struct tegra_sku_info *sku_info) {}