[PATCH 6/9] fs_enet: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.

Laurent Pinchart laurentp at cse-semaphore.com
Fri Feb 15 23:50:15 EST 2008


Hi Scott,

I apologize for bringing this after so much time. Hope the "better late than 
never" motto applies.

On Friday 21 September 2007 00:01, Scott Wood wrote:
> The existing OF glue code was crufty and broken.  Rather than fix it, it
> will be removed, and the ethernet driver now talks to the device tree
> directly.
>
> The old, non-CONFIG_PPC_CPM_NEW_BINDING code can go away once CPM
> platforms are dropped from arch/ppc (which will hopefully be soon), and
> existing arch/powerpc boards that I wasn't able to test on for this
> patchset get converted (which should be even sooner).
>
> Signed-off-by: Scott Wood <scottwood at freescale.com>
[snip]
> diff --git a/drivers/net/fs_enet/fs_enet.h b/drivers/net/fs_enet/fs_enet.h
> index f8c7ee8..14ebba8 100644
> --- a/drivers/net/fs_enet/fs_enet.h
> +++ b/drivers/net/fs_enet/fs_enet.h
> @@ -24,19 +24,6 @@ struct fec_info {
>  #include <asm/cpm2.h>
>  #endif
>
> -/* This is used to operate with pins.
> -  Note that the actual port size may
> -    be different; cpm(s) handle it OK  */
> -struct bb_info {
> -	u8 mdio_dat_msk;
> -	u8 mdio_dir_msk;
> -	u8 *mdio_dir;
> -	u8 *mdio_dat;
> -	u8 mdc_msk;
> -	u8 *mdc_dat;
> -	int delay;
> -};
> -
[snip]
> diff --git a/drivers/net/fs_enet/mii-bitbang.c
> b/drivers/net/fs_enet/mii-bitbang.c index 8f766a5..2b9c44c 100644
> --- a/drivers/net/fs_enet/mii-bitbang.c
> +++ b/drivers/net/fs_enet/mii-bitbang.c
[snip]
> +struct bb_info {
> +	__be32 __iomem *dir;
> +	__be32 __iomem *dat;
> +	u32 mdio_msk;
> +	u32 mdc_msk;
> +	int delay;
> +};

We're loosing the possibility of having MDC and MDIO on different ports. This 
is quite easy to fix for the non-CONFIG_PPC_CPM_NEW_BINDING case but I'm not 
familiar with OF bindings (yet) to fix the CONFIG_PPC_CPM_NEW_BINDING case.

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussée de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080215/3b2f36b8/attachment.pgp>


More information about the Linuxppc-dev mailing list