summaryrefslogtreecommitdiffstats
path: root/drkaiser.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-12-18 15:01:24 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-12-18 15:01:24 +0000
commit8a3c60cdd0e5632173567923ae1927763e31e857 (patch)
tree3a5514d022392cf4d8fa368f9f02653da21a93ca /drkaiser.c
parent63fd9026f1e82b67a65072fda862ba7af35839e1 (diff)
downloadast2050-flashrom-8a3c60cdd0e5632173567923ae1927763e31e857.zip
ast2050-flashrom-8a3c60cdd0e5632173567923ae1927763e31e857.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. Corresponding to flashrom svn r1474. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Diffstat (limited to 'drkaiser.c')
-rw-r--r--drkaiser.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drkaiser.c b/drkaiser.c
index 9f2202e..362db57 100644
--- a/drkaiser.c
+++ b/drkaiser.c
@@ -39,6 +39,10 @@ const struct pcidev_status drkaiser_pcidev[] = {
static uint8_t *drkaiser_bar;
+static void drkaiser_chip_writeb(const struct flashctx *flash, uint8_t val,
+ chipaddr addr);
+static uint8_t drkaiser_chip_readb(const struct flashctx *flash,
+ const chipaddr addr);
static const struct par_programmer par_programmer_drkaiser = {
.chip_readb = drkaiser_chip_readb,
.chip_readw = fallback_chip_readw,
@@ -84,12 +88,14 @@ int drkaiser_init(void)
return 0;
}
-void drkaiser_chip_writeb(uint8_t val, chipaddr addr)
+static void drkaiser_chip_writeb(const struct flashctx *flash, uint8_t val,
+ chipaddr addr)
{
pci_mmio_writeb(val, drkaiser_bar + (addr & DRKAISER_MEMMAP_MASK));
}
-uint8_t drkaiser_chip_readb(const chipaddr addr)
+static uint8_t drkaiser_chip_readb(const struct flashctx *flash,
+ const chipaddr addr)
{
return pci_mmio_readb(drkaiser_bar + (addr & DRKAISER_MEMMAP_MASK));
}
OpenPOWER on IntegriCloud