Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31204
Change subject: ec/google/wilco: Add ACPI device for event interface ......................................................................
ec/google/wilco: Add ACPI device for event interface
Add a separate ACPI device for the Wilco EC event interface so that the OS drivers can bind to it separately. Since the event handling is all done with ACPI and not mailbox calls this will be implemented as a standard acpi_driver in the kernel.
BUG=b:119046283 TEST=veriy device exists in DSDT
Change-Id: I5259a926fb6d5faea835bcdefa12f0184c5adf4a Signed-off-by: Duncan Laurie dlaurie@google.com --- M src/ec/google/wilco/acpi/ec_dev.asl M src/ec/google/wilco/acpi/event.asl 2 files changed, 28 insertions(+), 16 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/31204/1
diff --git a/src/ec/google/wilco/acpi/ec_dev.asl b/src/ec/google/wilco/acpi/ec_dev.asl index a3e8c48..fb43747 100644 --- a/src/ec/google/wilco/acpi/ec_dev.asl +++ b/src/ec/google/wilco/acpi/ec_dev.asl @@ -62,3 +62,31 @@ EndDependentFn () }) } + +Device (WEVT) +{ + Name (_HID, "GOOG000D") + Name (_UID, 1) + Name (_DDN, "Wilco EC Event Interface") + + Method (_STA) + { + Return (0xB) + } + + /* Get Event Buffer */ + Method (QSET, 0, Serialized) + { + /* Get count of event bytes */ + Local0 = R (QSEC) + Name (QBUF, Buffer (Local0) {}) + + /* Fill QS event buffer with Local0 bytes */ + For (Local1 = 0, Local1 < Local0, Local1++) { + QBUF[Local1] = R (QSEB) + } + + Printf ("QS = %o", QBUF) + Return (QBUF) + } +} diff --git a/src/ec/google/wilco/acpi/event.asl b/src/ec/google/wilco/acpi/event.asl index 4a3394f..754ed26 100644 --- a/src/ec/google/wilco/acpi/event.asl +++ b/src/ec/google/wilco/acpi/event.asl @@ -125,19 +125,3 @@ ECQ4 (Local0) } } - -/* Get Event Buffer */ -Method (QSET, 0, Serialized) -{ - /* Get count of event bytes */ - Local0 = R (QSEC) - Name (QBUF, Buffer (Local0) {}) - - /* Fill QS event buffer with Local0 bytes */ - For (Local1 = 0, Local1 < Local0, Local1++) { - QBUF[Local1] = R (QSEB) - } - - Printf ("QS = %o", QBUF) - Return (QBUF) -}
Duncan Laurie has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/31204 )
Change subject: ec/google/wilco: Add ACPI device for event interface ......................................................................
ec/google/wilco: Add ACPI device for event interface
Add a separate ACPI device for the Wilco EC event interface so that the OS drivers can bind to it separately. Since the event handling is all done with ACPI and not mailbox calls this will be implemented as a standard acpi_driver in the kernel.
BUG=b:119046283 TEST=veriy device exists in DSDT
Change-Id: I5259a926fb6d5faea835bcdefa12f0184c5adf4a Signed-off-by: Duncan Laurie dlaurie@google.com --- M src/ec/google/wilco/acpi/ec_dev.asl M src/ec/google/wilco/acpi/event.asl 2 files changed, 28 insertions(+), 16 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/31204/2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31204 )
Change subject: ec/google/wilco: Add ACPI device for event interface ......................................................................
Patch Set 2: Code-Review+2
Hello build bot (Jenkins), Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31204
to look at the new patch set (#4).
Change subject: ec/google/wilco: Add ACPI device for event interface ......................................................................
ec/google/wilco: Add ACPI device for event interface
Add a separate ACPI device for the Wilco EC event interface so that the OS drivers can bind to it separately. Since the event handling is all done with ACPI and not mailbox calls this will be implemented as a standard acpi_driver in the kernel.
BUG=b:119046283 TEST=veriy device exists in DSDT
Change-Id: I5259a926fb6d5faea835bcdefa12f0184c5adf4a Signed-off-by: Duncan Laurie dlaurie@google.com --- M src/ec/google/wilco/acpi/ec_dev.asl M src/ec/google/wilco/acpi/event.asl 2 files changed, 29 insertions(+), 17 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/31204/4
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31204 )
Change subject: ec/google/wilco: Add ACPI device for event interface ......................................................................
Patch Set 4: Code-Review+2
Duncan Laurie has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/31204 )
Change subject: ec/google/wilco: Add ACPI device for event interface ......................................................................
ec/google/wilco: Add ACPI device for event interface
Add a separate ACPI device for the Wilco EC event interface so that the OS drivers can bind to it separately. Since the event handling is all done with ACPI and not mailbox calls this will be implemented as a standard acpi_driver in the kernel.
BUG=b:119046283 TEST=veriy device exists in DSDT
Change-Id: I5259a926fb6d5faea835bcdefa12f0184c5adf4a Signed-off-by: Duncan Laurie dlaurie@google.com Reviewed-on: https://review.coreboot.org/c/31204 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Furquan Shaikh furquan@google.com --- M src/ec/google/wilco/acpi/ec_dev.asl M src/ec/google/wilco/acpi/event.asl 2 files changed, 29 insertions(+), 17 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/ec/google/wilco/acpi/ec_dev.asl b/src/ec/google/wilco/acpi/ec_dev.asl index a3e8c48..634e243 100644 --- a/src/ec/google/wilco/acpi/ec_dev.asl +++ b/src/ec/google/wilco/acpi/ec_dev.asl @@ -62,3 +62,31 @@ EndDependentFn () }) } + +Device (WEVT) +{ + Name (_HID, "GOOG000D") + Name (_UID, 1) + Name (_DDN, "Wilco EC Event Interface") + + Method (_STA) + { + Return (0xB) + } + + /* Get Event Buffer */ + Method (QSET, 0, Serialized) + { + /* Get count of event bytes */ + Local0 = R (QSEC) + Name (QBUF, Buffer (Local0) {}) + + /* Fill QS event buffer with Local0 bytes */ + For (Local1 = 0, Local1 < Local0, Local1++) { + QBUF[Local1] = R (QSEB) + } + + Printf ("QS = %o", QBUF) + Return (QBUF) + } +} diff --git a/src/ec/google/wilco/acpi/event.asl b/src/ec/google/wilco/acpi/event.asl index 4a3394f..d818d22 100644 --- a/src/ec/google/wilco/acpi/event.asl +++ b/src/ec/google/wilco/acpi/event.asl @@ -79,7 +79,7 @@
If (EBIT (E2QS, Arg0)) { Printf ("QS EVENT") - Notify (^WLCO, 0x90) + Notify (^WEVT, 0x90) } }
@@ -125,19 +125,3 @@ ECQ4 (Local0) } } - -/* Get Event Buffer */ -Method (QSET, 0, Serialized) -{ - /* Get count of event bytes */ - Local0 = R (QSEC) - Name (QBUF, Buffer (Local0) {}) - - /* Fill QS event buffer with Local0 bytes */ - For (Local1 = 0, Local1 < Local0, Local1++) { - QBUF[Local1] = R (QSEB) - } - - Printf ("QS = %o", QBUF) - Return (QBUF) -}