path: root/flash.h
diff options
authorCarl-Daniel Hailfinger <>2009-05-16 01:23:55 +0000
committerCarl-Daniel Hailfinger <>2009-05-16 01:23:55 +0000
commit9ee107721f746b0b81dcacf2f59c4f48d4210b9e (patch)
tree7e77126eedcc62dbf83c65cb365d597b7cbb1d03 /flash.h
parent9862251f8985237445de98060b2fb319c2d6d519 (diff)
Add generic 16 bit and 32 bit chip read/write emulation to the external flasher infrastructure
The emulation works by splitting 32 bit accesses into 16 bit accesses and 16 bit accesses into to 8 bit accesses. That way, external flashers can mix and match the amount of emulation they need. Corresponding to flashrom svn r517. Signed-off-by: Carl-Daniel Hailfinger <> Acked-by: Uwe Hermann <>
Diffstat (limited to 'flash.h')
1 files changed, 4 insertions, 4 deletions
diff --git a/flash.h b/flash.h
index 11e14c6..a51458e 100644
--- a/flash.h
+++ b/flash.h
@@ -611,6 +611,10 @@ void internal_chip_writel(uint32_t val, volatile void *addr);
uint8_t internal_chip_readb(const volatile void *addr);
uint16_t internal_chip_readw(const volatile void *addr);
uint32_t internal_chip_readl(const volatile void *addr);
+void fallback_chip_writew(uint16_t val, volatile void *addr);
+void fallback_chip_writel(uint32_t val, volatile void *addr);
+uint16_t fallback_chip_readw(const volatile void *addr);
+uint32_t fallback_chip_readl(const volatile void *addr);
#if defined(__FreeBSD__) || defined(__DragonFly__)
extern int io_fd;
@@ -635,11 +639,7 @@ int nic3com_shutdown(void);
void *nic3com_map(const char *descr, unsigned long phys_addr, size_t len);
void nic3com_unmap(void *virt_addr, size_t len);
void nic3com_chip_writeb(uint8_t val, volatile void *addr);
-void nic3com_chip_writew(uint16_t val, volatile void *addr);
-void nic3com_chip_writel(uint32_t val, volatile void *addr);
uint8_t nic3com_chip_readb(const volatile void *addr);
-uint16_t nic3com_chip_readw(const volatile void *addr);
-uint32_t nic3com_chip_readl(const volatile void *addr);
extern struct pcidev_status nics_3com[];
/* flashrom.c */
OpenPOWER on IntegriCloud