* It does not implement much more ...
*/
-#include "vl.h"
+#include "hw.h"
+#include "flash.h"
+#include "block.h"
+#include "qemu-timer.h"
#define PFLASH_BUG(fmt, args...) \
do { \
pfl->counter--;
break;
+ default:
+ goto error_flash;
}
return;
case 3: /* Confirm mode */
if (cmd == 0xd0) {
pfl->wcycle = 0;
pfl->status |= 0x80;
- break;
} else {
DPRINTF("%s: unknown command for \"write block\"\n", __func__);
PFLASH_BUG("Write block confirm");
+ goto reset_flash;
}
+ break;
+ default:
+ goto error_flash;
}
return;
default:
return ret;
}
-pflash_t *pflash_register (target_phys_addr_t base, ram_addr_t off,
- BlockDriverState *bs,
- target_ulong sector_len, int nb_blocs, int width,
- uint16_t id0, uint16_t id1,
- uint16_t id2, uint16_t id3)
+pflash_t *pflash_cfi01_register(target_phys_addr_t base, ram_addr_t off,
+ BlockDriverState *bs, target_ulong sector_len,
+ int nb_blocs, int width,
+ uint16_t id0, uint16_t id1,
+ uint16_t id2, uint16_t id3)
{
pflash_t *pfl;
target_long total_len;