slippy/falco/peppy: Fix SPD GPIO initialization.

SPD GPIOs were being read prior to initialization in romstage_common. To
fix, pass the copy_spd function to romstage_common, to be called at the
appropriate time (after PCH init, before DRAM init).

BUG=chrome-os-partner:20162.
TEST=Manual. Test on peppy board with non-zero SPD GPIOs, verify correct
SPD is selected.

Change-Id: I2554813e56a58c8c81456f1a53cc8ce9c2030a73
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/58608
This commit is contained in:
Aaron Durbin 2013-06-13 17:29:36 -07:00 committed by ChromeBot
commit fff7105e92
7 changed files with 9 additions and 9 deletions

View file

@ -151,6 +151,7 @@ struct romstage_params {
const void *gpio_map;
const struct rcba_config_instruction *rcba_config;
unsigned long bist;
void (*copy_spd)(struct pei_data *);
};
void mainboard_romstage_entry(unsigned long bist);
void romstage_common(const struct romstage_params *params);

View file

@ -258,6 +258,9 @@ void romstage_common(const struct romstage_params *params)
report_platform_info();
if (params->copy_spd != NULL)
params->copy_spd(params->pei_data);
sdram_initialize(params->pei_data);
#if CONFIG_COLLECT_TIMESTAMPS

View file

@ -165,11 +165,9 @@ void mainboard_romstage_entry(unsigned long bist)
.gpio_map = &mainboard_gpio_map,
.rcba_config = &rcba_config[0],
.bist = bist,
.copy_spd = copy_spd,
};
/* Prepare SPD data */
copy_spd(&pei_data);
/* Call into the real romstage main with this board's attributes. */
romstage_common(&romstage_params);
}

View file

@ -158,11 +158,9 @@ void mainboard_romstage_entry(unsigned long bist)
.gpio_map = &mainboard_gpio_map,
.rcba_config = &rcba_config[0],
.bist = bist,
.copy_spd = copy_spd,
};
/* Prepare SPD data */
copy_spd(&pei_data);
/* Call into the real romstage main with this board's attributes. */
romstage_common(&romstage_params);
}

View file

@ -191,11 +191,9 @@ void mainboard_romstage_entry(unsigned long bist)
.gpio_map = &mainboard_gpio_map,
.rcba_config = &rcba_config[0],
.bist = bist,
.copy_spd = copy_spd,
};
/* Prepare SPD data */
copy_spd(&pei_data);
/* Call into the real romstage main with this board's attributes. */
romstage_common(&romstage_params);

View file

@ -140,6 +140,7 @@ void mainboard_romstage_entry(unsigned long bist)
.gpio_map = &mainboard_gpio_map,
.rcba_config = &rcba_config[0],
.bist = bist,
.copy_spd = NULL,
};
/* Call into the real romstage main with this board's attributes. */

View file

@ -131,6 +131,7 @@ void mainboard_romstage_entry(unsigned long bist)
.gpio_map = &mainboard_gpio_map,
.rcba_config = &rcba_config[0],
.bist = bist,
.copy_spd = NULL,
};
/* Call into the real romstage main with this board's attributes. */