summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2014-10-17 14:42:29 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-10-21 03:45:41 +0000
commite8dde0bd403f168b2f61f9bb7e5d68511db0d505 (patch)
treeb626341e518bcd55844963d6a4b2b2ebcd7cec5c
parent5e646355cb11c8e31c781f6d83cea4aa1690095c (diff)
downloadvboot-factory-samus-6375.B.tar.gz
HACK: samus: workaround for gpiochip labelfactory-samus-6375.B
The Samus EVT2 BIOS names the GPIO controller "PCH-LP" which does not match the label in the kernel. As a workaround for the factory use an alias for the PCH-LP that will allow it to find GPIOs properly. BUG=chrome-os-partner:33098 BRANCH=samus TEST='crossystem wpsw_cur' returns 1 on samus with 6300.18 firmware Change-Id: I0b2a109bf79c851d9894e938741622f5c4941da0 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/224573 Commit-Queue: Ricky Liang <jcliang@chromium.org> Tested-by: Ricky Liang <jcliang@chromium.org>
-rw-r--r--host/arch/x86/lib/crossystem_arch.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/host/arch/x86/lib/crossystem_arch.c b/host/arch/x86/lib/crossystem_arch.c
index 15a6433e..bf6baa68 100644
--- a/host/arch/x86/lib/crossystem_arch.c
+++ b/host/arch/x86/lib/crossystem_arch.c
@@ -625,6 +625,7 @@ struct GpioChipset {
const char *name;
int (*ChipOffsetAndGpioNumber)(unsigned *gpio_num, unsigned *chip_offset,
const char *name);
+ const char *label;
};
static const struct GpioChipset chipsets_supported[] = {
@@ -632,8 +633,12 @@ static const struct GpioChipset chipsets_supported[] = {
{ "CougarPoint", FindGpioChipOffset },
{ "PantherPoint", FindGpioChipOffset },
{ "LynxPoint", FindGpioChipOffset },
- { "PCH-LP", FindGpioChipOffset },
- { "INT3437:00", FindGpioChipOffsetByLabel },
+ /*
+ * FIXME(crosbug.com/p/33098): Remove this label hack once Samus
+ * firmware can be updated to pass the proper name in ACPI tables.
+ */
+ { "PCH-LP", FindGpioChipOffsetByLabel, "INT3437:00" },
+ { "INT3437:00", FindGpioChipOffsetByLabel, "INT3437:00" },
{ "BayTrail", BayTrailFindGpioChipOffset },
{ NULL },
};
@@ -693,7 +698,7 @@ static int ReadGpio(unsigned signal_type) {
/* Modify GPIO number by driver's offset */
if (!chipset->ChipOffsetAndGpioNumber(&controller_num, &controller_offset,
- chipset->name))
+ chipset->label))
return -1;
controller_offset += controller_num;