summaryrefslogtreecommitdiff
path: root/common/cmd_eeprom.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2005-09-22 09:04:17 +0200
committerStefan Roese <sr@denx.de>2005-09-22 09:04:17 +0200
commit98f4a3dfcbee54ce2b1d16ef2a2901493e65e5d2 (patch)
treefd82268230e750ae4d6e12c12ae60b5f784eec4c /common/cmd_eeprom.c
parent5810dc3a2e4f5f9075f4a1818317b41e552843e5 (diff)
Add SM501 support to HH405 board.
Add support for gzip compressed bmp's (CONFIG_VIDEO_BMP_GZIP). Add support for eeprom write-enable (CFG_EEPROM_WREN). Patch by Stefan Roese, 22 Sep 2005
Diffstat (limited to 'common/cmd_eeprom.c')
-rw-r--r--common/cmd_eeprom.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/cmd_eeprom.c b/common/cmd_eeprom.c
index a3dedb0ba97..d15a4120577 100644
--- a/common/cmd_eeprom.c
+++ b/common/cmd_eeprom.c
@@ -49,6 +49,9 @@ extern int eeprom_read (unsigned dev_addr, unsigned offset,
uchar *buffer, unsigned cnt);
extern int eeprom_write (unsigned dev_addr, unsigned offset,
uchar *buffer, unsigned cnt);
+#if defined(CFG_EEPROM_WREN)
+extern int eeprom_write_enable (unsigned dev_addr, int state);
+#endif
#endif
@@ -214,6 +217,9 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cn
int i;
#endif
+#if defined(CFG_EEPROM_WREN)
+ eeprom_write_enable (dev_addr,1);
+#endif
/* Write data until done or would cross a write page boundary.
* We must write the address again when changing pages
* because the address counter only increments within a page.
@@ -367,6 +373,9 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cn
udelay(CFG_EEPROM_PAGE_WRITE_DELAY_MS * 1000);
#endif
}
+#if defined(CFG_EEPROM_WREN)
+ eeprom_write_enable (dev_addr,0);
+#endif
return rcode;
}