linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* New version of the device tree aware EMAC driver
@ 2007-05-16  3:26 David Gibson
  2007-05-16 16:18 ` Valentine Barshak
  2007-05-16 17:00 ` Valentine Barshak
  0 siblings, 2 replies; 5+ messages in thread
From: David Gibson @ 2007-05-16  3:26 UTC (permalink / raw)
  To: linuxppc-dev

I've made a few more tiny tweaks to BenH's rewritten device-tree based
4xx EMAC driver.  The main change is that it now no longer requires
'device_type', just 'compatible' to be set in the ZMII and MAL device
nodes when probing.  This works better with current thinking on
flattened device trees which discourages creating new device_type
values unless there is a clear use for a new device class binding.

The patch can be obtained from:

http://ozlabs.org/~dgibson/home/emac/powerpc-emac-new-20070516.patch

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: New version of the device tree aware EMAC driver
  2007-05-16  3:26 New version of the device tree aware EMAC driver David Gibson
@ 2007-05-16 16:18 ` Valentine Barshak
  2007-05-16 17:00 ` Valentine Barshak
  1 sibling, 0 replies; 5+ messages in thread
From: Valentine Barshak @ 2007-05-16 16:18 UTC (permalink / raw)
  To: linuxppc-dev

David Gibson wrote:
> I've made a few more tiny tweaks to BenH's rewritten device-tree based
> 4xx EMAC driver.  The main change is that it now no longer requires
> 'device_type', just 'compatible' to be set in the ZMII and MAL device
> nodes when probing.  This works better with current thinking on
> flattened device trees which discourages creating new device_type
> values unless there is a clear use for a new device class binding.
>
> The patch can be obtained from:
>
> http://ozlabs.org/~dgibson/home/emac/powerpc-emac-new-20070516.patch
>
>   
Looks like EMAC_FTR_STACR_OC_INVERT is missed in the EMAC_FTRS_POSSIBLE
(ibm_newemac/core.h)

Should be something like this:
    EMAC_FTRS_POSSIBLE    =
#ifdef CONFIG_IBM_NEW_EMAC_EMAC4
        EMAC_FTR_EMAC4 | EMAC_FTR_HAS_AXON_STACR | 
EMAC_FTR_STACR_OC_INVERT |
#endif
Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: New version of the device tree aware EMAC driver
  2007-05-16  3:26 New version of the device tree aware EMAC driver David Gibson
  2007-05-16 16:18 ` Valentine Barshak
@ 2007-05-16 17:00 ` Valentine Barshak
  2007-05-16 18:03   ` Valentine Barshak
  1 sibling, 1 reply; 5+ messages in thread
From: Valentine Barshak @ 2007-05-16 17:00 UTC (permalink / raw)
  To: linuxppc-dev

David Gibson wrote:
> I've made a few more tiny tweaks to BenH's rewritten device-tree based
> 4xx EMAC driver.  The main change is that it now no longer requires
> 'device_type', just 'compatible' to be set in the ZMII and MAL device
> nodes when probing.  This works better with current thinking on
> flattened device trees which discourages creating new device_type
> values unless there is a clear use for a new device class binding.
>
> The patch can be obtained from:
>
> http://ozlabs.org/~dgibson/home/emac/powerpc-emac-new-20070516.patch
>
>   
In __emac_mdio_read and __emac_mdio_write functions:

+    if (!emac_has_feature(dev, EMAC_FTR_STACR_OC_INVERT))
+        r |= EMAC_STACR_OC;

should be

+    if (emac_has_feature(dev, EMAC_FTR_STACR_OC_INVERT))
+        r |= EMAC_STACR_OC;

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: New version of the device tree aware EMAC driver
  2007-05-16 17:00 ` Valentine Barshak
@ 2007-05-16 18:03   ` Valentine Barshak
  2007-05-21  5:06     ` David Gibson
  0 siblings, 1 reply; 5+ messages in thread
From: Valentine Barshak @ 2007-05-16 18:03 UTC (permalink / raw)
  To: linuxppc-dev

Valentine Barshak wrote:
> David Gibson wrote:
>   
>> I've made a few more tiny tweaks to BenH's rewritten device-tree based
>> 4xx EMAC driver.  The main change is that it now no longer requires
>> 'device_type', just 'compatible' to be set in the ZMII and MAL device
>> nodes when probing.  This works better with current thinking on
>> flattened device trees which discourages creating new device_type
>> values unless there is a clear use for a new device class binding.
>>
>> The patch can be obtained from:
>>
>> http://ozlabs.org/~dgibson/home/emac/powerpc-emac-new-20070516.patch
>>
>>   
>>     
> In __emac_mdio_read and __emac_mdio_write functions:
>
> +    if (!emac_has_feature(dev, EMAC_FTR_STACR_OC_INVERT))
> +        r |= EMAC_STACR_OC;
>
> should be
>
> +    if (emac_has_feature(dev, EMAC_FTR_STACR_OC_INVERT))
> +        r |= EMAC_STACR_OC;
>
> Thanks.
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>   
With the above 2 fixes (and Marvell 88E1111 Ethernet PHY support added) 
seems to work fine on Sequoia PPC440EPx,
thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: New version of the device tree aware EMAC driver
  2007-05-16 18:03   ` Valentine Barshak
@ 2007-05-21  5:06     ` David Gibson
  0 siblings, 0 replies; 5+ messages in thread
From: David Gibson @ 2007-05-21  5:06 UTC (permalink / raw)
  To: Valentine Barshak; +Cc: linuxppc-dev

On Wed, May 16, 2007 at 10:03:06PM +0400, Valentine Barshak wrote:
> Valentine Barshak wrote:
> > David Gibson wrote:
> >   
> >> I've made a few more tiny tweaks to BenH's rewritten device-tree based
> >> 4xx EMAC driver.  The main change is that it now no longer requires
> >> 'device_type', just 'compatible' to be set in the ZMII and MAL device
> >> nodes when probing.  This works better with current thinking on
> >> flattened device trees which discourages creating new device_type
> >> values unless there is a clear use for a new device class binding.
> >>
> >> The patch can be obtained from:
> >>
> >> http://ozlabs.org/~dgibson/home/emac/powerpc-emac-new-20070516.patch
> >>
> >>   
> >>     
> > In __emac_mdio_read and __emac_mdio_write functions:
> >
> > +    if (!emac_has_feature(dev, EMAC_FTR_STACR_OC_INVERT))
> > +        r |= EMAC_STACR_OC;
> >
> > should be
> >
> > +    if (emac_has_feature(dev, EMAC_FTR_STACR_OC_INVERT))
> > +        r |= EMAC_STACR_OC;
> >
> > Thanks.
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-dev
> >   
> With the above 2 fixes (and Marvell 88E1111 Ethernet PHY support added) 
> seems to work fine on Sequoia PPC440EPx,
> thanks.

Ok, I've merged those fixes.  New version of the driver coming soon.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-05-21  5:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-16  3:26 New version of the device tree aware EMAC driver David Gibson
2007-05-16 16:18 ` Valentine Barshak
2007-05-16 17:00 ` Valentine Barshak
2007-05-16 18:03   ` Valentine Barshak
2007-05-21  5:06     ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).