mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
hw/rtc/ds1338: Trace send and receive operations
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Bernhard Beschow <shentey@gmail.com> Message-id: 20241103143330.123596-2-shentey@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
a5c02408c1
commit
e8217c573f
2 changed files with 10 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
#include "qemu/module.h"
|
||||
#include "qom/object.h"
|
||||
#include "sysemu/rtc.h"
|
||||
#include "trace.h"
|
||||
|
||||
/* Size of NVRAM including both the user-accessible area and the
|
||||
* secondary register area.
|
||||
|
@ -126,6 +127,9 @@ static uint8_t ds1338_recv(I2CSlave *i2c)
|
|||
uint8_t res;
|
||||
|
||||
res = s->nvram[s->ptr];
|
||||
|
||||
trace_ds1338_recv(s->ptr, res);
|
||||
|
||||
inc_regptr(s);
|
||||
return res;
|
||||
}
|
||||
|
@ -134,6 +138,8 @@ static int ds1338_send(I2CSlave *i2c, uint8_t data)
|
|||
{
|
||||
DS1338State *s = DS1338(i2c);
|
||||
|
||||
trace_ds1338_send(s->ptr, data);
|
||||
|
||||
if (s->addr_byte) {
|
||||
s->ptr = data & (NVRAM_SIZE - 1);
|
||||
s->addr_byte = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue