[U-Boot] [PATCH v9] Marvell MV88E61XX Switch Driver support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Tue May 5 00:12:57 CEST 2009


> --- a/include/netdev.h
> +++ b/include/netdev.h
> @@ -28,6 +28,34 @@
>  #ifndef _NETDEV_H_
>  #define _NETDEV_H_
>  
> +/* constants for switch configuration */
> +enum switch_cfg_vlan {
IHMO in this case it must be mvxxxx_swtich .....

and maybe cover by a defive

but I not sure it's the rigth place for this

> +	SWITCH_VLANCFG_DEFAULT,
> +	SWITCH_VLANCFG_ROUTER
> +};
> +
> +enum switch_cfg_rgmiid {
> +	SWITCH_RGMII_DELAY_DIS,
> +	SWITCH_RGMII_DELAY_EN
> +};
> +
> +enum switch_cfg_prtstt {
> +	SWITCH_PORTSTT_DISABLED,
> +	SWITCH_PORTSTT_BLOCKING,
> +	SWITCH_PORTSTT_LEARNING,
> +	SWITCH_PORTSTT_FORWARDING
> +};
> +
> +/* switch configuration structure */
> +struct switch_config {
> +	char *name;
> +	enum switch_cfg_vlan vlancfg;
> +	enum switch_cfg_rgmiid rgmii_delay;
> +	enum switch_cfg_prtstt portstate;
> +	u32 ports_enabled;
> +	u8 cpuport;
> +};
a simple
struct switch_config;

and the a MV88E61XX_H

will be cleaner

Best Regards,
J.


More information about the U-Boot mailing list