lkml.org 
[lkml]   [2007]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/3] [NET] phy/fixed.c: rework to not duplicate PHYlayer functionality
    On Sun, Dec 02, 2007 at 12:54:36PM +0100, Joakim Tjernlund wrote:
    > [SNIP]
    > > ^^ the correct solution is to implement arch_initcall function
    > > which will create fixed PHYs, and then leave only
    > > snprintf(fpi->bus_id, 16, PHY_ID_FMT, 0, *data); part in the
    > > fs_enet's find_phy().
    > >
    > > Try add something like this to the fsl_soc.c (compile untested):
    > >
    > > - - - -
    > > static int __init of_add_fixed_phys(void)
    > > {
    > > struct device_node *np;
    > > const u32 *prop;
    > > struct fixed_phy_status status = {};
    > >
    > > while ((np = of_find_node_by_name(NULL, "ethernet"))) {
    > > data = of_get_property(np, "fixed-link", NULL);
    > > if (!data)
    > > continue;
    > >
    > > status.link = 1;
    > > status.duplex = data[1];
    > > status.speed = data[2];
    >
    > What about Pause and Asym_Pause?

    Will be addressed in the next respin of these patches. Let's
    hope on Monday.

    > Dunno why so few, if any, eth drivers
    > impl. it, but the PHY lib supports it.
    > Even if fixed PHYs doesn't support it directly I think the OF interface
    > should have it.
    >
    > - fixed-link : <a b c d e> where a is emulated phy id - choose any,
    > but unique to the all specified fixed-links, b is duplex - 0 half,
    > 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no pause,
    > 1 pause, d asym_pause - 0 no asym_pause, 1 asym_pause.

    --
    Anton Vorontsov
    email: cbou@mail.ru
    backup email: ya-cbou@yandex.ru
    irc://irc.freenode.net/bd2


    \
     
     \ /
      Last update: 2007-12-02 13:23    [W:6.354 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site