From 8a3c60cdd0e5632173567923ae1927763e31e857 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Sun, 18 Dec 2011 15:01:24 +0000 Subject: Add struct flashctx * parameter to all functions accessing flash chips All programmer access function prototypes except init have been made static and moved to the respective file. A few internal functions in flash chip drivers had chipaddr parameters which are no longer needed. The lines touched by flashctx changes have been adjusted to 80 columns except in header files. Corresponding to flashrom svn r1474. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Michael Karcher --- nic3com.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'nic3com.c') diff --git a/nic3com.c b/nic3com.c index 0c27957..473c7b1 100644 --- a/nic3com.c +++ b/nic3com.c @@ -55,6 +55,10 @@ const struct pcidev_status nics_3com[] = { {}, }; +static void nic3com_chip_writeb(const struct flashctx *flash, uint8_t val, + chipaddr addr); +static uint8_t nic3com_chip_readb(const struct flashctx *flash, + const chipaddr addr); static const struct par_programmer par_programmer_nic3com = { .chip_readb = nic3com_chip_readb, .chip_readw = fallback_chip_readw, @@ -116,13 +120,15 @@ int nic3com_init(void) return 0; } -void nic3com_chip_writeb(uint8_t val, chipaddr addr) +static void nic3com_chip_writeb(const struct flashctx *flash, uint8_t val, + chipaddr addr) { OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR); OUTB(val, io_base_addr + BIOS_ROM_DATA); } -uint8_t nic3com_chip_readb(const chipaddr addr) +static uint8_t nic3com_chip_readb(const struct flashctx *flash, + const chipaddr addr) { OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR); return INB(io_base_addr + BIOS_ROM_DATA); -- cgit v1.1