Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33508
Change subject: mb/lenovo/x201/smihandler.c: Remove useless smihandler code ......................................................................
mb/lenovo/x201/smihandler.c: Remove useless smihandler code
This code to handle the brightness from SMM is copied from the Lenovo Thinkpad X60 code, but does not work on later generation. The PCI device it tries to address does not even exist on those devices.
Change-Id: I0c25c3e5bec651b27158a84cc91289639a04ceb6 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/mainboard/lenovo/x201/smihandler.c 1 file changed, 0 insertions(+), 25 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/33508/1
diff --git a/src/mainboard/lenovo/x201/smihandler.c b/src/mainboard/lenovo/x201/smihandler.c index 9043f8e..8d2a966 100644 --- a/src/mainboard/lenovo/x201/smihandler.c +++ b/src/mainboard/lenovo/x201/smihandler.c @@ -71,23 +71,6 @@ return 1; }
-static void mainboard_smi_brightness_up(void) -{ - u8 value; - - if ((value = pci_read_config8(PCI_DEV(0, 2, 1), 0xf4)) < 0xf0) - pci_write_config8(PCI_DEV(0, 2, 1), 0xf4, (value + 0x10) | 0xf); -} - -static void mainboard_smi_brightness_down(void) -{ - u8 value; - - if ((value = pci_read_config8(PCI_DEV(0, 2, 1), 0xf4)) > 0x10) - pci_write_config8(PCI_DEV(0, 2, 1), 0xf4, - (value - 0x10) & 0xf0); -} - static void mainboard_smi_handle_ec_sci(void) { u8 status = inb(EC_SC); @@ -100,14 +83,6 @@ printk(BIOS_DEBUG, "EC event %02x\n", event);
switch (event) { - case 0x14: - /* brightness up */ - mainboard_smi_brightness_up(); - break; - case 0x15: - /* brightness down */ - mainboard_smi_brightness_down(); - break; case 0x18: /* Fn-F9 key */ case 0x27:
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33508 )
Change subject: mb/lenovo/x201/smihandler.c: Remove useless smihandler code ......................................................................
Patch Set 1: Code-Review+2
(2 comments)
https://review.coreboot.org/#/c/33508/1/src/mainboard/lenovo/x201/smihandler... File src/mainboard/lenovo/x201/smihandler.c:
https://review.coreboot.org/#/c/33508/1/src/mainboard/lenovo/x201/smihandler... PS1, Line 115: Unrelated, looks like unintentional fall-through / missing breaks above?
https://review.coreboot.org/#/c/33508/1/src/mainboard/lenovo/x201/smihandler... PS1, Line 119: dito
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33508 )
Change subject: mb/lenovo/x201/smihandler.c: Remove useless smihandler code ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/33508/1/src/mainboard/lenovo/x201/smihandler... File src/mainboard/lenovo/x201/smihandler.c:
https://review.coreboot.org/#/c/33508/1/src/mainboard/lenovo/x201/smihandler... PS1, Line 115:
Unrelated, looks like unintentional fall-through / missing breaks above?
Those are supposed to be events on which the dock needs to be undocked. It does not fully match with acpi/dock.asl so I'd expect some stale code too.
Hello Kyösti Mälkki, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33508
to look at the new patch set (#3).
Change subject: mb/lenovo/x201/smihandler.c: Remove useless smihandler code ......................................................................
mb/lenovo/x201/smihandler.c: Remove useless smihandler code
This code to handle the brightness from SMM is copied from the Lenovo Thinkpad X60 code, but does not work on later generation. The PCI device it tries to address does not even exist on those devices.
Change-Id: I0c25c3e5bec651b27158a84cc91289639a04ceb6 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/mainboard/lenovo/x201/smihandler.c 1 file changed, 0 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/33508/3
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33508 )
Change subject: mb/lenovo/x201/smihandler.c: Remove useless smihandler code ......................................................................
Patch Set 3: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33508 )
Change subject: mb/lenovo/x201/smihandler.c: Remove useless smihandler code ......................................................................
mb/lenovo/x201/smihandler.c: Remove useless smihandler code
This code to handle the brightness from SMM is copied from the Lenovo Thinkpad X60 code, but does not work on later generation. The PCI device it tries to address does not even exist on those devices.
Change-Id: I0c25c3e5bec651b27158a84cc91289639a04ceb6 Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/33508 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/mainboard/lenovo/x201/smihandler.c 1 file changed, 0 insertions(+), 26 deletions(-)
Approvals: build bot (Jenkins): Verified Kyösti Mälkki: Looks good to me, approved
diff --git a/src/mainboard/lenovo/x201/smihandler.c b/src/mainboard/lenovo/x201/smihandler.c index 9043f8e..e80782a 100644 --- a/src/mainboard/lenovo/x201/smihandler.c +++ b/src/mainboard/lenovo/x201/smihandler.c @@ -15,7 +15,6 @@ */
#include <arch/io.h> -#include <device/pci_ops.h> #include <console/console.h> #include <cpu/x86/smm.h> #include <southbridge/intel/ibexpeak/nvs.h> @@ -71,23 +70,6 @@ return 1; }
-static void mainboard_smi_brightness_up(void) -{ - u8 value; - - if ((value = pci_read_config8(PCI_DEV(0, 2, 1), 0xf4)) < 0xf0) - pci_write_config8(PCI_DEV(0, 2, 1), 0xf4, (value + 0x10) | 0xf); -} - -static void mainboard_smi_brightness_down(void) -{ - u8 value; - - if ((value = pci_read_config8(PCI_DEV(0, 2, 1), 0xf4)) > 0x10) - pci_write_config8(PCI_DEV(0, 2, 1), 0xf4, - (value - 0x10) & 0xf0); -} - static void mainboard_smi_handle_ec_sci(void) { u8 status = inb(EC_SC); @@ -100,14 +82,6 @@ printk(BIOS_DEBUG, "EC event %02x\n", event);
switch (event) { - case 0x14: - /* brightness up */ - mainboard_smi_brightness_up(); - break; - case 0x15: - /* brightness down */ - mainboard_smi_brightness_down(); - break; case 0x18: /* Fn-F9 key */ case 0x27: