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>
This commit is contained in:
parent
286a0ab143
commit
aaac678e80
|
@ -62,3 +62,31 @@ Device (WLCO)
|
||||||
EndDependentFn ()
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ Method (ECQ2, 1, Serialized)
|
||||||
|
|
||||||
If (EBIT (E2QS, Arg0)) {
|
If (EBIT (E2QS, Arg0)) {
|
||||||
Printf ("QS EVENT")
|
Printf ("QS EVENT")
|
||||||
Notify (^WLCO, 0x90)
|
Notify (^WEVT, 0x90)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,19 +125,3 @@ Method (_Q66, 0, Serialized)
|
||||||
ECQ4 (Local0)
|
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)
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue