From patchwork Sat Mar 21 22:29:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 24891 X-Patchwork-Delegate: grant.likely@secretlab.ca Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 04C8BDF836 for ; Sun, 22 Mar 2009 09:35:35 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.169]) by ozlabs.org (Postfix) with ESMTP id E9FCFDDEEF for ; Sun, 22 Mar 2009 09:29:10 +1100 (EST) Received: by wf-out-1314.google.com with SMTP id 24so1929047wfg.15 for ; Sat, 21 Mar 2009 15:29:10 -0700 (PDT) Received: by 10.142.157.9 with SMTP id f9mr2128128wfe.87.1237674550405; Sat, 21 Mar 2009 15:29:10 -0700 (PDT) Received: from trillian.cg.shawcable.net (S01060016b61d1226.cg.shawcable.net [68.146.92.145]) by mx.google.com with ESMTPS id 28sm7568636wfd.25.2009.03.21.15.29.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Mar 2009 15:29:09 -0700 (PDT) Received: from localhost.localdomain (trillian [127.0.0.1]) by trillian.cg.shawcable.net (Postfix) with ESMTP id 92AF8C8E2E; Sat, 21 Mar 2009 16:29:07 -0600 (MDT) From: Grant Likely Subject: [PATCH v2 10/13] powerpc/82xx: Rework Embedded Planet ep8248e platform to use of_mdio To: linuxppc-dev@ozlabs.org, netdev@vger.kernel.org, olof@lixom.net Date: Sat, 21 Mar 2009 16:29:07 -0600 Message-ID: <20090321222906.20493.32061.stgit@localhost.localdomain> In-Reply-To: <20090321222047.20493.87335.stgit@localhost.localdomain> References: <20090321222047.20493.87335.stgit@localhost.localdomain> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 Cc: afleming@freescale.com, davem@davemloft.net X-BeenThere: linuxppc-dev@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@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.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 | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index 0eb6d7f..bd323b5 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 @@ -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)