summaryrefslogtreecommitdiffstats
path: root/internal.c
diff options
context:
space:
mode:
Diffstat (limited to 'internal.c')
-rw-r--r--internal.c35
1 files changed, 28 insertions, 7 deletions
diff --git a/internal.c b/internal.c
index 215ce6f36..386b84284 100644
--- a/internal.c
+++ b/internal.c
@@ -127,6 +127,20 @@ int register_superio(struct superio s)
int is_laptop = 0;
int laptop_ok = 0;
+static void internal_chip_writeb(const struct flashctx *flash, uint8_t val,
+ chipaddr addr);
+static void internal_chip_writew(const struct flashctx *flash, uint16_t val,
+ chipaddr addr);
+static void internal_chip_writel(const struct flashctx *flash, uint32_t val,
+ chipaddr addr);
+static uint8_t internal_chip_readb(const struct flashctx *flash,
+ const chipaddr addr);
+static uint16_t internal_chip_readw(const struct flashctx *flash,
+ const chipaddr addr);
+static uint32_t internal_chip_readl(const struct flashctx *flash,
+ const chipaddr addr);
+static void internal_chip_readn(const struct flashctx *flash, uint8_t *buf,
+ const chipaddr addr, size_t len);
static const struct par_programmer par_programmer_internal = {
.chip_readb = internal_chip_readb,
.chip_readw = internal_chip_readw,
@@ -324,37 +338,44 @@ int internal_init(void)
}
#endif
-void internal_chip_writeb(uint8_t val, chipaddr addr)
+static void internal_chip_writeb(const struct flashctx *flash, uint8_t val,
+ chipaddr addr)
{
mmio_writeb(val, (void *) addr);
}
-void internal_chip_writew(uint16_t val, chipaddr addr)
+static void internal_chip_writew(const struct flashctx *flash, uint16_t val,
+ chipaddr addr)
{
mmio_writew(val, (void *) addr);
}
-void internal_chip_writel(uint32_t val, chipaddr addr)
+static void internal_chip_writel(const struct flashctx *flash, uint32_t val,
+ chipaddr addr)
{
mmio_writel(val, (void *) addr);
}
-uint8_t internal_chip_readb(const chipaddr addr)
+static uint8_t internal_chip_readb(const struct flashctx *flash,
+ const chipaddr addr)
{
return mmio_readb((void *) addr);
}
-uint16_t internal_chip_readw(const chipaddr addr)
+static uint16_t internal_chip_readw(const struct flashctx *flash,
+ const chipaddr addr)
{
return mmio_readw((void *) addr);
}
-uint32_t internal_chip_readl(const chipaddr addr)
+static uint32_t internal_chip_readl(const struct flashctx *flash,
+ const chipaddr addr)
{
return mmio_readl((void *) addr);
}
-void internal_chip_readn(uint8_t *buf, const chipaddr addr, size_t len)
+static void internal_chip_readn(const struct flashctx *flash, uint8_t *buf,
+ const chipaddr addr, size_t len)
{
memcpy(buf, (void *)addr, len);
return;