Lines Matching defs:val
43 static void pci_host_data_writeb(void* opaque, pci_addr_t addr, uint32_t val)
47 PCI_DPRINTF("writeb addr " TARGET_FMT_plx " val %x\n",
48 (target_phys_addr_t)addr, val);
50 pci_data_write(s->bus, s->config_reg | (addr & 3), val, 1);
53 static void pci_host_data_writew(void* opaque, pci_addr_t addr, uint32_t val)
57 val = bswap16(val);
59 PCI_DPRINTF("writew addr " TARGET_FMT_plx " val %x\n",
60 (target_phys_addr_t)addr, val);
62 pci_data_write(s->bus, s->config_reg | (addr & 3), val, 2);
65 static void pci_host_data_writel(void* opaque, pci_addr_t addr, uint32_t val)
69 val = bswap32(val);
71 PCI_DPRINTF("writel addr " TARGET_FMT_plx " val %x\n",
72 (target_phys_addr_t)addr, val);
74 pci_data_write(s->bus, s->config_reg, val, 4);
80 uint32_t val;
84 val = pci_data_read(s->bus, s->config_reg | (addr & 3), 1);
85 PCI_DPRINTF("readb addr " TARGET_FMT_plx " val %x\n",
86 (target_phys_addr_t)addr, val);
87 return val;
93 uint32_t val;
96 val = pci_data_read(s->bus, s->config_reg | (addr & 3), 2);
97 PCI_DPRINTF("readw addr " TARGET_FMT_plx " val %x\n",
98 (target_phys_addr_t)addr, val);
100 val = bswap16(val);
102 return val;
108 uint32_t val;
111 val = pci_data_read(s->bus, s->config_reg | (addr & 3), 4);
112 PCI_DPRINTF("readl addr " TARGET_FMT_plx " val %x\n",
113 (target_phys_addr_t)addr, val);
115 val = bswap32(val);
117 return val;