~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/platform_data/dsa.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef __DSA_PDATA_H
  3 #define __DSA_PDATA_H
  4 
  5 struct device;
  6 struct net_device;
  7 
  8 #define DSA_MAX_SWITCHES        4
  9 #define DSA_MAX_PORTS           12
 10 #define DSA_RTABLE_NONE         -1
 11 
 12 struct dsa_chip_data {
 13         /*
 14          * How to access the switch configuration registers.
 15          */
 16         struct device   *host_dev;
 17         int             sw_addr;
 18 
 19         /*
 20          * Reference to network devices
 21          */
 22         struct device   *netdev[DSA_MAX_PORTS];
 23 
 24         /* set to size of eeprom if supported by the switch */
 25         int             eeprom_len;
 26 
 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
 30          */
 31         struct device_node *of_node;
 32 
 33         /*
 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.
 39          */
 40         char            *port_names[DSA_MAX_PORTS];
 41         struct device_node *port_dn[DSA_MAX_PORTS];
 42 
 43         /*
 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.
 47          */
 48         s8              rtable[DSA_MAX_SWITCHES];
 49 };
 50 
 51 struct dsa_platform_data {
 52         /*
 53          * Reference to a Linux network interface that connects
 54          * to the root switch chip of the tree.
 55          */
 56         struct device   *netdev;
 57         struct net_device *of_netdev;
 58 
 59         /*
 60          * Info structs describing each of the switch chips
 61          * connected via this network interface.
 62          */
 63         int             nr_chips;
 64         struct dsa_chip_data    *chip;
 65 };
 66 
 67 
 68 #endif /* __DSA_PDATA_H */
 69 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php