[U-Boot] [PATCH v9] Marvell MV88E61XX Switch Driver support
Ben Warren
biggerbadderben at gmail.com
Tue May 5 00:41:56 CEST 2009
Hi Prafulla,
Prafulla Wadaskar wrote:
<snip>
> diff --git a/include/netdev.h b/include/netdev.h
> index b73aa8e..932d986 100644
> --- 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 {
> + 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;
> +};
> +
>
Now you're in a common file, so namespaces are important. Keep in mind
that while yours is the first switch here, it probably won't be the last
and nobody else is bound to using your definitions. Please qualify all
of these names so it's obvious what hardware they refer to.
Please add this stuff to the bottom of this file, and add an appropriate
comment block in the same theme as I've done with the others.
regards,
Ben
More information about the U-Boot
mailing list