From: Wolfram Sang <w.sang@pengutronix.de>
To: linuxppc-embedded@ozlabs.org
Cc: Wolfram Sang <w.sang@pengutronix.de>
Subject: [patch 1/2] FEC_MPC52XX_PHY: Remove obsolete code
Date: Sat, 16 Aug 2008 04:32:00 +0200 [thread overview]
Message-ID: <20080816024055.241009929@pengutronix.de> (raw)
In-Reply-To: 20080816023159.126377505@pengutronix.de
Remove last remains of the former (and broken) irq support code. The
driver is polling only.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
drivers/net/fec_mpc52xx_phy.c | 20 --------------------
1 file changed, 20 deletions(-)
Index: .kernel/drivers/net/fec_mpc52xx_phy.c
===================================================================
--- .kernel.orig/drivers/net/fec_mpc52xx_phy.c
+++ .kernel/drivers/net/fec_mpc52xx_phy.c
@@ -76,7 +76,6 @@
{
struct device *dev = &of->dev;
struct device_node *np = of->node;
- struct device_node *child = NULL;
struct mii_bus *bus;
struct mpc52xx_fec_mdio_priv *priv;
struct resource res = {};
@@ -105,15 +104,6 @@
for (i=0; i<PHY_MAX_ADDR; i++)
bus->irq[i] = PHY_POLL;
- while ((child = of_get_next_child(np, child)) != NULL) {
- int irq = irq_of_parse_and_map(child, 0);
- if (irq != NO_IRQ) {
- const u32 *id = of_get_property(child, "reg", NULL);
- if (id)
- bus->irq[*id] = irq;
- }
- }
-
/* setup registers */
err = of_address_to_resource(np, 0, &res);
if (err)
@@ -133,9 +123,6 @@
/* set MII speed */
out_be32(&priv->regs->mii_speed, ((mpc52xx_find_ipb_freq(of->node) >> 20) / 5) << 1);
- /* enable MII interrupt */
- out_be32(&priv->regs->imask, in_be32(&priv->regs->imask) | FEC_IMASK_MII);
-
err = mdiobus_register(bus);
if (err)
goto out_unmap;
@@ -145,9 +132,6 @@
out_unmap:
iounmap(priv->regs);
out_free:
- for (i=0; i<PHY_MAX_ADDR; i++)
- if (bus->irq[i] != PHY_POLL)
- irq_dispose_mapping(bus->irq[i]);
kfree(bus->irq);
kfree(priv);
kfree(bus);
@@ -160,15 +144,11 @@
struct device *dev = &of->dev;
struct mii_bus *bus = dev_get_drvdata(dev);
struct mpc52xx_fec_mdio_priv *priv = bus->priv;
- int i;
mdiobus_unregister(bus);
dev_set_drvdata(dev, NULL);
iounmap(priv->regs);
- for (i=0; i<PHY_MAX_ADDR; i++)
- if (bus->irq[i])
- irq_dispose_mapping(bus->irq[i]);
kfree(priv);
kfree(bus->irq);
kfree(bus);
--
Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
next prev parent reply other threads:[~2008-08-16 2:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-16 2:31 [patch 0/2] FEC_MPC52XX_PHY: Updates Wolfram Sang
2008-08-16 2:32 ` Wolfram Sang [this message]
2008-10-15 14:28 ` [patch 1/2] FEC_MPC52XX_PHY: Remove obsolete code Grant Likely
2008-10-16 21:30 ` Wolfram Sang
2008-08-16 2:32 ` [patch 2/2] FEC_MPC52XX_PHY: Refactor read/write routines Wolfram Sang
2008-10-15 14:29 ` 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=20080816024055.241009929@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=linuxppc-embedded@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.