From 93a6665e0cf29971b92550ff020b8c2f67c17202 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 19 Mar 2013 15:25:46 -0500 Subject: [PATCH] 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 Reviewed-on: http://review.coreboot.org/2861 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/mainboard/intel/wtm2/chromeos.c | 12 ++++++++---- 1 file 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 #include +/* Compile-time settings for developer and recovery mode. */ +#define DEV_MODE_SETTING 1 +#define REC_MODE_SETTING 0 + #ifndef __PRE_RAM__ #include #include @@ -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)