From 8ad02684b25f2870cdea334fbd081f0ef4467cd4 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 23 Jan 2014 16:25:11 -0600 Subject: [PATCH] baytrail: add in C0 stepping idenitification support. The C0 cpuid's were added as well as the microcode, but we weren't making C0 a first class citizen in the pattrs. BUG=chrome-os-partner:24542 BRANCH=baytrail TEST=Built and booted b3. Change-Id: Ie23f8ce867f339eab3b55b8c5f49ab822f23eebb Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/183594 Reviewed-by: Duncan Laurie --- src/soc/intel/baytrail/baytrail/lpc.h | 2 ++ src/soc/intel/baytrail/ramstage.c | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/soc/intel/baytrail/baytrail/lpc.h b/src/soc/intel/baytrail/baytrail/lpc.h index 71391ade3f..31de3105e2 100644 --- a/src/soc/intel/baytrail/baytrail/lpc.h +++ b/src/soc/intel/baytrail/baytrail/lpc.h @@ -36,6 +36,7 @@ #define RID_A_STEPPING_START 1 #define RID_B_STEPPING_START 5 +#define RID_C_STEPPING_START 0xe enum baytrail_stepping { STEP_A0, STEP_A1, @@ -43,6 +44,7 @@ enum baytrail_stepping { STEP_B1, STEP_B2, STEP_B3, + STEP_C0, }; #endif /* _BAYTRAIL_LPC_H_ */ diff --git a/src/soc/intel/baytrail/ramstage.c b/src/soc/intel/baytrail/ramstage.c index 0cc932700f..e8f441f3c1 100644 --- a/src/soc/intel/baytrail/ramstage.c +++ b/src/soc/intel/baytrail/ramstage.c @@ -72,7 +72,9 @@ static inline void fill_in_msr(msr_t *msr, int idx) } } -static const char *stepping_str[] = { "A0", "A1", "B0", "B1", "B2", "B3" }; +static const char *stepping_str[] = { + "A0", "A1", "B0", "B1", "B2", "B3", "C0" +}; static void fill_in_pattrs(void) { @@ -84,7 +86,10 @@ static void fill_in_pattrs(void) dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC)); attrs->revid = pci_read_config8(dev, REVID); /* The revision to stepping IDs have two values per metal stepping. */ - if (attrs->revid >= RID_B_STEPPING_START) { + if (attrs->revid >= RID_C_STEPPING_START) { + attrs->stepping = (attrs->revid - RID_C_STEPPING_START) / 2; + attrs->stepping += STEP_C0; + } else if (attrs->revid >= RID_B_STEPPING_START) { attrs->stepping = (attrs->revid - RID_B_STEPPING_START) / 2; attrs->stepping += STEP_B0; } else {