diff options
Diffstat (limited to 'src/mainboard/google/stout')
-rw-r--r-- | src/mainboard/google/stout/chromeos.c | 16 | ||||
-rw-r--r-- | src/mainboard/google/stout/gpio.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/stout/romstage.c | 1 |
3 files changed, 4 insertions, 15 deletions
diff --git a/src/mainboard/google/stout/chromeos.c b/src/mainboard/google/stout/chromeos.c index a2abaed24a..4c7a9f5037 100644 --- a/src/mainboard/google/stout/chromeos.c +++ b/src/mainboard/google/stout/chromeos.c @@ -21,6 +21,7 @@ #include <device/pci.h> #include <southbridge/intel/bd82x6x/pch.h> +#include <southbridge/intel/common/gpio.h> #include "ec.h" #include <ec/quanta/it8518/ec.h> @@ -81,20 +82,7 @@ void fill_lb_gpios(struct lb_gpios *gpios) int get_write_protect_state(void) { - device_t dev; -#ifdef __PRE_RAM__ - dev = PCI_DEV(0, 0x1f, 0); -#else - dev = dev_find_slot(0, PCI_DEVFN(0x1f, 0)); -#endif - u16 gpio_base = pci_read_config32(dev, GPIOBASE) & 0xfffe; - - if (!gpio_base) - return 0; - - u32 gp_lvl = inl(gpio_base + GP_LVL); - - return !((gp_lvl >> 7) & 1); + return !get_gpio(7); } int get_lid_switch(void) diff --git a/src/mainboard/google/stout/gpio.c b/src/mainboard/google/stout/gpio.c index 7fffe8b48b..43134ea264 100644 --- a/src/mainboard/google/stout/gpio.c +++ b/src/mainboard/google/stout/gpio.c @@ -16,7 +16,7 @@ #ifndef STOUT_GPIO_H #define STOUT_GPIO_H -#include "southbridge/intel/bd82x6x/gpio.h" +#include <southbridge/intel/common/gpio.h> const struct pch_gpio_set1 pch_gpio_set1_mode = { .gpio0 = GPIO_MODE_GPIO, /* GPIO0 */ diff --git a/src/mainboard/google/stout/romstage.c b/src/mainboard/google/stout/romstage.c index 983988ce5d..8348e4f158 100644 --- a/src/mainboard/google/stout/romstage.c +++ b/src/mainboard/google/stout/romstage.c @@ -30,6 +30,7 @@ #include <northbridge/intel/sandybridge/raminit.h> #include <northbridge/intel/sandybridge/raminit_native.h> #include <southbridge/intel/bd82x6x/pch.h> +#include <southbridge/intel/common/gpio.h> #include <arch/cpu.h> #include <cpu/x86/msr.h> #include <halt.h> |