mb/google/octopus: add variant_early_override_gpio_table
Allow variants to override GPIO configurations of baseboard in the bootblock stage. BUG=b:137033609 BRANCH=octopus TEST=built Change-Id: I18d380cdf58f0f24e1bb1bff394ed8a91188a22c Signed-off-by: Marco Chen <marcochen@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34339 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
This commit is contained in:
@@ -21,8 +21,8 @@
|
|||||||
|
|
||||||
void bootblock_mainboard_init(void)
|
void bootblock_mainboard_init(void)
|
||||||
{
|
{
|
||||||
const struct pad_config *pads;
|
const struct pad_config *pads, *override_pads;
|
||||||
size_t num;
|
size_t num, override_num;
|
||||||
|
|
||||||
lpc_configure_pads();
|
lpc_configure_pads();
|
||||||
|
|
||||||
@@ -34,5 +34,7 @@ void bootblock_mainboard_init(void)
|
|||||||
mainboard_ec_init();
|
mainboard_ec_init();
|
||||||
|
|
||||||
pads = variant_early_gpio_table(&num);
|
pads = variant_early_gpio_table(&num);
|
||||||
gpio_configure_pads(pads, num);
|
override_pads = variant_early_override_gpio_table(&override_num);
|
||||||
|
gpio_configure_pads_with_override(pads, num,
|
||||||
|
override_pads, override_num);
|
||||||
}
|
}
|
||||||
|
@@ -299,6 +299,12 @@ const struct pad_config *__weak variant_override_gpio_table(size_t *num)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const struct pad_config *__weak variant_early_override_gpio_table(size_t *num)
|
||||||
|
{
|
||||||
|
*num = 0;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* GPIOs needed prior to ramstage. */
|
/* GPIOs needed prior to ramstage. */
|
||||||
static const struct pad_config early_gpio_table[] = {
|
static const struct pad_config early_gpio_table[] = {
|
||||||
PAD_CFG_GPI(GPIO_190, NONE, DEEP), /* PCH_WP_OD */
|
PAD_CFG_GPI(GPIO_190, NONE, DEEP), /* PCH_WP_OD */
|
||||||
|
@@ -26,6 +26,7 @@
|
|||||||
const struct pad_config *variant_base_gpio_table(size_t *num);
|
const struct pad_config *variant_base_gpio_table(size_t *num);
|
||||||
const struct pad_config *variant_override_gpio_table(size_t *num);
|
const struct pad_config *variant_override_gpio_table(size_t *num);
|
||||||
const struct pad_config *variant_early_gpio_table(size_t *num);
|
const struct pad_config *variant_early_gpio_table(size_t *num);
|
||||||
|
const struct pad_config *variant_early_override_gpio_table(size_t *num);
|
||||||
const struct pad_config *variant_sleep_gpio_table(size_t *num, int slp_typ);
|
const struct pad_config *variant_sleep_gpio_table(size_t *num, int slp_typ);
|
||||||
|
|
||||||
/* Baseboard default swizzle. Can be reused if swizzle is same. */
|
/* Baseboard default swizzle. Can be reused if swizzle is same. */
|
||||||
|
Reference in New Issue
Block a user