summaryrefslogtreecommitdiffstats
path: root/m29f400bt.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-06-01 02:21:02 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-06-01 02:21:02 +0000
commitf2756fa240ccf5b2fe888c4abc9c4cdf33932e3a (patch)
treec35a280fcd8ce8bb56337f783a12eea34203cc6d /m29f400bt.c
parent1181ee251a831be43881d5a6403c33c4229d2ade (diff)
downloadast2050-flashrom-f2756fa240ccf5b2fe888c4abc9c4cdf33932e3a.zip
ast2050-flashrom-f2756fa240ccf5b2fe888c4abc9c4cdf33932e3a.tar.gz
Combine block_erase*_en29lv640b and block_erase*_m29f400bt respectively
This patch combines two identical block and chip erase functions respectively: - Merge block_erase_m29f400bt and block_erase_en29lv640b into erase_block_shifted_jedec. - Merge block_erase_chip_m29f400bt and block_erase_chip_en29lv640b into erase_chip_block_shifted_jedec. Leave their implementations in en29lv640b.c for now. Corresponding to flashrom svn r1808. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'm29f400bt.c')
-rw-r--r--m29f400bt.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/m29f400bt.c b/m29f400bt.c
index c2236e5..399a7e0 100644
--- a/m29f400bt.c
+++ b/m29f400bt.c
@@ -85,54 +85,3 @@ int probe_m29f400bt(struct flashctx *flash)
return 0;
}
-
-int erase_m29f400bt(struct flashctx *flash)
-{
- chipaddr bios = flash->virtual_memory;
-
- chip_writeb(flash, 0xAA, bios + 0xAAA);
- chip_writeb(flash, 0x55, bios + 0x555);
- chip_writeb(flash, 0x80, bios + 0xAAA);
-
- chip_writeb(flash, 0xAA, bios + 0xAAA);
- chip_writeb(flash, 0x55, bios + 0x555);
- chip_writeb(flash, 0x10, bios + 0xAAA);
-
- programmer_delay(10);
- toggle_ready_jedec(flash, bios);
-
- /* FIXME: Check the status register for errors. */
- return 0;
-}
-
-int block_erase_m29f400bt(struct flashctx *flash, unsigned int start,
- unsigned int len)
-{
- chipaddr bios = flash->virtual_memory;
- chipaddr dst = bios + start;
-
- chip_writeb(flash, 0xAA, bios + 0xAAA);
- chip_writeb(flash, 0x55, bios + 0x555);
- chip_writeb(flash, 0x80, bios + 0xAAA);
-
- chip_writeb(flash, 0xAA, bios + 0xAAA);
- chip_writeb(flash, 0x55, bios + 0x555);
- chip_writeb(flash, 0x30, dst);
-
- programmer_delay(10);
- toggle_ready_jedec(flash, bios);
-
- /* FIXME: Check the status register for errors. */
- return 0;
-}
-
-int block_erase_chip_m29f400bt(struct flashctx *flash, unsigned int address,
- unsigned int blocklen)
-{
- if ((address != 0) || (blocklen != flash->chip->total_size * 1024)) {
- msg_cerr("%s called with incorrect arguments\n",
- __func__);
- return -1;
- }
- return erase_m29f400bt(flash);
-}
OpenPOWER on IntegriCloud