aboutsummaryrefslogtreecommitdiff
path: root/src/flash/mflash.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-04-27 05:40:52 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-04-27 05:40:52 +0000
commitc34a85446529c61f78114c3d87cd5fad30cfbfe5 (patch)
tree76307a4c3ce7acfb813eb4e6b63eb22927c408cb /src/flash/mflash.c
parent60fdeb057a53597bbd1b05b9fbc7c2d05fe8d143 (diff)
downloadriscv-openocd-c34a85446529c61f78114c3d87cd5fad30cfbfe5.zip
riscv-openocd-c34a85446529c61f78114c3d87cd5fad30cfbfe5.tar.gz
riscv-openocd-c34a85446529c61f78114c3d87cd5fad30cfbfe5.tar.bz2
Philippe Vachon <philippe@cowpig.ca> 64 bit host fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@1534 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash/mflash.c')
-rw-r--r--src/flash/mflash.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/flash/mflash.c b/src/flash/mflash.c
index 10830b2..08aad9f 100644
--- a/src/flash/mflash.c
+++ b/src/flash/mflash.c
@@ -473,14 +473,16 @@ static int mg_mflash_read_sects(void *buff, u32 sect_num, u32 sect_cnt)
residue = sect_cnt % 256;
for (i = 0; i < quotient; i++) {
- LOG_DEBUG("sect num : %u buff : 0x%8.8x", sect_num, (u32)buff_ptr);
+ LOG_DEBUG("sect num : %u buff : 0x%0lx", sect_num,
+ (unsigned long)buff_ptr);
mg_mflash_do_read_sects(buff_ptr, sect_num, 256);
sect_num += 256;
buff_ptr += 256 * MG_MFLASH_SECTOR_SIZE;
}
if (residue) {
- LOG_DEBUG("sect num : %u buff : %8.8x", sect_num, (u32)buff_ptr);
+ LOG_DEBUG("sect num : %u buff : %0lx", sect_num,
+ (unsigned long)buff_ptr);
mg_mflash_do_read_sects(buff_ptr, sect_num, residue);
}
@@ -542,14 +544,16 @@ static int mg_mflash_write_sects(void *buff, u32 sect_num, u32 sect_cnt)
residue = sect_cnt % 256;
for (i = 0; i < quotient; i++) {
- LOG_DEBUG("sect num : %u buff : %8.8x", sect_num, (u32)buff_ptr);
+ LOG_DEBUG("sect num : %u buff : %0lx", sect_num,
+ (unsigned long)buff_ptr);
mg_mflash_do_write_sects(buff_ptr, sect_num, 256);
sect_num += 256;
buff_ptr += 256 * MG_MFLASH_SECTOR_SIZE;
}
if (residue) {
- LOG_DEBUG("sect num : %u buff : %8.8x", sect_num, (u32)buff_ptr);
+ LOG_DEBUG("sect num : %u buff : %0lx", sect_num,
+ (unsigned long)buff_ptr);
mg_mflash_do_write_sects(buff_ptr, sect_num, residue);
}