Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9992
-gerrit
commit 7d7fcb2d48955a2ebd3f855dd0975754f7878080 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Fri Apr 24 16:05:58 2015 +0300
sandy/ivy boards: Rename defines from onboard.h for ACPI
Adopted style from later Chromebooks.
Change-Id: I4993b8f40489b6bf5d08e00089f36f293853629e Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/mainboard/google/butterfly/acpi/mainboard.asl | 11 ++++++++--- src/mainboard/google/butterfly/mainboard.c | 6 +++--- src/mainboard/google/butterfly/onboard.h | 7 ++++--- src/mainboard/google/link/acpi/mainboard.asl | 11 ++++++++--- src/mainboard/google/link/mainboard.c | 18 +++++++++--------- src/mainboard/google/link/onboard.h | 19 ++++++++++--------- src/mainboard/google/parrot/acpi/mainboard.asl | 16 ++++++++++++---- src/mainboard/google/parrot/mainboard.c | 12 ++++++------ src/mainboard/google/parrot/onboard.h | 10 ++++++---- src/mainboard/samsung/lumpy/acpi/mainboard.asl | 18 +++++++++++++----- src/mainboard/samsung/lumpy/mainboard.c | 12 ++++++------ src/mainboard/samsung/lumpy/onboard.h | 13 +++++++------ 12 files changed, 92 insertions(+), 61 deletions(-)
diff --git a/src/mainboard/google/butterfly/acpi/mainboard.asl b/src/mainboard/google/butterfly/acpi/mainboard.asl index c6e35e8..342193f 100644 --- a/src/mainboard/google/butterfly/acpi/mainboard.asl +++ b/src/mainboard/google/butterfly/acpi/mainboard.asl @@ -19,6 +19,8 @@ * MA 02110-1301 USA */
+#include <mainboard/google/butterfly/onboard.h> + Scope (_SB) { Device (LID0) { @@ -45,15 +47,18 @@ Scope (_SB) { Name(_HID, EisaId("PNP0C0E"))
// Trackpad Wake is GPIO11, wake from S3 - Name(_PRW, Package(){0x1b, 0x03}) + Name(_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x03 })
Name(_CRS, ResourceTemplate() { // PIRQG -> GSI22 - Interrupt (ResourceConsumer, EDGE, ActiveLow) {22} + Interrupt (ResourceConsumer, EDGE, ActiveLow) + { + BOARD_TRACKPAD_IRQ + }
// SMBUS Address 0x67 - VendorShort (ADDR) {0x67} + VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR } }) }
diff --git a/src/mainboard/google/butterfly/mainboard.c b/src/mainboard/google/butterfly/mainboard.c index 655fc2f..f83b33b 100644 --- a/src/mainboard/google/butterfly/mainboard.c +++ b/src/mainboard/google/butterfly/mainboard.c @@ -265,10 +265,10 @@ static int butterfly_onboard_smbios_data(device_t dev, int *handle,
len += smbios_write_type41( current, handle, - BUTTERFLY_TRACKPAD_NAME, /* name */ - BUTTERFLY_TRACKPAD_IRQ, /* instance */ + BOARD_TRACKPAD_NAME, /* name */ + BOARD_TRACKPAD_IRQ, /* instance */ 0, /* segment */ - BUTTERFLY_TRACKPAD_I2C_ADDR, /* bus */ + BOARD_TRACKPAD_I2C_ADDR, /* bus */ 0, /* device */ 0); /* function */
diff --git a/src/mainboard/google/butterfly/onboard.h b/src/mainboard/google/butterfly/onboard.h index e32e023..f7db29e 100644 --- a/src/mainboard/google/butterfly/onboard.h +++ b/src/mainboard/google/butterfly/onboard.h @@ -23,9 +23,10 @@ #include <arch/smp/mpspec.h> /* uses 7-bit I2C address */ /* must be set to edge triggered */ -#define BUTTERFLY_TRACKPAD_NAME "trackpad" -#define BUTTERFLY_TRACKPAD_I2C_ADDR 0x67 -#define BUTTERFLY_TRACKPAD_IRQ 22 /* PIRQG - 22 Edge triggered */ +#define BOARD_TRACKPAD_NAME "trackpad" +#define BOARD_TRACKPAD_I2C_ADDR 0x67 +#define BOARD_TRACKPAD_IRQ 22 /* PIRQG - 22 Edge triggered */ +#define BOARD_TRACKPAD_WAKE_GPIO 0x1b
/* defines for programming the MAC address */ #define BUTTERFLY_NIC_VENDOR_ID 0x10EC diff --git a/src/mainboard/google/link/acpi/mainboard.asl b/src/mainboard/google/link/acpi/mainboard.asl index a2778a0..ee727e0 100644 --- a/src/mainboard/google/link/acpi/mainboard.asl +++ b/src/mainboard/google/link/acpi/mainboard.asl @@ -19,6 +19,8 @@ * MA 02110-1301 USA */
+#include <mainboard/google/link/onboard.h> + Scope (_SB) { Device (LID0) { @@ -48,15 +50,18 @@ Scope (_SB) { Name(_HID, EisaId("PNP0C0E"))
// Trackpad Wake is GPIO12 - Name(_PRW, Package(){0x1c, 0x03}) + Name(_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x03 } )
Name(_CRS, ResourceTemplate() { // PIRQE -> GSI20 - Interrupt (ResourceConsumer, Edge, ActiveLow) {20} + Interrupt (ResourceConsumer, Edge, ActiveLow) + { + BOARD_TRACKPAD_IRQ + }
// SMBUS Address 0x4b - VendorShort (ADDR) {0x4b} + VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR } }) }
diff --git a/src/mainboard/google/link/mainboard.c b/src/mainboard/google/link/mainboard.c index ed40f8f..a3a98fc 100644 --- a/src/mainboard/google/link/mainboard.c +++ b/src/mainboard/google/link/mainboard.c @@ -173,28 +173,28 @@ static int link_onboard_smbios_data(device_t dev, int *handle,
len += smbios_write_type41( current, handle, - LINK_LIGHTSENSOR_NAME, /* name */ - LINK_LIGHTSENSOR_IRQ, /* instance */ + BOARD_LIGHTSENSOR_NAME, /* name */ + BOARD_LIGHTSENSOR_IRQ, /* instance */ 0, /* segment */ - LINK_LIGHTSENSOR_I2C_ADDR, /* bus */ + BOARD_LIGHTSENSOR_I2C_ADDR, /* bus */ 0, /* device */ 0); /* function */
len += smbios_write_type41( current, handle, - LINK_TRACKPAD_NAME, /* name */ - LINK_TRACKPAD_IRQ, /* instance */ + BOARD_TRACKPAD_NAME, /* name */ + BOARD_TRACKPAD_IRQ, /* instance */ 0, /* segment */ - LINK_TRACKPAD_I2C_ADDR, /* bus */ + BOARD_TRACKPAD_I2C_ADDR, /* bus */ 0, /* device */ 0); /* function */
len += smbios_write_type41( current, handle, - LINK_TOUCHSCREEN_NAME, /* name */ - LINK_TOUCHSCREEN_IRQ, /* instance */ + BOARD_TOUCHSCREEN_NAME, /* name */ + BOARD_TOUCHSCREEN_IRQ, /* instance */ 0, /* segment */ - LINK_TOUCHSCREEN_I2C_ADDR, /* bus */ + BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */ 0, /* device */ 0); /* function */
diff --git a/src/mainboard/google/link/onboard.h b/src/mainboard/google/link/onboard.h index eaac383..78cc85f 100644 --- a/src/mainboard/google/link/onboard.h +++ b/src/mainboard/google/link/onboard.h @@ -22,16 +22,17 @@
#include <arch/smp/mpspec.h>
-#define LINK_LIGHTSENSOR_NAME "lightsensor" -#define LINK_LIGHTSENSOR_I2C_ADDR 0x44 -#define LINK_LIGHTSENSOR_IRQ 0 +#define BOARD_LIGHTSENSOR_NAME "lightsensor" +#define BOARD_LIGHTSENSOR_I2C_ADDR 0x44 +#define BOARD_LIGHTSENSOR_IRQ 0
-#define LINK_TRACKPAD_NAME "trackpad" -#define LINK_TRACKPAD_I2C_ADDR 0x4b -#define LINK_TRACKPAD_IRQ 20 +#define BOARD_TRACKPAD_NAME "trackpad" +#define BOARD_TRACKPAD_I2C_ADDR 0x4b +#define BOARD_TRACKPAD_IRQ 20 +#define BOARD_TRACKPAD_WAKE_GPIO 0x1c
-#define LINK_TOUCHSCREEN_NAME "touchscreen" -#define LINK_TOUCHSCREEN_I2C_ADDR 0x4a -#define LINK_TOUCHSCREEN_IRQ 22 +#define BOARD_TOUCHSCREEN_NAME "touchscreen" +#define BOARD_TOUCHSCREEN_I2C_ADDR 0x4a +#define BOARD_TOUCHSCREEN_IRQ 22
#endif diff --git a/src/mainboard/google/parrot/acpi/mainboard.asl b/src/mainboard/google/parrot/acpi/mainboard.asl index 503e44b..9116c69 100644 --- a/src/mainboard/google/parrot/acpi/mainboard.asl +++ b/src/mainboard/google/parrot/acpi/mainboard.asl @@ -19,6 +19,8 @@ * MA 02110-1301 USA */
+#include <mainboard/google/parrot/onboard.h> + Scope (_GPE) { Method(_L1F, 0x0, NotSerialized) { @@ -59,19 +61,25 @@ Scope (_SB) { Name(_HID, EisaId("PNP0C0E"))
// Trackpad Wake is GPIO12, wake from S3 - Name(_PRW, Package(){0x1c, 0x03}) + Name(_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x03 })
Name(_CRS, ResourceTemplate() {
// PIRQA -> GSI16 - Interrupt (ResourceConsumer, Level, ActiveLow) {16} + Interrupt (ResourceConsumer, Level, ActiveLow) + { + BOARD_TRACKPAD_IRQ_DVT + }
// PIRQE -> GSI20 - Interrupt (ResourceConsumer, Edge, ActiveLow) {20} + Interrupt (ResourceConsumer, Edge, ActiveLow) + { + BOARD_TRACKPAD_IRQ_PVT + }
// SMBUS Address 0x67 - VendorShort (ADDR) {0x67} + VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR } }) }
diff --git a/src/mainboard/google/parrot/mainboard.c b/src/mainboard/google/parrot/mainboard.c index 547680e..39d2c84 100644 --- a/src/mainboard/google/parrot/mainboard.c +++ b/src/mainboard/google/parrot/mainboard.c @@ -62,19 +62,19 @@ static int parrot_onboard_smbios_data(device_t dev, int *handle, if (hardware_version < 0x2) { /* DVT vs PVT */ len += smbios_write_type41( current, handle, - PARROT_TRACKPAD_NAME, /* name */ - PARROT_TRACKPAD_IRQ_DVT, /* instance */ + BOARD_TRACKPAD_NAME, /* name */ + BOARD_TRACKPAD_IRQ_DVT, /* instance */ 0, /* segment */ - PARROT_TRACKPAD_I2C_ADDR, /* bus */ + BOARD_TRACKPAD_I2C_ADDR, /* bus */ 0, /* device */ 0); /* function */ } else { len += smbios_write_type41( current, handle, - PARROT_TRACKPAD_NAME, /* name */ - PARROT_TRACKPAD_IRQ_PVT, /* instance */ + BOARD_TRACKPAD_NAME, /* name */ + BOARD_TRACKPAD_IRQ_PVT, /* instance */ 0, /* segment */ - PARROT_TRACKPAD_I2C_ADDR, /* bus */ + BOARD_TRACKPAD_I2C_ADDR, /* bus */ 0, /* device */ 0); /* function */ } diff --git a/src/mainboard/google/parrot/onboard.h b/src/mainboard/google/parrot/onboard.h index f3d200d..4ed341e 100644 --- a/src/mainboard/google/parrot/onboard.h +++ b/src/mainboard/google/parrot/onboard.h @@ -22,8 +22,10 @@
#include <arch/smp/mpspec.h>
-#define PARROT_TRACKPAD_NAME "trackpad" -#define PARROT_TRACKPAD_I2C_ADDR 0x67 -#define PARROT_TRACKPAD_IRQ_DVT 16 -#define PARROT_TRACKPAD_IRQ_PVT 20 +#define BOARD_TRACKPAD_NAME "trackpad" +#define BOARD_TRACKPAD_I2C_ADDR 0x67 +#define BOARD_TRACKPAD_IRQ_DVT 16 +#define BOARD_TRACKPAD_IRQ_PVT 20 +#define BOARD_TRACKPAD_WAKE_GPIO 0x1c + #endif diff --git a/src/mainboard/samsung/lumpy/acpi/mainboard.asl b/src/mainboard/samsung/lumpy/acpi/mainboard.asl index b1ab678..435dd51 100644 --- a/src/mainboard/samsung/lumpy/acpi/mainboard.asl +++ b/src/mainboard/samsung/lumpy/acpi/mainboard.asl @@ -19,6 +19,8 @@ * MA 02110-1301 USA */
+#include <mainboard/samsung/lumpy/onboard.h> + Scope (_SB) { Device (LID0) { @@ -45,15 +47,18 @@ Scope (_SB) { Name(_HID, EisaId("PNP0C0E"))
// Trackpad Wake is GPIO11 - Name(_PRW, Package(){0x1b, 0x03}) + Name(_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x03 })
Name(_CRS, ResourceTemplate() { // PIRQF -> GSI21 - Interrupt (ResourceConsumer, Edge, ActiveLow) {21} + Interrupt (ResourceConsumer, Edge, ActiveLow) + { + BOARD_TRACKPAD_IRQ + }
// SMBUS Address 0x67 - VendorShort (ADDR) {0x67} + VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR } }) }
@@ -65,10 +70,13 @@ Scope (_SB) { Name(_CRS, ResourceTemplate() { // PIRQE -> GSI20 - Interrupt (ResourceConsumer, Edge, ActiveLow) {20} + Interrupt (ResourceConsumer, Edge, ActiveLow) + { + BOARD_LIGHTSENSOR_IRQ + }
// SMBUS Address 0x44 - VendorShort (ADDR) {0x44} + VendorShort (ADDR) { BOARD_LIGHTSENSOR_I2C_ADDR } }) } } diff --git a/src/mainboard/samsung/lumpy/mainboard.c b/src/mainboard/samsung/lumpy/mainboard.c index 3bdd4d9..6967a2b 100644 --- a/src/mainboard/samsung/lumpy/mainboard.c +++ b/src/mainboard/samsung/lumpy/mainboard.c @@ -86,14 +86,14 @@ static int lumpy_onboard_smbios_data(device_t dev, int *handle, int len = 0;
len += lumpy_smbios_type41_irq(handle, current, - LUMPY_LIGHTSENSOR_NAME, - LUMPY_LIGHTSENSOR_IRQ, - LUMPY_LIGHTSENSOR_I2C_ADDR); + BOARD_LIGHTSENSOR_NAME, + BOARD_LIGHTSENSOR_IRQ, + BOARD_LIGHTSENSOR_I2C_ADDR);
len += lumpy_smbios_type41_irq(handle, current, - LUMPY_TRACKPAD_NAME, - LUMPY_TRACKPAD_IRQ, - LUMPY_TRACKPAD_I2C_ADDR); + BOARD_TRACKPAD_NAME, + BOARD_TRACKPAD_IRQ, + BOARD_TRACKPAD_I2C_ADDR);
return len; } diff --git a/src/mainboard/samsung/lumpy/onboard.h b/src/mainboard/samsung/lumpy/onboard.h index 6bdf057..0237003 100644 --- a/src/mainboard/samsung/lumpy/onboard.h +++ b/src/mainboard/samsung/lumpy/onboard.h @@ -22,12 +22,13 @@
#include <arch/smp/mpspec.h>
-#define LUMPY_LIGHTSENSOR_NAME "lightsensor" -#define LUMPY_LIGHTSENSOR_I2C_ADDR 0x44 -#define LUMPY_LIGHTSENSOR_IRQ 20 +#define BOARD_LIGHTSENSOR_NAME "lightsensor" +#define BOARD_LIGHTSENSOR_I2C_ADDR 0x44 +#define BOARD_LIGHTSENSOR_IRQ 20
-#define LUMPY_TRACKPAD_NAME "trackpad" -#define LUMPY_TRACKPAD_I2C_ADDR 0x67 -#define LUMPY_TRACKPAD_IRQ 21 +#define BOARD_TRACKPAD_NAME "trackpad" +#define BOARD_TRACKPAD_I2C_ADDR 0x67 +#define BOARD_TRACKPAD_IRQ 21 +#define BOARD_TRACKPAD_WAKE_GPIO 0x1b
#endif