summaryrefslogtreecommitdiffstats
path: root/src/target/firmware
diff options
context:
space:
mode:
authorAndreas Oberritter2011-01-07 23:50:04 +0100
committerSteve Markgraf2011-01-07 23:58:30 +0100
commit0e130bf467923ddaff6000aa43747e88a6d3e00f (patch)
tree0ee8c72530cdbd14b11ecbe86e0938b7075b4c3a /src/target/firmware
parentMerge commit '4a4f96d1f67441e2902a0806f1d7c4b29a072ca3' (diff)
downloadosmocom-0e130bf467923ddaff6000aa43747e88a6d3e00f.tar.gz
osmocom-0e130bf467923ddaff6000aa43747e88a6d3e00f.tar.xz
osmocom-0e130bf467923ddaff6000aa43747e88a6d3e00f.zip
Fix flash chip detection by using a volatile pointer
* This might be a workaround for a compiler bug (gcc 4.5.2, binutils 2.21) Signed-off-by: Andreas Oberritter <obi@saftware.de> Signed-off-by: Steve Markgraf <steve@steve-m.de>
Diffstat (limited to 'src/target/firmware')
-rw-r--r--src/target/firmware/flash/cfi_flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/firmware/flash/cfi_flash.c b/src/target/firmware/flash/cfi_flash.c
index 4218db1..d255694 100644
--- a/src/target/firmware/flash/cfi_flash.c
+++ b/src/target/firmware/flash/cfi_flash.c
@@ -410,7 +410,7 @@ static int get_query(void *base_addr, struct cfi_query *query)
for (i = 0; i < sizeof(struct cfi_query); i++) {
uint16_t byte =
flash_read16(base_addr, CFI_OFFSET_CFI_RESP + i);
- *(((unsigned char *)query) + i) = byte;
+ *(((volatile unsigned char *)query) + i) = byte;
}
if (query->qry[0] != 'Q' || query->qry[1] != 'R' || query->qry[2] != 'Y') {