1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* pci_sun4v.h: SUN4V specific PCI controller support.
4 * Copyright (C) 2006 David S. Miller (davem@davemloft.net)
10 long pci_sun4v_iommu_map(unsigned long devhandle
,
12 unsigned long num_ttes
,
13 unsigned long io_attributes
,
14 unsigned long io_page_list_pa
);
15 unsigned long pci_sun4v_iommu_demap(unsigned long devhandle
,
17 unsigned long num_ttes
);
18 unsigned long pci_sun4v_iommu_getmap(unsigned long devhandle
,
20 unsigned long *io_attributes
,
21 unsigned long *real_address
);
22 unsigned long pci_sun4v_config_get(unsigned long devhandle
,
23 unsigned long pci_device
,
24 unsigned long config_offset
,
26 int pci_sun4v_config_put(unsigned long devhandle
,
27 unsigned long pci_device
,
28 unsigned long config_offset
,
32 unsigned long pci_sun4v_msiq_conf(unsigned long devhandle
,
34 unsigned long msiq_paddr
,
35 unsigned long num_entries
);
36 unsigned long pci_sun4v_msiq_info(unsigned long devhandle
,
38 unsigned long *msiq_paddr
,
39 unsigned long *num_entries
);
40 unsigned long pci_sun4v_msiq_getvalid(unsigned long devhandle
,
42 unsigned long *valid
);
43 unsigned long pci_sun4v_msiq_setvalid(unsigned long devhandle
,
46 unsigned long pci_sun4v_msiq_getstate(unsigned long devhandle
,
48 unsigned long *state
);
49 unsigned long pci_sun4v_msiq_setstate(unsigned long devhandle
,
52 unsigned long pci_sun4v_msiq_gethead(unsigned long devhandle
,
55 unsigned long pci_sun4v_msiq_sethead(unsigned long devhandle
,
58 unsigned long pci_sun4v_msiq_gettail(unsigned long devhandle
,
61 unsigned long pci_sun4v_msi_getvalid(unsigned long devhandle
,
63 unsigned long *valid
);
64 unsigned long pci_sun4v_msi_setvalid(unsigned long devhandle
,
67 unsigned long pci_sun4v_msi_getmsiq(unsigned long devhandle
,
70 unsigned long pci_sun4v_msi_setmsiq(unsigned long devhandle
,
73 unsigned long msitype
);
74 unsigned long pci_sun4v_msi_getstate(unsigned long devhandle
,
76 unsigned long *state
);
77 unsigned long pci_sun4v_msi_setstate(unsigned long devhandle
,
80 unsigned long pci_sun4v_msg_getmsiq(unsigned long devhandle
,
83 unsigned long pci_sun4v_msg_setmsiq(unsigned long devhandle
,
86 unsigned long pci_sun4v_msg_getvalid(unsigned long devhandle
,
88 unsigned long *valid
);
89 unsigned long pci_sun4v_msg_setvalid(unsigned long devhandle
,
93 /* Sun4v HV IOMMU v2 APIs */
94 unsigned long pci_sun4v_iotsb_conf(unsigned long devhandle
,
96 unsigned long table_size
,
97 unsigned long page_size
,
98 unsigned long dvma_base
,
100 unsigned long pci_sun4v_iotsb_bind(unsigned long devhandle
,
101 unsigned long iotsb_num
,
102 unsigned int pci_device
);
103 unsigned long pci_sun4v_iotsb_map(unsigned long devhandle
,
104 unsigned long iotsb_num
,
105 unsigned long iotsb_index_iottes
,
106 unsigned long io_attributes
,
107 unsigned long io_page_list_pa
,
109 unsigned long pci_sun4v_iotsb_demap(unsigned long devhandle
,
110 unsigned long iotsb_num
,
111 unsigned long iotsb_index
,
112 unsigned long iottes
,
113 unsigned long *demapped
);
114 #endif /* !(_PCI_SUN4V_H) */