Hannah Williams (hannah.williams(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13186
-gerrit
commit 2cbddb4b1f728a22f019a585d23e05febe105218
Author: Hannah Williams <hannah.williams(a)intel.com>
Date: Fri Jan 22 23:04:05 2016 -0800
intel/strago: Get Boot Flash Write Protect status
Read GPIO to get the status
Change-Id: Id2d56ce4b47c4cccba2de3f113afaee6c49885c9
Signed-off-by: Hannah Williams <hannah.williams(a)intel.com>
---
src/mainboard/intel/strago/chromeos.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/src/mainboard/intel/strago/chromeos.c b/src/mainboard/intel/strago/chromeos.c
index 969021c..741933f 100755
--- a/src/mainboard/intel/strago/chromeos.c
+++ b/src/mainboard/intel/strago/chromeos.c
@@ -23,12 +23,11 @@
#include <ec/google/chromeec/ec.h>
#endif
#include <rules.h>
-#include <soc/gpio.h>
+#include <gpio.h>
#include <string.h>
#include <vendorcode/google/chromeos/chromeos.h>
-/* The WP status pin lives on GPIO_SSUS_6 which is pad 36 in the SUS well. */
-#define WP_STATUS_PAD 36
+#define WP_GPIO GP_E_22
#if ENV_RAMSTAGE
#include <boot/coreboot_tables.h>
@@ -115,15 +114,14 @@ int get_write_protect_state(void)
{
/*
* The vboot loader queries this function in romstage. The GPIOs have
- * not been set up yet as that configuration is done in ramstage. The
- * hardware defaults to an input but there is a 20K pulldown. Externally
- * there is a 10K pullup. Disable the internal pull in romstage so that
- * there isn't any ambiguity in the reading.
+ * not been set up yet as that configuration is done in ramstage.
+ * Configuring this GPIO as input so that there isn't any ambiguity
+ * in the reading.
*/
#if ENV_ROMSTAGE
- ssus_disable_internal_pull(WP_STATUS_PAD);
+ gpio_input_pullup(WP_GPIO);
#endif
/* WP is enabled when the pin is reading high. */
- return ssus_get_gpio(WP_STATUS_PAD);
+ return !!gpio_get(WP_GPIO);
}
Hannah Williams (hannah.williams(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12736
-gerrit
commit d8b2280cb71857152b0cb6966241226ab1cc9132
Author: Hannah Williams <hannah.williams(a)intel.com>
Date: Sun Aug 23 17:24:43 2015 -0700
soc/braswell: Set max frequency to be turbo frequency
In set_max_freq, instead of using ratio from IA_CORE_RATIOS, using
ratio from MSR_IACORE_TURBO_RATIOS
Also, punit_init needs to be called before enabling this frequency.
Original-Reviewed-on: https://chromium-review.googlesource.com/295268
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Original-Tested-by: Hannah Williams <hannah.williams(a)intel.com>
Change-Id: Iabdab9ec45f8eef0a105a5a05dbcdb997b6764b0
Signed-off-by: Hannah Williams <hannah.williams(a)intel.com>
---
src/soc/intel/braswell/ramstage.c | 1 +
src/soc/intel/braswell/tsc_freq.c | 9 +++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/soc/intel/braswell/ramstage.c b/src/soc/intel/braswell/ramstage.c
index 1e085d7..155c8a2 100644
--- a/src/soc/intel/braswell/ramstage.c
+++ b/src/soc/intel/braswell/ramstage.c
@@ -196,6 +196,7 @@ void soc_init_pre_device(struct soc_intel_braswell_config *config)
/* Perform silicon specific init. */
intel_silicon_init();
+ set_max_freq();
set_board_id();
/* Get GPIO initial states from mainboard */
diff --git a/src/soc/intel/braswell/tsc_freq.c b/src/soc/intel/braswell/tsc_freq.c
index fff882e..f4f1a8b 100644
--- a/src/soc/intel/braswell/tsc_freq.c
+++ b/src/soc/intel/braswell/tsc_freq.c
@@ -72,18 +72,23 @@ void set_max_freq(void)
msr.lo |= (1 << 16);
wrmsr(MSR_IA32_MISC_ENABLES, msr);
+ /* Enable Burst Mode */
+ msr = rdmsr(MSR_IA32_MISC_ENABLES);
+ msr.hi = 0;
+ wrmsr(MSR_IA32_MISC_ENABLES, msr);
+
/*
* Set guranteed ratio [21:16] from IACORE_RATIOS to bits [15:8] of
* the PERF_CTL.
*/
- msr = rdmsr(MSR_IACORE_RATIOS);
+ msr = rdmsr(MSR_IACORE_TURBO_RATIOS);
perf_ctl.lo = (msr.lo & 0x3f0000) >> 8;
/*
* Set guranteed vid [21:16] from IACORE_VIDS to bits [7:0] of
* the PERF_CTL.
*/
- msr = rdmsr(MSR_IACORE_VIDS);
+ msr = rdmsr(MSR_IACORE_TURBO_VIDS);
perf_ctl.lo |= (msr.lo & 0x7f0000) >> 16;
perf_ctl.hi = 0;