forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/soc/tegra/fuse/fuse.h
....@@ -1,19 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2010 Google, Inc.
34 * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
45 *
56 * Author:
67 * Colin Cross <ccross@android.com>
7
- *
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.
11
- *
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.
16
- *
178 */
189
1910 #ifndef __DRIVERS_MISC_TEGRA_FUSE_H
....@@ -22,6 +13,8 @@
2213 #include <linux/dmaengine.h>
2314 #include <linux/types.h>
2415
16
+struct nvmem_cell_lookup;
17
+struct nvmem_device;
2518 struct tegra_fuse;
2619
2720 struct tegra_fuse_info {
....@@ -36,6 +29,11 @@
3629 int (*probe)(struct tegra_fuse *fuse);
3730
3831 const struct tegra_fuse_info *info;
32
+
33
+ const struct nvmem_cell_lookup *lookups;
34
+ unsigned int num_lookups;
35
+
36
+ const struct attribute_group *soc_attr_group;
3937 };
4038
4139 struct tegra_fuse {
....@@ -57,6 +55,9 @@
5755 dma_addr_t phys;
5856 u32 *virt;
5957 } apbdma;
58
+
59
+ struct nvmem_device *nvmem;
60
+ struct nvmem_cell_lookup *lookups;
6061 };
6162
6263 void tegra_init_revision(void);
....@@ -64,6 +65,11 @@
6465
6566 u32 __init tegra_fuse_read_spare(unsigned int spare);
6667 u32 __init tegra_fuse_read_early(unsigned int offset);
68
+
69
+u8 tegra_get_major_rev(void);
70
+u8 tegra_get_minor_rev(void);
71
+
72
+extern const struct attribute_group tegra_soc_attr_group;
6773
6874 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
6975 void tegra20_init_speedo_data(struct tegra_sku_info *sku_info);
....@@ -109,4 +115,17 @@
109115 extern const struct tegra_fuse_soc tegra186_fuse_soc;
110116 #endif
111117
118
+#if IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) || \
119
+ IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC)
120
+extern const struct attribute_group tegra194_soc_attr_group;
121
+#endif
122
+
123
+#ifdef CONFIG_ARCH_TEGRA_194_SOC
124
+extern const struct tegra_fuse_soc tegra194_fuse_soc;
125
+#endif
126
+
127
+#ifdef CONFIG_ARCH_TEGRA_234_SOC
128
+extern const struct tegra_fuse_soc tegra234_fuse_soc;
129
+#endif
130
+
112131 #endif