xref: /openbmc/linux/drivers/net/dsa/ocelot/felix.h (revision aeb64ff3)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright 2019 NXP Semiconductors
3  */
4 #ifndef _MSCC_FELIX_H
5 #define _MSCC_FELIX_H
6 
7 #define ocelot_to_felix(o)		container_of((o), struct felix, ocelot)
8 
9 /* Platform-specific information */
10 struct felix_info {
11 	struct resource			*target_io_res;
12 	struct resource			*port_io_res;
13 	const struct reg_field		*regfields;
14 	const u32 *const		*map;
15 	const struct ocelot_ops		*ops;
16 	int				shared_queue_sz;
17 	const struct ocelot_stat_layout	*stats_layout;
18 	unsigned int			num_stats;
19 	int				num_ports;
20 	int				pci_bar;
21 };
22 
23 extern struct felix_info		felix_info_vsc9959;
24 
25 enum felix_instance {
26 	FELIX_INSTANCE_VSC9959		= 0,
27 };
28 
29 /* DSA glue / front-end for struct ocelot */
30 struct felix {
31 	struct dsa_switch		*ds;
32 	struct pci_dev			*pdev;
33 	struct felix_info		*info;
34 	struct ocelot			ocelot;
35 };
36 
37 #endif
38