diff options
author | Bryan Brattlof <bb@ti.com> | 2022-06-15 13:26:20 -0500 |
---|---|---|
committer | Anand Gadiyar <gadiyar@ti.com> | 2022-06-21 15:57:26 -0500 |
commit | 2a536842081388782e01a7f8588029fa59bcdaa0 (patch) | |
tree | b8735dae1f288e204c0abe9098f0c1666ea720e4 /drivers | |
parent | f4d82db64258c50b6e44411ffdf0b87770bc1aff (diff) |
soc: soc_ti_k3: identify j7200 SR2.0 SoCs
Anytime a new revision of a chip is produced, Texas Instruments
will increment the 4 bit VARIANT section of the CTRLMMR_WKUP_JTAGID
register by one. Typically this will be decoded as SR1.0 -> SR2.0 ...
however a few TI SoCs do not follow this convention.
Rather than defining a revision string for each SoC, use a default
revision string array for all TI SoCs that continue to follow the
typical 1.0 -> 2.0 revision scheme.
Signed-off-by: Bryan Brattlof <bb@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/soc/soc_ti_k3.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/drivers/soc/soc_ti_k3.c b/drivers/soc/soc_ti_k3.c index 77047f4aa37..ddd50e78b67 100644 --- a/drivers/soc/soc_ti_k3.c +++ b/drivers/soc/soc_ti_k3.c @@ -60,16 +60,12 @@ static const char *get_family_string(u32 idreg) return family; } -static char *j721e_rev_string_map[] = { - "1.0", "1.1", -}; - -static char *am64x_rev_string_map[] = { - "1.0", "2.0", +static char *typical_rev_string_map[] = { + "1.0", "2.0", "3.0", }; -static char *am65x_rev_string_map[] = { - "1.0", "2.0", +static char *j721e_rev_string_map[] = { + "1.0", "1.1", }; static const char *get_rev_string(u32 idreg) @@ -86,20 +82,10 @@ static const char *get_rev_string(u32 idreg) goto bail; return j721e_rev_string_map[rev]; - case AM65X: - if (rev > ARRAY_SIZE(am65x_rev_string_map)) - goto bail; - return am65x_rev_string_map[rev]; - - case AM64X: - if (rev > ARRAY_SIZE(am64x_rev_string_map)) - goto bail; - return am64x_rev_string_map[rev]; - - case J7200: default: - if (!rev) - return "1.0"; + if (rev > ARRAY_SIZE(typical_rev_string_map)) + goto bail; + return typical_rev_string_map[rev]; }; bail: |