Revision a4d5f62c

b/hw/apb_pci.c
189 189
static void pci_apb_iowritew (void *opaque, target_phys_addr_t addr,
190 190
                                  uint32_t val)
191 191
{
192
    cpu_outw(addr & IOPORTS_MASK, val);
192
    cpu_outw(addr & IOPORTS_MASK, bswap16(val));
193 193
}
194 194

  
195 195
static void pci_apb_iowritel (void *opaque, target_phys_addr_t addr,
196 196
                                uint32_t val)
197 197
{
198
    cpu_outl(addr & IOPORTS_MASK, val);
198
    cpu_outl(addr & IOPORTS_MASK, bswap32(val));
199 199
}
200 200

  
201 201
static uint32_t pci_apb_ioreadb (void *opaque, target_phys_addr_t addr)
......
210 210
{
211 211
    uint32_t val;
212 212

  
213
    val = cpu_inw(addr & IOPORTS_MASK);
213
    val = bswap16(cpu_inw(addr & IOPORTS_MASK));
214 214
    return val;
215 215
}
216 216

  
......
218 218
{
219 219
    uint32_t val;
220 220

  
221
    val = cpu_inl(addr & IOPORTS_MASK);
221
    val = bswap32(cpu_inl(addr & IOPORTS_MASK));
222 222
    return val;
223 223
}
224 224

  

Also available in: Unified diff