From patchwork Tue Mar 31 08:27:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 25360 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id D4C8ADE1D5 for ; Tue, 31 Mar 2009 19:28:07 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753866AbZCaI1y (ORCPT ); Tue, 31 Mar 2009 04:27:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754023AbZCaI1w (ORCPT ); Tue, 31 Mar 2009 04:27:52 -0400 Received: from rv-out-0506.google.com ([209.85.198.236]:58055 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753756AbZCaI1t (ORCPT ); Tue, 31 Mar 2009 04:27:49 -0400 Received: by rv-out-0506.google.com with SMTP id f9so2906140rvb.1 for ; Tue, 31 Mar 2009 01:27:48 -0700 (PDT) Received: by 10.114.79.18 with SMTP id c18mr4193045wab.215.1238488068285; Tue, 31 Mar 2009 01:27:48 -0700 (PDT) Received: from trillian.cg.shawcable.net (S01060016b61d1226.cg.shawcable.net [68.146.92.145]) by mx.google.com with ESMTPS id m6sm5439561wag.49.2009.03.31.01.27.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 31 Mar 2009 01:27:47 -0700 (PDT) Received: from localhost.localdomain (trillian [127.0.0.1]) by trillian.cg.shawcable.net (Postfix) with ESMTP id 03A2BC8085; Tue, 31 Mar 2009 02:27:46 -0600 (MDT) From: Grant Likely Subject: [PATCH 12/14] powerpc/82xx: Rework Embedded Planet ep8248e platform to use of_mdio To: netdev@vger.kernel.org, linuxppc-dev@ozlabs.org Cc: olof@lixom.net, afleming@freescale.com, galak@kernel.crashing.org, Anton Vorontsov , Joakim Tjernlund Date: Tue, 31 Mar 2009 02:27:46 -0600 Message-ID: <20090331082745.1427.91493.stgit@localhost.localdomain> In-Reply-To: <20090331075537.1427.7819.stgit@localhost.localdomain> References: <20090331075537.1427.7819.stgit@localhost.localdomain> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Grant Likely This patch modifies the bitbanged MDIO driver in the ep8248e platform code to use the common of_mdio infrastructure. Signed-off-by: Grant Likely --- arch/powerpc/platforms/82xx/ep8248e.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index 0eb6d7f..51fcae4 100644 --- a/arch/powerpc/platforms/82xx/ep8248e.c +++ b/arch/powerpc/platforms/82xx/ep8248e.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -115,7 +116,7 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev, struct mii_bus *bus; struct resource res; struct device_node *node; - int ret, i; + int ret; node = of_get_parent(ofdev->node); of_node_put(node); @@ -130,17 +131,13 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev, if (!bus) return -ENOMEM; - bus->phy_mask = 0; bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); - for (i = 0; i < PHY_MAX_ADDR; i++) - bus->irq[i] = -1; - bus->name = "ep8248e-mdio-bitbang"; bus->parent = &ofdev->dev; snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); - return mdiobus_register(bus); + return of_mdiobus_register(bus, ofdev->node); } static int ep8248e_mdio_remove(struct of_device *ofdev)