Duncan Laurie (dlaurie(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17138
-gerrit
commit 315dbb16a8182c3aba495761ea8f1a0b29cc45cd
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Mon Oct 17 19:47:51 2016 -0700
skylake: Use COMMON_FADT
Remove the FADT from the individual mainboards and select and
use COMMON_FADT in the SOC instead. Set the ACPI revision to 5.
Change-Id: Ieb87c467c71bc125f80c7d941486c2fbc9cd4020
Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
---
src/mainboard/google/chell/fadt.c | 47 ------------------------------------
src/mainboard/google/glados/fadt.c | 47 ------------------------------------
src/mainboard/google/lars/fadt.c | 47 ------------------------------------
src/mainboard/intel/kblrvp/fadt.c | 47 ------------------------------------
src/mainboard/intel/kunimitsu/fadt.c | 47 ------------------------------------
src/soc/intel/skylake/Kconfig | 1 +
src/soc/intel/skylake/acpi.c | 5 +++-
7 files changed, 5 insertions(+), 236 deletions(-)
diff --git a/src/mainboard/google/chell/fadt.c b/src/mainboard/google/chell/fadt.c
deleted file mode 100644
index 92987f9..0000000
--- a/src/mainboard/google/chell/fadt.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- * Copyright (C) 2015 Google Inc.
- * Copyright (C) 2015 Intel Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <string.h>
-#include <soc/acpi.h>
-
-void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
-{
- acpi_header_t *header = &(fadt->header);
-
- memset((void *) fadt, 0, sizeof(acpi_fadt_t));
- memcpy(header->signature, "FACP", 4);
- header->length = sizeof(acpi_fadt_t);
- header->revision = 5;
- memcpy(header->oem_id, OEM_ID, 6);
- memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
- memcpy(header->asl_compiler_id, ASLC, 4);
- header->asl_compiler_revision = 1;
-
- fadt->firmware_ctrl = (unsigned long) facs;
- fadt->dsdt = (unsigned long) dsdt;
- fadt->model = 1;
- fadt->preferred_pm_profile = PM_MOBILE;
-
- fadt->x_firmware_ctl_l = (unsigned long)facs;
- fadt->x_firmware_ctl_h = 0;
- fadt->x_dsdt_l = (unsigned long)dsdt;
- fadt->x_dsdt_h = 0;
-
- acpi_fill_in_fadt(fadt);
-
- header->checksum = acpi_checksum((void *) fadt, header->length);
-}
diff --git a/src/mainboard/google/glados/fadt.c b/src/mainboard/google/glados/fadt.c
deleted file mode 100644
index 92987f9..0000000
--- a/src/mainboard/google/glados/fadt.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- * Copyright (C) 2015 Google Inc.
- * Copyright (C) 2015 Intel Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <string.h>
-#include <soc/acpi.h>
-
-void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
-{
- acpi_header_t *header = &(fadt->header);
-
- memset((void *) fadt, 0, sizeof(acpi_fadt_t));
- memcpy(header->signature, "FACP", 4);
- header->length = sizeof(acpi_fadt_t);
- header->revision = 5;
- memcpy(header->oem_id, OEM_ID, 6);
- memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
- memcpy(header->asl_compiler_id, ASLC, 4);
- header->asl_compiler_revision = 1;
-
- fadt->firmware_ctrl = (unsigned long) facs;
- fadt->dsdt = (unsigned long) dsdt;
- fadt->model = 1;
- fadt->preferred_pm_profile = PM_MOBILE;
-
- fadt->x_firmware_ctl_l = (unsigned long)facs;
- fadt->x_firmware_ctl_h = 0;
- fadt->x_dsdt_l = (unsigned long)dsdt;
- fadt->x_dsdt_h = 0;
-
- acpi_fill_in_fadt(fadt);
-
- header->checksum = acpi_checksum((void *) fadt, header->length);
-}
diff --git a/src/mainboard/google/lars/fadt.c b/src/mainboard/google/lars/fadt.c
deleted file mode 100644
index 05fea01..0000000
--- a/src/mainboard/google/lars/fadt.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- * Copyright (C) 2014 Google Inc.
- * Copyright (C) 2015 Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <string.h>
-#include <soc/acpi.h>
-
-void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
-{
- acpi_header_t *header = &(fadt->header);
-
- memset((void *) fadt, 0, sizeof(acpi_fadt_t));
- memcpy(header->signature, "FACP", 4);
- header->length = sizeof(acpi_fadt_t);
- header->revision = 5;
- memcpy(header->oem_id, OEM_ID, 6);
- memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
- memcpy(header->asl_compiler_id, ASLC, 4);
- header->asl_compiler_revision = 1;
-
- fadt->firmware_ctrl = (unsigned long) facs;
- fadt->dsdt = (unsigned long) dsdt;
- fadt->model = 1;
- fadt->preferred_pm_profile = PM_MOBILE;
-
- fadt->x_firmware_ctl_l = (unsigned long)facs;
- fadt->x_firmware_ctl_h = 0;
- fadt->x_dsdt_l = (unsigned long)dsdt;
- fadt->x_dsdt_h = 0;
-
- acpi_fill_in_fadt(fadt);
-
- header->checksum = acpi_checksum((void *) fadt, header->length);
-}
diff --git a/src/mainboard/intel/kblrvp/fadt.c b/src/mainboard/intel/kblrvp/fadt.c
deleted file mode 100644
index 49301e3..0000000
--- a/src/mainboard/intel/kblrvp/fadt.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- * Copyright (C) 2014 Google Inc.
- * Copyright (C) 2016 Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <string.h>
-#include <soc/acpi.h>
-
-void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
-{
- acpi_header_t *header = &(fadt->header);
-
- memset((void *) fadt, 0, sizeof(acpi_fadt_t));
- memcpy(header->signature, "FACP", 4);
- header->length = sizeof(acpi_fadt_t);
- header->revision = 5;
- memcpy(header->oem_id, OEM_ID, 6);
- memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
- memcpy(header->asl_compiler_id, ASLC, 4);
- header->asl_compiler_revision = 1;
-
- fadt->firmware_ctrl = (unsigned long) facs;
- fadt->dsdt = (unsigned long) dsdt;
- fadt->model = 1;
- fadt->preferred_pm_profile = PM_MOBILE;
-
- fadt->x_firmware_ctl_l = (unsigned long)facs;
- fadt->x_firmware_ctl_h = 0;
- fadt->x_dsdt_l = (unsigned long)dsdt;
- fadt->x_dsdt_h = 0;
-
- acpi_fill_in_fadt(fadt);
-
- header->checksum = acpi_checksum((void *) fadt, header->length);
-}
diff --git a/src/mainboard/intel/kunimitsu/fadt.c b/src/mainboard/intel/kunimitsu/fadt.c
deleted file mode 100644
index 05fea01..0000000
--- a/src/mainboard/intel/kunimitsu/fadt.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- * Copyright (C) 2014 Google Inc.
- * Copyright (C) 2015 Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <string.h>
-#include <soc/acpi.h>
-
-void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
-{
- acpi_header_t *header = &(fadt->header);
-
- memset((void *) fadt, 0, sizeof(acpi_fadt_t));
- memcpy(header->signature, "FACP", 4);
- header->length = sizeof(acpi_fadt_t);
- header->revision = 5;
- memcpy(header->oem_id, OEM_ID, 6);
- memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
- memcpy(header->asl_compiler_id, ASLC, 4);
- header->asl_compiler_revision = 1;
-
- fadt->firmware_ctrl = (unsigned long) facs;
- fadt->dsdt = (unsigned long) dsdt;
- fadt->model = 1;
- fadt->preferred_pm_profile = PM_MOBILE;
-
- fadt->x_firmware_ctl_l = (unsigned long)facs;
- fadt->x_firmware_ctl_h = 0;
- fadt->x_dsdt_l = (unsigned long)dsdt;
- fadt->x_dsdt_h = 0;
-
- acpi_fill_in_fadt(fadt);
-
- header->checksum = acpi_checksum((void *) fadt, header->length);
-}
diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig
index a5fb0e8..7591d66 100644
--- a/src/soc/intel/skylake/Kconfig
+++ b/src/soc/intel/skylake/Kconfig
@@ -19,6 +19,7 @@ config CPU_SPECIFIC_OPTIONS
select CACHE_RELOCATED_RAMSTAGE_OUTSIDE_CBMEM if RELOCATABLE_RAMSTAGE
select C_ENVIRONMENT_BOOTBLOCK
select COLLECT_TIMESTAMPS
+ select COMMON_FADT
select CPU_INTEL_FIRMWARE_INTERFACE_TABLE
select GENERIC_GPIO_LIB
select HAVE_HARD_RESET
diff --git a/src/soc/intel/skylake/acpi.c b/src/soc/intel/skylake/acpi.c
index ca7bafa..fc4f58c 100644
--- a/src/soc/intel/skylake/acpi.c
+++ b/src/soc/intel/skylake/acpi.c
@@ -223,12 +223,15 @@ unsigned long acpi_fill_madt(unsigned long current)
return acpi_madt_irq_overrides(current);
}
-void acpi_fill_in_fadt(acpi_fadt_t *fadt)
+void acpi_fill_fadt(acpi_fadt_t *fadt)
{
const uint16_t pmbase = ACPI_BASE_ADDRESS;
const struct device *dev = dev_find_slot(0, PCH_DEVFN_LPC);
config_t *config = dev->chip_info;
+ /* Use ACPI 5.0 revision */
+ fadt->header.revision = ACPI_FADT_REV_ACPI_5_0;
+
fadt->sci_int = acpi_sci_irq();
fadt->smi_cmd = APM_CNT;
fadt->acpi_enable = APM_CNT_ACPI_ENABLE;
the following patch was just integrated into master:
commit 16e660560ab4892d8a3add2068b187b633c63361
Author: Furquan Shaikh <furquan(a)chromium.org>
Date: Fri Oct 21 16:42:45 2016 -0700
drivers/i2c/wacom_ts: Add support for WCOM touchscreen device driver
BUG=chrome-os-partner:57846
Change-Id: Id6bd91b3fd6420994ad5811d362618b1a38a8afa
Signed-off-by: Furquan Shaikh <furquan(a)chromium.org>
Reviewed-on: https://review.coreboot.org/17092
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Reviewed-by: Duncan Laurie <dlaurie(a)chromium.org>
See https://review.coreboot.org/17092 for details.
-gerrit
the following patch was just integrated into master:
commit f8a4f41d48acc9ecffc9d74185fad0cb8651f4da
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Mon Oct 24 17:49:35 2016 +0200
nb/x4x/gma.c: Remove writes to DP, FDI registers
Those registers are only used on more recent Intel platforms featuring a
PCH. The DP registers on G4X hardware are at a different offset.
Change-Id: I4660e547426ccec0b2095d897e4a8c86e0acf41e
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17111
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
See https://review.coreboot.org/17111 for details.
-gerrit
the following patch was just integrated into master:
commit 606b8bccb53e5bbc840d29657faaf333eff51e38
Author: Arthur Heymans <arthur(a)aheymans.xyz>
Date: Mon Oct 24 17:44:20 2016 +0200
nb/gm45/gma.c: Remove writes to DP, FDI registers
Those registers are only used on more recent Intel platforms featuring a
PCH. The DP registers on G4X hardware are at a different offset.
Change-Id: Ib49e54d4e7d6595dc09fb1be35ac8178b80c7f71
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17110
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
See https://review.coreboot.org/17110 for details.
-gerrit
the following patch was just integrated into master:
commit 04be6b5949dae23ad989a35a2e6e6f750add6d04
Author: Nico Huber <nico.h(a)gmx.de>
Date: Sat Oct 22 20:01:34 2016 +0200
nb/intel/i945: Add PCI id for I945GC
Also drop an odd comment about the resource allocator which seems to
work fine, with the right id.
Change-Id: I9099211fe946c28f90dd7730345b81a3f7f6f545
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
Reviewed-on: https://review.coreboot.org/17095
Reviewed-by: Arthur Heymans <arthur(a)aheymans.xyz>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
See https://review.coreboot.org/17095 for details.
-gerrit
Furquan Shaikh (furquan(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17092
-gerrit
commit 1b6f933d50fcabd3776168eb246c19da2be815d1
Author: Furquan Shaikh <furquan(a)chromium.org>
Date: Fri Oct 21 16:42:45 2016 -0700
drivers/i2c/wacom_ts: Add support for WCOM touchscreen device driver
BUG=chrome-os-partner:57846
Change-Id: Id6bd91b3fd6420994ad5811d362618b1a38a8afa
Signed-off-by: Furquan Shaikh <furquan(a)chromium.org>
---
src/drivers/i2c/wacom_ts/Kconfig | 3 ++
src/drivers/i2c/wacom_ts/Makefile.inc | 1 +
src/drivers/i2c/wacom_ts/chip.h | 30 ++++++++++++++++++
src/drivers/i2c/wacom_ts/ts.c | 59 +++++++++++++++++++++++++++++++++++
4 files changed, 93 insertions(+)
diff --git a/src/drivers/i2c/wacom_ts/Kconfig b/src/drivers/i2c/wacom_ts/Kconfig
new file mode 100644
index 0000000..50da3f1
--- /dev/null
+++ b/src/drivers/i2c/wacom_ts/Kconfig
@@ -0,0 +1,3 @@
+config DRIVERS_I2C_WACOM_TS
+ bool
+ select DRIVERS_I2C_GENERIC
diff --git a/src/drivers/i2c/wacom_ts/Makefile.inc b/src/drivers/i2c/wacom_ts/Makefile.inc
new file mode 100644
index 0000000..9455099
--- /dev/null
+++ b/src/drivers/i2c/wacom_ts/Makefile.inc
@@ -0,0 +1 @@
+ramstage-$(CONFIG_DRIVERS_I2C_WACOM_TS) += ts.c
diff --git a/src/drivers/i2c/wacom_ts/chip.h b/src/drivers/i2c/wacom_ts/chip.h
new file mode 100644
index 0000000..b59f630
--- /dev/null
+++ b/src/drivers/i2c/wacom_ts/chip.h
@@ -0,0 +1,30 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __I2C_WACOM_TS_CHIP_H__
+#define __I2C_WACOM_TS_CHIP_H__
+
+#include <drivers/i2c/generic/chip.h>
+
+#define WCOM50C1_HID "WCOM50C1"
+#define PNP0C50_CID "PNP0C50"
+#define WCOM_TS_DESC "WCOM Touchscreen"
+
+struct drivers_i2c_wacom_ts_config {
+ struct drivers_i2c_generic_config generic;
+ uint8_t hid_desc_reg_offset;
+};
+
+#endif /* __I2C_WACOM_TS_CHIP_H__ */
diff --git a/src/drivers/i2c/wacom_ts/ts.c b/src/drivers/i2c/wacom_ts/ts.c
new file mode 100644
index 0000000..ebc8883
--- /dev/null
+++ b/src/drivers/i2c/wacom_ts/ts.c
@@ -0,0 +1,59 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <arch/acpigen_dsm.h>
+#include <device/device.h>
+#include <stdint.h>
+#include "chip.h"
+
+static void i2c_wacom_ts_fill_dsm(struct device *dev)
+{
+ struct drivers_i2c_wacom_ts_config *config = dev->chip_info;
+ struct dsm_i2c_hid_config dsm_config = {
+ .hid_desc_reg_offset = config->hid_desc_reg_offset,
+ };
+
+ acpigen_write_dsm_i2c_hid(&dsm_config);
+}
+
+static void i2c_wacom_ts_fill_ssdt_generator(struct device *dev)
+{
+ i2c_generic_fill_ssdt(dev, &i2c_wacom_ts_fill_dsm);
+}
+
+static const char *i2c_wacom_ts_acpi_name(struct device *dev)
+{
+ return "WCTS";
+}
+
+static struct device_operations i2c_wacom_ts_ops = {
+ .read_resources = DEVICE_NOOP,
+ .set_resources = DEVICE_NOOP,
+ .enable_resources = DEVICE_NOOP,
+#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+ .acpi_name = &i2c_wacom_ts_acpi_name,
+ .acpi_fill_ssdt_generator = &i2c_wacom_ts_fill_ssdt_generator,
+#endif
+};
+
+static void i2c_wacom_ts_enable(struct device *dev)
+{
+ dev->ops = &i2c_wacom_ts_ops;
+}
+
+struct chip_operations drivers_i2c_wacom_ts_ops = {
+ CHIP_NAME("Wacom Touchscreen Device")
+ .enable_dev = &i2c_wacom_ts_enable
+};