mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-18 11:54:37 +08:00
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>
This commit is contained in:
parent
753863d7f8
commit
83468fe259
@ -103,6 +103,9 @@ static struct tegra_fuse *fuse = &(struct tegra_fuse) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct of_device_id tegra_fuse_match[] = {
|
static const struct of_device_id tegra_fuse_match[] = {
|
||||||
|
#ifdef CONFIG_ARCH_TEGRA_186_SOC
|
||||||
|
{ .compatible = "nvidia,tegra186-efuse", .data = &tegra186_fuse_soc },
|
||||||
|
#endif
|
||||||
#ifdef CONFIG_ARCH_TEGRA_210_SOC
|
#ifdef CONFIG_ARCH_TEGRA_210_SOC
|
||||||
{ .compatible = "nvidia,tegra210-efuse", .data = &tegra210_fuse_soc },
|
{ .compatible = "nvidia,tegra210-efuse", .data = &tegra210_fuse_soc },
|
||||||
#endif
|
#endif
|
||||||
|
@ -46,7 +46,8 @@
|
|||||||
defined(CONFIG_ARCH_TEGRA_114_SOC) || \
|
defined(CONFIG_ARCH_TEGRA_114_SOC) || \
|
||||||
defined(CONFIG_ARCH_TEGRA_124_SOC) || \
|
defined(CONFIG_ARCH_TEGRA_124_SOC) || \
|
||||||
defined(CONFIG_ARCH_TEGRA_132_SOC) || \
|
defined(CONFIG_ARCH_TEGRA_132_SOC) || \
|
||||||
defined(CONFIG_ARCH_TEGRA_210_SOC)
|
defined(CONFIG_ARCH_TEGRA_210_SOC) || \
|
||||||
|
defined(CONFIG_ARCH_TEGRA_186_SOC)
|
||||||
static u32 tegra30_fuse_read_early(struct tegra_fuse *fuse, unsigned int offset)
|
static u32 tegra30_fuse_read_early(struct tegra_fuse *fuse, unsigned int offset)
|
||||||
{
|
{
|
||||||
return readl_relaxed(fuse->base + FUSE_BEGIN + offset);
|
return readl_relaxed(fuse->base + FUSE_BEGIN + offset);
|
||||||
@ -98,7 +99,10 @@ static void __init tegra30_fuse_init(struct tegra_fuse *fuse)
|
|||||||
fuse->read = tegra30_fuse_read;
|
fuse->read = tegra30_fuse_read;
|
||||||
|
|
||||||
tegra_init_revision();
|
tegra_init_revision();
|
||||||
fuse->soc->speedo_init(&tegra_sku_info);
|
|
||||||
|
if (fuse->soc->speedo_init)
|
||||||
|
fuse->soc->speedo_init(&tegra_sku_info);
|
||||||
|
|
||||||
tegra30_fuse_add_randomness();
|
tegra30_fuse_add_randomness();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -158,3 +162,16 @@ const struct tegra_fuse_soc tegra210_fuse_soc = {
|
|||||||
.info = &tegra210_fuse_info,
|
.info = &tegra210_fuse_info,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_ARCH_TEGRA_186_SOC)
|
||||||
|
static const struct tegra_fuse_info tegra186_fuse_info = {
|
||||||
|
.read = tegra30_fuse_read,
|
||||||
|
.size = 0x300,
|
||||||
|
.spare = 0x280,
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct tegra_fuse_soc tegra186_fuse_soc = {
|
||||||
|
.init = tegra30_fuse_init,
|
||||||
|
.info = &tegra186_fuse_info,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
@ -105,4 +105,8 @@ extern const struct tegra_fuse_soc tegra124_fuse_soc;
|
|||||||
extern const struct tegra_fuse_soc tegra210_fuse_soc;
|
extern const struct tegra_fuse_soc tegra210_fuse_soc;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_ARCH_TEGRA_186_SOC
|
||||||
|
extern const struct tegra_fuse_soc tegra186_fuse_soc;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user