From: Øyvind H. <go...@us...> - 2011-04-19 12:54:12
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 32ede8fa21fecb68d404b25251ec29ce5e8e6505 (commit) from e105915a4a1ca8f5c80d25b0a79728bc16f306b1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 32ede8fa21fecb68d404b25251ec29ce5e8e6505 Author: Alexandre Pereira da Silva <ale...@gm...> Date: Tue Apr 12 12:56:28 2011 -0300 Fix non cfi x16 nor flash connected to x8 bus. The ids in the table should be masked before comparison. diff --git a/src/flash/nor/non_cfi.c b/src/flash/nor/non_cfi.c index b673904..795f60d 100644 --- a/src/flash/nor/non_cfi.c +++ b/src/flash/nor/non_cfi.c @@ -454,13 +454,19 @@ static struct non_cfi non_cfi_flashes[] = { void cfi_fixup_non_cfi(struct flash_bank *bank) { + unsigned int mask; struct cfi_flash_bank *cfi_info = bank->driver_priv; struct non_cfi *non_cfi = non_cfi_flashes; + if(cfi_info->x16_as_x8) + mask = 0xFF; + else + mask = 0xFFFF; + for (non_cfi = non_cfi_flashes; non_cfi->mfr; non_cfi++) { if ((cfi_info->manufacturer == non_cfi->mfr) - && (cfi_info->device_id == non_cfi->id)) + && (cfi_info->device_id == (non_cfi->id & mask))) { break; } ----------------------------------------------------------------------- Summary of changes: src/flash/nor/non_cfi.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |