From patchwork Fri Jun 12 21:34:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ken MacLeod X-Patchwork-Id: 28653 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 3869AB71FB for ; Sat, 13 Jun 2009 12:04:54 +1000 (EST) Received: by ozlabs.org (Postfix) id 27CC0DDD0C; Sat, 13 Jun 2009 12:04:54 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (bilbo.ozlabs.org [203.10.76.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bilbo.ozlabs.org", Issuer "CAcert Class 3 Root" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 2393BDDD0B for ; Sat, 13 Jun 2009 12:04:54 +1000 (EST) Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4C7B6B7589 for ; Sat, 13 Jun 2009 12:04:18 +1000 (EST) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id DCF24B71C3 for ; Sat, 13 Jun 2009 07:34:28 +1000 (EST) Received: by ozlabs.org (Postfix) id CC23BDDD0B; Sat, 13 Jun 2009 07:34:28 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from sccmmhc91.asp.att.net (sccmmhc91.asp.att.net [204.127.203.211]) by ozlabs.org (Postfix) with ESMTP id 547E0DDD04 for ; Sat, 13 Jun 2009 07:34:27 +1000 (EST) DKIM-Signature: v=1; q=dns/txt; d=mchsi.com; s=dkim01; a=rsa-sha256; c=relaxed/relaxed; t=1244842467; h=Content-Type:MIME-Version: Message-ID:Date:From:Subject:To; bh=ka3opsEjEXSLS5UfhaT+NJSRKY547Ld DEutuR0wAYXs=; b=uFVJsAM8ttTY2QM9+G2+KvkhrK8Wyayybpnw5LT+nE8X95wqiV EPQKBkIgnE3RRyAMLbQ1co/BIyY5QbXDHMdg== Received: from localhost.localdomain (173-29-224-151.client.mchsi.com[173.29.224.151]) by mchsi.com (sccmmhc91) with ESMTP id <20090612213423m9100hr7kse>; Fri, 12 Jun 2009 21:34:24 +0000 Received: from localhost.localdomain (tara [127.0.0.1]) by localhost.localdomain (8.14.2/8.14.2) with ESMTP id n5CLYdtb021831 for ; Fri, 12 Jun 2009 16:34:39 -0500 Received: (from ken@localhost) by localhost.localdomain (8.14.2/8.14.2/Submit) id n5CLYcGd021829; Fri, 12 Jun 2009 16:34:38 -0500 X-Authentication-Warning: localhost.localdomain: ken set sender to ken@bitsko.slc.ut.us using -f To: linuxppc-dev@ozlabs.org Subject: [PATCH] net/fs_enet: Allow use_rmii to be set in OF From: Ken MacLeod Date: Fri, 12 Jun 2009 16:34:37 -0500 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 13 Jun 2009 12:04:12 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Allow use_rmii in fs_platform_info to be set in the OF device tree using phy-mode="rmii". Signed-off-by: Ken MacLeod --- drivers/net/fs_enet/fs_enet-main.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index a9cbc31..57879be 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c @@ -1043,6 +1043,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev, struct fs_platform_info *fpi; const u32 *data; const u8 *mac_addr; + const char *str; int privsize, len, ret = -ENODEV; fpi = kzalloc(sizeof(*fpi), GFP_KERNEL); @@ -1057,6 +1058,10 @@ static int __devinit fs_enet_probe(struct of_device *ofdev, fpi->cp_command = *data; } + str = of_get_property(ofdev->node, "phy-mode", &len); + if (str != NULL && !strcasecmp(str, "rmii")) + fpi->use_rmii = 1; + fpi->rx_ring = 32; fpi->tx_ring = 32; fpi->rx_copybreak = 240;