intel/kunimitsu: port the change from glados for correctly reading lid
switch and SPI write protect for fill_lb_gpios() to coreboot table. BUG=chrome-os-partner:43707 BRANCH=none TEST=build and boot on kunimits Signed-off-by: robbie zhang <robbie.zhang@intel.com> Change-Id: I82cd3f74d0ac26e369ee4274b2c65f4f93c1fd3b Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Original-Commit-Id: 804a8a60951321e1b5b1d7ddacb97ddbe0cd7680 Original-Change-Id: I31ed6c0e48089b84ef9d52753484253a091d5aa5 Original-Reviewed-on: https://chromium-review.googlesource.com/295580 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Commit-Queue: Wenkai Du <wenkai.du@intel.com> Original-Tested-by: Wenkai Du <wenkai.du@intel.com> Reviewed-on: http://review.coreboot.org/11436 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
302aeb7a4e
commit
fada85e655
|
@ -23,6 +23,7 @@
|
|||
#include <device/device.h>
|
||||
#include <device/pci.h>
|
||||
#include <ec/google/chromeec/ec.h>
|
||||
#include <gpio.h>
|
||||
#include <soc/gpio.h>
|
||||
#include <string.h>
|
||||
#include <vendorcode/google/chromeos/chromeos.h>
|
||||
|
@ -57,13 +58,13 @@ void fill_lb_gpios(struct lb_gpios *gpios)
|
|||
|
||||
int get_lid_switch(void)
|
||||
{
|
||||
/* Default to force open */
|
||||
return 1;
|
||||
/* Read lid switch state from the EC. */
|
||||
return !!(google_chromeec_get_switches() & EC_SWITCH_LID_OPEN);
|
||||
}
|
||||
|
||||
/* The dev-switch is virtual */
|
||||
int get_developer_mode_switch(void)
|
||||
{
|
||||
/* No physical developer mode switch. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -87,5 +88,6 @@ int clear_recovery_mode_switch(void)
|
|||
|
||||
int get_write_protect_state(void)
|
||||
{
|
||||
return 0;
|
||||
/* Read PCH_WP GPIO. */
|
||||
return gpio_get(GPIO_PCH_WP);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue