summaryrefslogtreecommitdiff
path: root/hw/ds1225y.c
diff options
context:
space:
mode:
authorHervé Poussineau <hpoussin@reactos.org>2011-07-18 23:34:21 +0200
committerBlue Swirl <blauwirbel@gmail.com>2011-07-20 20:54:50 +0000
commitd43ed9ec2566922e76420b4ac914df6b2d473c4b (patch)
treed56a5822fd54cace4ade059c19a0513ae3031bd0 /hw/ds1225y.c
parent86f25c7c37c6f6250cfac4d0ee331af3ca73cac1 (diff)
downloadqemu-d43ed9ec2566922e76420b4ac914df6b2d473c4b.tar.gz
qemu-d43ed9ec2566922e76420b4ac914df6b2d473c4b.tar.bz2
qemu-d43ed9ec2566922e76420b4ac914df6b2d473c4b.zip
ds1225y: use trace framework
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/ds1225y.c')
-rw-r--r--hw/ds1225y.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/hw/ds1225y.c b/hw/ds1225y.c
index 1fd701086e..5105b9bb8f 100644
--- a/hw/ds1225y.c
+++ b/hw/ds1225y.c
@@ -24,9 +24,7 @@
#include "hw.h"
#include "mips.h"
-#include "nvram.h"
-
-//#define DEBUG_NVRAM
+#include "trace.h"
typedef struct ds1225y_t
{
@@ -42,10 +40,7 @@ static uint32_t nvram_readb (void *opaque, target_phys_addr_t addr)
uint32_t val;
val = s->contents[addr];
-
-#ifdef DEBUG_NVRAM
- printf("nvram: read 0x%x at " TARGET_FMT_lx "\n", val, addr);
-#endif
+ trace_nvram_read(addr, val);
return val;
}
@@ -71,11 +66,10 @@ static void nvram_writeb (void *opaque, target_phys_addr_t addr, uint32_t val)
{
ds1225y_t *s = opaque;
-#ifdef DEBUG_NVRAM
- printf("nvram: write 0x%x at " TARGET_FMT_lx "\n", val, addr);
-#endif
+ val &= 0xff;
+ trace_nvram_write(addr, s->contents[addr], val);
- s->contents[addr] = val & 0xff;
+ s->contents[addr] = val;
if (s->file) {
qemu_fseek(s->file, addr, SEEK_SET);
qemu_put_byte(s->file, (int)val);