public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH] net: ravb: Fix NULL pointer access
Date: Mon, 21 Sep 2020 18:26:34 +0200	[thread overview]
Message-ID: <432b8394-d1e5-9b68-03a9-1e26bce18ac7@gmail.com> (raw)
In-Reply-To: <TYBPR01MB5309C82ABD2BACACAFA60E17863D0@TYBPR01MB5309.jpnprd01.prod.outlook.com>

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.

      reply	other threads:[~2020-09-21 16:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 14:10 [PATCH] net: ravb: Fix NULL pointer access Biju Das
2020-09-15 14:23 ` Michal Simek
2020-09-16 13:53 ` Marek Vasut
2020-09-16 15:43   ` Biju Das
2020-09-16 21:30     ` Marek Vasut
2020-09-18 15:26       ` Biju Das
2020-09-19  2:48         ` Marek Vasut
2020-09-19 11:14           ` Biju Das
2020-09-19 12:44             ` Marek Vasut
2020-09-19 18:14               ` Biju Das
2020-09-19 19:12                 ` Marek Vasut
2020-09-20  7:34                   ` Biju Das
2020-09-21 16:26                     ` Marek Vasut [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=432b8394-d1e5-9b68-03a9-1e26bce18ac7@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox