/*1* include/net/dsa.h - Driver for Distributed Switch Architecture switch chips2* Copyright (c) 2008-2009 Marvell Semiconductor3*4* This program is free software; you can redistribute it and/or modify5* it under the terms of the GNU General Public License as published by6* the Free Software Foundation; either version 2 of the License, or7* (at your option) any later version.8*/910#ifndef __LINUX_NET_DSA_H11#define __LINUX_NET_DSA_H1213#define DSA_MAX_SWITCHES 414#define DSA_MAX_PORTS 121516struct dsa_chip_data {17/*18* How to access the switch configuration registers.19*/20struct device *mii_bus;21int sw_addr;2223/*24* The names of the switch's ports. Use "cpu" to25* designate the switch port that the cpu is connected to,26* "dsa" to indicate that this port is a DSA link to27* another switch, NULL to indicate the port is unused,28* or any other string to indicate this is a physical port.29*/30char *port_names[DSA_MAX_PORTS];3132/*33* An array (with nr_chips elements) of which element [a]34* indicates which port on this switch should be used to35* send packets to that are destined for switch a. Can be36* NULL if there is only one switch chip.37*/38s8 *rtable;39};4041struct dsa_platform_data {42/*43* Reference to a Linux network interface that connects44* to the root switch chip of the tree.45*/46struct device *netdev;4748/*49* Info structs describing each of the switch chips50* connected via this network interface.51*/52int nr_chips;53struct dsa_chip_data *chip;54};5556extern bool dsa_uses_dsa_tags(void *dsa_ptr);57extern bool dsa_uses_trailer_tags(void *dsa_ptr);585960#endif616263