[ 1281432 ] Update jedec.c of patch #835292 to current environment

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@683 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent 089b30cada
commit 33dc2a250d

@ -314,6 +314,7 @@ jedec_detect( bus_t *bus, uint32_t adr, cfi_array_t **cfi_array )
int ba, bw;
int i, j;
cfi_query_structure_t *cfi;
bus_area_t area;
*cfi_array = calloc( 1, sizeof (cfi_array_t) );
if (!*cfi_array)
@ -321,7 +322,9 @@ jedec_detect( bus_t *bus, uint32_t adr, cfi_array_t **cfi_array )
(*cfi_array)->bus = bus;
(*cfi_array)->address = adr;
bw = bus_width( bus, adr );
if (bus_area( bus, adr, &area ) != 0)
return -8; /* bus width detection failed */
bw = area.width;
if (bw != 8 && bw != 16 && bw != 32)
return -3; /* invalid bus width */
(*cfi_array)->bus_width = ba = bw / 8;

Loading…
Cancel
Save