broadwell: Flatten `mainboard_pre_raminit`
All Broadwell boards only use the `mainboard_pre_raminit` function to call `mainboard_fill_pei_data` and optionally `mainboard_fill_spd_data`. Move the declaration and weak definition of `mainboard_fill_spd_data` to platform code, replace the call to `mainboard_pre_raminit` in romstage.c with calls to `mainboard_fill_pei_data` and `mainboard_fill_spd_data`, and delete all other instances of `mainboard_pre_raminit` for Broadwell. Finally, delete now-empty romstage.c and spd.h files from mainboards. Change-Id: I3334b20bd7138bb753b996a137ff106e87c6e8a5 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49776 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
This commit is contained in:
parent
ac1c9bb5cd
commit
65f81a7b90
|
@ -1,16 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <console/console.h>
|
||||
#include <ec/google/chromeec/ec.h>
|
||||
#include <soc/pei_data.h>
|
||||
#include <soc/pei_wrapper.h>
|
||||
#include <soc/romstage.h>
|
||||
#include "variant.h"
|
||||
|
||||
void mainboard_pre_raminit(struct romstage_params *rp)
|
||||
{
|
||||
/* Fill out PEI DATA */
|
||||
mainboard_fill_pei_data(&rp->pei_data);
|
||||
mainboard_fill_spd_data(&rp->pei_data);
|
||||
|
||||
}
|
|
@ -11,7 +11,6 @@ int variant_smbios_data(struct device *dev, int *handle,
|
|||
unsigned long *current);
|
||||
void lan_init(void);
|
||||
|
||||
void mainboard_fill_spd_data(struct pei_data *pei_data);
|
||||
void fill_spd_for_index(uint8_t spd[], unsigned int index);
|
||||
|
||||
#define SPD_LEN 256
|
||||
|
|
|
@ -8,16 +8,8 @@
|
|||
#include <soc/romstage.h>
|
||||
#include <superio/ite/common/ite.h>
|
||||
#include <superio/ite/it8772f/it8772f.h>
|
||||
#include <mainboard/google/jecht/spd/spd.h>
|
||||
#include "onboard.h"
|
||||
|
||||
void mainboard_pre_raminit(struct romstage_params *rp)
|
||||
{
|
||||
/* Fill out PEI DATA */
|
||||
mainboard_fill_pei_data(&rp->pei_data);
|
||||
mainboard_fill_spd_data(&rp->pei_data);
|
||||
}
|
||||
|
||||
void mainboard_post_raminit(const int s3resume)
|
||||
{
|
||||
if (CONFIG(CHROMEOS))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <soc/pei_data.h>
|
||||
#include <mainboard/google/jecht/spd/spd.h>
|
||||
#include <soc/romstage.h>
|
||||
|
||||
/* Copy SPD data for on-board memory */
|
||||
void mainboard_fill_spd_data(struct pei_data *pei_data)
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#ifndef MAINBOARD_SPD_H
|
||||
#define MAINBOARD_SPD_H
|
||||
|
||||
struct pei_data;
|
||||
void mainboard_fill_spd_data(struct pei_data *pei_data);
|
||||
|
||||
#endif
|
|
@ -1,13 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <console/console.h>
|
||||
#include <soc/gpio.h>
|
||||
#include <soc/pei_data.h>
|
||||
#include <soc/pei_wrapper.h>
|
||||
#include <soc/romstage.h>
|
||||
|
||||
void mainboard_pre_raminit(struct romstage_params *rp)
|
||||
{
|
||||
/* Fill out PEI DATA */
|
||||
mainboard_fill_pei_data(&rp->pei_data);
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <soc/pei_data.h>
|
||||
#include <soc/pei_wrapper.h>
|
||||
#include <soc/romstage.h>
|
||||
|
||||
void mainboard_pre_raminit(struct romstage_params *rp)
|
||||
{
|
||||
/* Fill out PEI DATA */
|
||||
mainboard_fill_pei_data(&rp->pei_data);
|
||||
}
|
|
@ -11,7 +11,7 @@ struct romstage_params {
|
|||
struct pei_data pei_data;
|
||||
};
|
||||
|
||||
void mainboard_pre_raminit(struct romstage_params *params);
|
||||
void mainboard_fill_spd_data(struct pei_data *pei_data);
|
||||
void mainboard_post_raminit(const int s3resume);
|
||||
|
||||
void raminit(struct pei_data *pei_data);
|
||||
|
|
|
@ -9,11 +9,16 @@
|
|||
#include <soc/gpio.h>
|
||||
#include <soc/me.h>
|
||||
#include <soc/pei_data.h>
|
||||
#include <soc/pei_wrapper.h>
|
||||
#include <soc/pm.h>
|
||||
#include <soc/romstage.h>
|
||||
#include <stdint.h>
|
||||
#include <timestamp.h>
|
||||
|
||||
__weak void mainboard_fill_spd_data(struct pei_data *pei_data)
|
||||
{
|
||||
}
|
||||
|
||||
__weak void mainboard_post_raminit(const int s3resume)
|
||||
{
|
||||
}
|
||||
|
@ -45,8 +50,8 @@ void mainboard_romstage_entry(void)
|
|||
/* Initialize GPIOs */
|
||||
init_gpios(mainboard_gpio_config);
|
||||
|
||||
/* Fill in mainboard pei_date. */
|
||||
mainboard_pre_raminit(&rp);
|
||||
mainboard_fill_pei_data(&rp.pei_data);
|
||||
mainboard_fill_spd_data(&rp.pei_data);
|
||||
|
||||
post_code(0x32);
|
||||
|
||||
|
|
Loading…
Reference in New Issue