From: Andy Yan <andy.yan@rock-chips.com>
To: David Wu <david.wu@rock-chips.com>, heiko@sntech.de, wsa@the-dreams.de
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
dianders@chromium.org, linux-rockchip@lists.infradead.org,
linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] i2c: rk3x: Give the tuning value 0 during rk3x_i2c_v0_calc_timings
Date: Mon, 24 Oct 2016 19:55:32 +0800 [thread overview]
Message-ID: <e2972b59-b648-88ed-ca0a-acd827b63c2b@rock-chips.com> (raw)
In-Reply-To: <1477125822-30644-1-git-send-email-david.wu@rock-chips.com>
Hi:
On 2016年10月22日 16:43, David Wu wrote:
> We found a bug that i2c transfer sometimes failed on 3066a board with
> stabel-4.8, the con register would be updated by uninitialized tuning
> value, it made the i2c transfer failed.
>
> So give the tuning value to be zero during rk3x_i2c_v0_calc_timings.
>
> Signed-off-by: David Wu <david.wu@rock-chips.com>
> ---
> drivers/i2c/busses/i2c-rk3x.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
> index 50702c7..df22066 100644
> --- a/drivers/i2c/busses/i2c-rk3x.c
> +++ b/drivers/i2c/busses/i2c-rk3x.c
> @@ -694,6 +694,8 @@ static int rk3x_i2c_v0_calc_timings(unsigned long clk_rate,
> t_calc->div_low--;
> t_calc->div_high--;
>
> + /* Give the tuning value 0, that would not update con register */
> + t_calc->tuning = 0;
> /* Maximum divider supported by hw is 0xffff */
> if (t_calc->div_low > 0xffff) {
> t_calc->div_low = 0xffff;
rk3066a based board can't boot up(with endless i2c irq messages print
out) from linux-4.8 without this fix.
Tested-by: Andy Yan <andy.yan@rock-chips.com>
next prev parent reply other threads:[~2016-10-24 11:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-22 8:43 [PATCH] i2c: rk3x: Give the tuning value 0 during rk3x_i2c_v0_calc_timings David Wu
2016-10-24 11:55 ` Andy Yan [this message]
2016-10-24 18:29 ` Doug Anderson
2016-10-25 9:12 ` Wolfram Sang
[not found] ` <1477125822-30644-1-git-send-email-david.wu-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-10-27 13:11 ` Wolfram Sang
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=e2972b59-b648-88ed-ca0a-acd827b63c2b@rock-chips.com \
--to=andy.yan@rock-chips.com \
--cc=david.wu@rock-chips.com \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=wsa@the-dreams.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