public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab•ca>
To: Wolfram Sang <w.sang@pengutronix•de>
Cc: linuxppc-embedded@ozlabs•org
Subject: Re: [patch 1/2] FEC_MPC52XX_PHY: Remove obsolete code
Date: Wed, 15 Oct 2008 08:28:55 -0600	[thread overview]
Message-ID: <20081015142855.GE16262@secretlab.ca> (raw)
In-Reply-To: <20080816024055.241009929@pengutronix.de>

On Sat, Aug 16, 2008 at 04:32:00AM +0200, Wolfram Sang wrote:
> 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>

I'm not convinced on this one.  At the very least I need a more detailed
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
the MDIO irq which tells the processor that an MDIO transaction has
completed.  Second is an IRQ from the PHY itself which can come in from
an entirely different path.

As it stands, I'm going to hold off picking this one up.

g.

> ---
>  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
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs•org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

  reply	other threads:[~2008-10-15 14:28 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 [this message]
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=20081015142855.GE16262@secretlab.ca \
    --to=grant.likely@secretlab$(echo .)ca \
    --cc=linuxppc-embedded@ozlabs$(echo .)org \
    --cc=w.sang@pengutronix$(echo .)de \
    /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