m25p80: Fix debug messages.
Some dodgy casts were making a mess of these msgs. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
This commit is contained in:
parent
42bb9c9178
commit
3bec0c7d46
|
@ -319,7 +319,7 @@ static void flash_erase(Flash *s, int offset, FlashCMD cmd)
|
||||||
|
|
||||||
DB_PRINT("offset = %#x, len = %d\n", offset, len);
|
DB_PRINT("offset = %#x, len = %d\n", offset, len);
|
||||||
if ((s->pi->flags & capa_to_assert) != capa_to_assert) {
|
if ((s->pi->flags & capa_to_assert) != capa_to_assert) {
|
||||||
hw_error("m25p80: %dk erase size not supported by device\n", len);
|
hw_error("m25p80: %d erase size not supported by device\n", len);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!s->write_enable) {
|
if (!s->write_enable) {
|
||||||
|
@ -349,8 +349,8 @@ void flash_write8(Flash *s, uint64_t addr, uint8_t data)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((prev ^ data) & data) {
|
if ((prev ^ data) & data) {
|
||||||
DB_PRINT("programming zero to one! addr=%lx %x -> %x\n",
|
DB_PRINT("programming zero to one! addr=%" PRIx64 " %" PRIx8
|
||||||
addr, prev, data);
|
" -> %" PRIx8 "\n", addr, prev, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->pi->flags & WR_1) {
|
if (s->pi->flags & WR_1) {
|
||||||
|
@ -538,15 +538,16 @@ static uint32_t m25p80_transfer8(SSISlave *ss, uint32_t tx)
|
||||||
switch (s->state) {
|
switch (s->state) {
|
||||||
|
|
||||||
case STATE_PAGE_PROGRAM:
|
case STATE_PAGE_PROGRAM:
|
||||||
DB_PRINT("page program cur_addr=%lx data=%x\n", s->cur_addr,
|
DB_PRINT("page program cur_addr=%#" PRIx64 " data=%" PRIx8 "\n",
|
||||||
(uint8_t)tx);
|
s->cur_addr, (uint8_t)tx);
|
||||||
flash_write8(s, s->cur_addr, (uint8_t)tx);
|
flash_write8(s, s->cur_addr, (uint8_t)tx);
|
||||||
s->cur_addr++;
|
s->cur_addr++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATE_READ:
|
case STATE_READ:
|
||||||
r = s->storage[s->cur_addr];
|
r = s->storage[s->cur_addr];
|
||||||
DB_PRINT("READ 0x%lx=%x\n", s->cur_addr, r);
|
DB_PRINT("READ 0x%" PRIx64 "=%" PRIx8 "\n", s->cur_addr,
|
||||||
|
(uint8_t)r);
|
||||||
s->cur_addr = (s->cur_addr + 1) % s->size;
|
s->cur_addr = (s->cur_addr + 1) % s->size;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue