[PATCH 2.6.20] powerpc: Changed gianfar device tree definition tomake it more flexible

Joakim Tjernlund joakim.tjernlund at transmode.se
Mon Dec 4 19:20:36 EST 2006


 

> -----Original Message-----
> From: 
> linuxppc-dev-bounces+joakim.tjernlund=transmode.se at ozlabs.org 
> [mailto:linuxppc-dev-bounces+joakim.tjernlund=transmode.se at ozl
> abs.org] On Behalf Of Andy Fleming
> Sent: 01 December 2006 18:57
> To: linuxppc-dev at ozlabs.org; Paul Mackerras; Kumar Gala
> Subject: [PATCH 2.6.20] powerpc: Changed gianfar device tree 
> definition tomake it more flexible
> 
> The old gianfar node definition used a concept of "models" to
> determine the feature bits and interrupt settings to pass to the
> driver.  This won't scale well when the hardware designers come
> up with new and (hopefully) interesting variants of the eTSEC.
> So one goal of this patch is to prepare for that eventuality by
> listing the features, rather than inferring them.
> 
> And then, incidentally, some of the code was cleaned up so that
> initialization functions will skip devices which encounter
> errors, rather than bailing.  The CPM devices were not modified
> in this way, as they are more complex.
> 
> Finally, all the dts files with gianfar nodes were updated to use
> the new feature bits and the new interface field, and the various
> MAC address conventions were all accommodated by preserving the
> currently-used field, while adding local-mac-address, which will
> be used in the future (once u-boot changes have been made).
> Signed-off-by: Andrew Fleming <afleming at freescale.com>

[SNIP]

> +
> +static struct gfar_flag_info __initdata flag_info[] = {
> +	{ "gigabit", FSL_GIANFAR_DEV_HAS_GIGABIT },
> +	{ "coalescing", FSL_GIANFAR_DEV_HAS_COALESCE },
> +	{ "rmon", FSL_GIANFAR_DEV_HAS_RMON },
> +	{ "checksumming", FSL_GIANFAR_DEV_HAS_CSUM },
> +	{ "vlan", FSL_GIANFAR_DEV_HAS_VLAN },
> +	{ "extended-hash", FSL_GIANFAR_DEV_HAS_EXTENDED_HASH },
> +	{ "padding", FSL_GIANFAR_DEV_HAS_PADDING },
> +	{ "filer", FSL_GIANFAR_DEV_HAS_FILER },
> +	{ "parseL4", FSL_GIANFAR_DEV_HAS_PARSE_L4 },
> +	{ "parseL3", FSL_GIANFAR_DEV_HAS_PARSE_L3 },
> +	{ "parseL2", FSL_GIANFAR_DEV_HAS_PARSE_L2 },
> +	{ "multi-queue", FSL_GIANFAR_DEV_HAS_MULTI_QUEUE },
> +	{ "buffer-stashing", FSL_GIANFAR_DEV_HAS_BUF_STASHING },
> +	{ "buffer-locking", FSL_GIANFAR_DEV_HAS_BUF_LOCKING },
> +	{ "bd-stashing", FSL_GIANFAR_DEV_HAS_BD_STASHING },
> +	{ "bd-locking", FSL_GIANFAR_DEV_HAS_BD_LOCKING },
> +};

Shouldn't these be  mapped to generic names(drop the GIANFAR name)?
The newer UCC also have sevral of these capabilities and it seems
to me that one can use the same names instead of making a similar table.

 Jocke



More information about the Linuxppc-dev mailing list