diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-10-29 16:11:16 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-10-30 19:44:56 +0000 |
commit | 52ce907d40074d92c5044ac2fbe5c267b166a4ee (patch) | |
tree | e373d3671913c0ae1b74fea0fe7c6ea833a3b2ae /chip | |
parent | ea71b8c2a7f5fd55717f6dc65a996e8e0bcf0ebb (diff) | |
download | chrome-ec-52ce907d40074d92c5044ac2fbe5c267b166a4ee.tar.gz |
lm4: Properly identify TM4 chip used on haswell/baytrail systems
This chip returns ver/family/partno = 0x10de, as indicated by the
datasheet. Also switch the identification code to use a switch
statement rather than re-reading the DID1 register in if-then-else.
BUG=chrome-os-partner:23679
BRANCH=none (maybe haswell branches, but it's largely cosmetic)
TEST=version command on rambi identifies the chip as ti tm4e1g31h6zrb B1
Change-Id: I4a3748413de65d3116feb7c444f5a2af5953eecd
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175008
Reviewed-by: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/lm4/system.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/chip/lm4/system.c b/chip/lm4/system.c index 05f6def1bd..589a10c99e 100644 --- a/chip/lm4/system.c +++ b/chip/lm4/system.c @@ -513,17 +513,20 @@ const char *system_get_chip_id_string(void) const char *system_get_raw_chip_name(void) { - if ((LM4_SYSTEM_DID1 & 0xffff0000) == 0x10e20000) { + switch ((LM4_SYSTEM_DID1 & 0xffff0000) >> 16) { + case 0x10de: + return "tm4e1g31h6zrb"; + case 0x10e2: return "lm4fsxhh5bb"; - } else if ((LM4_SYSTEM_DID1 & 0xffff0000) == 0x10e30000) { + case 0x10e3: return "lm4fs232h5bb"; - } else if ((LM4_SYSTEM_DID1 & 0xffff0000) == 0x10e40000) { + case 0x10e4: return "lm4fs99h5bb"; - } else if ((LM4_SYSTEM_DID1 & 0xffff0000) == 0x10e60000) { + case 0x10e6: return "lm4fs1ah5bb"; - } else if ((LM4_SYSTEM_DID1 & 0xffff0000) == 0x10ea0000) { + case 0x10ea: return "lm4fs1gh5bb"; - } else { + default: return system_get_chip_id_string(); } } |