Revision d43ed9ec

b/hw/ds1225y.c
24 24

  
25 25
#include "hw.h"
26 26
#include "mips.h"
27
#include "nvram.h"
28

  
29
//#define DEBUG_NVRAM
27
#include "trace.h"
30 28

  
31 29
typedef struct ds1225y_t
32 30
{
......
42 40
    uint32_t val;
43 41

  
44 42
    val = s->contents[addr];
45

  
46
#ifdef DEBUG_NVRAM
47
    printf("nvram: read 0x%x at " TARGET_FMT_lx "\n", val, addr);
48
#endif
43
    trace_nvram_read(addr, val);
49 44
    return val;
50 45
}
51 46

  
......
71 66
{
72 67
    ds1225y_t *s = opaque;
73 68

  
74
#ifdef DEBUG_NVRAM
75
    printf("nvram: write 0x%x at " TARGET_FMT_lx "\n", val, addr);
76
#endif
69
    val &= 0xff;
70
    trace_nvram_write(addr, s->contents[addr], val);
77 71

  
78
    s->contents[addr] = val & 0xff;
72
    s->contents[addr] = val;
79 73
    if (s->file) {
80 74
        qemu_fseek(s->file, addr, SEEK_SET);
81 75
        qemu_put_byte(s->file, (int)val);
b/trace-events
103 103
disable cs4231_mem_writel_reg(uint32_t reg, uint32_t old, uint32_t val) "write reg %d: 0x%08x -> 0x%08x"
104 104
disable cs4231_mem_writel_dreg(uint32_t reg, uint32_t old, uint32_t val) "write dreg %d: 0x%02x -> 0x%02x"
105 105

  
106
# hw/ds1225y.c
107
disable nvram_read(uint32_t addr, uint32_t ret) "read addr %d: 0x%02x"
108
disable nvram_write(uint32_t addr, uint32_t old, uint32_t val) "write addr %d: 0x%02x -> 0x%02x"
109

  
106 110
# hw/eccmemctl.c
107 111
disable ecc_mem_writel_mer(uint32_t val) "Write memory enable %08x"
108 112
disable ecc_mem_writel_mdr(uint32_t val) "Write memory delay %08x"

Also available in: Unified diff