Josie Nordrum has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
mb/google/zork: Generate acpi methods in mainboard.c
Generate acpi methods which enable and disable backlight during _INI, _WAK, and _PTS.
BUG=b:158087989 BRANCH=Zork EST=check backlight during reboot and suspend
Signed-off-by: Josie Nordrum JosieNordrum@google.com Change-Id: I2f3434dc92de1f697693ff69ca15bd76647b89a2 --- M src/mainboard/google/zork/mainboard.c 1 file changed, 47 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/46671/1
diff --git a/src/mainboard/google/zork/mainboard.c b/src/mainboard/google/zork/mainboard.c index f0d9a28..1049d6b 100644 --- a/src/mainboard/google/zork/mainboard.c +++ b/src/mainboard/google/zork/mainboard.c @@ -6,6 +6,7 @@ #include <device/device.h> #include <device/mmio.h> #include <acpi/acpi.h> +#include <acpi/acpigen.h> #include <acpi/acpi_gnvs.h> #include <amdblocks/amd_pci_util.h> #include <amdblocks/gpio_banks.h> @@ -175,6 +176,50 @@ variant_get_dxio_ddi_descriptors(dxio_descs, dxio_num, ddi_descs, ddi_num); }
+static void mainboard_write_blken(void) +{ + acpigen_write_method("\_SB.BKEN", 0); + acpigen_soc_clear_tx_gpio(GPIO_85); + acpigen_pop_len(); +} + +static void mainboard_write_blkdis(void) +{ + acpigen_write_method("\_SB.BKDS", 0); + acpigen_soc_set_tx_gpio(GPIO_85); + acpigen_pop_len(); +} + +static void mainboard_write_mini(void) +{ + acpigen_write_method("\_SB.MINI", 0); + acpigen_emit_namestring("\_SB.BKEN"); + acpigen_pop_len(); +} + +static void mainboard_write_mwak(void) +{ + acpigen_write_method("\_SB.MWAK", 0); + acpigen_emit_namestring("\_SB.BKEN"); + acpigen_pop_len(); +} + +static void mainboard_write_mpts(void) +{ + acpigen_write_method("\_SB.MPTS", 0); + acpigen_emit_namestring("\_SB.BKDS"); + acpigen_pop_len(); +} + +static void mainboard_fill_ssdt(const struct device *dev) +{ + mainboard_write_blken(); + mainboard_write_blkdis(); + mainboard_write_mini(); + mainboard_write_mpts(); + mainboard_write_mwak(); +} + /************************************************* * Dedicated mainboard function *************************************************/ @@ -186,6 +231,8 @@ pirq_setup();
dev->ops->acpi_inject_dsdt = chromeos_dsdt_generator; + dev->ops->acpi_fill_ssdt = mainboard_fill_ssdt; + }
static void mainboard_final(void *chip_info)
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
Patch Set 1:
(20 comments)
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... File src/mainboard/google/zork/mainboard.c:
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 181: acpigen_write_method("\_SB.BKEN", 0); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 182: acpigen_soc_clear_tx_gpio(GPIO_85); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 183: acpigen_pop_len(); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 188: acpigen_write_method("\_SB.BKDS", 0); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 189: acpigen_soc_set_tx_gpio(GPIO_85); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 190: acpigen_pop_len(); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 195: acpigen_write_method("\_SB.MINI", 0); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 196: acpigen_emit_namestring("\_SB.BKEN"); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 197: acpigen_pop_len(); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 202: acpigen_write_method("\_SB.MWAK", 0); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 203: acpigen_emit_namestring("\_SB.BKEN"); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 204: acpigen_pop_len(); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 209: acpigen_write_method("\_SB.MPTS", 0); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 210: acpigen_emit_namestring("\_SB.BKDS"); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 211: acpigen_pop_len(); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 216: mainboard_write_blken(); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 217: mainboard_write_blkdis(); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 218: mainboard_write_mini(); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 219: mainboard_write_mpts(); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 220: mainboard_write_mwak(); please, no spaces at the start of a line
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
Patch Set 1:
(2 comments)
You will also have to drop: https://source.corp.google.com/chromeos_public/src/third_party/coreboot/src/...
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... File src/mainboard/google/zork/mainboard.c:
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 178: nit: You can add macros for the method names just to make it easier to reuse below:
#define METHOD_BACKLIGHT_ENABLE "\_SB.BKEN" #define METHOD_BACKLIGHT_DISABLE "\_SB.BKDS" #define METHOD_MAINBOARD_INI "\_SB.MINI" ...
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 181: These should be all tabs instead of spaces.
Hello build bot (Jenkins), Furquan Shaikh, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46671
to look at the new patch set (#2).
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
mb/google/zork: Generate acpi methods in mainboard.c
Generate acpi methods which enable and disable backlight during _INI, _WAK, and _PTS.
BUG=b:158087989 BRANCH=Zork EST=check backlight during reboot and suspend
Signed-off-by: Josie Nordrum JosieNordrum@google.com Change-Id: I2f3434dc92de1f697693ff69ca15bd76647b89a2 --- M src/mainboard/google/zork/mainboard.c 1 file changed, 47 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/46671/2
Josie Nordrum has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... File src/mainboard/google/zork/mainboard.c:
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 178:
nit: You can add macros for the method names just to make it easier to reuse below: […]
Ack
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 181:
These should be all tabs instead of spaces.
Done
Hello build bot (Jenkins), Furquan Shaikh, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46671
to look at the new patch set (#4).
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
mb/google/zork: Generate acpi methods in mainboard.c
Generate acpi methods which enable and disable backlight during _INI, _WAK, and _PTS.
BUG=b:158087989 BRANCH=Zork EST=check backlight during reboot and suspend
Signed-off-by: Josie Nordrum JosieNordrum@google.com Change-Id: I2f3434dc92de1f697693ff69ca15bd76647b89a2 --- M src/mainboard/google/zork/mainboard.c 1 file changed, 47 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/46671/4
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... File src/mainboard/google/zork/mainboard.c:
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 178:
Ack
Are you planning on adding the macros?
Hello build bot (Jenkins), Furquan Shaikh, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46671
to look at the new patch set (#7).
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
mb/google/zork: Generate acpi methods in mainboard.c
Generate acpi methods which enable and disable backlight during _INI, _WAK, and _PTS.
BUG=b:158087989 BRANCH=Zork EST=check backlight during reboot and suspend
Signed-off-by: Josie Nordrum JosieNordrum@google.com Change-Id: I2f3434dc92de1f697693ff69ca15bd76647b89a2 --- M src/mainboard/google/zork/mainboard.c 1 file changed, 53 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/46671/7
Josie Nordrum has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... File src/mainboard/google/zork/mainboard.c:
https://review.coreboot.org/c/coreboot/+/46671/1/src/mainboard/google/zork/m... PS1, Line 178:
Are you planning on adding the macros?
Added
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
Patch Set 7: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/46671/7//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46671/7//COMMIT_MSG@14 PS7, Line 14: EST you lost a T.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
Patch Set 7: Code-Review+2
Josie Nordrum has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
Patch Set 7:
pulled wrong commit from test branch- don't review yet
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
Patch Set 7:
We've been bamboozled.
Hello build bot (Jenkins), Martin Roth, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46671
to look at the new patch set (#8).
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
mb/google/zork: Generate acpi methods in mainboard.c
Generate acpi methods which enable and disable backlight during _INI, _WAK, and _PTS.
BUG=b:158087989 BRANCH=Zork EST=check backlight during reboot and suspend
Signed-off-by: Josie Nordrum JosieNordrum@google.com Change-Id: I2f3434dc92de1f697693ff69ca15bd76647b89a2 --- M src/mainboard/google/zork/mainboard.c 1 file changed, 53 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/46671/8
Hello build bot (Jenkins), Martin Roth, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46671
to look at the new patch set (#9).
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
mb/google/zork: Generate acpi methods in mainboard.c
Generate acpi methods which enable and disable backlight during _INI, _WAK, and _PTS.
BUG=b:158087989 BRANCH=Zork EST=check backlight during reboot and suspend
Signed-off-by: Josie Nordrum JosieNordrum@google.com Change-Id: I2f3434dc92de1f697693ff69ca15bd76647b89a2 --- M src/mainboard/google/zork/mainboard.c 1 file changed, 53 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/46671/9
Josie Nordrum has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
Patch Set 9:
ok, ready for review. Re-tested/verified on DUT.
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
Patch Set 9: Code-Review+2
Hello build bot (Jenkins), Furquan Shaikh, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46671
to look at the new patch set (#10).
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
mb/google/zork: Generate acpi methods in mainboard.c
Generate acpi methods which enable and disable backlight during _INI, _WAK, and _PTS.
BUG=b:158087989 BRANCH=Zork TEST=check backlight during reboot and suspend
Signed-off-by: Josie Nordrum JosieNordrum@google.com Change-Id: I2f3434dc92de1f697693ff69ca15bd76647b89a2 --- M src/mainboard/google/zork/mainboard.c 1 file changed, 53 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/46671/10
Josie Nordrum has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46671/7//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46671/7//COMMIT_MSG@14 PS7, Line 14: EST
you lost a T.
(: Done
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
Patch Set 10: Code-Review+2
Tim Wawrzynczak has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
mb/google/zork: Generate acpi methods in mainboard.c
Generate acpi methods which enable and disable backlight during _INI, _WAK, and _PTS.
BUG=b:158087989 BRANCH=Zork TEST=check backlight during reboot and suspend
Signed-off-by: Josie Nordrum JosieNordrum@google.com Change-Id: I2f3434dc92de1f697693ff69ca15bd76647b89a2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/46671 Reviewed-by: Martin Roth martinroth@google.com Reviewed-by: Furquan Shaikh furquan@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/google/zork/mainboard.c 1 file changed, 53 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Martin Roth: Looks good to me, approved Furquan Shaikh: Looks good to me, approved
diff --git a/src/mainboard/google/zork/mainboard.c b/src/mainboard/google/zork/mainboard.c index f0d9a28..9503d37 100644 --- a/src/mainboard/google/zork/mainboard.c +++ b/src/mainboard/google/zork/mainboard.c @@ -6,6 +6,7 @@ #include <device/device.h> #include <device/mmio.h> #include <acpi/acpi.h> +#include <acpi/acpigen.h> #include <acpi/acpi_gnvs.h> #include <amdblocks/amd_pci_util.h> #include <amdblocks/gpio_banks.h> @@ -28,6 +29,12 @@ #include <commonlib/helpers.h> #include <bootstate.h>
+#define METHOD_BACKLIGHT_ENABLE "\_SB.BKEN" +#define METHOD_BACKLIGHT_DISABLE "\_SB.BKDS" +#define METHOD_MAINBOARD_INI "\_SB.MINI" +#define METHOD_MAINBOARD_WAK "\_SB.MWAK" +#define METHOD_MAINBOARD_PTS "\_SB.MPTS" + /*********************************************************** * These arrays set up the FCH PCI_INTR registers 0xC00/0xC01. * This table is responsible for physically routing the PIC and @@ -175,6 +182,50 @@ variant_get_dxio_ddi_descriptors(dxio_descs, dxio_num, ddi_descs, ddi_num); }
+static void mainboard_write_blken(void) +{ + acpigen_write_method(METHOD_BACKLIGHT_ENABLE, 0); + acpigen_soc_clear_tx_gpio(GPIO_85); + acpigen_pop_len(); +} + +static void mainboard_write_blkdis(void) +{ + acpigen_write_method(METHOD_BACKLIGHT_DISABLE, 0); + acpigen_soc_set_tx_gpio(GPIO_85); + acpigen_pop_len(); +} + +static void mainboard_write_mini(void) +{ + acpigen_write_method(METHOD_MAINBOARD_INI, 0); + acpigen_emit_namestring(METHOD_BACKLIGHT_ENABLE); + acpigen_pop_len(); +} + +static void mainboard_write_mwak(void) +{ + acpigen_write_method(METHOD_MAINBOARD_WAK, 0); + acpigen_emit_namestring(METHOD_BACKLIGHT_ENABLE); + acpigen_pop_len(); +} + +static void mainboard_write_mpts(void) +{ + acpigen_write_method(METHOD_MAINBOARD_PTS, 0); + acpigen_emit_namestring(METHOD_BACKLIGHT_DISABLE); + acpigen_pop_len(); +} + +static void mainboard_fill_ssdt(const struct device *dev) +{ + mainboard_write_blken(); + mainboard_write_blkdis(); + mainboard_write_mini(); + mainboard_write_mpts(); + mainboard_write_mwak(); +} + /************************************************* * Dedicated mainboard function *************************************************/ @@ -186,6 +237,8 @@ pirq_setup();
dev->ops->acpi_inject_dsdt = chromeos_dsdt_generator; + dev->ops->acpi_fill_ssdt = mainboard_fill_ssdt; + }
static void mainboard_final(void *chip_info)