diff options
Diffstat (limited to 'include/linux/pci-epc.h')
-rw-r--r-- | include/linux/pci-epc.h | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h index f7a04e1af112..a1a5e5df0f66 100644 --- a/include/linux/pci-epc.h +++ b/include/linux/pci-epc.h | |||
@@ -1,12 +1,9 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
1 | /** | 2 | /** |
2 | * PCI Endpoint *Controller* (EPC) header file | 3 | * PCI Endpoint *Controller* (EPC) header file |
3 | * | 4 | * |
4 | * Copyright (C) 2017 Texas Instruments | 5 | * Copyright (C) 2017 Texas Instruments |
5 | * Author: Kishon Vijay Abraham I <kishon@ti.com> | 6 | * Author: Kishon Vijay Abraham I <kishon@ti.com> |
6 | * | ||
7 | * This program is free software: you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 of | ||
9 | * the License as published by the Free Software Foundation. | ||
10 | */ | 7 | */ |
11 | 8 | ||
12 | #ifndef __LINUX_PCI_EPC_H | 9 | #ifndef __LINUX_PCI_EPC_H |
@@ -39,17 +36,20 @@ enum pci_epc_irq_type { | |||
39 | * @owner: the module owner containing the ops | 36 | * @owner: the module owner containing the ops |
40 | */ | 37 | */ |
41 | struct pci_epc_ops { | 38 | struct pci_epc_ops { |
42 | int (*write_header)(struct pci_epc *pci_epc, | 39 | int (*write_header)(struct pci_epc *epc, u8 func_no, |
43 | struct pci_epf_header *hdr); | 40 | struct pci_epf_header *hdr); |
44 | int (*set_bar)(struct pci_epc *epc, enum pci_barno bar, | 41 | int (*set_bar)(struct pci_epc *epc, u8 func_no, |
42 | enum pci_barno bar, | ||
45 | dma_addr_t bar_phys, size_t size, int flags); | 43 | dma_addr_t bar_phys, size_t size, int flags); |
46 | void (*clear_bar)(struct pci_epc *epc, enum pci_barno bar); | 44 | void (*clear_bar)(struct pci_epc *epc, u8 func_no, |
47 | int (*map_addr)(struct pci_epc *epc, phys_addr_t addr, | 45 | enum pci_barno bar); |
48 | u64 pci_addr, size_t size); | 46 | int (*map_addr)(struct pci_epc *epc, u8 func_no, |
49 | void (*unmap_addr)(struct pci_epc *epc, phys_addr_t addr); | 47 | phys_addr_t addr, u64 pci_addr, size_t size); |
50 | int (*set_msi)(struct pci_epc *epc, u8 interrupts); | 48 | void (*unmap_addr)(struct pci_epc *epc, u8 func_no, |
51 | int (*get_msi)(struct pci_epc *epc); | 49 | phys_addr_t addr); |
52 | int (*raise_irq)(struct pci_epc *pci_epc, | 50 | int (*set_msi)(struct pci_epc *epc, u8 func_no, u8 interrupts); |
51 | int (*get_msi)(struct pci_epc *epc, u8 func_no); | ||
52 | int (*raise_irq)(struct pci_epc *epc, u8 func_no, | ||
53 | enum pci_epc_irq_type type, u8 interrupt_num); | 53 | enum pci_epc_irq_type type, u8 interrupt_num); |
54 | int (*start)(struct pci_epc *epc); | 54 | int (*start)(struct pci_epc *epc); |
55 | void (*stop)(struct pci_epc *epc); | 55 | void (*stop)(struct pci_epc *epc); |
@@ -124,17 +124,21 @@ void pci_epc_destroy(struct pci_epc *epc); | |||
124 | int pci_epc_add_epf(struct pci_epc *epc, struct pci_epf *epf); | 124 | int pci_epc_add_epf(struct pci_epc *epc, struct pci_epf *epf); |
125 | void pci_epc_linkup(struct pci_epc *epc); | 125 | void pci_epc_linkup(struct pci_epc *epc); |
126 | void pci_epc_remove_epf(struct pci_epc *epc, struct pci_epf *epf); | 126 | void pci_epc_remove_epf(struct pci_epc *epc, struct pci_epf *epf); |
127 | int pci_epc_write_header(struct pci_epc *epc, struct pci_epf_header *hdr); | 127 | int pci_epc_write_header(struct pci_epc *epc, u8 func_no, |
128 | int pci_epc_set_bar(struct pci_epc *epc, enum pci_barno bar, | 128 | struct pci_epf_header *hdr); |
129 | int pci_epc_set_bar(struct pci_epc *epc, u8 func_no, | ||
130 | enum pci_barno bar, | ||
129 | dma_addr_t bar_phys, size_t size, int flags); | 131 | dma_addr_t bar_phys, size_t size, int flags); |
130 | void pci_epc_clear_bar(struct pci_epc *epc, int bar); | 132 | void pci_epc_clear_bar(struct pci_epc *epc, u8 func_no, int bar); |
131 | int pci_epc_map_addr(struct pci_epc *epc, phys_addr_t phys_addr, | 133 | int pci_epc_map_addr(struct pci_epc *epc, u8 func_no, |
134 | phys_addr_t phys_addr, | ||
132 | u64 pci_addr, size_t size); | 135 | u64 pci_addr, size_t size); |
133 | void pci_epc_unmap_addr(struct pci_epc *epc, phys_addr_t phys_addr); | 136 | void pci_epc_unmap_addr(struct pci_epc *epc, u8 func_no, |
134 | int pci_epc_set_msi(struct pci_epc *epc, u8 interrupts); | 137 | phys_addr_t phys_addr); |
135 | int pci_epc_get_msi(struct pci_epc *epc); | 138 | int pci_epc_set_msi(struct pci_epc *epc, u8 func_no, u8 interrupts); |
136 | int pci_epc_raise_irq(struct pci_epc *epc, enum pci_epc_irq_type type, | 139 | int pci_epc_get_msi(struct pci_epc *epc, u8 func_no); |
137 | u8 interrupt_num); | 140 | int pci_epc_raise_irq(struct pci_epc *epc, u8 func_no, |
141 | enum pci_epc_irq_type type, u8 interrupt_num); | ||
138 | int pci_epc_start(struct pci_epc *epc); | 142 | int pci_epc_start(struct pci_epc *epc); |
139 | void pci_epc_stop(struct pci_epc *epc); | 143 | void pci_epc_stop(struct pci_epc *epc); |
140 | struct pci_epc *pci_epc_get(const char *epc_name); | 144 | struct pci_epc *pci_epc_get(const char *epc_name); |