Re: [U-Boot] net: fec_mxc: multiple calls to fec_mii_setspeed()

2018-03-15 Thread Troy Kisky
On 3/15/2018 12:49 PM, Joe Hershberger wrote:
> On Wed, Mar 14, 2018 at 3:15 AM, Yasushi SHOJI  
> wrote:
>> Hello,
>>
>> I just noticed that in fec_mxc.c, fec_mii_setspeed() is called twice if
>> you are calling fecmxc_initialize_multi(), once from
>> fec_get_miibus(), and the other from fec_probe().
>>
>> Is this intended?  If so, would you mind to elaborate a bit?
> 
> I think this is a question for Troy since it seems he made the change
> in commit fe428b909b83f0ef83d1fbc7a446bfb60bc4fe01 (net: fec_mxc: get
> phydev before fec_probe). I'm not sure why that would be intended, but
> also don't know what it hurts other than execution time.
> 
> -Joe
> 
Probably playing it safe that

/* Reset chip. */
writel(readl(>eth->ecntrl) | FEC_ECNTRL_RESET, >eth->ecntrl);

might mess up that register on some chip. A lot of manuals to check before 
removing
from fec_probe


Troy
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] net: fec_mxc: multiple calls to fec_mii_setspeed()

2018-03-15 Thread Joe Hershberger
On Wed, Mar 14, 2018 at 3:15 AM, Yasushi SHOJI  wrote:
> Hello,
>
> I just noticed that in fec_mxc.c, fec_mii_setspeed() is called twice if
> you are calling fecmxc_initialize_multi(), once from
> fec_get_miibus(), and the other from fec_probe().
>
> Is this intended?  If so, would you mind to elaborate a bit?

I think this is a question for Troy since it seems he made the change
in commit fe428b909b83f0ef83d1fbc7a446bfb60bc4fe01 (net: fec_mxc: get
phydev before fec_probe). I'm not sure why that would be intended, but
also don't know what it hurts other than execution time.

-Joe
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot