1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2010 Google, Inc.
4 * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
7 * Colin Cross <ccross@android.com>
10 #ifndef __DRIVERS_MISC_TEGRA_FUSE_H
11 #define __DRIVERS_MISC_TEGRA_FUSE_H
13 #include <linux/dmaengine.h>
14 #include <linux/types.h>
18 struct tegra_fuse_info
{
19 u32 (*read
)(struct tegra_fuse
*fuse
, unsigned int offset
);
24 struct tegra_fuse_soc
{
25 void (*init
)(struct tegra_fuse
*fuse
);
26 void (*speedo_init
)(struct tegra_sku_info
*info
);
27 int (*probe
)(struct tegra_fuse
*fuse
);
29 const struct tegra_fuse_info
*info
;
38 u32 (*read_early
)(struct tegra_fuse
*fuse
, unsigned int offset
);
39 u32 (*read
)(struct tegra_fuse
*fuse
, unsigned int offset
);
40 const struct tegra_fuse_soc
*soc
;
42 /* APBDMA on Tegra20 */
45 struct completion wait
;
46 struct dma_chan
*chan
;
47 struct dma_slave_config config
;
53 void tegra_init_revision(void);
54 void tegra_init_apbmisc(void);
56 bool __init
tegra_fuse_read_spare(unsigned int spare
);
57 u32 __init
tegra_fuse_read_early(unsigned int offset
);
59 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
60 void tegra20_init_speedo_data(struct tegra_sku_info
*sku_info
);
63 #ifdef CONFIG_ARCH_TEGRA_3x_SOC
64 void tegra30_init_speedo_data(struct tegra_sku_info
*sku_info
);
67 #ifdef CONFIG_ARCH_TEGRA_114_SOC
68 void tegra114_init_speedo_data(struct tegra_sku_info
*sku_info
);
71 #if defined(CONFIG_ARCH_TEGRA_124_SOC) || defined(CONFIG_ARCH_TEGRA_132_SOC)
72 void tegra124_init_speedo_data(struct tegra_sku_info
*sku_info
);
75 #ifdef CONFIG_ARCH_TEGRA_210_SOC
76 void tegra210_init_speedo_data(struct tegra_sku_info
*sku_info
);
79 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
80 extern const struct tegra_fuse_soc tegra20_fuse_soc
;
83 #ifdef CONFIG_ARCH_TEGRA_3x_SOC
84 extern const struct tegra_fuse_soc tegra30_fuse_soc
;
87 #ifdef CONFIG_ARCH_TEGRA_114_SOC
88 extern const struct tegra_fuse_soc tegra114_fuse_soc
;
91 #if defined(CONFIG_ARCH_TEGRA_124_SOC) || defined(CONFIG_ARCH_TEGRA_132_SOC)
92 extern const struct tegra_fuse_soc tegra124_fuse_soc
;
95 #ifdef CONFIG_ARCH_TEGRA_210_SOC
96 extern const struct tegra_fuse_soc tegra210_fuse_soc
;
99 #ifdef CONFIG_ARCH_TEGRA_186_SOC
100 extern const struct tegra_fuse_soc tegra186_fuse_soc
;