Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46999 )
Change subject: soc/intel/broadwell: Get rid of `struct romstage_params` ......................................................................
soc/intel/broadwell: Get rid of `struct romstage_params`
This is no longer necessary. Get rid of it.
Change-Id: Ib91b99332e05555b9ea746a7b202231bff47cf6a Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/soc/intel/broadwell/pch/pm.h M src/soc/intel/broadwell/pch/power_state.c M src/soc/intel/broadwell/romstage.c M src/soc/intel/broadwell/romstage.h 4 files changed, 12 insertions(+), 18 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/46999/1
diff --git a/src/soc/intel/broadwell/pch/pm.h b/src/soc/intel/broadwell/pch/pm.h index 7e9e1a5..918b3a6 100644 --- a/src/soc/intel/broadwell/pch/pm.h +++ b/src/soc/intel/broadwell/pch/pm.h @@ -110,6 +110,8 @@ uint16_t hsio_checksum; };
+struct chipset_power_state *fill_power_state(void); + /* PM1_CNT */ void enable_pm1_control(uint32_t mask); void disable_pm1_control(uint32_t mask); diff --git a/src/soc/intel/broadwell/pch/power_state.c b/src/soc/intel/broadwell/pch/power_state.c index 562b876..a39822a 100644 --- a/src/soc/intel/broadwell/pch/power_state.c +++ b/src/soc/intel/broadwell/pch/power_state.c @@ -14,6 +14,7 @@
#include "lpc.h" #include "pch.h" +#include "pm.h"
static struct chipset_power_state power_state;
diff --git a/src/soc/intel/broadwell/romstage.c b/src/soc/intel/broadwell/romstage.c index 73afc15..bea9feb 100644 --- a/src/soc/intel/broadwell/romstage.c +++ b/src/soc/intel/broadwell/romstage.c @@ -21,7 +21,8 @@ /* Entry from cpu/intel/car/romstage.c. */ void mainboard_romstage_entry(void) { - struct romstage_params rp = { 0 }; + struct chipset_power_state *power_state; + struct pei_data pei_data = { 0 };
post_code(0x30);
@@ -32,9 +33,9 @@ pch_early_init();
/* Get power state */ - rp.power_state = fill_power_state(); + power_state = fill_power_state();
- const int s3resume = rp.power_state->prev_sleep_state == ACPI_S3; + const int s3resume = power_state->prev_sleep_state == ACPI_S3;
elog_boot_notify(s3resume);
@@ -48,24 +49,23 @@ init_gpios(mainboard_gpio_config);
/* Fill in mainboard pei_data */ - mainboard_fill_pei_data(&rp.pei_data); - mainboard_fill_spd_data(&rp.pei_data); + mainboard_fill_pei_data(&pei_data); + mainboard_fill_spd_data(&pei_data);
post_code(0x32);
timestamp_add_now(TS_BEFORE_INITRAM);
- rp.pei_data.boot_mode = rp.power_state->prev_sleep_state; + pei_data.boot_mode = power_state->prev_sleep_state;
/* Print ME state before MRC */ intel_me_status();
/* Save ME HSIO version */ - intel_me_hsio_version(&rp.power_state->hsio_version, - &rp.power_state->hsio_checksum); + intel_me_hsio_version(&power_state->hsio_version, &power_state->hsio_checksum);
/* Initialize RAM */ - raminit(&rp.pei_data); + raminit(&pei_data);
timestamp_add_now(TS_AFTER_INITRAM);
diff --git a/src/soc/intel/broadwell/romstage.h b/src/soc/intel/broadwell/romstage.h index f5fda23..d788155 100644 --- a/src/soc/intel/broadwell/romstage.h +++ b/src/soc/intel/broadwell/romstage.h @@ -5,20 +5,11 @@
#include <soc/intel/broadwell/pei_data.h>
-struct chipset_power_state; -struct pei_data; -struct romstage_params { - struct chipset_power_state *power_state; - struct pei_data pei_data; -}; - void mainboard_pre_raminit(struct pei_data *pei_data); void mainboard_post_raminit(const int s3resume);
void raminit(struct pei_data *pei_data);
-struct chipset_power_state; -struct chipset_power_state *fill_power_state(void); void report_platform_info(void);
#endif