Fix the memory types command

This commit is contained in:
Marcel Holtmann 2005-11-07 09:31:00 +00:00
parent 4c230395b7
commit 226949879e

View File

@ -335,21 +335,21 @@ static int cmd_memtypes(int dd, int argc, char *argv[])
for (i = 0; i < 4; i++) {
memset(array, 0, sizeof(array));
array[2] = stores[i] & 0xff;
array[3] = stores[i] >> 8;
array[0] = stores[i] & 0xff;
array[1] = stores[i] >> 8;
err = csr_read_varid_complex(dd, seqnum++,
CSR_VARID_PS_MEMORY_TYPE, array, sizeof(array));
if (err < 0)
break;
continue;
type = array[4] + (array[5] << 8);
type = array[2] + (array[3] << 8);
printf("%s (0x%04x) = %s (%d)\n", storestostr(stores[i]),
stores[i], memorytostr(type), type);
}
return err;
return 0;
}
static struct option pskey_options[] = {