Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/29345 )
Change subject: soc/amd/stoneyridge: Get rid of domain_read_resources
......................................................................
soc/amd/stoneyridge: Get rid of domain_read_resources
The function domain_read_resources() didn't have any code to actually
reserve any resources - it was just creating an empty resource entry.
I looked at fixing it to actually reserve the space, but the values in
the registers at the point when this runs aren't the final values that
we want to reserve anyway, they're temp values with a range much larger
than we want to reserve.
I next looked at moving the amd_initcpuio() function earlier so that we
could get the correct values for the registers, but even that doesn't
give us what we really want.
Ultimately removing this whole function seems to be the right thing.
BUG=None
TEST=Verify that the only resource that changes is the empty resource:
PCI: 00:18.0 resource base 0 size 0 align 0 gran 0 limit 0 flags 1 index 1080
Change-Id: I83bd3ea8db141416632c12fc883386070363f2f1
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/29345
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Reviewed-by: Richard Spiegel <richard.spiegel(a)silverbackltd.com>
---
M src/soc/amd/stoneyridge/chip.c
M src/soc/amd/stoneyridge/northbridge.c
2 files changed, 1 insertion(+), 38 deletions(-)
Approvals:
build bot (Jenkins): Verified
Marshall Dawson: Looks good to me, approved
Richard Spiegel: Looks good to me, approved
diff --git a/src/soc/amd/stoneyridge/chip.c b/src/soc/amd/stoneyridge/chip.c
index 33c1730..ef65887 100644
--- a/src/soc/amd/stoneyridge/chip.c
+++ b/src/soc/amd/stoneyridge/chip.c
@@ -114,7 +114,7 @@
};
struct device_operations pci_domain_ops = {
- .read_resources = domain_read_resources,
+ .read_resources = pci_domain_read_resources,
.set_resources = domain_set_resources,
.enable_resources = domain_enable_resources,
.scan_bus = pci_domain_scan_bus,
diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c
index 3dae2ba..d7a20a3 100644
--- a/src/soc/amd/stoneyridge/northbridge.c
+++ b/src/soc/amd/stoneyridge/northbridge.c
@@ -388,43 +388,6 @@
pci_write_config32(SOC_HDA0_DEV, HDA_DEV_CTRL_STATUS, value);
}
-void domain_read_resources(struct device *dev)
-{
- unsigned int reg;
- struct device *addr_map = dev_find_slot(0, ADDR_DEVFN);
-
- /* Find the already assigned resource pairs */
- for (reg = 0x80 ; reg <= 0xd8 ; reg += 0x08) {
- u32 base, limit;
- base = pci_read_config32(addr_map, reg);
- limit = pci_read_config32(addr_map, reg + 4);
- /* Is this register allocated? */
- if ((base & 3) != 0) {
- unsigned int nodeid, reg_link;
- struct device *reg_dev = dev_find_slot(0, HT_DEVFN);
- if (reg < 0xc0) /* mmio */
- nodeid = (limit & 0xf) + (base & 0x30);
- else /* io */
- nodeid = (limit & 0xf) + ((base >> 4) & 0x30);
-
- reg_link = (limit >> 4) & 7;
- if (reg_dev) {
- /* Reserve the resource */
- struct resource *res;
- res = new_resource(reg_dev,
- IOINDEX(0x1000 + reg,
- reg_link));
- if (res)
- res->flags = 1;
- }
- }
- }
- /* FIXME: do we need to check extend conf space?
- I don't believe that much preset value */
-
- pci_domain_read_resources(dev);
-}
-
void domain_enable_resources(struct device *dev)
{
/* Must be called after PCI enumeration and resource allocation */
--
To view, visit https://review.coreboot.org/29345
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I83bd3ea8db141416632c12fc883386070363f2f1
Gerrit-Change-Number: 29345
Gerrit-PatchSet: 2
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Daniel Kurtz <djkurtz(a)google.com>
Gerrit-Reviewer: Marc Jones <marc(a)marcjonesconsulting.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Richard Spiegel <richard.spiegel(a)silverbackltd.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Hello Richard Spiegel, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/29412
to look at the new patch set (#2).
Change subject: vendorcode/amd: [Test] move f*/Proc to Common/Proc
......................................................................
vendorcode/amd: [Test] move f*/Proc to Common/Proc
Change-Id: Ic897f996af393949b1240279c65298bc4ccaf571
Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr>
---
M src/mainboard/asus/f2a85-m/buildOpts.c
M src/mainboard/hp/pavilion_m6_1035dx/buildOpts.c
M src/mainboard/jetway/nf81-t56n-lf/buildOpts.c
M src/mainboard/lenovo/g505s/buildOpts.c
M src/mainboard/msi/ms7721/buildOpts.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdFch.h
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitEarly.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitEnv.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitLate.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitMid.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitPost.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitReset.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitResume.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdLateRunApTask.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdS3LateRestore.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdS3Save.c
R src/vendorcode/amd/agesa/common/Proc/Common/CommonInits.c
R src/vendorcode/amd/agesa/common/Proc/Common/CommonInits.h
R src/vendorcode/amd/agesa/common/Proc/Common/CommonReturns.c
R src/vendorcode/amd/agesa/common/Proc/Common/CreateStruct.c
R src/vendorcode/amd/agesa/common/Proc/Common/CreateStruct.h
R src/vendorcode/amd/agesa/common/Proc/Common/Makefile.inc
R src/vendorcode/amd/agesa/common/Proc/Common/S3RestoreState.c
R src/vendorcode/amd/agesa/common/Proc/Common/S3SaveState.c
R src/vendorcode/amd/agesa/common/Proc/Common/S3SaveState.h
M src/vendorcode/amd/agesa/f12/Makefile.inc
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdFch.h
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitEarly.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitEnv.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitLate.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitMid.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitPost.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitReset.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitResume.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdLateRunApTask.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdS3LateRestore.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdS3Save.c
D src/vendorcode/amd/agesa/f12/Proc/Common/CommonInits.c
D src/vendorcode/amd/agesa/f12/Proc/Common/CommonInits.h
D src/vendorcode/amd/agesa/f12/Proc/Common/CommonPage.h
D src/vendorcode/amd/agesa/f12/Proc/Common/CommonReturns.c
D src/vendorcode/amd/agesa/f12/Proc/Common/CreateStruct.c
D src/vendorcode/amd/agesa/f12/Proc/Common/CreateStruct.h
D src/vendorcode/amd/agesa/f12/Proc/Common/S3RestoreState.c
D src/vendorcode/amd/agesa/f12/Proc/Common/S3SaveState.c
D src/vendorcode/amd/agesa/f12/Proc/Common/S3SaveState.h
M src/vendorcode/amd/agesa/f14/Makefile.inc
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitEarly.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitEnv.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitLate.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitMid.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitPost.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitReset.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitResume.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdLateRunApTask.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdS3LateRestore.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdS3Save.c
D src/vendorcode/amd/agesa/f14/Proc/Common/CommonInits.c
D src/vendorcode/amd/agesa/f14/Proc/Common/CommonInits.h
D src/vendorcode/amd/agesa/f14/Proc/Common/CommonPage.h
D src/vendorcode/amd/agesa/f14/Proc/Common/CommonReturns.c
D src/vendorcode/amd/agesa/f14/Proc/Common/CreateStruct.c
D src/vendorcode/amd/agesa/f14/Proc/Common/CreateStruct.h
D src/vendorcode/amd/agesa/f14/Proc/Common/Makefile.inc
D src/vendorcode/amd/agesa/f14/Proc/Common/S3RestoreState.c
D src/vendorcode/amd/agesa/f14/Proc/Common/S3SaveState.c
D src/vendorcode/amd/agesa/f14/Proc/Common/S3SaveState.h
M src/vendorcode/amd/agesa/f15tn/Makefile.inc
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdFch.h
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitEarly.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitEnv.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitLate.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitMid.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitPost.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitReset.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitResume.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdLateRunApTask.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdS3LateRestore.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdS3Save.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/CommonInits.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/CommonInits.h
D src/vendorcode/amd/agesa/f15tn/Proc/Common/CommonPage.h
D src/vendorcode/amd/agesa/f15tn/Proc/Common/CommonReturns.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/CreateStruct.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/CreateStruct.h
D src/vendorcode/amd/agesa/f15tn/Proc/Common/Makefile.inc
D src/vendorcode/amd/agesa/f15tn/Proc/Common/S3RestoreState.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/S3SaveState.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/S3SaveState.h
M src/vendorcode/amd/agesa/f16kb/Makefile.inc
D src/vendorcode/amd/agesa/f16kb/Proc/Common/Makefile.inc
91 files changed, 9 insertions(+), 15,351 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/29412/2
--
To view, visit https://review.coreboot.org/29412
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic897f996af393949b1240279c65298bc4ccaf571
Gerrit-Change-Number: 29412
Gerrit-PatchSet: 2
Gerrit-Owner: Elyes HAOUAS <ehaouas(a)noos.fr>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Richard Spiegel <richard.spiegel(a)silverbackltd.com>
Elyes HAOUAS has uploaded this change for review. ( https://review.coreboot.org/29412
Change subject: vendorcode/amd: [Test] move f*/Proc to Common/Proc
......................................................................
vendorcode/amd: [Test] move f*/Proc to Common/Proc
Change-Id: Ic897f996af393949b1240279c65298bc4ccaf571
Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr>
---
R src/vendorcode/amd/agesa/common/Proc/Common/AmdFch.h
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitEarly.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitEnv.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitLate.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitMid.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitPost.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitReset.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdInitResume.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdLateRunApTask.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdS3LateRestore.c
R src/vendorcode/amd/agesa/common/Proc/Common/AmdS3Save.c
R src/vendorcode/amd/agesa/common/Proc/Common/CommonInits.c
R src/vendorcode/amd/agesa/common/Proc/Common/CommonInits.h
R src/vendorcode/amd/agesa/common/Proc/Common/CommonReturns.c
R src/vendorcode/amd/agesa/common/Proc/Common/CreateStruct.c
R src/vendorcode/amd/agesa/common/Proc/Common/CreateStruct.h
R src/vendorcode/amd/agesa/common/Proc/Common/Makefile.inc
R src/vendorcode/amd/agesa/common/Proc/Common/S3RestoreState.c
R src/vendorcode/amd/agesa/common/Proc/Common/S3SaveState.c
R src/vendorcode/amd/agesa/common/Proc/Common/S3SaveState.h
M src/vendorcode/amd/agesa/f12/Makefile.inc
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdFch.h
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitEarly.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitEnv.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitLate.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitMid.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitPost.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitReset.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdInitResume.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdLateRunApTask.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdS3LateRestore.c
D src/vendorcode/amd/agesa/f12/Proc/Common/AmdS3Save.c
D src/vendorcode/amd/agesa/f12/Proc/Common/CommonInits.c
D src/vendorcode/amd/agesa/f12/Proc/Common/CommonInits.h
D src/vendorcode/amd/agesa/f12/Proc/Common/CommonPage.h
D src/vendorcode/amd/agesa/f12/Proc/Common/CommonReturns.c
D src/vendorcode/amd/agesa/f12/Proc/Common/CreateStruct.c
D src/vendorcode/amd/agesa/f12/Proc/Common/CreateStruct.h
D src/vendorcode/amd/agesa/f12/Proc/Common/S3RestoreState.c
D src/vendorcode/amd/agesa/f12/Proc/Common/S3SaveState.c
D src/vendorcode/amd/agesa/f12/Proc/Common/S3SaveState.h
M src/vendorcode/amd/agesa/f14/Makefile.inc
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitEarly.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitEnv.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitLate.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitMid.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitPost.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitReset.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdInitResume.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdLateRunApTask.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdS3LateRestore.c
D src/vendorcode/amd/agesa/f14/Proc/Common/AmdS3Save.c
D src/vendorcode/amd/agesa/f14/Proc/Common/CommonInits.c
D src/vendorcode/amd/agesa/f14/Proc/Common/CommonInits.h
D src/vendorcode/amd/agesa/f14/Proc/Common/CommonPage.h
D src/vendorcode/amd/agesa/f14/Proc/Common/CommonReturns.c
D src/vendorcode/amd/agesa/f14/Proc/Common/CreateStruct.c
D src/vendorcode/amd/agesa/f14/Proc/Common/CreateStruct.h
D src/vendorcode/amd/agesa/f14/Proc/Common/Makefile.inc
D src/vendorcode/amd/agesa/f14/Proc/Common/S3RestoreState.c
D src/vendorcode/amd/agesa/f14/Proc/Common/S3SaveState.c
D src/vendorcode/amd/agesa/f14/Proc/Common/S3SaveState.h
M src/vendorcode/amd/agesa/f15tn/Makefile.inc
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdFch.h
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitEarly.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitEnv.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitLate.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitMid.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitPost.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitReset.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdInitResume.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdLateRunApTask.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdS3LateRestore.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/AmdS3Save.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/CommonInits.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/CommonInits.h
D src/vendorcode/amd/agesa/f15tn/Proc/Common/CommonPage.h
D src/vendorcode/amd/agesa/f15tn/Proc/Common/CommonReturns.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/CreateStruct.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/CreateStruct.h
D src/vendorcode/amd/agesa/f15tn/Proc/Common/Makefile.inc
D src/vendorcode/amd/agesa/f15tn/Proc/Common/S3RestoreState.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/S3SaveState.c
D src/vendorcode/amd/agesa/f15tn/Proc/Common/S3SaveState.h
M src/vendorcode/amd/agesa/f16kb/Makefile.inc
D src/vendorcode/amd/agesa/f16kb/Proc/Common/Makefile.inc
86 files changed, 4 insertions(+), 15,346 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/29412/1
--
To view, visit https://review.coreboot.org/29412
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic897f996af393949b1240279c65298bc4ccaf571
Gerrit-Change-Number: 29412
Gerrit-PatchSet: 1
Gerrit-Owner: Elyes HAOUAS <ehaouas(a)noos.fr>
Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/29411
Change subject: mb/google/sarien: Enable Wilco EC
......................................................................
mb/google/sarien: Enable Wilco EC
The Sarien mainboard uses the newly added Wilco EC.
- enable CONFIG_EC_GOOGLE_WILCO
- add the device and host command ranges to the devicetree
- have the mainboard SMI handlers call the EC handlers
- add EC and SuperIO devices to the ACPI DSDT
- call the early init hook for serial setup
Change-Id: Idfc4a4af52a613de910ec313d657167918aa2619
Signed-off-by: Duncan Laurie <dlaurie(a)google.com>
---
M src/mainboard/google/sarien/Kconfig
M src/mainboard/google/sarien/Makefile.inc
M src/mainboard/google/sarien/bootblock.c
M src/mainboard/google/sarien/dsdt.asl
A src/mainboard/google/sarien/smihandler.c
M src/mainboard/google/sarien/variants/arcada/devicetree.cb
A src/mainboard/google/sarien/variants/arcada/include/variant/ec.h
M src/mainboard/google/sarien/variants/sarien/devicetree.cb
A src/mainboard/google/sarien/variants/sarien/include/variant/ec.h
9 files changed, 135 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/11/29411/1
diff --git a/src/mainboard/google/sarien/Kconfig b/src/mainboard/google/sarien/Kconfig
index ac1afd5..fcf9f44 100644
--- a/src/mainboard/google/sarien/Kconfig
+++ b/src/mainboard/google/sarien/Kconfig
@@ -6,6 +6,7 @@
select DRIVERS_I2C_HID
select DRIVERS_SPI_ACPI
select DRIVERS_PS2_KEYBOARD
+ select EC_GOOGLE_WILCO
select GENERIC_SPD_BIN
select HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
diff --git a/src/mainboard/google/sarien/Makefile.inc b/src/mainboard/google/sarien/Makefile.inc
index d0b1cef..3370900 100644
--- a/src/mainboard/google/sarien/Makefile.inc
+++ b/src/mainboard/google/sarien/Makefile.inc
@@ -19,6 +19,8 @@
romstage-y += romstage.c
+smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c
+
bootblock-$(CONFIG_CHROMEOS) += chromeos.c
ramstage-$(CONFIG_CHROMEOS) += chromeos.c
romstage-$(CONFIG_CHROMEOS) += chromeos.c
diff --git a/src/mainboard/google/sarien/bootblock.c b/src/mainboard/google/sarien/bootblock.c
index 399a127..bee9b1a 100644
--- a/src/mainboard/google/sarien/bootblock.c
+++ b/src/mainboard/google/sarien/bootblock.c
@@ -14,6 +14,7 @@
*/
#include <bootblock_common.h>
+#include <ec/google/wilco/bootblock.h>
#include <soc/gpio.h>
#include <variant/gpio.h>
@@ -29,4 +30,5 @@
void bootblock_mainboard_init(void)
{
early_config_gpio();
+ wilco_ec_early_init();
}
diff --git a/src/mainboard/google/sarien/dsdt.asl b/src/mainboard/google/sarien/dsdt.asl
index 3295078..26efdb7 100644
--- a/src/mainboard/google/sarien/dsdt.asl
+++ b/src/mainboard/google/sarien/dsdt.asl
@@ -13,6 +13,8 @@
* GNU General Public License for more details.
*/
+#include "variant/ec.h"
+
DefinitionBlock(
"dsdt.aml",
"DSDT",
@@ -50,4 +52,15 @@
/* Chipset specific sleep states */
#include <soc/intel/cannonlake/acpi/sleepstates.asl>
+
+#if IS_ENABLED(CONFIG_EC_GOOGLE_WILCO)
+ /* Chrome OS Embedded Controller */
+ Scope (\_SB.PCI0.LPCB)
+ {
+ /* ACPI code for EC SuperIO functions */
+ #include <ec/google/wilco/acpi/superio.asl>
+ /* ACPI code for EC functions */
+ #include <ec/google/wilco/acpi/ec.asl>
+ }
+#endif
}
diff --git a/src/mainboard/google/sarien/smihandler.c b/src/mainboard/google/sarien/smihandler.c
new file mode 100644
index 0000000..0efcaa9
--- /dev/null
+++ b/src/mainboard/google/sarien/smihandler.c
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Google LLC
+ *
+ * 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 <cpu/x86/smm.h>
+#include <ec/google/wilco/smm.h>
+#include <soc/smm.h>
+#include <variant/ec.h>
+
+void mainboard_smi_espi_handler(void)
+{
+ wilco_ec_smi_espi();
+}
+
+void mainboard_smi_sleep(u8 slp_typ)
+{
+ wilco_ec_smi_sleep(slp_typ);
+}
+
+int mainboard_smi_apmc(u8 apmc)
+{
+ wilco_ec_smi_apmc(apmc);
+ return 0;
+}
diff --git a/src/mainboard/google/sarien/variants/arcada/devicetree.cb b/src/mainboard/google/sarien/variants/arcada/devicetree.cb
index 939acd2..e3b9680 100644
--- a/src/mainboard/google/sarien/variants/arcada/devicetree.cb
+++ b/src/mainboard/google/sarien/variants/arcada/devicetree.cb
@@ -8,6 +8,11 @@
register "gpe0_dw1" = "PMC_GPP_C"
register "gpe0_dw2" = "PMC_GPP_D"
+ # EC host command ranges
+ register "gen1_dec" = "0x00040931" # 0x930-0x937
+ register "gen2_dec" = "0x00040941" # 0x940-0x947
+ register "gen3_dec" = "0x000c0951" # 0x950-0x95f
+
# FSP configuration
register "SaGv" = "3"
register "HeciEnabled" = "1"
@@ -152,7 +157,11 @@
device pci 1e.1 off end # UART #1
device pci 1e.2 off end # GSPI #0
device pci 1e.3 off end # GSPI #1
- device pci 1f.0 on end # LPC/eSPI
+ device pci 1f.0 on
+ chip ec/google/wilco
+ device pnp 0c09.0 on end
+ end
+ end # LPC/eSPI
device pci 1f.1 on end # P2SB
device pci 1f.2 on end # Power Management Controller
device pci 1f.3 on end # Intel HDA
diff --git a/src/mainboard/google/sarien/variants/arcada/include/variant/ec.h b/src/mainboard/google/sarien/variants/arcada/include/variant/ec.h
new file mode 100644
index 0000000..cb73092
--- /dev/null
+++ b/src/mainboard/google/sarien/variants/arcada/include/variant/ec.h
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Google LLC
+ *
+ * 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 VARIANT_EC_H
+#define VARIANT_EC_H
+
+#include <soc/gpe.h>
+#include <soc/gpio.h>
+
+/* EC wake pin */
+#define EC_WAKE_PIN GPE0_DW1_12
+
+/* eSPI virtual wire reporting */
+#define EC_SCI_GPI GPE0_ESPI
+
+/* Enable PS/2 keyboard */
+#define SIO_EC_ENABLE_PS2K
+
+#endif
diff --git a/src/mainboard/google/sarien/variants/sarien/devicetree.cb b/src/mainboard/google/sarien/variants/sarien/devicetree.cb
index 1f262bf..1360b3f 100644
--- a/src/mainboard/google/sarien/variants/sarien/devicetree.cb
+++ b/src/mainboard/google/sarien/variants/sarien/devicetree.cb
@@ -8,6 +8,11 @@
register "gpe0_dw1" = "PMC_GPP_C"
register "gpe0_dw2" = "PMC_GPP_D"
+ # EC host command ranges
+ register "gen1_dec" = "0x00040931" # 0x930-0x937
+ register "gen2_dec" = "0x00040941" # 0x940-0x947
+ register "gen3_dec" = "0x000c0951" # 0x950-0x95f
+
# FSP configuration
register "SaGv" = "3"
register "HeciEnabled" = "1"
@@ -152,7 +157,11 @@
device pci 1e.1 off end # UART #1
device pci 1e.2 off end # GSPI #0
device pci 1e.3 off end # GSPI #1
- device pci 1f.0 on end # LPC/eSPI
+ device pci 1f.0 on
+ chip ec/google/wilco
+ device pnp 0c09.0 on end
+ end
+ end # LPC/eSPI
device pci 1f.1 on end # P2SB
device pci 1f.2 on end # Power Management Controller
device pci 1f.3 on end # Intel HDA
diff --git a/src/mainboard/google/sarien/variants/sarien/include/variant/ec.h b/src/mainboard/google/sarien/variants/sarien/include/variant/ec.h
new file mode 100644
index 0000000..cb73092
--- /dev/null
+++ b/src/mainboard/google/sarien/variants/sarien/include/variant/ec.h
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Google LLC
+ *
+ * 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 VARIANT_EC_H
+#define VARIANT_EC_H
+
+#include <soc/gpe.h>
+#include <soc/gpio.h>
+
+/* EC wake pin */
+#define EC_WAKE_PIN GPE0_DW1_12
+
+/* eSPI virtual wire reporting */
+#define EC_SCI_GPI GPE0_ESPI
+
+/* Enable PS/2 keyboard */
+#define SIO_EC_ENABLE_PS2K
+
+#endif
--
To view, visit https://review.coreboot.org/29411
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfc4a4af52a613de910ec313d657167918aa2619
Gerrit-Change-Number: 29411
Gerrit-PatchSet: 1
Gerrit-Owner: Duncan Laurie <dlaurie(a)chromium.org>
Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/29408
Change subject: ec/google/wilco: Add wake pin configuration
......................................................................
ec/google/wilco: Add wake pin configuration
Add a way for the mainboard to provide a wake pin that the EC
will use to wake the system. This defines a _PRW object.
Change-Id: I94954104bbb8226683c37abc8c0465fe3c62a693
Signed-off-by: Duncan Laurie <dlaurie(a)google.com>
---
M src/ec/google/wilco/acpi/ec_dev.asl
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/29408/1
diff --git a/src/ec/google/wilco/acpi/ec_dev.asl b/src/ec/google/wilco/acpi/ec_dev.asl
index 0519ff0..a3e8c48 100644
--- a/src/ec/google/wilco/acpi/ec_dev.asl
+++ b/src/ec/google/wilco/acpi/ec_dev.asl
@@ -18,6 +18,9 @@
Name (_HID, "GOOG000C")
Name (_UID, 1)
Name (_DDN, "Wilco EC Command Device")
+#ifdef EC_WAKE_PIN
+ Name (_PRW, Package () { EC_WAKE_PIN, 0x5 })
+#endif
Method (_STA)
{
--
To view, visit https://review.coreboot.org/29408
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I94954104bbb8226683c37abc8c0465fe3c62a693
Gerrit-Change-Number: 29408
Gerrit-PatchSet: 1
Gerrit-Owner: Duncan Laurie <dlaurie(a)chromium.org>
Marshall Dawson has uploaded a new patch set (#2). ( https://review.coreboot.org/29406 )
Change subject: NOT_FOR_MERGE soc/amd/stoneridge: Add DRAM check for s3
......................................................................
NOT_FOR_MERGE soc/amd/stoneridge: Add DRAM check for s3
Allocate cbmem space to store DRAM check data during S3. Verify the
the data is unchanged during the resume. Due to where the save and
verify steps are placed, the test cannot capture 100% of potential
memory corruption causes in coreboot.
The ranges to verify are determined by the coreboot tables that are
constructed at the end of POST. If a failure occurs within RAM available
to the OS, the test reports "ERROR" to force suspend_stress_test to
stop. Otherwise, the mismatch is reported as "FYI", e.g. in memory
owned by coreboot.
The granularity of blocks to check within each range is configurable,
and defaults to 1MB. The size of data stored for each block is 32 bits.
Both parameters may be changed if desired.
CAUTION: This test must not be deployed in a shipping system. It
disables TSEG, and its protections, in order to allow the
performance to be at an acceptable level.
TODO: Add the capability of checking DRAM above 4GB.
TEST=Suspend and resume grunt. Verify mismatch with induced error.
BUG=b:118157730
Change-Id: I375dd7ea9a3ab8992f1616126bcbd9724e4fc9a0
Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
---
M src/soc/amd/common/block/pi/amd_resume_final.c
M src/soc/amd/stoneyridge/Kconfig
M src/soc/amd/stoneyridge/Makefile.inc
M src/soc/amd/stoneyridge/finalize.c
M src/soc/amd/stoneyridge/include/soc/iomap.h
A src/soc/amd/stoneyridge/include/soc/s3test_util.h
A src/soc/amd/stoneyridge/s3test_util.c
M src/soc/amd/stoneyridge/smihandler.c
8 files changed, 431 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/29406/2
--
To view, visit https://review.coreboot.org/29406
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I375dd7ea9a3ab8992f1616126bcbd9724e4fc9a0
Gerrit-Change-Number: 29406
Gerrit-PatchSet: 2
Gerrit-Owner: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>