diff options
| author | Tom Rini <trini@ti.com> | 2013-01-11 14:38:24 -0700 | 
|---|---|---|
| committer | Tom Rini <trini@ti.com> | 2013-01-11 14:38:24 -0700 | 
| commit | 7a8e739cd5bc0c48511d343f469af89a88a3294d (patch) | |
| tree | 2198c265cd9d83d58b42ab8a8e66c2fff4d4545a /include/netdev.h | |
| parent | 6fb4d74e59750b43f00d460c569e8a30c67c5bb0 (diff) | |
| parent | 59ee45ee91cc91b392a8e2684bfcb8c933ce4967 (diff) | |
| download | olio-uboot-2014.01-7a8e739cd5bc0c48511d343f469af89a88a3294d.tar.xz olio-uboot-2014.01-7a8e739cd5bc0c48511d343f469af89a88a3294d.zip | |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'include/netdev.h')
| -rw-r--r-- | include/netdev.h | 21 | 
1 files changed, 16 insertions, 5 deletions
| diff --git a/include/netdev.h b/include/netdev.h index b8d303d08..7f158d433 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -163,10 +163,9 @@ static inline int pci_eth_init(bd_t *bis)   * the stuct and enums here are used to specify switch configuration params   */  #if defined(CONFIG_MV88E61XX_SWITCH) -enum mv88e61xx_cfg_vlan { -	MV88E61XX_VLANCFG_DEFAULT, -	MV88E61XX_VLANCFG_ROUTER -}; + +/* constants for any 88E61xx switch */ +#define MV88E61XX_MAX_PORTS_NUM	6  enum mv88e61xx_cfg_mdip {  	MV88E61XX_MDIP_NOCHANGE, @@ -192,7 +191,7 @@ enum mv88e61xx_cfg_prtstt {  struct mv88e61xx_config {  	char *name; -	enum mv88e61xx_cfg_vlan vlancfg; +	u8 vlancfg[MV88E61XX_MAX_PORTS_NUM];  	enum mv88e61xx_cfg_rgmiid rgmii_delay;  	enum mv88e61xx_cfg_prtstt portstate;  	enum mv88e61xx_cfg_ledinit led_init; @@ -201,6 +200,18 @@ struct mv88e61xx_config {  	u8 cpuport;  }; +/* + * Common mappings for Internal VLANs + * These mappings consider that all ports are useable; the driver + * will mask inexistent/unused ports. + */ + +/* Switch mode : routes any port to any port */ +#define MV88E61XX_VLANCFG_SWITCH { 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F } + +/* Router mode: routes only CPU port 5 to/from non-CPU ports 0-4 */ +#define MV88E61XX_VLANCFG_ROUTER { 0x20, 0x20, 0x20, 0x20, 0x20, 0x1F } +  int mv88e61xx_switch_initialize(struct mv88e61xx_config *swconfig);  #endif /* CONFIG_MV88E61XX_SWITCH */ |