All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: EMCP333 <emcp@enser.io>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: tegra: do the baud tolerance math in 64 bits
Date: Sun, 22 Nov 2026 05:15:13 +0000	[thread overview]
Message-ID: <sashiko-outbox-227721@kernel.org> (raw)
In-Reply-To: <20261122-b4-serial-tegra-baud-tolerance-v1-1-39907382281f@enser.io>

> From: EMCP333 <emcp@enser.io>
> 
> On a 32-bit kernel both halves of the baud tolerance logic overflow
> `long`, so a Tegra20/30/114/124 board whose DT has an
> nvidia,adjust-baud-rates entry runs its fast UART rates at the wrong
> speed, and the range check then reports the wrong speed as fine.
> 
> tegra_get_tolerance_rate() returns rate + rate * tolerance / 10000, with
> rate = 16 x baud. For any baud above ~986 kbaud, rate * tolerance
> exceeds 2^31 and wraps, so the adjustment comes out negative and the
> clock divider rounds the request down a further half step. On a Tegra
> Note 7 (pll_p 408 MHz, nvidia,adjust-baud-rates = <1000000 4000000 136>),
> read back from clk_summary:
> 
>     baud      wanted uartc   got uartc     actual baud   error
> [ ... ]
> them.
> 
> Fixes: f04a3cc8d455 ("serial: tegra: add support to adjust baud rate")
> Fixes: d781ec21bae6 ("serial: tegra: report clk rate errors")
> Signed-off-by: EMCP333 <emcp@enser.io>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261122-b4-serial-tegra-baud-tolerance-v1-1-39907382281f@enser.io?part=1

  reply	other threads:[~2026-11-22  5:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22  5:11 [PATCH] serial: tegra: do the baud tolerance math in 64 bits EMCP333 via B4 Relay
2026-11-22  5:11 ` EMCP333
2026-11-22  5:15 ` sashiko-bot [this message]
2026-11-22  9:30 ` Greg Kroah-Hartman
     [not found]   ` <CAOY-3nCEb=fMMwHyecpvs5jVTod90tG7L8HvbDWZ+OgBfSJY0A@mail.gmail.com>
2026-11-22 15:34     ` Greg Kroah-Hartman

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=sashiko-outbox-227721@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=emcp@enser.io \
    --cc=linux-serial@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.