From ad8eb60e5d559e113a73e13213846938fded03de Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 24 May 2021 20:33:45 +1000 Subject: par_masters: Reshuffle to remove forward declarations Dispense with all these forward declarations by way of ordering. Just deal with all the par_masters in one go to be over and done with. BUG=none BRANCH=none TEST=builds Change-Id: I88e89992380195fee7c9de7ec57502ab980ec5df Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/54873 Tested-by: build bot (Jenkins) Reviewed-by: Anastasia Klimchuk Reviewed-by: Angel Pons --- it8212.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'it8212.c') diff --git a/it8212.c b/it8212.c index 2f2d43ea4..7c66a59ef 100644 --- a/it8212.c +++ b/it8212.c @@ -32,8 +32,16 @@ const struct dev_entry devs_it8212[] = { #define IT8212_MEMMAP_SIZE (128 * 1024) #define IT8212_MEMMAP_MASK (IT8212_MEMMAP_SIZE - 1) -static void it8212_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr); -static uint8_t it8212_chip_readb(const struct flashctx *flash, const chipaddr addr); +static void it8212_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr) +{ + pci_mmio_writeb(val, it8212_bar + (addr & IT8212_MEMMAP_MASK)); +} + +static uint8_t it8212_chip_readb(const struct flashctx *flash, const chipaddr addr) +{ + return pci_mmio_readb(it8212_bar + (addr & IT8212_MEMMAP_MASK)); +} + static const struct par_master par_master_it8212 = { .chip_readb = it8212_chip_readb, .chip_readw = fallback_chip_readw, @@ -70,13 +78,3 @@ int it8212_init(void) register_par_master(&par_master_it8212, BUS_PARALLEL, NULL); return 0; } - -static void it8212_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr) -{ - pci_mmio_writeb(val, it8212_bar + (addr & IT8212_MEMMAP_MASK)); -} - -static uint8_t it8212_chip_readb(const struct flashctx *flash, const chipaddr addr) -{ - return pci_mmio_readb(it8212_bar + (addr & IT8212_MEMMAP_MASK)); -} -- cgit v1.2.3