aboutsummaryrefslogtreecommitdiffstats
path: root/internal.c
diff options
context:
space:
mode:
Diffstat (limited to 'internal.c')
-rw-r--r--internal.c86
1 files changed, 36 insertions, 50 deletions
diff --git a/internal.c b/internal.c
index 44570a5e..abd90a8f 100644
--- a/internal.c
+++ b/internal.c
@@ -114,19 +114,48 @@ int is_laptop = 0;
int laptop_ok = 0;
static void internal_chip_writeb(const struct flashctx *flash, uint8_t val,
- chipaddr addr);
+ chipaddr addr)
+{
+ mmio_writeb(val, (void *) addr);
+}
+
static void internal_chip_writew(const struct flashctx *flash, uint16_t val,
- chipaddr addr);
+ chipaddr addr)
+{
+ mmio_writew(val, (void *) addr);
+}
+
static void internal_chip_writel(const struct flashctx *flash, uint32_t val,
- chipaddr addr);
+ chipaddr addr)
+{
+ mmio_writel(val, (void *) addr);
+}
+
static uint8_t internal_chip_readb(const struct flashctx *flash,
- const chipaddr addr);
+ const chipaddr addr)
+{
+ return mmio_readb((void *) addr);
+}
+
static uint16_t internal_chip_readw(const struct flashctx *flash,
- const chipaddr addr);
+ const chipaddr addr)
+{
+ return mmio_readw((void *) addr);
+}
+
static uint32_t internal_chip_readl(const struct flashctx *flash,
- const chipaddr addr);
+ const chipaddr addr)
+{
+ return mmio_readl((void *) addr);
+}
+
static void internal_chip_readn(const struct flashctx *flash, uint8_t *buf,
- const chipaddr addr, size_t len);
+ const chipaddr addr, size_t len)
+{
+ mmio_readn((void *)addr, buf, len);
+ return;
+}
+
static const struct par_master par_master_internal = {
.chip_readb = internal_chip_readb,
.chip_readw = internal_chip_readw,
@@ -344,46 +373,3 @@ internal_init_exit:
return ret;
}
-
-static void internal_chip_writeb(const struct flashctx *flash, uint8_t val,
- chipaddr addr)
-{
- mmio_writeb(val, (void *) addr);
-}
-
-static void internal_chip_writew(const struct flashctx *flash, uint16_t val,
- chipaddr addr)
-{
- mmio_writew(val, (void *) addr);
-}
-
-static void internal_chip_writel(const struct flashctx *flash, uint32_t val,
- chipaddr addr)
-{
- mmio_writel(val, (void *) addr);
-}
-
-static uint8_t internal_chip_readb(const struct flashctx *flash,
- const chipaddr addr)
-{
- return mmio_readb((void *) addr);
-}
-
-static uint16_t internal_chip_readw(const struct flashctx *flash,
- const chipaddr addr)
-{
- return mmio_readw((void *) addr);
-}
-
-static uint32_t internal_chip_readl(const struct flashctx *flash,
- const chipaddr addr)
-{
- return mmio_readl((void *) addr);
-}
-
-static void internal_chip_readn(const struct flashctx *flash, uint8_t *buf,
- const chipaddr addr, size_t len)
-{
- mmio_readn((void *)addr, buf, len);
- return;
-}