From: Rutger H. <ru...@cs...> - 2009-04-23 14:59:02
|
Arnim Laeuger wrote: > Rutger Hofman schrieb: >> In file src/flash/amd_flash.c function amd_29xx040_read_array() we have >> this code: >> >> static void >> amd_29xx040_read_array (urj_flash_cfi_array_t *cfi_array) >> { >> /* Read Array */ >> if (var_forced_detection.unlock_bypass == AMD_BYPASS_UNLOCK_MODE) >> { >> URJ_BUS_WRITE (bus, cfi_array->address + 0x555, 0x90); >> URJ_BUS_WRITE (bus, cfi_array->address + 0x2AA, 0x00); >> usleep (100); >> var_forced_detection.unlock_bypass = AMD_STANDARD_MODE; >> } >> URJ_BUS_WRITE (cfi_array->bus, cfi_array->address + 0x0, 0x0F0); >> /* AMD reset */ >> } >> >> As you can see, this manipulates the global variable 'bus' in the two >> calls under the if clause, and manipulates 'cfi_array->bus' below. Is >> this correct? > > No. > >> Or should it do 'cfi_array->bus' in all cases? > > Yes, definitely. Feel free to fix that. You mean, in the urjtag/ tree? Or also in the vanilla 0.10 jtag tree? Rutger |