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

2008-02-15 Thread Laurent Pinchart
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 [EMAIL PROTECTED]
[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


pgp1gLzoe0cQF.pgp
Description: PGP signature


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

2008-02-15 Thread Sergej Stepanov

Am Freitag, den 15.02.2008, 13:50 +0100 schrieb Laurent Pinchart:

 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.
 
for OF issue i had this for a paar month:
http://www.spinics.net/lists/netdev/msg45778.html
http://www.spinics.net/lists/netdev/msg47159.html
i'll be glad if it helps...

Regards
Sergej.


--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2007-10-02 Thread Esben Haabendal
Hi Scott,

A minor error handling bug

 + const u32 *data = of_get_property(np, phy-handle, len);
 + if (!data || len != 4)
 + return -EINVAL;
 +
 + phynode = of_find_node_by_phandle(*data);
 + if (!phynode)
 + return -EINVAL;
 +
 + mdionode = of_get_parent(phynode);
 + if (!phynode)

if (!mdionode)

 + goto out_put_phy;

Best regards,
Esben

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2007-09-20 Thread Stephen Rothwell
On Thu, 20 Sep 2007 17:01:21 -0500 Scott Wood [EMAIL PROTECTED] wrote:

 +++ b/drivers/net/fs_enet/fs_enet-main.c
 @@ -44,12 +44,18 @@
  #include asm/irq.h
  #include asm/uaccess.h
  
 +#ifdef CONFIG_PPC_CPM_NEW_BINDING
 +#include asm/of_platform.h

Hmm, didn't I already ask you to change this to linux/of_platform.h?

 +++ b/drivers/net/fs_enet/mac-fcc.c
 @@ -42,6 +42,10 @@
  #include asm/irq.h
  #include asm/uaccess.h
  
 +#ifdef CONFIG_PPC_CPM_NEW_BINDING
 +#include asm/of_device.h

And this to linux/of_device.h

 +++ b/drivers/net/fs_enet/mac-fec.c
 @@ -43,6 +43,10 @@
  #include asm/commproc.h
  #endif
  
 +#ifdef CONFIG_PPC_CPM_NEW_BINDING
 +#include asm/of_device.h

And this?

 +++ b/drivers/net/fs_enet/mac-scc.c
 @@ -43,6 +43,10 @@
  #include asm/commproc.h
  #endif
  
 +#ifdef CONFIG_PPC_CPM_NEW_BINDING
 +#include asm/of_platform.h

And this

 +++ b/drivers/net/fs_enet/mii-fec.c
 @@ -36,6 +36,10 @@
  #include asm/irq.h
  #include asm/uaccess.h
  
 +#ifdef CONFIG_PPC_CPM_NEW_BINDING
 +#include asm/of_platform.h

And here

Sorry if I missed these last time around.
-- 
Cheers,
Stephen Rothwell[EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/


pgp1FNmSgmowq.pgp
Description: PGP signature


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

2007-09-20 Thread Scott Wood
On Fri, Sep 21, 2007 at 10:08:41AM +1000, Stephen Rothwell wrote:
 On Thu, 20 Sep 2007 17:01:21 -0500 Scott Wood [EMAIL PROTECTED] wrote:
 
  +++ b/drivers/net/fs_enet/fs_enet-main.c
  @@ -44,12 +44,18 @@
   #include asm/irq.h
   #include asm/uaccess.h
   
  +#ifdef CONFIG_PPC_CPM_NEW_BINDING
  +#include asm/of_platform.h
 
 Hmm, didn't I already ask you to change this to linux/of_platform.h?

Grrr, I thought I'd gotten them all.
 
-Scott
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html