mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
soc/tegra: fuse: Support revision B01
Previously, all supported SoCs only used the A major revision. The Tegra210B01 SoC incremented the major revision. Add support for this. Signed-off-by: Aaron Kling <webgeek1234@gmail.com> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
4ccb980125
commit
98442683d8
|
|
@ -34,6 +34,7 @@ static const char *tegra_revision_name[TEGRA_REVISION_MAX] = {
|
|||
[TEGRA_REVISION_A03] = "A03",
|
||||
[TEGRA_REVISION_A03p] = "A03 prime",
|
||||
[TEGRA_REVISION_A04] = "A04",
|
||||
[TEGRA_REVISION_B01] = "B01",
|
||||
};
|
||||
|
||||
static const char *tegra_platform_name[TEGRA_PLATFORM_MAX] = {
|
||||
|
|
|
|||
|
|
@ -167,30 +167,41 @@ static const struct of_device_id apbmisc_match[] __initconst = {
|
|||
|
||||
void __init tegra_init_revision(void)
|
||||
{
|
||||
u8 chip_id, minor_rev;
|
||||
u8 chip_id, major_rev, minor_rev;
|
||||
|
||||
chip_id = tegra_get_chip_id();
|
||||
major_rev = tegra_get_major_rev();
|
||||
minor_rev = tegra_get_minor_rev();
|
||||
|
||||
switch (minor_rev) {
|
||||
case 1:
|
||||
tegra_sku_info.revision = TEGRA_REVISION_A01;
|
||||
break;
|
||||
case 2:
|
||||
tegra_sku_info.revision = TEGRA_REVISION_A02;
|
||||
break;
|
||||
case 3:
|
||||
if (chip_id == TEGRA20 && (tegra_fuse_read_spare(18) ||
|
||||
tegra_fuse_read_spare(19)))
|
||||
tegra_sku_info.revision = TEGRA_REVISION_A03p;
|
||||
else
|
||||
tegra_sku_info.revision = TEGRA_REVISION_A03;
|
||||
break;
|
||||
case 4:
|
||||
tegra_sku_info.revision = TEGRA_REVISION_A04;
|
||||
break;
|
||||
default:
|
||||
tegra_sku_info.revision = TEGRA_REVISION_UNKNOWN;
|
||||
if (major_rev > 1) {
|
||||
switch (minor_rev) {
|
||||
case 1:
|
||||
tegra_sku_info.revision = TEGRA_REVISION_B01;
|
||||
break;
|
||||
default:
|
||||
tegra_sku_info.revision = TEGRA_REVISION_UNKNOWN;
|
||||
}
|
||||
} else {
|
||||
switch (minor_rev) {
|
||||
case 1:
|
||||
tegra_sku_info.revision = TEGRA_REVISION_A01;
|
||||
break;
|
||||
case 2:
|
||||
tegra_sku_info.revision = TEGRA_REVISION_A02;
|
||||
break;
|
||||
case 3:
|
||||
if (chip_id == TEGRA20 && (tegra_fuse_read_spare(18) ||
|
||||
tegra_fuse_read_spare(19)))
|
||||
tegra_sku_info.revision = TEGRA_REVISION_A03p;
|
||||
else
|
||||
tegra_sku_info.revision = TEGRA_REVISION_A03;
|
||||
break;
|
||||
case 4:
|
||||
tegra_sku_info.revision = TEGRA_REVISION_A04;
|
||||
break;
|
||||
default:
|
||||
tegra_sku_info.revision = TEGRA_REVISION_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
tegra_sku_info.sku_id = tegra_fuse_read_early(FUSE_SKU_INFO);
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ enum tegra_revision {
|
|||
TEGRA_REVISION_A03,
|
||||
TEGRA_REVISION_A03p,
|
||||
TEGRA_REVISION_A04,
|
||||
TEGRA_REVISION_B01,
|
||||
TEGRA_REVISION_MAX,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user