Stefan Ott has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40664 )
Change subject: mb/lenovo/{x201,t410}: Move ThinkLight code ......................................................................
mb/lenovo/{x201,t410}: Move ThinkLight code
This patch moves the code to control the ThinkLight to the common ACPI folder for h8. This reduces code duplication and allows other ThinkPads to include the same code for ThinkLight support.
Change-Id: I57de7516051bdcbb23fc21b4de352f265075893b Signed-off-by: Stefan Ott stefan@ott.net --- A src/ec/lenovo/h8/acpi/light.asl M src/mainboard/lenovo/t410/acpi/platform.asl M src/mainboard/lenovo/t410/dsdt.asl M src/mainboard/lenovo/x201/acpi/platform.asl M src/mainboard/lenovo/x201/dsdt.asl 5 files changed, 23 insertions(+), 30 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/40664/1
diff --git a/src/ec/lenovo/h8/acpi/light.asl b/src/ec/lenovo/h8/acpi/light.asl new file mode 100644 index 0000000..d9b1f41 --- /dev/null +++ b/src/ec/lenovo/h8/acpi/light.asl @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* This file is part of the coreboot project. */ + +Method(UCMS, 1, Serialized) +{ + Switch(ToInteger(Arg0)) + { + Case (0x0c) /* Turn on ThinkLight */ + { + _SB.PCI0.LPCB.EC.LGHT(1) + } + Case (0x0d) /* Turn off ThinkLight */ + { + _SB.PCI0.LPCB.EC.LGHT(0) + } + } +} diff --git a/src/mainboard/lenovo/t410/acpi/platform.asl b/src/mainboard/lenovo/t410/acpi/platform.asl index a5c3964..3bea226 100644 --- a/src/mainboard/lenovo/t410/acpi/platform.asl +++ b/src/mainboard/lenovo/t410/acpi/platform.asl @@ -22,18 +22,3 @@ /* Not implemented. */ Return(Package(){0,0}) } - -Method(UCMS, 1, Serialized) -{ - Switch(ToInteger(Arg0)) - { - Case (0x0c) /* Turn on ThinkLight */ - { - _SB.PCI0.LPCB.EC.LGHT(1) - } - Case (0x0d) /* Turn off ThinkLight */ - { - _SB.PCI0.LPCB.EC.LGHT(0) - } - } -} diff --git a/src/mainboard/lenovo/t410/dsdt.asl b/src/mainboard/lenovo/t410/dsdt.asl index c49c31b..1463049 100644 --- a/src/mainboard/lenovo/t410/dsdt.asl +++ b/src/mainboard/lenovo/t410/dsdt.asl @@ -76,4 +76,7 @@
/* Dock support code */ #include "acpi/dock.asl" + + /* ThinkLight */ + #include <ec/lenovo/h8/acpi/light.asl> } diff --git a/src/mainboard/lenovo/x201/acpi/platform.asl b/src/mainboard/lenovo/x201/acpi/platform.asl index 2f3b215..2677b84 100644 --- a/src/mainboard/lenovo/x201/acpi/platform.asl +++ b/src/mainboard/lenovo/x201/acpi/platform.asl @@ -27,21 +27,6 @@ Return(Package(){0,0}) }
-Method(UCMS, 1, Serialized) -{ - Switch(ToInteger(Arg0)) - { - Case (0x0c) /* Turn on ThinkLight */ - { - _SB.PCI0.LPCB.EC.LGHT(1) - } - Case (0x0d) /* Turn off ThinkLight */ - { - _SB.PCI0.LPCB.EC.LGHT(0) - } - } -} - /* System Bus */
Scope(_SB) diff --git a/src/mainboard/lenovo/x201/dsdt.asl b/src/mainboard/lenovo/x201/dsdt.asl index c49c31b..1463049 100644 --- a/src/mainboard/lenovo/x201/dsdt.asl +++ b/src/mainboard/lenovo/x201/dsdt.asl @@ -76,4 +76,7 @@
/* Dock support code */ #include "acpi/dock.asl" + + /* ThinkLight */ + #include <ec/lenovo/h8/acpi/light.asl> }
Hello build bot (Jenkins), Alexander Couzens, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40664
to look at the new patch set (#2).
Change subject: mb/lenovo/{x201,t410}: Move ThinkLight code ......................................................................
mb/lenovo/{x201,t410}: Move ThinkLight code
This patch moves the code to control the ThinkLight to the common ACPI folder for h8. This reduces code duplication and allows other ThinkPads to include the same code for ThinkLight support.
Change-Id: I57de7516051bdcbb23fc21b4de352f265075893b Signed-off-by: Stefan Ott stefan@ott.net --- A src/ec/lenovo/h8/acpi/thinklight.asl M src/mainboard/lenovo/t410/acpi/platform.asl M src/mainboard/lenovo/t410/dsdt.asl M src/mainboard/lenovo/x201/acpi/platform.asl M src/mainboard/lenovo/x201/dsdt.asl 5 files changed, 21 insertions(+), 30 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/40664/2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40664 )
Change subject: mb/lenovo/{x201,t410}: Move ThinkLight code ......................................................................
Patch Set 2: Code-Review+2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40664 )
Change subject: mb/lenovo/{x201,t410}: Move ThinkLight code ......................................................................
Patch Set 2: Code-Review+1
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40664 )
Change subject: mb/lenovo/{x201,t410}: Move ThinkLight code ......................................................................
mb/lenovo/{x201,t410}: Move ThinkLight code
This patch moves the code to control the ThinkLight to the common ACPI folder for h8. This reduces code duplication and allows other ThinkPads to include the same code for ThinkLight support.
Change-Id: I57de7516051bdcbb23fc21b4de352f265075893b Signed-off-by: Stefan Ott stefan@ott.net Reviewed-on: https://review.coreboot.org/c/coreboot/+/40664 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net --- A src/ec/lenovo/h8/acpi/thinklight.asl M src/mainboard/lenovo/t410/acpi/platform.asl M src/mainboard/lenovo/t410/dsdt.asl M src/mainboard/lenovo/x201/acpi/platform.asl M src/mainboard/lenovo/x201/dsdt.asl 5 files changed, 21 insertions(+), 30 deletions(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Angel Pons: Looks good to me, approved
diff --git a/src/ec/lenovo/h8/acpi/thinklight.asl b/src/ec/lenovo/h8/acpi/thinklight.asl new file mode 100644 index 0000000..d9b1f41 --- /dev/null +++ b/src/ec/lenovo/h8/acpi/thinklight.asl @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* This file is part of the coreboot project. */ + +Method(UCMS, 1, Serialized) +{ + Switch(ToInteger(Arg0)) + { + Case (0x0c) /* Turn on ThinkLight */ + { + _SB.PCI0.LPCB.EC.LGHT(1) + } + Case (0x0d) /* Turn off ThinkLight */ + { + _SB.PCI0.LPCB.EC.LGHT(0) + } + } +} diff --git a/src/mainboard/lenovo/t410/acpi/platform.asl b/src/mainboard/lenovo/t410/acpi/platform.asl index a5c3964..3bea226 100644 --- a/src/mainboard/lenovo/t410/acpi/platform.asl +++ b/src/mainboard/lenovo/t410/acpi/platform.asl @@ -22,18 +22,3 @@ /* Not implemented. */ Return(Package(){0,0}) } - -Method(UCMS, 1, Serialized) -{ - Switch(ToInteger(Arg0)) - { - Case (0x0c) /* Turn on ThinkLight */ - { - _SB.PCI0.LPCB.EC.LGHT(1) - } - Case (0x0d) /* Turn off ThinkLight */ - { - _SB.PCI0.LPCB.EC.LGHT(0) - } - } -} diff --git a/src/mainboard/lenovo/t410/dsdt.asl b/src/mainboard/lenovo/t410/dsdt.asl index c49c31b..c2624d4 100644 --- a/src/mainboard/lenovo/t410/dsdt.asl +++ b/src/mainboard/lenovo/t410/dsdt.asl @@ -76,4 +76,6 @@
/* Dock support code */ #include "acpi/dock.asl" + + #include <ec/lenovo/h8/acpi/thinklight.asl> } diff --git a/src/mainboard/lenovo/x201/acpi/platform.asl b/src/mainboard/lenovo/x201/acpi/platform.asl index 2f3b215..2677b84 100644 --- a/src/mainboard/lenovo/x201/acpi/platform.asl +++ b/src/mainboard/lenovo/x201/acpi/platform.asl @@ -27,21 +27,6 @@ Return(Package(){0,0}) }
-Method(UCMS, 1, Serialized) -{ - Switch(ToInteger(Arg0)) - { - Case (0x0c) /* Turn on ThinkLight */ - { - _SB.PCI0.LPCB.EC.LGHT(1) - } - Case (0x0d) /* Turn off ThinkLight */ - { - _SB.PCI0.LPCB.EC.LGHT(0) - } - } -} - /* System Bus */
Scope(_SB) diff --git a/src/mainboard/lenovo/x201/dsdt.asl b/src/mainboard/lenovo/x201/dsdt.asl index c49c31b..c2624d4 100644 --- a/src/mainboard/lenovo/x201/dsdt.asl +++ b/src/mainboard/lenovo/x201/dsdt.asl @@ -76,4 +76,6 @@
/* Dock support code */ #include "acpi/dock.asl" + + #include <ec/lenovo/h8/acpi/thinklight.asl> }