[patch 1/2] FEC_MPC52XX_PHY: Remove obsolete code

Grant Likely grant.likely at secretlab.ca
Thu Oct 16 01:28:55 EST 2008


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 at 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 at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded


More information about the Linuxppc-embedded mailing list