Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754622AbXLBMUo (ORCPT ); Sun, 2 Dec 2007 07:20:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752009AbXLBMUb (ORCPT ); Sun, 2 Dec 2007 07:20:31 -0500 Received: from mx33.mail.ru ([194.67.23.194]:34599 "EHLO mx33.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751877AbXLBMUa (ORCPT ); Sun, 2 Dec 2007 07:20:30 -0500 X-Greylist: delayed 52761 seconds by postgrey-1.27 at vger.kernel.org; Sun, 02 Dec 2007 07:20:30 EST Date: Sun, 2 Dec 2007 15:13:12 +0300 From: Anton Vorontsov To: Joakim Tjernlund Cc: "'Jochen Friedrich'" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "'Jeff Garzik'" , linuxppc-dev@ozlabs.org Subject: Re: [PATCH 1/3] [NET] phy/fixed.c: rework to not duplicate PHYlayer functionality Message-ID: <20071202121312.GA2996@zarina> Reply-To: cbou@mail.ru References: <20071201213403.GA2350@zarina> <051e01c834da$1cce82f0$5267a8c0@Jocke> MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Disposition: inline In-Reply-To: <051e01c834da$1cce82f0$5267a8c0@Jocke> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1696 Lines: 50 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 : 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/