<p>Patrick Rudolph has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21003">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ec/lenovo/h8/ssdt: Add UWB ACPI interface<br><br>Add ACPI methods GUWB and SUWB for thinkpad_acpi.<br><br>Change-Id: I8f9a56e45c0d765b0e06b8d3600bd3575dd09491<br>Signed-off-by: Patrick Rudolph <siro@das-labor.org><br>---<br>M src/ec/lenovo/h8/acpi/ec.asl<br>M src/ec/lenovo/h8/ssdt.c<br>2 files changed, 67 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/21003/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl<br>index 085c9e2..9643102 100644<br>--- a/src/ec/lenovo/h8/acpi/ec.asl<br>+++ b/src/ec/lenovo/h8/acpi/ec.asl<br>@@ -42,6 +42,9 @@<br> Offset (0x30),<br> , 6,<br> ALMT, 1, /* Audio Mute + LED */<br>+ Offset (0x31),<br>+ , 2,<br>+ UWBE, 1, /* Ultra Wideband enable */<br> Offset (0x3a),<br> AMUT, 1, /* Audio Mute (internal use) */<br> , 3,<br>diff --git a/src/ec/lenovo/h8/ssdt.c b/src/ec/lenovo/h8/ssdt.c<br>index 26c0d84..7ed134b 100644<br>--- a/src/ec/lenovo/h8/ssdt.c<br>+++ b/src/ec/lenovo/h8/ssdt.c<br>@@ -239,6 +239,69 @@<br> acpigen_pop_len(); /* Method */<br> }<br> <br>+/* Generate ACPI methods GUWB and SUWB */<br>+static void h8_dsdt_uwb(struct device *dev)<br>+{<br>+ struct ec_lenovo_h8_config *conf = dev->chip_info;<br>+ if (!conf)<br>+ return;<br>+<br>+ const bool has_uwb = conf->has_uwb;<br>+<br>+ /* Method (GUWB, 0) */<br>+ acpigen_write_method("GUWB", 0);<br>+ /* Store(Zero, Local0) */<br>+ acpigen_write_store_ops(ZERO_OP, LOCAL0_OP);<br>+ if (has_uwb) {<br>+ /* UWB present */<br>+ /* Or(Local0, One, Local0) */<br>+ acpigen_write_or(LOCAL0_OP, ONE_OP, LOCAL0_OP);<br>+<br>+ /* If(LEqual(\_SB.PCI0.LPCB.EC.UWBE, One)) */<br>+ acpigen_write_if();<br>+ acpigen_emit_byte(LEQUAL_OP);<br>+ acpigen_emit_namestring(h8_dsdt_scope(dev, "UWBE"));<br>+ acpigen_emit_byte(ONE_OP);<br>+<br>+ /* Or(Local0, 2, Local0) */<br>+ acpigen_emit_byte(OR_OP);<br>+ acpigen_emit_byte(LOCAL0_OP);<br>+ acpigen_write_integer(2);<br>+ acpigen_emit_byte(LOCAL0_OP);<br>+ acpigen_pop_len(); /* If */<br>+ }<br>+ /* Return(Local0) */<br>+ acpigen_emit_byte(RETURN_OP);<br>+ acpigen_emit_byte(LOCAL0_OP);<br>+ acpigen_pop_len(); /* Method */<br>+<br>+ /* Method (SUWB, 1) */<br>+ acpigen_write_method("SUWB", 1);<br>+ if (has_uwb) {<br>+ /* And(Arg0, 2, Local0) */<br>+ acpigen_emit_byte(AND_OP);<br>+ acpigen_emit_byte(ARG0_OP);<br>+ acpigen_write_integer(2);<br>+ acpigen_emit_byte(LOCAL0_OP);<br>+ /* If(Lequal(Local0, 2)) */<br>+ acpigen_write_if_lequal_op_int(LOCAL0_OP, 2);<br>+ /* Store(One, \_SB.PCI0.LPCB.EC.UWBE) */<br>+ acpigen_write_store();<br>+ acpigen_emit_byte(ONE_OP);<br>+ acpigen_emit_namestring(h8_dsdt_scope(dev, "UWBE"));<br>+ acpigen_pop_len(); /* If */<br>+ /* Else */<br>+ acpigen_write_else();<br>+ /* Store(Zero, \_SB.PCI0.LPCB.EC.UWBE) */<br>+ acpigen_write_store();<br>+ acpigen_emit_byte(ZERO_OP);<br>+ acpigen_emit_namestring(h8_dsdt_scope(dev, "UWBE"));<br>+ acpigen_pop_len(); /* Else */<br>+ }<br>+ acpigen_pop_len(); /* Method */<br>+}<br>+<br>+<br> /*<br> * Generates EC SSDT.<br> */<br>@@ -256,6 +319,7 @@<br> h8_dsdt_bluetooth(dev);<br> h8_dsdt_wwan(dev);<br> h8_dsdt_keyboard_backlight(dev);<br>+ h8_dsdt_uwb(dev);<br> <br> acpigen_pop_len(); /* Scope HKEY */<br> }<br></pre><p>To view, visit <a href="https://review.coreboot.org/21003">change 21003</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21003"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I8f9a56e45c0d765b0e06b8d3600bd3575dd09491 </div>
<div style="display:none"> Gerrit-Change-Number: 21003 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <siro@das-labor.org> </div>