Revision 02c7c992

b/Makefile.objs
171 171
hw-obj-$(CONFIG_IDE_ISA) += ide/isa.o
172 172
hw-obj-$(CONFIG_IDE_PIIX) += ide/piix.o
173 173
hw-obj-$(CONFIG_IDE_CMD646) += ide/cmd646.o
174
hw-obj-$(CONFIG_IDE_MACIO) += ide/macio.o
174 175

  
175 176
# SCSI layer
176 177
hw-obj-y += lsi53c895a.o
b/Makefile.target
190 190
obj-i386-y += debugcon.o multiboot.o
191 191

  
192 192
# shared objects
193
obj-ppc-y = ppc.o ide/macio.o
193
obj-ppc-y = ppc.o
194 194
obj-ppc-y += vga.o dma.o openpic.o
195 195
# PREP target
196 196
obj-ppc-y += pckbd.o i8259.o mc146818rtc.o
b/default-configs/ppc-softmmu.mak
14 14
CONFIG_IDE_PCI=y
15 15
CONFIG_IDE_ISA=y
16 16
CONFIG_IDE_CMD646=y
17
CONFIG_IDE_MACIO=y
17 18
CONFIG_NE2000_ISA=y
18 19
CONFIG_SOUND=y
19 20
CONFIG_VIRTIO_PCI=y
b/default-configs/ppc64-softmmu.mak
14 14
CONFIG_IDE_PCI=y
15 15
CONFIG_IDE_ISA=y
16 16
CONFIG_IDE_CMD646=y
17
CONFIG_IDE_MACIO=y
17 18
CONFIG_NE2000_ISA=y
18 19
CONFIG_SOUND=y
19 20
CONFIG_VIRTIO_PCI=y
b/default-configs/ppcemb-softmmu.mak
14 14
CONFIG_IDE_PCI=y
15 15
CONFIG_IDE_ISA=y
16 16
CONFIG_IDE_CMD646=y
17
CONFIG_IDE_MACIO=y
17 18
CONFIG_NE2000_ISA=y
18 19
CONFIG_SOUND=y
19 20
CONFIG_VIRTIO_PCI=y
b/hw/ide/macio.c
40 40
    BlockDriverAIOCB *aiocb;
41 41
} MACIOIDEState;
42 42

  
43
#define MACIO_PAGE_SIZE 4096
44

  
43 45
static void pmac_ide_atapi_transfer_cb(void *opaque, int ret)
44 46
{
45 47
    DBDMA_io *io = opaque;
......
77 79

  
78 80
    s->io_buffer_size = io->len;
79 81

  
80
    qemu_sglist_init(&s->sg, io->len / TARGET_PAGE_SIZE + 1);
82
    qemu_sglist_init(&s->sg, io->len / MACIO_PAGE_SIZE + 1);
81 83
    qemu_sglist_add(&s->sg, io->addr, io->len);
82 84
    io->addr += io->len;
83 85
    io->len = 0;
......
139 141
    s->io_buffer_index = 0;
140 142
    s->io_buffer_size = io->len;
141 143

  
142
    qemu_sglist_init(&s->sg, io->len / TARGET_PAGE_SIZE + 1);
144
    qemu_sglist_init(&s->sg, io->len / MACIO_PAGE_SIZE + 1);
143 145
    qemu_sglist_add(&s->sg, io->addr, io->len);
144 146
    io->addr += io->len;
145 147
    io->len = 0;
......
223 225
    MACIOIDEState *d = opaque;
224 226

  
225 227
    addr = (addr & 0xFFF) >> 4;
226
#ifdef TARGET_WORDS_BIGENDIAN
227 228
    val = bswap16(val);
228
#endif
229 229
    if (addr == 0) {
230 230
        ide_data_writew(&d->bus, 0, val);
231 231
    }
......
242 242
    } else {
243 243
        retval = 0xFFFF;
244 244
    }
245
#ifdef TARGET_WORDS_BIGENDIAN
246 245
    retval = bswap16(retval);
247
#endif
248 246
    return retval;
249 247
}
250 248

  
......
254 252
    MACIOIDEState *d = opaque;
255 253

  
256 254
    addr = (addr & 0xFFF) >> 4;
257
#ifdef TARGET_WORDS_BIGENDIAN
258 255
    val = bswap32(val);
259
#endif
260 256
    if (addr == 0) {
261 257
        ide_data_writel(&d->bus, 0, val);
262 258
    }
......
273 269
    } else {
274 270
        retval = 0xFFFFFFFF;
275 271
    }
276
#ifdef TARGET_WORDS_BIGENDIAN
277 272
    retval = bswap32(retval);
278
#endif
279 273
    return retval;
280 274
}
281 275

  

Also available in: Unified diff