Commit 42a89d77554ed23b4288fb1c167bc873e6565128

Authored by Paul Brook
1 parent 2ac71179

Use target_phys_addr_t, not target_ulong.

Signed-off-by: Paul Brook <paul@codesourcery.com>
Showing 1 changed file with 13 additions and 12 deletions
hw/pflash_cfi01.c
... ... @@ -60,9 +60,9 @@ do { \
60 60  
61 61 struct pflash_t {
62 62 BlockDriverState *bs;
63   - target_ulong base;
64   - target_ulong sector_len;
65   - target_ulong total_len;
  63 + target_phys_addr_t base;
  64 + target_phys_addr_t sector_len;
  65 + target_phys_addr_t total_len;
66 66 int width;
67 67 int wcycle; /* if 0, the flash is read normally */
68 68 int bypass;
... ... @@ -72,7 +72,7 @@ struct pflash_t {
72 72 uint16_t ident[4];
73 73 uint8_t cfi_len;
74 74 uint8_t cfi_table[0x52];
75   - target_ulong counter;
  75 + target_phys_addr_t counter;
76 76 QEMUTimer *timer;
77 77 ram_addr_t off;
78 78 int fl_mem;
... ... @@ -96,9 +96,10 @@ static void pflash_timer (void *opaque)
96 96 pfl->cmd = 0;
97 97 }
98 98  
99   -static uint32_t pflash_read (pflash_t *pfl, target_ulong offset, int width)
  99 +static uint32_t pflash_read (pflash_t *pfl, target_phys_addr_t offset,
  100 + int width)
100 101 {
101   - target_ulong boff;
  102 + target_phys_addr_t boff;
102 103 uint32_t ret;
103 104 uint8_t *p;
104 105  
... ... @@ -194,7 +195,7 @@ static void pflash_update(pflash_t *pfl, int offset,
194 195 }
195 196 }
196 197  
197   -static void inline pflash_data_write(pflash_t *pfl, target_ulong offset,
  198 +static void inline pflash_data_write(pflash_t *pfl, target_phys_addr_t offset,
198 199 uint32_t value, int width)
199 200 {
200 201 uint8_t *p = pfl->storage;
... ... @@ -235,10 +236,10 @@ static void inline pflash_data_write(pflash_t *pfl, target_ulong offset,
235 236  
236 237 }
237 238  
238   -static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value,
239   - int width)
  239 +static void pflash_write(pflash_t *pfl, target_phys_addr_t offset,
  240 + uint32_t value, int width)
240 241 {
241   - target_ulong boff;
  242 + target_phys_addr_t boff;
242 243 uint8_t *p;
243 244 uint8_t cmd;
244 245  
... ... @@ -398,7 +399,7 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value,
398 399  
399 400 error_flash:
400 401 printf("%s: Unimplemented flash cmd sequence "
401   - "(offset " TARGET_FMT_lx ", wcycle 0x%x cmd 0x%x value 0x%x)\n",
  402 + "(offset " TARGET_FMT_plx ", wcycle 0x%x cmd 0x%x value 0x%x)\n",
402 403 __func__, offset, pfl->wcycle, pfl->cmd, value);
403 404  
404 405 reset_flash:
... ... @@ -506,7 +507,7 @@ pflash_t *pflash_cfi01_register(target_phys_addr_t base, ram_addr_t off,
506 507 uint16_t id2, uint16_t id3)
507 508 {
508 509 pflash_t *pfl;
509   - target_long total_len;
  510 + target_phys_addr_t total_len;
510 511  
511 512 total_len = sector_len * nb_blocs;
512 513  
... ...