Lennert Buytenhek | 91da11f | 2008-10-07 13:44:02 +0000 | [diff] [blame] | 1 | /* |
| 2 | * include/net/dsa.h - Driver for Distributed Switch Architecture switch chips |
| 3 | * Copyright (c) 2008 Marvell Semiconductor |
| 4 | * |
| 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 | */ |
| 10 | |
| 11 | #ifndef __LINUX_NET_DSA_H |
| 12 | #define __LINUX_NET_DSA_H |
| 13 | |
| 14 | #define DSA_MAX_PORTS 12 |
| 15 | |
| 16 | struct dsa_platform_data { |
| 17 | /* |
| 18 | * Reference to a Linux network interface that connects |
| 19 | * to the switch chip. |
| 20 | */ |
| 21 | struct device *netdev; |
| 22 | |
| 23 | /* |
| 24 | * How to access the switch configuration registers, and |
| 25 | * the names of the switch ports (use "cpu" to designate |
| 26 | * the switch port that the cpu is connected to). |
| 27 | */ |
| 28 | struct device *mii_bus; |
| 29 | int sw_addr; |
| 30 | char *port_names[DSA_MAX_PORTS]; |
| 31 | }; |
| 32 | |
Lennert Buytenhek | cf85d08 | 2008-10-07 13:45:02 +0000 | [diff] [blame] | 33 | extern bool dsa_uses_dsa_tags(void *dsa_ptr); |
Lennert Buytenhek | 396138f0 | 2008-10-07 13:46:07 +0000 | [diff] [blame] | 34 | extern bool dsa_uses_trailer_tags(void *dsa_ptr); |
Lennert Buytenhek | cf85d08 | 2008-10-07 13:45:02 +0000 | [diff] [blame] | 35 | |
Lennert Buytenhek | 91da11f | 2008-10-07 13:44:02 +0000 | [diff] [blame] | 36 | |
| 37 | #endif |