haswell: Automatically determine system type
Check the PCH's LPC device ID to know the system type instead of relying on hardcoded numbers. The `get_pch_platform_type` function is MRC-safe. Change-Id: Icfe7c2dccb7c7a178892ad3a2e34ca93b33b2bb9 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43124 Reviewed-by: Tristan Corrick <tristan@corrick.kiwi> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
317399366e
commit
3ac92b7c93
|
@ -18,7 +18,6 @@ void mainboard_config_rcba(void)
|
|||
|
||||
void mainboard_fill_pei_data(struct pei_data *pei_data)
|
||||
{
|
||||
pei_data->system_type = 1; /* Desktop/Server */
|
||||
pei_data->spd_addresses[0] = 0xa0;
|
||||
pei_data->spd_addresses[1] = 0xa2;
|
||||
pei_data->spd_addresses[2] = 0xa4;
|
||||
|
|
|
@ -18,7 +18,6 @@ void mainboard_config_rcba(void)
|
|||
|
||||
void mainboard_fill_pei_data(struct pei_data *pei_data)
|
||||
{
|
||||
pei_data->system_type = 1; /* Desktop/Server */
|
||||
pei_data->spd_addresses[0] = 0xa0;
|
||||
pei_data->spd_addresses[2] = 0xa4;
|
||||
pei_data->ec_present = 0;
|
||||
|
|
|
@ -41,7 +41,6 @@ void mainboard_config_rcba(void)
|
|||
|
||||
void mainboard_fill_pei_data(struct pei_data *pei_data)
|
||||
{
|
||||
pei_data->system_type = 5; /* ULT */
|
||||
pei_data->spd_addresses[0] = 0xa0;
|
||||
pei_data->spd_addresses[2] = 0xa4;
|
||||
pei_data->ec_present = 0;
|
||||
|
|
|
@ -42,7 +42,6 @@ void mainboard_config_rcba(void)
|
|||
|
||||
void mainboard_fill_pei_data(struct pei_data *pei_data)
|
||||
{
|
||||
pei_data->system_type = 5; /* ULT */
|
||||
pei_data->spd_addresses[0] = 0xff;
|
||||
pei_data->spd_addresses[2] = 0xff;
|
||||
pei_data->ec_present = 1;
|
||||
|
|
|
@ -42,7 +42,6 @@ void mainboard_config_rcba(void)
|
|||
|
||||
void mainboard_fill_pei_data(struct pei_data *pei_data)
|
||||
{
|
||||
pei_data->system_type = 0; /* 0 Mobile, 1 Desktop/Server */
|
||||
pei_data->spd_addresses[0] = 0xa0;
|
||||
pei_data->spd_addresses[1] = 0xa2;
|
||||
pei_data->spd_addresses[2] = 0xa4;
|
||||
|
|
|
@ -42,7 +42,6 @@ void mb_late_romstage_setup(void)
|
|||
|
||||
void mainboard_fill_pei_data(struct pei_data *pei_data)
|
||||
{
|
||||
pei_data->system_type = 0; /* Mobile */
|
||||
pei_data->spd_addresses[0] = 0xa0;
|
||||
pei_data->spd_addresses[2] = 0xa2;
|
||||
pei_data->ec_present = 1;
|
||||
|
|
|
@ -18,7 +18,6 @@ void mainboard_config_rcba(void)
|
|||
|
||||
void mainboard_fill_pei_data(struct pei_data *pei_data)
|
||||
{
|
||||
pei_data->system_type = 1; /* Desktop/Server */
|
||||
pei_data->spd_addresses[0] = 0xa0;
|
||||
pei_data->spd_addresses[1] = 0xa2;
|
||||
pei_data->spd_addresses[2] = 0xa4;
|
||||
|
|
|
@ -51,6 +51,7 @@ void mainboard_romstage_entry(void)
|
|||
.pmbase = DEFAULT_PMBASE,
|
||||
.gpiobase = DEFAULT_GPIOBASE,
|
||||
.temp_mmio_base = 0xfed08000,
|
||||
.system_type = get_pch_platform_type(),
|
||||
.tseg_size = CONFIG_SMM_TSEG_SIZE,
|
||||
.ddr_refresh_2x = CONFIG(ENABLE_DDR_2X_REFRESH),
|
||||
.max_ddr3_freq = 1600,
|
||||
|
|
Loading…
Reference in New Issue