Commit cd3de432 authored by Varun Wadekar's avatar Varun Wadekar
Browse files

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: default avatarVarun Wadekar <vwadekar@nvidia.com>
Showing with 12 additions and 2 deletions
+12 -2
...@@ -69,6 +69,7 @@ typedef enum tegra_platform { ...@@ -69,6 +69,7 @@ typedef enum tegra_platform {
typedef enum tegra_chipid { typedef enum tegra_chipid {
TEGRA_CHIPID_TEGRA13 = 0x13, TEGRA_CHIPID_TEGRA13 = 0x13,
TEGRA_CHIPID_TEGRA21 = 0x21, TEGRA_CHIPID_TEGRA21 = 0x21,
TEGRA_CHIPID_TEGRA18 = 0x18,
} tegra_chipid_t; } tegra_chipid_t;
/* /*
...@@ -109,6 +110,13 @@ uint8_t tegra_chipid_is_t210(void) ...@@ -109,6 +110,13 @@ uint8_t tegra_chipid_is_t210(void)
return (chip_id == TEGRA_CHIPID_TEGRA21); 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 * Read the chip ID value and derive the platform
*/ */
......
...@@ -42,8 +42,10 @@ uint32_t tegra_get_chipid_minor(void); ...@@ -42,8 +42,10 @@ uint32_t tegra_get_chipid_minor(void);
/* /*
* Tegra chip identifiers * Tegra chip identifiers
*/ */
uint8_t tegra_is_t132(void); uint8_t tegra_chipid_is_t132(void);
uint8_t tegra_is_t210(void); uint8_t tegra_chipid_is_t210(void);
uint8_t tegra_chipid_is_t186(void);
/* /*
* Tegra platform identifiers * Tegra platform identifiers
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment