[PATCH] net: ravb: Fix NULL pointer access
Marek Vasut
marek.vasut at gmail.com
Mon Sep 21 18:26:34 CEST 2020
On 9/20/20 9:34 AM, Biju Das wrote:
Hi,
[...]
>>> if we remove writephyext, by looking the code at [1], rxc-skew-ps will be
>> taken from the device tree[3] and "txc-skew-pc" will be the default
>> value(0xf).
>>> [3]https://elixir.bootlin.com/u-boot/v2020.10-rc4/source/arch/arm/dts/
>>> salvator-common.dtsi#L331
>>
>> So you want to check whether each RCar3 DT contains a PHY node and that
>> PHY node has rxc-skew-ps and txc-skew-ps , which combined then results
>> into a register value (0xf << 5) | (0x19 << 0) .
>
> rxc-skew-ps set in DTS is 1500. 1 step is 60 ps, so 1500/60 = 25 which is 0x19 and this value will be overridden and stored in ofcfg->grp's val[0].
OK, good, thanks.
>>> I will check this and let you know the results after checking on RCar board.
>> Unfortunately currently I don't have RCar board.
>>
>> It's enough to just check the DTs and verify that they set the matching
>> correct values of rxc-skew-ps/txc-skew-ps . I can test it on the real hardware.
>
> Yes, that way we can make sure the mapping operation is correct for this phy. 1500 in dts after mapping operation should override
> ofcfg->grp's val[0] with 0x19.
>
>> If you want, you can add the txc-skew-ps into the Linux R-Car3 DTs too.
>
> We don't need to set txc-skew-ps in dts, since it is same as default value and is filled in ofcfg->grp's val[1].
> We can avoid unnecessary mapping operations by not specifying in device tree, for default values.
Hopefully the default setting will not change in some new revision of
the PHY then.
More information about the U-Boot
mailing list