docbooks: add/fix PCI kernel-doc
[linux-2.6/mini2440.git] / include / net / dsa.h
blob839f768f9e35c6ac175ff03d42b694839f7fd49a
1 /*
2 * include/net/dsa.h - Driver for Distributed Switch Architecture switch chips
3 * Copyright (c) 2008-2009 Marvell Semiconductor
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 */
11 #ifndef __LINUX_NET_DSA_H
12 #define __LINUX_NET_DSA_H
14 #define DSA_MAX_SWITCHES 4
15 #define DSA_MAX_PORTS 12
17 struct dsa_chip_data {
19 * How to access the switch configuration registers.
21 struct device *mii_bus;
22 int sw_addr;
25 * The names of the switch's ports. Use "cpu" to
26 * designate the switch port that the cpu is connected to,
27 * "dsa" to indicate that this port is a DSA link to
28 * another switch, NULL to indicate the port is unused,
29 * or any other string to indicate this is a physical port.
31 char *port_names[DSA_MAX_PORTS];
34 * An array (with nr_chips elements) of which element [a]
35 * indicates which port on this switch should be used to
36 * send packets to that are destined for switch a. Can be
37 * NULL if there is only one switch chip.
39 s8 *rtable;
42 struct dsa_platform_data {
44 * Reference to a Linux network interface that connects
45 * to the root switch chip of the tree.
47 struct device *netdev;
50 * Info structs describing each of the switch chips
51 * connected via this network interface.
53 int nr_chips;
54 struct dsa_chip_data *chip;
57 extern bool dsa_uses_dsa_tags(void *dsa_ptr);
58 extern bool dsa_uses_trailer_tags(void *dsa_ptr);
61 #endif