summaryrefslogtreecommitdiff
path: root/src/mainboard/intel/wtm2
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2013-03-19 15:25:46 -0500
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-03-22 00:17:49 +0100
commit93a6665e0cf29971b92550ff020b8c2f67c17202 (patch)
treea2a2c75f240b2cfab8327d4bb0840bdf16f4f241 /src/mainboard/intel/wtm2
parent54553d9fc18d28033202c6b48c6b8cb49967c7e5 (diff)
wtm2: build-time dev and recovery settings
It's helpful to switch back and forth for developer and recovery settings while testing boards. The wtm2 board currently doesn't have gpios which dynamically seelect that. Might as well make it easy to change the value for each setting with one define. The original defaults are kept. Change-Id: I7b928c592fd20a1b847e4733f4cdef09d6ddad4c Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/2861 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/mainboard/intel/wtm2')
-rw-r--r--src/mainboard/intel/wtm2/chromeos.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mainboard/intel/wtm2/chromeos.c b/src/mainboard/intel/wtm2/chromeos.c
index 7cc0ef405c..385791d159 100644
--- a/src/mainboard/intel/wtm2/chromeos.c
+++ b/src/mainboard/intel/wtm2/chromeos.c
@@ -24,6 +24,10 @@
#include <device/pci.h>
#include <southbridge/intel/lynxpoint/pch.h>
+/* Compile-time settings for developer and recovery mode. */
+#define DEV_MODE_SETTING 1
+#define REC_MODE_SETTING 0
+
#ifndef __PRE_RAM__
#include <boot/coreboot_tables.h>
#include <arch/coreboot_tables.h>
@@ -54,8 +58,8 @@ void fill_lb_gpios(struct lb_gpios *gpios)
gpio = gpios->gpios;
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "write protect", 0);
- fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "recovery", 0); // force off
- fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "developer", 1); // force on
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "recovery", REC_MODE_SETTING);
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "developer", DEV_MODE_SETTING);
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "lid", 1); // force open
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "power", 0);
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", oprom_is_loaded);
@@ -64,12 +68,12 @@ void fill_lb_gpios(struct lb_gpios *gpios)
int get_developer_mode_switch(void)
{
- return 1; // force on
+ return DEV_MODE_SETTING;
}
int get_recovery_mode_switch(void)
{
- return 0; // force off
+ return REC_MODE_SETTING;
}
int get_write_protect_state(void)