mirror of
https://github.com/LIV2/A4092-dev.git
synced 2025-12-06 00:32:49 +00:00
a4092flash: Fix detection and verification
This commit is contained in:
parent
9726dcb0e3
commit
a3e881544c
@ -279,10 +279,10 @@ bool flash_init(UBYTE *manuf, UBYTE *devid, ULONG *base, UWORD *sectorSize) {
|
|||||||
flash_unlock_sdp();
|
flash_unlock_sdp();
|
||||||
flash_command(CMD_ID_ENTRY);
|
flash_command(CMD_ID_ENTRY);
|
||||||
|
|
||||||
// Read manufacturer ID from byte address 0
|
// Read manufacturer ID
|
||||||
manufId = flash_read_byte(0);
|
manufId = flash_read_byte(0);
|
||||||
// Read device ID from byte address 2
|
// Read device ID
|
||||||
deviceId = flash_read_byte(2);
|
deviceId = flash_read_byte(1);
|
||||||
|
|
||||||
flash_command(CMD_CFI_ID_EXIT);
|
flash_command(CMD_CFI_ID_EXIT);
|
||||||
|
|
||||||
|
|||||||
@ -482,7 +482,7 @@ BOOL writeBufToFlash(struct scsiBoard *board, UBYTE *source, UBYTE *dest, ULONG
|
|||||||
lastProgress = progress;
|
lastProgress = progress;
|
||||||
}
|
}
|
||||||
sourcePtr = ((void *)source + i);
|
sourcePtr = ((void *)source + i);
|
||||||
destPtr = ((void *)dest + (i << 1));
|
destPtr = ((void *)dest + (i << 2));
|
||||||
if (*sourcePtr != *destPtr) {
|
if (*sourcePtr != *destPtr) {
|
||||||
printf("\nVerification failed at %06x - Expected %02X but read %02X\n",(int)destPtr,*sourcePtr,*destPtr);
|
printf("\nVerification failed at %06x - Expected %02X but read %02X\n",(int)destPtr,*sourcePtr,*destPtr);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user