Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc/tegra: fuse: Add Tegra186 support

Tegra210 and Tegra186 are mostly compatible from a fuses point of view.
However, speedo support is implemented in the BPMP firmware, hence the
implementation needs to be skipped in the fuses driver.

Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
[treding@nvidia.com: reword commit message]
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Timo Alho and committed by
Thierry Reding
83468fe2 753863d7

+26 -2
+3
drivers/soc/tegra/fuse/fuse-tegra.c
··· 103 103 }; 104 104 105 105 static const struct of_device_id tegra_fuse_match[] = { 106 + #ifdef CONFIG_ARCH_TEGRA_186_SOC 107 + { .compatible = "nvidia,tegra186-efuse", .data = &tegra186_fuse_soc }, 108 + #endif 106 109 #ifdef CONFIG_ARCH_TEGRA_210_SOC 107 110 { .compatible = "nvidia,tegra210-efuse", .data = &tegra210_fuse_soc }, 108 111 #endif
+19 -2
drivers/soc/tegra/fuse/fuse-tegra30.c
··· 46 46 defined(CONFIG_ARCH_TEGRA_114_SOC) || \ 47 47 defined(CONFIG_ARCH_TEGRA_124_SOC) || \ 48 48 defined(CONFIG_ARCH_TEGRA_132_SOC) || \ 49 - defined(CONFIG_ARCH_TEGRA_210_SOC) 49 + defined(CONFIG_ARCH_TEGRA_210_SOC) || \ 50 + defined(CONFIG_ARCH_TEGRA_186_SOC) 50 51 static u32 tegra30_fuse_read_early(struct tegra_fuse *fuse, unsigned int offset) 51 52 { 52 53 return readl_relaxed(fuse->base + FUSE_BEGIN + offset); ··· 99 98 fuse->read = tegra30_fuse_read; 100 99 101 100 tegra_init_revision(); 102 - fuse->soc->speedo_init(&tegra_sku_info); 101 + 102 + if (fuse->soc->speedo_init) 103 + fuse->soc->speedo_init(&tegra_sku_info); 104 + 103 105 tegra30_fuse_add_randomness(); 104 106 } 105 107 #endif ··· 160 156 .init = tegra30_fuse_init, 161 157 .speedo_init = tegra210_init_speedo_data, 162 158 .info = &tegra210_fuse_info, 159 + }; 160 + #endif 161 + 162 + #if defined(CONFIG_ARCH_TEGRA_186_SOC) 163 + static const struct tegra_fuse_info tegra186_fuse_info = { 164 + .read = tegra30_fuse_read, 165 + .size = 0x300, 166 + .spare = 0x280, 167 + }; 168 + 169 + const struct tegra_fuse_soc tegra186_fuse_soc = { 170 + .init = tegra30_fuse_init, 171 + .info = &tegra186_fuse_info, 163 172 }; 164 173 #endif
+4
drivers/soc/tegra/fuse/fuse.h
··· 105 105 extern const struct tegra_fuse_soc tegra210_fuse_soc; 106 106 #endif 107 107 108 + #ifdef CONFIG_ARCH_TEGRA_186_SOC 109 + extern const struct tegra_fuse_soc tegra186_fuse_soc; 110 + #endif 111 + 108 112 #endif