Commit 99ba31b4fe905e6781e2c99c1e686370acc40ec6

Authored by bellard
1 parent 0510224e

flash device fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2033 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 1 additions and 4 deletions
hw/pflash_cfi02.c
... ... @@ -42,9 +42,6 @@
42 42 #ifdef PFLASH_DEBUG
43 43 #define DPRINTF(fmt, args...) \
44 44 do { \
45   - if (loglevel) \
46   - fprintf(logfile, "PFLASH: " fmt , ##args); \
47   - else \
48 45 printf("PFLASH: " fmt , ##args); \
49 46 } while (0)
50 47 #else
... ... @@ -213,7 +210,7 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value,
213 210 /* WARNING: when the memory area is in ROMD mode, the offset is a
214 211 ram offset, not a physical address */
215 212 if (pfl->wcycle == 0)
216   - offset -= pfl->off;
  213 + offset -= (target_ulong)(long)pfl->storage;
217 214 else
218 215 offset -= pfl->base;
219 216  
... ...