Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/19460 )
Change subject: ichspi: Drop `dev` parameter from init functions ......................................................................
ichspi: Drop `dev` parameter from init functions
It's never used and has no clear contract (e.g. will the pointer stay valid beyond the call?).
Change-Id: I0d4e7cc731364e86eff214b9022b842a577f9ef4 Signed-off-by: Nico Huber nico.huber@secunet.com Reviewed-on: https://review.coreboot.org/19460 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Philippe Mathieu-Daudé philippe.mathieu.daude@gmail.com Reviewed-by: Stefan Reinauer stefan.reinauer@coreboot.org --- M chipset_enable.c M ichspi.c M programmer.h 3 files changed, 8 insertions(+), 8 deletions(-)
Approvals: build bot (Jenkins): Verified Philippe Mathieu-Daudé: Looks good to me, but someone else must approve Stefan Reinauer: Looks good to me, approved
diff --git a/chipset_enable.c b/chipset_enable.c index 208cd3a..83c470f 100644 --- a/chipset_enable.c +++ b/chipset_enable.c @@ -718,7 +718,7 @@ void *spibar = rcrb + spibar_offset;
/* This adds BUS_SPI */ - int ret_spi = ich_init_spi(dev, spibar, ich_generation); + int ret_spi = ich_init_spi(spibar, ich_generation); if (ret_spi == ERROR_FATAL) return ret_spi; @@ -846,7 +846,7 @@ */ enable_flash_ich_bios_cntl_memmapped(ich_generation, spibar + 0xFC);
- int ret_spi = ich_init_spi(dev, spibar, ich_generation); + int ret_spi = ich_init_spi(spibar, ich_generation); if (ret_spi == ERROR_FATAL) return ret_spi;
@@ -949,12 +949,12 @@ return ERROR_FATAL; }
- return via_init_spi(dev, spi0_mm_base); + return via_init_spi(spi0_mm_base); }
static int enable_flash_vt8237s_spi(struct pci_dev *dev, const char *name) { - return via_init_spi(dev, pci_read_long(dev, 0xbc) << 8); + return via_init_spi(pci_read_long(dev, 0xbc) << 8); }
static int enable_flash_cs5530(struct pci_dev *dev, const char *name) diff --git a/ichspi.c b/ichspi.c index e1395ee..218e3b1 100644 --- a/ichspi.c +++ b/ichspi.c @@ -1561,7 +1561,7 @@ .erase = ich_hwseq_block_erase, };
-int ich_init_spi(struct pci_dev *dev, void *spibar, enum ich_chipset ich_gen) +int ich_init_spi(void *spibar, enum ich_chipset ich_gen) { int i; uint16_t tmp2; @@ -1828,7 +1828,7 @@ .write_aai = default_spi_write_aai, };
-int via_init_spi(struct pci_dev *dev, uint32_t mmio_base) +int via_init_spi(uint32_t mmio_base) { int i;
diff --git a/programmer.h b/programmer.h index 9beaf98..fd9da96 100644 --- a/programmer.h +++ b/programmer.h @@ -655,8 +655,8 @@ /* ichspi.c */ #if CONFIG_INTERNAL == 1 extern uint32_t ichspi_bbar; -int ich_init_spi(struct pci_dev *dev, void *spibar, enum ich_chipset ich_generation); -int via_init_spi(struct pci_dev *dev, uint32_t mmio_base); +int ich_init_spi(void *spibar, enum ich_chipset ich_generation); +int via_init_spi(uint32_t mmio_base);
/* amd_imc.c */ int amd_imc_shutdown(struct pci_dev *dev);