Tim Wawrzynczak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/41407 )
Change subject: soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil ......................................................................
soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil
pmc.c was included in the SMM object, but only needed the one function, pmc_soc_set_afterg3_en. pmutil.c was already doing power management- related functionality, and was included in SMM, so moving pmc_soc_set_afterg3_en to pmutil.c allowed pmc.c to be removed from the SMM build.
Change-Id: I87f65fd10d35f1f75516e804501d5319b81a0383 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/soc/intel/tigerlake/Makefile.inc M src/soc/intel/tigerlake/pmc.c M src/soc/intel/tigerlake/pmutil.c 3 files changed, 17 insertions(+), 18 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/41407/1
diff --git a/src/soc/intel/tigerlake/Makefile.inc b/src/soc/intel/tigerlake/Makefile.inc index f62bfaf..51422f9 100644 --- a/src/soc/intel/tigerlake/Makefile.inc +++ b/src/soc/intel/tigerlake/Makefile.inc @@ -47,7 +47,6 @@
smm-y += gpio.c smm-y += p2sb.c -smm-y += pmc.c smm-y += pmutil.c smm-y += smihandler.c smm-y += uart.c diff --git a/src/soc/intel/tigerlake/pmc.c b/src/soc/intel/tigerlake/pmc.c index 23453f0..aef2b6d 100644 --- a/src/soc/intel/tigerlake/pmc.c +++ b/src/soc/intel/tigerlake/pmc.c @@ -17,23 +17,6 @@ #include <soc/pm.h> #include <soc/soc_chip.h>
-/* - * Set which power state system will be after reapplying - * the power (from G3 State) - */ -void pmc_soc_set_afterg3_en(const bool on) -{ - uint8_t reg8; - uint8_t *const pmcbase = pmc_mmio_regs(); - - reg8 = read8(pmcbase + GEN_PMCON_A); - if (on) - reg8 &= ~SLEEP_AFTER_POWER_FAIL; - else - reg8 |= SLEEP_AFTER_POWER_FAIL; - write8(pmcbase + GEN_PMCON_A, reg8); -} - static void config_deep_sX(uint32_t offset, uint32_t mask, int sx, int enable) { uint32_t reg; diff --git a/src/soc/intel/tigerlake/pmutil.c b/src/soc/intel/tigerlake/pmutil.c index bd6a46c..befc4fc 100644 --- a/src/soc/intel/tigerlake/pmutil.c +++ b/src/soc/intel/tigerlake/pmutil.c @@ -275,3 +275,20 @@ { return (uint16_t) ACPI_BASE_ADDRESS; } + +/* + * Set which power state system will be after reapplying + * the power (from G3 State) + */ +void pmc_soc_set_afterg3_en(const bool on) +{ + uint8_t reg8; + uint8_t *const pmcbase = pmc_mmio_regs(); + + reg8 = read8(pmcbase + GEN_PMCON_A); + if (on) + reg8 &= ~SLEEP_AFTER_POWER_FAIL; + else + reg8 |= SLEEP_AFTER_POWER_FAIL; + write8(pmcbase + GEN_PMCON_A, reg8); +}
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41407 )
Change subject: soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil ......................................................................
Patch Set 1: Code-Review+2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41407 )
Change subject: soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil ......................................................................
Patch Set 1: Code-Review+2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41407 )
Change subject: soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil ......................................................................
Patch Set 1: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/41407/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/41407/1//COMMIT_MSG@12 PS1, Line 12: allowed allows
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth, Paul Menzel, Duncan Laurie, Nick Vaccaro, Aaron Durbin, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/41407
to look at the new patch set (#2).
Change subject: soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil ......................................................................
soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil
pmc.c was included in the SMM object, but only needed the one function, pmc_soc_set_afterg3_en. pmutil.c was already doing power management- related functionality, and was included in SMM, so moving pmc_soc_set_afterg3_en to pmutil.c allows pmc.c to be removed from the SMM build.
Change-Id: I87f65fd10d35f1f75516e804501d5319b81a0383 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/soc/intel/tigerlake/Makefile.inc D src/soc/intel/tigerlake/acpi/pmc.asl M src/soc/intel/tigerlake/acpi/southbridge.asl M src/soc/intel/tigerlake/pmc.c M src/soc/intel/tigerlake/pmutil.c 5 files changed, 47 insertions(+), 46 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/41407/2
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth, Paul Menzel, Duncan Laurie, Nick Vaccaro, Aaron Durbin, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/41407
to look at the new patch set (#3).
Change subject: soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil ......................................................................
soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil
pmc.c was included in the SMM object, but only needed the one function, pmc_soc_set_afterg3_en. pmutil.c was already doing power management- related functionality, and was included in SMM, so moving pmc_soc_set_afterg3_en to pmutil.c allows pmc.c to be removed from the SMM build.
Change-Id: I87f65fd10d35f1f75516e804501d5319b81a0383 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/soc/intel/tigerlake/Makefile.inc D src/soc/intel/tigerlake/acpi/pmc.asl M src/soc/intel/tigerlake/acpi/southbridge.asl M src/soc/intel/tigerlake/pmc.c M src/soc/intel/tigerlake/pmutil.c 5 files changed, 47 insertions(+), 46 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/41407/3
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth, Paul Menzel, Duncan Laurie, Nick Vaccaro, Aaron Durbin, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/41407
to look at the new patch set (#4).
Change subject: soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil ......................................................................
soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil
pmc.c was included in the SMM object, but only needed the one function, pmc_soc_set_afterg3_en. pmutil.c was already doing power management- related functionality, and was included in SMM, so moving pmc_soc_set_afterg3_en to pmutil.c allows pmc.c to be removed from the SMM build.
Change-Id: I87f65fd10d35f1f75516e804501d5319b81a0383 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/soc/intel/tigerlake/Makefile.inc M src/soc/intel/tigerlake/pmc.c M src/soc/intel/tigerlake/pmutil.c 3 files changed, 17 insertions(+), 18 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/41407/4
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41407 )
Change subject: soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41407/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/41407/1//COMMIT_MSG@12 PS1, Line 12: allowed
allows
Done
Hello build bot (Jenkins), Furquan Shaikh, Patrick Georgi, Martin Roth, Paul Menzel, Duncan Laurie, Nick Vaccaro, Aaron Durbin, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/41407
to look at the new patch set (#5).
Change subject: soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil ......................................................................
soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil
pmc.c was included in the SMM object, but only needed the one function, pmc_soc_set_afterg3_en. pmutil.c was already doing power management- related functionality, and was included in SMM, so moving pmc_soc_set_afterg3_en to pmutil.c allows pmc.c to be removed from the SMM build.
Change-Id: I87f65fd10d35f1f75516e804501d5319b81a0383 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/soc/intel/tigerlake/Makefile.inc M src/soc/intel/tigerlake/pmc.c M src/soc/intel/tigerlake/pmutil.c 3 files changed, 17 insertions(+), 18 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/41407/5
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41407 )
Change subject: soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil ......................................................................
Patch Set 5: Code-Review+2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41407 )
Change subject: soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil ......................................................................
Patch Set 8: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/41407 )
Change subject: soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil ......................................................................
soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil
pmc.c was included in the SMM object, but only needed the one function, pmc_soc_set_afterg3_en. pmutil.c was already doing power management- related functionality, and was included in SMM, so moving pmc_soc_set_afterg3_en to pmutil.c allows pmc.c to be removed from the SMM build.
Change-Id: I87f65fd10d35f1f75516e804501d5319b81a0383 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/41407 Reviewed-by: Furquan Shaikh furquan@google.com Reviewed-by: Aaron Durbin adurbin@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/intel/tigerlake/Makefile.inc M src/soc/intel/tigerlake/pmc.c M src/soc/intel/tigerlake/pmutil.c 3 files changed, 17 insertions(+), 18 deletions(-)
Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved Furquan Shaikh: Looks good to me, approved
diff --git a/src/soc/intel/tigerlake/Makefile.inc b/src/soc/intel/tigerlake/Makefile.inc index f62bfaf..51422f9 100644 --- a/src/soc/intel/tigerlake/Makefile.inc +++ b/src/soc/intel/tigerlake/Makefile.inc @@ -47,7 +47,6 @@
smm-y += gpio.c smm-y += p2sb.c -smm-y += pmc.c smm-y += pmutil.c smm-y += smihandler.c smm-y += uart.c diff --git a/src/soc/intel/tigerlake/pmc.c b/src/soc/intel/tigerlake/pmc.c index fa59d46..2d30424 100644 --- a/src/soc/intel/tigerlake/pmc.c +++ b/src/soc/intel/tigerlake/pmc.c @@ -17,23 +17,6 @@ #include <soc/pm.h> #include <soc/soc_chip.h>
-/* - * Set which power state system will be after reapplying - * the power (from G3 State) - */ -void pmc_soc_set_afterg3_en(const bool on) -{ - uint8_t reg8; - uint8_t *const pmcbase = pmc_mmio_regs(); - - reg8 = read8(pmcbase + GEN_PMCON_A); - if (on) - reg8 &= ~SLEEP_AFTER_POWER_FAIL; - else - reg8 |= SLEEP_AFTER_POWER_FAIL; - write8(pmcbase + GEN_PMCON_A, reg8); -} - static void config_deep_sX(uint32_t offset, uint32_t mask, int sx, int enable) { uint32_t reg; diff --git a/src/soc/intel/tigerlake/pmutil.c b/src/soc/intel/tigerlake/pmutil.c index bd6a46c..befc4fc 100644 --- a/src/soc/intel/tigerlake/pmutil.c +++ b/src/soc/intel/tigerlake/pmutil.c @@ -275,3 +275,20 @@ { return (uint16_t) ACPI_BASE_ADDRESS; } + +/* + * Set which power state system will be after reapplying + * the power (from G3 State) + */ +void pmc_soc_set_afterg3_en(const bool on) +{ + uint8_t reg8; + uint8_t *const pmcbase = pmc_mmio_regs(); + + reg8 = read8(pmcbase + GEN_PMCON_A); + if (on) + reg8 &= ~SLEEP_AFTER_POWER_FAIL; + else + reg8 |= SLEEP_AFTER_POWER_FAIL; + write8(pmcbase + GEN_PMCON_A, reg8); +}
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41407 )
Change subject: soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil ......................................................................
Patch Set 9:
Automatic boot test returned (PASS/FAIL/TOTAL): 4/0/4 Emulation targets: "QEMU x86 q35/ich9" using payload TianoCore : SUCCESS : https://lava.9esec.io/r/3686 "QEMU x86 q35/ich9" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/3685 "QEMU x86 i440fx/piix4" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/3684 "QEMU AArch64" using payload LinuxBoot_u-root_kexec : SUCCESS : https://lava.9esec.io/r/3683
Please note: This test is under development and might not be accurate at all!