| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: pci.h,v 1.43 2021/12/19 01:23:01 riastradh Exp $ */ | | 1 | /* $NetBSD: pci.h,v 1.44 2021/12/19 01:48:12 riastradh Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2013 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2013 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Taylor R. Campbell. | | 8 | * by Taylor R. Campbell. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -199,26 +199,27 @@ struct pci_dev { | | | @@ -199,26 +199,27 @@ struct pci_dev { |
199 | #define pci_disable_rom linux_pci_disable_rom | | 199 | #define pci_disable_rom linux_pci_disable_rom |
200 | #define pci_dma_supported linux_pci_dma_supported | | 200 | #define pci_dma_supported linux_pci_dma_supported |
201 | #define pci_domain_nr linux_pci_domain_nr | | 201 | #define pci_domain_nr linux_pci_domain_nr |
202 | #define pci_enable_msi linux_pci_enable_msi | | 202 | #define pci_enable_msi linux_pci_enable_msi |
203 | #define pci_enable_rom linux_pci_enable_rom | | 203 | #define pci_enable_rom linux_pci_enable_rom |
204 | #define pci_find_capability linux_pci_find_capability | | 204 | #define pci_find_capability linux_pci_find_capability |
205 | #define pci_get_class linux_pci_get_class | | 205 | #define pci_get_class linux_pci_get_class |
206 | #define pci_get_domain_bus_and_slot linux_pci_get_domain_bus_and_slot | | 206 | #define pci_get_domain_bus_and_slot linux_pci_get_domain_bus_and_slot |
207 | #define pci_get_drvdata linux_pci_get_drvdata | | 207 | #define pci_get_drvdata linux_pci_get_drvdata |
208 | #define pci_iomap linux_pci_iomap | | 208 | #define pci_iomap linux_pci_iomap |
209 | #define pci_iounmap linux_pci_iounmap | | 209 | #define pci_iounmap linux_pci_iounmap |
210 | #define pci_is_pcie linux_pci_is_pcie | | 210 | #define pci_is_pcie linux_pci_is_pcie |
211 | #define pci_is_root_bus linux_pci_is_root_bus | | 211 | #define pci_is_root_bus linux_pci_is_root_bus |
| | | 212 | #define pci_is_thunderbolt_attached linux_pci_is_thunderbolt_attached |
212 | #define pci_map_rom linux_pci_map_rom | | 213 | #define pci_map_rom linux_pci_map_rom |
213 | #define pci_platform_rom linux_pci_platform_rom | | 214 | #define pci_platform_rom linux_pci_platform_rom |
214 | #define pci_read_config_byte linux_pci_read_config_byte | | 215 | #define pci_read_config_byte linux_pci_read_config_byte |
215 | #define pci_read_config_dword linux_pci_read_config_dword | | 216 | #define pci_read_config_dword linux_pci_read_config_dword |
216 | #define pci_read_config_word linux_pci_read_config_word | | 217 | #define pci_read_config_word linux_pci_read_config_word |
217 | #define pci_resource_end linux_pci_resource_end | | 218 | #define pci_resource_end linux_pci_resource_end |
218 | #define pci_resource_flags linux_pci_resource_flags | | 219 | #define pci_resource_flags linux_pci_resource_flags |
219 | #define pci_resource_len linux_pci_resource_len | | 220 | #define pci_resource_len linux_pci_resource_len |
220 | #define pci_resource_start linux_pci_resource_start | | 221 | #define pci_resource_start linux_pci_resource_start |
221 | #define pci_restore_state linux_pci_restore_state | | 222 | #define pci_restore_state linux_pci_restore_state |
222 | #define pci_save_state linux_pci_save_state | | 223 | #define pci_save_state linux_pci_save_state |
223 | #define pci_set_drvdata linux_pci_set_drvdata | | 224 | #define pci_set_drvdata linux_pci_set_drvdata |
224 | #define pci_set_master linux_pci_set_master | | 225 | #define pci_set_master linux_pci_set_master |
| @@ -237,26 +238,27 @@ void linux_pci_dev_destroy(struct pci_d | | | @@ -237,26 +238,27 @@ void linux_pci_dev_destroy(struct pci_d |
237 | int linux_pci_enable_device(struct pci_dev *); | | 238 | int linux_pci_enable_device(struct pci_dev *); |
238 | void linux_pci_disable_device(struct pci_dev *); | | 239 | void linux_pci_disable_device(struct pci_dev *); |
239 | | | 240 | |
240 | bool pci_is_root_bus(struct pci_bus *); | | 241 | bool pci_is_root_bus(struct pci_bus *); |
241 | int pci_domain_nr(struct pci_bus *); | | 242 | int pci_domain_nr(struct pci_bus *); |
242 | | | 243 | |
243 | device_t pci_dev_dev(struct pci_dev *); | | 244 | device_t pci_dev_dev(struct pci_dev *); |
244 | void pci_set_drvdata(struct pci_dev *, void *); | | 245 | void pci_set_drvdata(struct pci_dev *, void *); |
245 | void * pci_get_drvdata(struct pci_dev *); | | 246 | void * pci_get_drvdata(struct pci_dev *); |
246 | | | 247 | |
247 | int pci_find_capability(struct pci_dev *, int); | | 248 | int pci_find_capability(struct pci_dev *, int); |
248 | bool pci_is_pcie(struct pci_dev *); | | 249 | bool pci_is_pcie(struct pci_dev *); |
249 | bool pci_dma_supported(struct pci_dev *, uintmax_t); | | 250 | bool pci_dma_supported(struct pci_dev *, uintmax_t); |
| | | 251 | bool pci_is_thunderbolt_attached(struct pci_dev *); |
250 | | | 252 | |
251 | int pci_read_config_dword(struct pci_dev *, int, uint32_t *); | | 253 | int pci_read_config_dword(struct pci_dev *, int, uint32_t *); |
252 | int pci_read_config_word(struct pci_dev *, int, uint16_t *); | | 254 | int pci_read_config_word(struct pci_dev *, int, uint16_t *); |
253 | int pci_read_config_byte(struct pci_dev *, int, uint8_t *); | | 255 | int pci_read_config_byte(struct pci_dev *, int, uint8_t *); |
254 | int pci_write_config_dword(struct pci_dev *, int, uint32_t); | | 256 | int pci_write_config_dword(struct pci_dev *, int, uint32_t); |
255 | int pci_write_config_word(struct pci_dev *, int, uint16_t); | | 257 | int pci_write_config_word(struct pci_dev *, int, uint16_t); |
256 | int pci_write_config_byte(struct pci_dev *, int, uint8_t); | | 258 | int pci_write_config_byte(struct pci_dev *, int, uint8_t); |
257 | | | 259 | |
258 | int pci_bus_read_config_dword(struct pci_bus *, unsigned, int, | | 260 | int pci_bus_read_config_dword(struct pci_bus *, unsigned, int, |
259 | uint32_t *); | | 261 | uint32_t *); |
260 | int pci_bus_read_config_word(struct pci_bus *, unsigned, int, | | 262 | int pci_bus_read_config_word(struct pci_bus *, unsigned, int, |
261 | uint16_t *); | | 263 | uint16_t *); |
262 | int pci_bus_read_config_byte(struct pci_bus *, unsigned, int, | | 264 | int pci_bus_read_config_byte(struct pci_bus *, unsigned, int, |