回覆: [net-next 3/3] net: ftgmac100: Support for AST2700

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Simon,

Thank you for your reply.

> > @@ -1965,16 +1980,27 @@ static int ftgmac100_probe(struct
> platform_device *pdev)
> >  			dev_err(priv->dev, "MII probe failed!\n");
> >  			goto err_ncsi_dev;
> >  		}
> > -
> >  	}
> >
> >  	if (priv->is_aspeed) {
> > +		struct reset_control *rst;
> > +
> >  		err = ftgmac100_setup_clk(priv);
> >  		if (err)
> >  			goto err_phy_connect;
> >
> > -		/* Disable ast2600 problematic HW arbitration */
> > -		if (of_device_is_compatible(np, "aspeed,ast2600-mac"))
> > +		rst = devm_reset_control_get_optional(priv->dev, NULL);
> > +		if (IS_ERR(rst))
> 
> Hi Jacky,
> 
> Should err be set to ERR_PTR(rst) here so that value is returned by the
> function?

Yes. I will add checking the return value in the next version.

> 
> > +			goto err_register_netdev;
> > +
> > +		priv->rst = rst;
> > +		err = reset_control_assert(priv->rst);
> > +		mdelay(10);
> > +		err = reset_control_deassert(priv->rst);
> > +
> > +		/* Disable some aspeed platform problematic HW arbitration */
> > +		if (of_device_is_compatible(np, "aspeed,ast2600-mac") ||
> > +		    of_device_is_compatible(np, "aspeed,ast2700-mac"))
> >  			iowrite32(FTGMAC100_TM_DEFAULT,
> >  				  priv->base + FTGMAC100_OFFSET_TM);
> >  	}

Thanks,
Jacky




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux