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 #include <linux/dmaengine.h>
23 #include <linux/types.h>
27 struct tegra_fuse_info {
28 u32 (*read)(struct tegra_fuse *fuse, unsigned int offset);
33 struct tegra_fuse_soc {
34 void (*init)(struct tegra_fuse *fuse);
35 void (*speedo_init)(struct tegra_sku_info *info);
36 int (*probe)(struct tegra_fuse *fuse);
38 const struct tegra_fuse_info *info;
47 u32 (*read_early)(struct tegra_fuse *fuse, unsigned int offset);
48 u32 (*read)(struct tegra_fuse *fuse, unsigned int offset);
49 const struct tegra_fuse_soc *soc;
51 /* APBDMA on Tegra20 */
54 struct completion wait;
55 struct dma_chan *chan;
56 struct dma_slave_config config;
62 void tegra_init_revision(void);
63 void tegra_init_apbmisc(void);
65 u32 __init tegra_fuse_read_spare(unsigned int spare);
66 u32 __init tegra_fuse_read_early(unsigned int offset);
68 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
69 void tegra20_init_speedo_data(struct tegra_sku_info *sku_info);
72 #ifdef CONFIG_ARCH_TEGRA_3x_SOC
73 void tegra30_init_speedo_data(struct tegra_sku_info *sku_info);
76 #ifdef CONFIG_ARCH_TEGRA_114_SOC
77 void tegra114_init_speedo_data(struct tegra_sku_info *sku_info);
80 #if defined(CONFIG_ARCH_TEGRA_124_SOC) || defined(CONFIG_ARCH_TEGRA_132_SOC)
81 void tegra124_init_speedo_data(struct tegra_sku_info *sku_info);
84 #ifdef CONFIG_ARCH_TEGRA_210_SOC
85 void tegra210_init_speedo_data(struct tegra_sku_info *sku_info);
88 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
89 extern const struct tegra_fuse_soc tegra20_fuse_soc;
92 #ifdef CONFIG_ARCH_TEGRA_3x_SOC
93 extern const struct tegra_fuse_soc tegra30_fuse_soc;
96 #ifdef CONFIG_ARCH_TEGRA_114_SOC
97 extern const struct tegra_fuse_soc tegra114_fuse_soc;
100 #if defined(CONFIG_ARCH_TEGRA_124_SOC) || defined(CONFIG_ARCH_TEGRA_132_SOC)
101 extern const struct tegra_fuse_soc tegra124_fuse_soc;
104 #ifdef CONFIG_ARCH_TEGRA_210_SOC
105 extern const struct tegra_fuse_soc tegra210_fuse_soc;