| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2010 Google, Inc. |
|---|
| 3 | 4 | * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved. |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * Author: |
|---|
| 6 | 7 | * 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 | | - * |
|---|
| 17 | 8 | */ |
|---|
| 18 | 9 | |
|---|
| 19 | 10 | #ifndef __DRIVERS_MISC_TEGRA_FUSE_H |
|---|
| .. | .. |
|---|
| 22 | 13 | #include <linux/dmaengine.h> |
|---|
| 23 | 14 | #include <linux/types.h> |
|---|
| 24 | 15 | |
|---|
| 16 | +struct nvmem_cell_lookup; |
|---|
| 17 | +struct nvmem_device; |
|---|
| 25 | 18 | struct tegra_fuse; |
|---|
| 26 | 19 | |
|---|
| 27 | 20 | struct tegra_fuse_info { |
|---|
| .. | .. |
|---|
| 36 | 29 | int (*probe)(struct tegra_fuse *fuse); |
|---|
| 37 | 30 | |
|---|
| 38 | 31 | 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; |
|---|
| 39 | 37 | }; |
|---|
| 40 | 38 | |
|---|
| 41 | 39 | struct tegra_fuse { |
|---|
| .. | .. |
|---|
| 57 | 55 | dma_addr_t phys; |
|---|
| 58 | 56 | u32 *virt; |
|---|
| 59 | 57 | } apbdma; |
|---|
| 58 | + |
|---|
| 59 | + struct nvmem_device *nvmem; |
|---|
| 60 | + struct nvmem_cell_lookup *lookups; |
|---|
| 60 | 61 | }; |
|---|
| 61 | 62 | |
|---|
| 62 | 63 | void tegra_init_revision(void); |
|---|
| .. | .. |
|---|
| 64 | 65 | |
|---|
| 65 | 66 | u32 __init tegra_fuse_read_spare(unsigned int spare); |
|---|
| 66 | 67 | 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; |
|---|
| 67 | 73 | |
|---|
| 68 | 74 | #ifdef CONFIG_ARCH_TEGRA_2x_SOC |
|---|
| 69 | 75 | void tegra20_init_speedo_data(struct tegra_sku_info *sku_info); |
|---|
| .. | .. |
|---|
| 109 | 115 | extern const struct tegra_fuse_soc tegra186_fuse_soc; |
|---|
| 110 | 116 | #endif |
|---|
| 111 | 117 | |
|---|
| 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 | + |
|---|
| 112 | 131 | #endif |
|---|