Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/73462 )
Change subject: ichspi: Plumb programmer_cfg to via_init_spi() entry ......................................................................
ichspi: Plumb programmer_cfg to via_init_spi() entry
Change-Id: I965645432a2d077fbdb3c4cdc36d008a5846ff8d Signed-off-by: Edward O'Callaghan quasisec@google.com --- M chipset_enable.c M ichspi.c M include/programmer.h 3 files changed, 14 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/62/73462/1
diff --git a/chipset_enable.c b/chipset_enable.c index 16ef0f4..0747d57 100644 --- a/chipset_enable.c +++ b/chipset_enable.c @@ -1193,12 +1193,12 @@ return ERROR_FLASHROM_FATAL; }
- return via_init_spi(spi0_mm_base); + return via_init_spi(cfg, spi0_mm_base); }
static int enable_flash_vt8237s_spi(const struct programmer_cfg *cfg, struct pci_dev *dev, const char *name) { - return via_init_spi(pci_read_long(dev, 0xbc) << 8); + return via_init_spi(cfg, pci_read_long(dev, 0xbc) << 8); }
static int enable_flash_cs5530(const struct programmer_cfg *cfg, struct pci_dev *dev, const char *name) diff --git a/ichspi.c b/ichspi.c index 1522d2b..0d3dd0e 100644 --- a/ichspi.c +++ b/ichspi.c @@ -2384,7 +2384,7 @@ .probe_opcode = ich_spi_probe_opcode, };
-int via_init_spi(uint32_t mmio_base) +int via_init_spi(const struct programmer_cfg *cfg, uint32_t mmio_base) { int i;
diff --git a/include/programmer.h b/include/programmer.h index 5b304f5..e81d3bd 100644 --- a/include/programmer.h +++ b/include/programmer.h @@ -368,7 +368,7 @@ /* ichspi.c */ #if CONFIG_INTERNAL == 1 int ich_init_spi(const struct programmer_cfg *cfg, void *spibar, enum ich_chipset ich_generation); -int via_init_spi(uint32_t mmio_base); +int via_init_spi(const struct programmer_cfg *cfg, uint32_t mmio_base);
/* amd_imc.c */ int amd_imc_shutdown(struct pci_dev *dev);