From: Wolfram Sang <w.sang@pengutronix•de>
To: Grant Likely <grant.likely@secretlab•ca>
Cc: linuxppc-embedded@ozlabs•org
Subject: Re: [patch 1/2] FEC_MPC52XX_PHY: Remove obsolete code
Date: Thu, 16 Oct 2008 23:30:21 +0200 [thread overview]
Message-ID: <20081016213021.GD13629@pengutronix.de> (raw)
In-Reply-To: <20081015142855.GE16262@secretlab.ca>
[-- Attachment #1: Type: text/plain, Size: 1756 bytes --]
On Wed, Oct 15, 2008 at 08:28:55AM -0600, Grant Likely wrote:
> description of what is wrong and why the code needs to be removed. As
> far as I can tell, this code affects two different IRQ paths. First is
Ups, you are right! I am sorry that I missed that somehow :( Here is
hopefully a better version, which just skips the really unnecessary
interrupt and fixes a glitch in mdio_remove:
===
[MPC52XX] fec_mpc52xx_phy: Minor cleanups
As this driver polls for a complete MDIO transaction, there is no need to enable
interrupts for it. Furthermore, make both checks for freeing MDIO-bus irqs
consistent.
Signed-off-by: Wolfram Sang <w.sang@pengutronix•de>
---
drivers/net/fec_mpc52xx_phy.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c
index 08e18bc..3ad3750 100644
--- a/drivers/net/fec_mpc52xx_phy.c
+++ b/drivers/net/fec_mpc52xx_phy.c
@@ -133,9 +133,6 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of, const struct of_device_i
/* 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;
@@ -167,7 +164,7 @@ static int mpc52xx_fec_mdio_remove(struct of_device *of)
iounmap(priv->regs);
for (i=0; i<PHY_MAX_ADDR; i++)
- if (bus->irq[i])
+ if (bus->irq[i] != PHY_POLL)
irq_dispose_mapping(bus->irq[i]);
kfree(priv);
kfree(bus->irq);
--
1.5.6.5
--
Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-10-16 21:30 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 ` [patch 1/2] FEC_MPC52XX_PHY: Remove obsolete code Wolfram Sang
2008-10-15 14:28 ` Grant Likely
2008-10-16 21:30 ` Wolfram Sang [this message]
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=20081016213021.GD13629@pengutronix.de \
--to=w.sang@pengutronix$(echo .)de \
--cc=grant.likely@secretlab$(echo .)ca \
--cc=linuxppc-embedded@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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