]> git.proxmox.com Git - mirror_qemu.git/blob - hw/hppa/pci.c
hppa: move hppa_pci_ignore_ops from pci.c to machine.c
[mirror_qemu.git] / hw / hppa / pci.c
1 /*
2 * QEMU HP-PARISC PCI support functions.
3 *
4 */
5
6 #include "qemu/osdep.h"
7 #include "hppa_sys.h"
8 #include "qemu/log.h"
9 #include "hw/pci/pci.h"
10 #include "hw/pci/pci_host.h"
11 #include "hw/intc/i8259.h"
12 #include "trace.h"
13
14
15 /* PCI config space reads/writes, to byte-word addressable memory. */
16 static uint64_t bw_conf1_read(void *opaque, hwaddr addr,
17 unsigned size)
18 {
19 PCIBus *b = opaque;
20 return pci_data_read(b, addr, size);
21 }
22
23 static void bw_conf1_write(void *opaque, hwaddr addr,
24 uint64_t val, unsigned size)
25 {
26 PCIBus *b = opaque;
27 pci_data_write(b, addr, val, size);
28 }
29
30 const MemoryRegionOps hppa_pci_conf1_ops = {
31 .read = bw_conf1_read,
32 .write = bw_conf1_write,
33 .endianness = DEVICE_BIG_ENDIAN,
34 .impl = {
35 .min_access_size = 1,
36 .max_access_size = 4,
37 },
38 };
39
40 /* PCI/EISA Interrupt Acknowledge Cycle. */
41
42 static uint64_t iack_read(void *opaque, hwaddr addr, unsigned size)
43 {
44 return pic_read_irq(isa_pic);
45 }
46
47 static void special_write(void *opaque, hwaddr addr,
48 uint64_t val, unsigned size)
49 {
50 trace_hppa_pci_iack_write();
51 }
52
53 const MemoryRegionOps hppa_pci_iack_ops = {
54 .read = iack_read,
55 .write = special_write,
56 .endianness = DEVICE_BIG_ENDIAN,
57 .valid = {
58 .min_access_size = 4,
59 .max_access_size = 4,
60 },
61 .impl = {
62 .min_access_size = 4,
63 .max_access_size = 4,
64 },
65 };