xref: /linux/include/linux/soc/marvell/silicons.h (revision 8be4d31cb8aaeea27bde4b7ddb26e28a89062ebf)
1 /* SPDX-License-Identifier: GPL-2.0-only
2  * Copyright (C) 2024 Marvell.
3  */
4 
5 #ifndef __SOC_SILICON_H
6 #define __SOC_SILICON_H
7 
8 #include <linux/types.h>
9 #include <linux/pci.h>
10 
11 #if defined(CONFIG_ARM64)
12 
13 #define CN20K_CHIPID	0x20
14 /*
15  * Silicon check for CN20K family
16  */
is_cn20k(struct pci_dev * pdev)17 static inline bool is_cn20k(struct pci_dev *pdev)
18 {
19 	return (pdev->subsystem_device & 0xFF) == CN20K_CHIPID;
20 }
21 #else
22 #define is_cn20k(pdev)		((void)(pdev), 0)
23 #endif
24 
25 #endif /* __SOC_SILICON_H */
26