Tegra: platform: support Tegra186 chip id

This patch adds support to read the chip id and identify if
the current platform is Tegra186.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
This commit is contained in:
Varun Wadekar 2017-04-13 14:12:49 -07:00
parent 95a7fae42c
commit cd3de4326b
2 changed files with 12 additions and 2 deletions

View File

@ -69,6 +69,7 @@ typedef enum tegra_platform {
typedef enum tegra_chipid {
TEGRA_CHIPID_TEGRA13 = 0x13,
TEGRA_CHIPID_TEGRA21 = 0x21,
TEGRA_CHIPID_TEGRA18 = 0x18,
} tegra_chipid_t;
/*
@ -109,6 +110,13 @@ uint8_t tegra_chipid_is_t210(void)
return (chip_id == TEGRA_CHIPID_TEGRA21);
}
uint8_t tegra_chipid_is_t186(void)
{
uint32_t chip_id = (tegra_get_chipid() >> CHIP_ID_SHIFT) & CHIP_ID_MASK;
return (chip_id == TEGRA_CHIPID_TEGRA18);
}
/*
* Read the chip ID value and derive the platform
*/

View File

@ -42,8 +42,10 @@ uint32_t tegra_get_chipid_minor(void);
/*
* Tegra chip identifiers
*/
uint8_t tegra_is_t132(void);
uint8_t tegra_is_t210(void);
uint8_t tegra_chipid_is_t132(void);
uint8_t tegra_chipid_is_t210(void);
uint8_t tegra_chipid_is_t186(void);
/*
* Tegra platform identifiers