Stefan Reinauer (stefan.reinauer@coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2861
-gerrit
commit 721565e38049dc1e03fe2ef0205287c7b52cadad Author: Aaron Durbin adurbin@chromium.org Date: Tue Mar 19 15:25:46 2013 -0500
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 --- 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 c2386a8..7ef7458 100644 --- a/src/mainboard/intel/wtm2/chromeos.c +++ b/src/mainboard/intel/wtm2/chromeos.c @@ -28,6 +28,10 @@ #endif #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> @@ -58,8 +62,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); @@ -68,12 +72,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)