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

Troy Kisky troy.kisky at boundarydevices.com
Fri Mar 16 00:01:34 UTC 2018


On 3/15/2018 12:49 PM, Joe Hershberger wrote:
> On Wed, Mar 14, 2018 at 3:15 AM, Yasushi SHOJI <yasushi.shoji at gmail.com> 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(&fec->eth->ecntrl) | FEC_ECNTRL_RESET, &fec->eth->ecntrl);

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


Troy


More information about the U-Boot mailing list