Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/49775 )
Change subject: broadwell: Clean up `mainboard_post_raminit` ......................................................................
broadwell: Clean up `mainboard_post_raminit`
Make it optional and change its signature.
Change-Id: I4b5f3fb08e8954514ebf39e72c95aa62d66856d7 Signed-off-by: Angel Pons th3fanbus@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/49775 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Michael Niewöhner foss@mniewoehner.de --- M src/mainboard/google/auron/romstage.c M src/mainboard/google/auron/variants/gandof/variant.c M src/mainboard/google/auron/variants/lulu/variant.c M src/mainboard/google/auron/variants/samus/variant.c M src/mainboard/google/jecht/romstage.c M src/mainboard/intel/wtm2/romstage.c M src/mainboard/purism/librem_bdw/romstage.c M src/soc/intel/broadwell/include/soc/romstage.h M src/soc/intel/broadwell/romstage.c 9 files changed, 13 insertions(+), 21 deletions(-)
Approvals: build bot (Jenkins): Verified Michael Niewöhner: Looks good to me, approved
diff --git a/src/mainboard/google/auron/romstage.c b/src/mainboard/google/auron/romstage.c index 9de58a8..a3705bc 100644 --- a/src/mainboard/google/auron/romstage.c +++ b/src/mainboard/google/auron/romstage.c @@ -14,7 +14,3 @@ mainboard_fill_spd_data(&rp->pei_data);
} - -__weak void mainboard_post_raminit(struct romstage_params *rp) -{ -} diff --git a/src/mainboard/google/auron/variants/gandof/variant.c b/src/mainboard/google/auron/variants/gandof/variant.c index 0d2f47e..b93e2c1 100644 --- a/src/mainboard/google/auron/variants/gandof/variant.c +++ b/src/mainboard/google/auron/variants/gandof/variant.c @@ -24,8 +24,8 @@ return len; }
-void mainboard_post_raminit(struct romstage_params *rp) +void mainboard_post_raminit(const int s3resume) { - if (rp->power_state->prev_sleep_state != ACPI_S3) + if (!s3resume) google_chromeec_kbbacklight(75); } diff --git a/src/mainboard/google/auron/variants/lulu/variant.c b/src/mainboard/google/auron/variants/lulu/variant.c index b38807b..8349aca 100644 --- a/src/mainboard/google/auron/variants/lulu/variant.c +++ b/src/mainboard/google/auron/variants/lulu/variant.c @@ -34,8 +34,8 @@ return len; }
-void mainboard_post_raminit(struct romstage_params *rp) +void mainboard_post_raminit(const int s3resume) { - if (rp->power_state->prev_sleep_state != ACPI_S3) + if (!s3resume) google_chromeec_kbbacklight(75); } diff --git a/src/mainboard/google/auron/variants/samus/variant.c b/src/mainboard/google/auron/variants/samus/variant.c index c69e662..1e4a258 100644 --- a/src/mainboard/google/auron/variants/samus/variant.c +++ b/src/mainboard/google/auron/variants/samus/variant.c @@ -21,9 +21,9 @@ return 0; }
-void mainboard_post_raminit(struct romstage_params *rp) +void mainboard_post_raminit(const int s3resume) { - if (rp->power_state->prev_sleep_state != ACPI_S3) + if (!s3resume) google_chromeec_kbbacklight(100);
printk(BIOS_INFO, "MLB: board version %s\n", samus_board_version()); diff --git a/src/mainboard/google/jecht/romstage.c b/src/mainboard/google/jecht/romstage.c index 6129011..58db3cf 100644 --- a/src/mainboard/google/jecht/romstage.c +++ b/src/mainboard/google/jecht/romstage.c @@ -18,7 +18,7 @@ mainboard_fill_spd_data(&rp->pei_data); }
-void mainboard_post_raminit(struct romstage_params *rp) +void mainboard_post_raminit(const int s3resume) { if (CONFIG(CHROMEOS)) init_bootmode_straps(); diff --git a/src/mainboard/intel/wtm2/romstage.c b/src/mainboard/intel/wtm2/romstage.c index 9e22250..1b6539b 100644 --- a/src/mainboard/intel/wtm2/romstage.c +++ b/src/mainboard/intel/wtm2/romstage.c @@ -11,7 +11,3 @@ /* Fill out PEI DATA */ mainboard_fill_pei_data(&rp->pei_data); } - -void mainboard_post_raminit(struct romstage_params *rp) -{ -} diff --git a/src/mainboard/purism/librem_bdw/romstage.c b/src/mainboard/purism/librem_bdw/romstage.c index 8fc2f9e..8ffd0783 100644 --- a/src/mainboard/purism/librem_bdw/romstage.c +++ b/src/mainboard/purism/librem_bdw/romstage.c @@ -9,7 +9,3 @@ /* Fill out PEI DATA */ mainboard_fill_pei_data(&rp->pei_data); } - -void mainboard_post_raminit(struct romstage_params *rp) -{ -} diff --git a/src/soc/intel/broadwell/include/soc/romstage.h b/src/soc/intel/broadwell/include/soc/romstage.h index 646ad0e..eb51ea1 100644 --- a/src/soc/intel/broadwell/include/soc/romstage.h +++ b/src/soc/intel/broadwell/include/soc/romstage.h @@ -12,7 +12,7 @@ };
void mainboard_pre_raminit(struct romstage_params *params); -void mainboard_post_raminit(struct romstage_params *params); +void mainboard_post_raminit(const int s3resume);
void raminit(struct pei_data *pei_data);
diff --git a/src/soc/intel/broadwell/romstage.c b/src/soc/intel/broadwell/romstage.c index 8e884d5..084c3e6 100644 --- a/src/soc/intel/broadwell/romstage.c +++ b/src/soc/intel/broadwell/romstage.c @@ -14,6 +14,10 @@ #include <stdint.h> #include <timestamp.h>
+__weak void mainboard_post_raminit(const int s3resume) +{ +} + /* Entry from cpu/intel/car/romstage.c. */ void mainboard_romstage_entry(void) { @@ -64,5 +68,5 @@
romstage_handoff_init(rp.power_state->prev_sleep_state == ACPI_S3);
- mainboard_post_raminit(&rp); + mainboard_post_raminit(rp.power_state->prev_sleep_state == ACPI_S3); }