soc/intel/common: Remove GPIO PAD lock config override from mainboard
This patch removes mainboard capability to override GPIO PAD lock configuration using `mb_gpio_lock_config` override function as the variant GPIO pad configuration table is now capable of locking GPIO PADs. BUG=b:208827718 TEST=Able to build and boot brya. Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: I6769f51afaf79b007d4f199bccc532d6b1c4d435 Reviewed-on: https://review.coreboot.org/c/coreboot/+/61587 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com> Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com> Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
This commit is contained in:
parent
526cc3ed44
commit
2fb232af8b
|
@ -259,12 +259,6 @@ int gpio_lock_pads(const struct gpio_lock_config *pad_list, const size_t count);
|
||||||
*/
|
*/
|
||||||
const struct gpio_lock_config *soc_gpio_lock_config(size_t *num);
|
const struct gpio_lock_config *soc_gpio_lock_config(size_t *num);
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns an array of gpio_lock_config entries that the mainboard
|
|
||||||
* deems security risks that should be locked down.
|
|
||||||
*/
|
|
||||||
const struct gpio_lock_config *mb_gpio_lock_config(size_t *num);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the pmc_gpe to gpio_gpe mapping table
|
* Returns the pmc_gpe to gpio_gpe mapping table
|
||||||
*
|
*
|
||||||
|
|
|
@ -317,32 +317,17 @@ __weak const struct gpio_lock_config *soc_gpio_lock_config(size_t *num)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
__weak const struct gpio_lock_config *mb_gpio_lock_config(size_t *num)
|
|
||||||
{
|
|
||||||
*num = 0;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void soc_lock_gpios(void)
|
static void soc_lock_gpios(void)
|
||||||
{
|
{
|
||||||
const struct gpio_lock_config *soc_gpios;
|
const struct gpio_lock_config *soc_gpios;
|
||||||
const struct gpio_lock_config *mb_gpios;
|
|
||||||
size_t soc_gpio_num;
|
size_t soc_gpio_num;
|
||||||
size_t mb_gpio_num;
|
|
||||||
|
|
||||||
/* get list of gpios from SoC */
|
/* get list of gpios from SoC */
|
||||||
soc_gpios = soc_gpio_lock_config(&soc_gpio_num);
|
soc_gpios = soc_gpio_lock_config(&soc_gpio_num);
|
||||||
|
|
||||||
/* get list of gpios from mainboard */
|
|
||||||
mb_gpios = mb_gpio_lock_config(&mb_gpio_num);
|
|
||||||
|
|
||||||
/* Lock any soc requested gpios */
|
/* Lock any soc requested gpios */
|
||||||
if (soc_gpio_num)
|
if (soc_gpio_num)
|
||||||
gpio_lock_pads(soc_gpios, soc_gpio_num);
|
gpio_lock_pads(soc_gpios, soc_gpio_num);
|
||||||
|
|
||||||
/* Lock any mainboard requested gpios */
|
|
||||||
if (mb_gpio_num)
|
|
||||||
gpio_lock_pads(mb_gpios, mb_gpio_num);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void finalize(void)
|
static void finalize(void)
|
||||||
|
|
Loading…
Reference in New Issue