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>
This commit is contained in:
1 parent
0a63d792ed
commit
cdae45b395
3 files changed
+33
-20
No files matched your search
@@ -35,6 +35,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] = {
|
||||
|
||||
@@ -134,30 +134,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,
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user