1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* SPDX-FileCopyrightText: Copyright Red Hat */ 3 4 #ifndef _ICE_ADAPTER_H_ 5 #define _ICE_ADAPTER_H_ 6 7 #include <linux/spinlock_types.h> 8 #include <linux/refcount_types.h> 9 10 struct pci_dev; 11 12 /** 13 * struct ice_adapter - PCI adapter resources shared across PFs 14 * @ptp_gltsyn_time_lock: Spinlock protecting access to the GLTSYN_TIME 15 * register of the PTP clock. 16 * @refcount: Reference count. struct ice_pf objects hold the references. 17 */ 18 struct ice_adapter { 19 /* For access to the GLTSYN_TIME register */ 20 spinlock_t ptp_gltsyn_time_lock; 21 22 refcount_t refcount; 23 }; 24 25 struct ice_adapter *ice_adapter_get(const struct pci_dev *pdev); 26 void ice_adapter_put(const struct pci_dev *pdev); 27 28 #endif /* _ICE_ADAPTER_H */ 29