linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: linuxppc-dev@ozlabs.org, netdev@vger.kernel.org,
	Andy Fleming <afleming@freescale.com>,
	David Miller <davem@davemloft.net>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Andy Fleming <afleming@freescale.com>
Subject: [PATCH v3 10/13] powerpc/82xx: Rework Embedded Planet ep8248e platform to use of_mdio
Date: Sat, 25 Apr 2009 16:53:28 -0600	[thread overview]
Message-ID: <20090425225328.32392.2015.stgit@localhost.localdomain> (raw)
In-Reply-To: <20090425224458.32392.31296.stgit@localhost.localdomain>

From: Grant Likely <grant.likely@secretlab.ca>

This patch modifies the bitbanged MDIO driver in the ep8248e platform
code to use the common of_mdio infrastructure.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Andy Fleming <afleming@freescale.com>
---

 arch/powerpc/platforms/82xx/ep8248e.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)


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 <linux/interrupt.h>
 #include <linux/fsl_devices.h>
 #include <linux/mdio-bitbang.h>
+#include <linux/of_mdio.h>
 #include <linux/of_platform.h>
 
 #include <asm/io.h>
@@ -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)

  parent reply	other threads:[~2009-04-25 22:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-25 22:52 [PATCH 00/13] OF device tree handling of PHY drivers Grant Likely
2009-04-25 22:52 ` [PATCH v3 01/13] of: add of_parse_phandle() helper for parsing phandle properties Grant Likely
2009-04-25 22:52 ` [PATCH v3 02/13] phylib: rework to prepare for OF registration of PHYs Grant Likely
2009-04-25 22:52 ` [PATCH v3 03/13] phylib: add *_direct() variants of phy_connect and phy_attach functions Grant Likely
2009-04-25 22:52 ` [PATCH v3 04/13] openfirmware: Add OF phylib support code Grant Likely
2009-04-25 22:53 ` [PATCH v3 05/13] net: Rework mpc5200 fec driver to use of_mdio infrastructure Grant Likely
2009-04-25 22:53 ` [PATCH v3 06/13] net: rework fsl_pq_mdio " Grant Likely
2009-04-25 22:53 ` [PATCH v3 07/13] net: Rework gianfar " Grant Likely
2009-04-25 22:53 ` [PATCH v3 08/13] net: Rework pasemi_mac " Grant Likely
2009-04-25 22:53 ` [PATCH v3 09/13] net: Rework ucc_geth " Grant Likely
2009-04-26  9:00   ` Joakim Tjernlund
2009-04-27 15:36     ` Grant Likely
2009-04-25 22:53 ` Grant Likely [this message]
2009-04-25 22:53 ` [PATCH v3 11/13] net: Rework fs_enet " Grant Likely
2009-04-25 22:53 ` [PATCH v3 12/13] net: add Xilinx ll_temac device driver Grant Likely
2009-04-25 22:53 ` [PATCH v3 13/13] net: fix fsl_pq_mdio driver to use module_init() Grant Likely
2009-04-27  9:54 ` [PATCH 00/13] OF device tree handling of PHY drivers David Miller
2009-04-27 13:07   ` Grant Likely
2009-04-27 17:17   ` Grant Likely
2009-05-04 23:14     ` Scott Wood
2009-05-05  1:55       ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090425225328.32392.2015.stgit@localhost.localdomain \
    --to=grant.likely@secretlab.ca \
    --cc=afleming@freescale.com \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).