.. | .. |
---|
26 | 26 | */ |
---|
27 | 27 | struct pci_config_window *pci_ecam_create(struct device *dev, |
---|
28 | 28 | struct resource *cfgres, struct resource *busr, |
---|
29 | | - struct pci_ecam_ops *ops) |
---|
| 29 | + const struct pci_ecam_ops *ops) |
---|
30 | 30 | { |
---|
31 | 31 | struct pci_config_window *cfg; |
---|
32 | 32 | unsigned int bus_range, bus_range_max, bsz; |
---|
.. | .. |
---|
101 | 101 | pci_ecam_free(cfg); |
---|
102 | 102 | return ERR_PTR(err); |
---|
103 | 103 | } |
---|
| 104 | +EXPORT_SYMBOL_GPL(pci_ecam_create); |
---|
104 | 105 | |
---|
105 | 106 | void pci_ecam_free(struct pci_config_window *cfg) |
---|
106 | 107 | { |
---|
.. | .. |
---|
121 | 122 | release_resource(&cfg->res); |
---|
122 | 123 | kfree(cfg); |
---|
123 | 124 | } |
---|
| 125 | +EXPORT_SYMBOL_GPL(pci_ecam_free); |
---|
124 | 126 | |
---|
125 | 127 | /* |
---|
126 | 128 | * Function to implement the pci_ops ->map_bus method |
---|
.. | .. |
---|
143 | 145 | base = cfg->win + (busn << cfg->ops->bus_shift); |
---|
144 | 146 | return base + (devfn << devfn_shift) + where; |
---|
145 | 147 | } |
---|
| 148 | +EXPORT_SYMBOL_GPL(pci_ecam_map_bus); |
---|
146 | 149 | |
---|
147 | 150 | /* ECAM ops */ |
---|
148 | | -struct pci_ecam_ops pci_generic_ecam_ops = { |
---|
| 151 | +const struct pci_ecam_ops pci_generic_ecam_ops = { |
---|
149 | 152 | .bus_shift = 20, |
---|
150 | 153 | .pci_ops = { |
---|
151 | 154 | .map_bus = pci_ecam_map_bus, |
---|
.. | .. |
---|
153 | 156 | .write = pci_generic_config_write, |
---|
154 | 157 | } |
---|
155 | 158 | }; |
---|
| 159 | +EXPORT_SYMBOL_GPL(pci_generic_ecam_ops); |
---|
156 | 160 | |
---|
157 | 161 | #if defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS) |
---|
158 | 162 | /* ECAM ops for 32-bit access only (non-compliant) */ |
---|
159 | | -struct pci_ecam_ops pci_32b_ops = { |
---|
| 163 | +const struct pci_ecam_ops pci_32b_ops = { |
---|
160 | 164 | .bus_shift = 20, |
---|
161 | 165 | .pci_ops = { |
---|
162 | 166 | .map_bus = pci_ecam_map_bus, |
---|
.. | .. |
---|
164 | 168 | .write = pci_generic_config_write32, |
---|
165 | 169 | } |
---|
166 | 170 | }; |
---|
| 171 | + |
---|
| 172 | +/* ECAM ops for 32-bit read only (non-compliant) */ |
---|
| 173 | +const struct pci_ecam_ops pci_32b_read_ops = { |
---|
| 174 | + .bus_shift = 20, |
---|
| 175 | + .pci_ops = { |
---|
| 176 | + .map_bus = pci_ecam_map_bus, |
---|
| 177 | + .read = pci_generic_config_read32, |
---|
| 178 | + .write = pci_generic_config_write, |
---|
| 179 | + } |
---|
| 180 | +}; |
---|
167 | 181 | #endif |
---|