Antonello Dettori (dev(a)dettori.io) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16405
-gerrit
commit 821f1e75b8782039ad22f302531cafb4ac101eca
Author: Antonello Dettori <dev(a)dettori.io>
Date: Fri Sep 2 09:12:20 2016 +0200
lenovo/t60: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/lenovo/t60.
The patch has been tested both with the arch/io.h definition of device_t
enabled and disabled in order to ensure compatibility while the
transaction takes place.
Change-Id: I4d87498637d74f96ca5809b0e810755a58fc64ab
Signed-off-by: Antonello Dettori <dev(a)dettori.io>
---
src/mainboard/lenovo/t60/romstage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainboard/lenovo/t60/romstage.c b/src/mainboard/lenovo/t60/romstage.c
index 3ed6afd..d3cd90c 100644
--- a/src/mainboard/lenovo/t60/romstage.c
+++ b/src/mainboard/lenovo/t60/romstage.c
@@ -95,7 +95,7 @@ static void ich7_enable_lpc(void)
static void early_superio_config(void)
{
int timeout = 100000;
- device_t dev = PNP_DEV(0x2e, 3);
+ pnp_devfn_t dev = PNP_DEV(0x2e, 3);
pnp_write_config(dev, 0x29, 0xa0);
Antonello Dettori (dev(a)dettori.io) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16404
-gerrit
commit b51c0392c91c50dae5332b706ba56d09d637fc0d
Author: Antonello Dettori <dev(a)dettori.io>
Date: Fri Sep 2 09:08:01 2016 +0200
arch/acpi.h: add #if guard to handle the absence of device_t type
Avoid the inclusion of a function declaration if the argument type
device_t is not defined.
This was not a problem until now because the
old declaration of device_t and the new one overlapped.
Change-Id: I05a6ef1bf65bf47f3c6933073ae2d26992348813
Signed-off-by: Antonello Dettori <dev(a)dettori.io>
---
src/arch/x86/include/arch/acpi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index 21dae08..a30c5f1 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -606,7 +606,7 @@ void acpi_create_slit(acpi_slit_t *slit,
void acpi_create_ivrs(acpi_ivrs_t *ivrs,
unsigned long (*acpi_fill_ivrs)(acpi_ivrs_t* ivrs_struct, unsigned long current));
-#if ENV_RAMSTAGE
+#if ENV_RAMSTAGE && !defined(__SIMPLE_DEVICE__)
void acpi_create_hpet(acpi_hpet_t *hpet);
unsigned long acpi_write_hpet(device_t device, unsigned long start, acpi_rsdp_t *rsdp);
Antonello Dettori (dev(a)dettori.io) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16403
-gerrit
commit 610d9d29fc5b7c2f83edd71c21f18228a6075b99
Author: Antonello Dettori <dev(a)dettori.io>
Date: Thu Sep 1 17:04:14 2016 +0200
southbridge/intel/i82801ix: transition away from device_t
Replace the use of the old device_t definition inside
southbridge/intel/i82801ix.
The patch has been tested both with the arch/io.h definition of device_t
enabled and disabled in order to ensure compatibility while the
transaction takes place.
Change-Id: Ibf20e6c08994b09d2a2e68a1a1d38a7a477493aa
Signed-off-by: Antonello Dettori <dev(a)dettori.io>
---
src/southbridge/intel/i82801ix/early_init.c | 2 +-
src/southbridge/intel/i82801ix/early_smbus.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/southbridge/intel/i82801ix/early_init.c b/src/southbridge/intel/i82801ix/early_init.c
index 3d94b56..c40f9b7 100644
--- a/src/southbridge/intel/i82801ix/early_init.c
+++ b/src/southbridge/intel/i82801ix/early_init.c
@@ -19,7 +19,7 @@
void i82801ix_early_init(void)
{
- const device_t d31f0 = PCI_DEV(0, 0x1f, 0);
+ const pci_devfn_t d31f0 = PCI_DEV(0, 0x1f, 0);
/* Set up RCBA. */
pci_write_config32(d31f0, D31F0_RCBA, (uintptr_t)DEFAULT_RCBA | 1);
diff --git a/src/southbridge/intel/i82801ix/early_smbus.c b/src/southbridge/intel/i82801ix/early_smbus.c
index 3cac32f..31b33e9 100644
--- a/src/southbridge/intel/i82801ix/early_smbus.c
+++ b/src/southbridge/intel/i82801ix/early_smbus.c
@@ -24,7 +24,7 @@
void enable_smbus(void)
{
- device_t dev;
+ pci_devfn_t dev;
/* Set the SMBus device statically. */
dev = PCI_DEV(0x0, 0x1f, 0x3);
Shaunak Saha (shaunak.saha(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16400
-gerrit
commit 142dc5a3eb64aa944d5afbc0a95bbcbf2bc2e09c
Author: Shaunak Saha <shaunak.saha(a)intel.com>
Date: Thu Sep 1 22:27:15 2016 -0700
google/reef: Set up GPIO_TIER1_SCI_EN properly
Previously we were setting the gpio_tier1_sci in smihandler before
going to S3. But this won't work for S0iX as it happens from kernel
and smi handler is not involved in that flow. We need to set this bit
i.e. bit 15 in acpi gpe0a register at 0x430h. Kernel before going to
sleep checks what values are passed through asl as wake events(through _PRW)
,keeps those enabled only and clears other bits in gpe0 enable registers.
So we need to inform kernel to keep gpio_tier_sci also set as these is needed
for any wake. This patch adds a _PRW method to powerbutton asl code.
We can use the _PRW method of powerbutton. The reason of choosing powerbutton
is its the default wake source and does not need any _PRW method defined
and we cannot define more than one _PRW for any other wake source.
BUG=chrome-os-partner:56483
TEST=System resumes from S3 on lidopen,powerbutton and USB wake.
Also from S0iX system is resuming for WIFI wake.
Change-Id: Ia9a96f2923bb1720b2fa6eab66832551134c6bea
Signed-off-by: Shaunak Saha <shaunak.saha(a)intel.com>
---
src/mainboard/google/reef/acpi/mainboard.asl | 1 +
src/mainboard/google/reef/gpio.h | 6 ++++++
src/mainboard/google/reef/smihandler.c | 3 ---
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/mainboard/google/reef/acpi/mainboard.asl b/src/mainboard/google/reef/acpi/mainboard.asl
index 9665bb2..4111635 100644
--- a/src/mainboard/google/reef/acpi/mainboard.asl
+++ b/src/mainboard/google/reef/acpi/mainboard.asl
@@ -31,6 +31,7 @@ Scope (\_SB)
Device (PWRB)
{
Name (_HID, EisaId ("PNP0C0C"))
+ Name (_PRW, Package() { GPIO_TIER_1_SCI_EN, 0x3 })
}
}
diff --git a/src/mainboard/google/reef/gpio.h b/src/mainboard/google/reef/gpio.h
index dbe7062..44bdca4 100644
--- a/src/mainboard/google/reef/gpio.h
+++ b/src/mainboard/google/reef/gpio.h
@@ -21,6 +21,12 @@
/* Input device interrupt configuration */
#define TOUCHPAD_INT GPIO_18_IRQ
+/*
+ * Enables the setting of the GPIO_TIER1_SCI_STS bit to generate a wake event
+ * and/or an SCI or SMI#.
+ */
+#define GPIO_TIER_1_SCI_EN 15
+
#define BOARD_HP_MIC_CODEC_IRQ GPIO_116_IRQ
#define BOARD_HP_MIC_CODEC_I2C_ADDR 0x1a
diff --git a/src/mainboard/google/reef/smihandler.c b/src/mainboard/google/reef/smihandler.c
index d33222b..d3d6b2b 100644
--- a/src/mainboard/google/reef/smihandler.c
+++ b/src/mainboard/google/reef/smihandler.c
@@ -33,9 +33,6 @@ void mainboard_smi_sleep(u8 slp_typ)
{
gpio_configure_pads(sleep_gpio_table, ARRAY_SIZE(sleep_gpio_table));
- if (slp_typ == ACPI_S3)
- enable_gpe(GPIO_TIER_1_SCI);
-
if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC))
chromeec_smi_sleep(slp_typ, MAINBOARD_EC_S3_WAKE_EVENTS,
MAINBOARD_EC_S5_WAKE_EVENTS);