diff options
author | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2011-12-18 15:01:24 +0000 |
---|---|---|
committer | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2011-12-18 15:01:24 +0000 |
commit | e8c818e1cd78e69a3cb2ad9785a48a858f34415c (patch) | |
tree | 3a5514d022392cf4d8fa368f9f02653da21a93ca /atahpt.c | |
parent | baf84624cd340c9b8dfaa45c56060ab788f4945e (diff) | |
download | flashrom-e8c818e1cd78e69a3cb2ad9785a48a858f34415c.tar.gz |
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.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1474 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'atahpt.c')
-rw-r--r-- | atahpt.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -40,6 +40,10 @@ const struct pcidev_status ata_hpt[] = { {}, }; +static void atahpt_chip_writeb(const struct flashctx *flash, uint8_t val, + chipaddr addr); +static uint8_t atahpt_chip_readb(const struct flashctx *flash, + const chipaddr addr); static const struct par_programmer par_programmer_atahpt = { .chip_readb = atahpt_chip_readb, .chip_readw = fallback_chip_readw, @@ -80,13 +84,15 @@ int atahpt_init(void) return 0; } -void atahpt_chip_writeb(uint8_t val, chipaddr addr) +static void atahpt_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 atahpt_chip_readb(const chipaddr addr) +static uint8_t atahpt_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); |