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,9 +42,6 @@
42 #ifdef PFLASH_DEBUG 42 #ifdef PFLASH_DEBUG
43 #define DPRINTF(fmt, args...) \ 43 #define DPRINTF(fmt, args...) \
44 do { \ 44 do { \
45 - if (loglevel) \  
46 - fprintf(logfile, "PFLASH: " fmt , ##args); \  
47 - else \  
48 printf("PFLASH: " fmt , ##args); \ 45 printf("PFLASH: " fmt , ##args); \
49 } while (0) 46 } while (0)
50 #else 47 #else
@@ -213,7 +210,7 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value, @@ -213,7 +210,7 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value,
213 /* WARNING: when the memory area is in ROMD mode, the offset is a 210 /* WARNING: when the memory area is in ROMD mode, the offset is a
214 ram offset, not a physical address */ 211 ram offset, not a physical address */
215 if (pfl->wcycle == 0) 212 if (pfl->wcycle == 0)
216 - offset -= pfl->off; 213 + offset -= (target_ulong)(long)pfl->storage;
217 else 214 else
218 offset -= pfl->base; 215 offset -= pfl->base;
219 216