accel/qaic: Add AIC200 support
[drm/drm-misc.git] / include / linux / platform_data / dsa.h
blobd4d9bf2060a6ad9634cfba6ec7e754c5e131916b
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __DSA_PDATA_H
3 #define __DSA_PDATA_H
5 struct device;
6 struct net_device;
8 #define DSA_MAX_SWITCHES 4
9 #define DSA_MAX_PORTS 12
10 #define DSA_RTABLE_NONE -1
12 struct dsa_chip_data {
14 * How to access the switch configuration registers.
16 struct device *host_dev;
17 int sw_addr;
20 * Reference to network devices
22 struct device *netdev[DSA_MAX_PORTS];
24 /* set to size of eeprom if supported by the switch */
25 int eeprom_len;
27 /* Device tree node pointer for this specific switch chip
28 * used during switch setup in case additional properties
29 * and resources needs to be used
31 struct device_node *of_node;
34 * The names of the switch's ports. Use "cpu" to
35 * designate the switch port that the cpu is connected to,
36 * "dsa" to indicate that this port is a DSA link to
37 * another switch, NULL to indicate the port is unused,
38 * or any other string to indicate this is a physical port.
40 char *port_names[DSA_MAX_PORTS];
41 struct device_node *port_dn[DSA_MAX_PORTS];
44 * An array of which element [a] indicates which port on this
45 * switch should be used to send packets to that are destined
46 * for switch a. Can be NULL if there is only one switch chip.
48 s8 rtable[DSA_MAX_SWITCHES];
51 struct dsa_platform_data {
53 * Reference to a Linux network interface that connects
54 * to the root switch chip of the tree.
56 struct device *netdev;
57 struct net_device *of_netdev;
60 * Info structs describing each of the switch chips
61 * connected via this network interface.
63 int nr_chips;
64 struct dsa_chip_data *chip;
68 #endif /* __DSA_PDATA_H */