static void tnetw1130_mem0_writew(void *opaque, target_phys_addr_t addr, uint32_t val) { pci_tnetw1130_t *d = (pci_tnetw1130_t *) opaque; tnetw1130_t *s = &d->tnetw1130; addr -= s->region[0]; tnetw1130_write0w(d, addr, val); }
static void tnetw1130_write0(void *opaque, hwaddr addr, uint64_t val, unsigned size) { TNETW1130State *d = opaque; tnetw1130_t *s = &d->tnetw1130; switch (size) { case 1: tnetw1130_write0b(s, addr, val); break; case 2: tnetw1130_write0w(s, addr, val); break; case 4: tnetw1130_write0l(s, addr, val); break; default: assert(!"bad size"); } }