xref: /linux/drivers/net/ethernet/mellanox/mlxsw/pci.h (revision 03ab8e6297acd1bc0eedaa050e2a1635c576fd11)
19948a064SJiri Pirko /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
29948a064SJiri Pirko /* Copyright (c) 2016-2018 Mellanox Technologies. All rights reserved */
31d20d23cSJiri Pirko 
41d20d23cSJiri Pirko #ifndef _MLXSW_PCI_H
51d20d23cSJiri Pirko #define _MLXSW_PCI_H
61d20d23cSJiri Pirko 
71d20d23cSJiri Pirko #include <linux/pci.h>
81d20d23cSJiri Pirko 
91d20d23cSJiri Pirko #define PCI_DEVICE_ID_MELLANOX_SPECTRUM		0xcb84
10c3ab4354SJiri Pirko #define PCI_DEVICE_ID_MELLANOX_SPECTRUM2	0xcf6c
11da382875SJiri Pirko #define PCI_DEVICE_ID_MELLANOX_SPECTRUM3	0xcf70
12*47354021SAmit Cohen #define PCI_DEVICE_ID_MELLANOX_SPECTRUM4	0xcf80
131d20d23cSJiri Pirko 
141d20d23cSJiri Pirko #if IS_ENABLED(CONFIG_MLXSW_PCI)
151d20d23cSJiri Pirko 
161d20d23cSJiri Pirko int mlxsw_pci_driver_register(struct pci_driver *pci_driver);
171d20d23cSJiri Pirko void mlxsw_pci_driver_unregister(struct pci_driver *pci_driver);
181d20d23cSJiri Pirko 
191d20d23cSJiri Pirko #else
201d20d23cSJiri Pirko 
211d20d23cSJiri Pirko static inline int
mlxsw_pci_driver_register(struct pci_driver * pci_driver)221d20d23cSJiri Pirko mlxsw_pci_driver_register(struct pci_driver *pci_driver)
231d20d23cSJiri Pirko {
241d20d23cSJiri Pirko 	return 0;
251d20d23cSJiri Pirko }
261d20d23cSJiri Pirko 
271d20d23cSJiri Pirko static inline void
mlxsw_pci_driver_unregister(struct pci_driver * pci_driver)281d20d23cSJiri Pirko mlxsw_pci_driver_unregister(struct pci_driver *pci_driver)
291d20d23cSJiri Pirko {
301d20d23cSJiri Pirko }
311d20d23cSJiri Pirko 
321d20d23cSJiri Pirko #endif
331d20d23cSJiri Pirko 
341d20d23cSJiri Pirko #endif
35