From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Long Zhao <longzhao@ambarella.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Linus Walleij" <linusw@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [EXT] Re: [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks
Date: Sat, 15 Aug 2026 11:34:24 +0300 [thread overview]
Message-ID: <aoAkkJQ8W_3gsQlx@ashevche-desk.local> (raw)
In-Reply-To: <7E774305-3920-4BB7-BA46-E0772D6BED84@ambarella.com>
On Fri, Aug 14, 2026 at 12:39:12PM +0000, Long Zhao wrote:
> OK, Andy. We will switch to 8250_ambarella.c instead in V4.
You also may consider a quirk in 8250_of.c if it's quite standard OF-enumerated
8250-compatible device.
> 在 2026年8月14日,20:34,Andy Shevchenko <andriy.shevchenko@linux.intel.com> 写道:
>
> On Fri, Aug 14, 2026 at 12:10:34PM +0000, Long Zhao wrote:
>
> > Originally we submitted a dedicated Ambarella UART driver. During review,
> > Linus pointed out that the register layout is basically 8250-compatible
> > and suggested reusing the existing 8250 code instead of maintaining a
> > separate driver. That is how we ended up with the current approach of
> > binding through 8250_dw plus a small set of Ambarella quirks.
>
> Right, please re-read carefully what he wrote
>
> "This needs to be rewritten using the 8250 library in the kernel
> under drivers/tty/serial/8250/8250_ambarella.c
> or similar."
>
> You already confirmed that your IP has nothing to do with the Synopsys. Why is
> the 8250_dw touched?!
>
> > [1] https://urldefense.com/v3/__https://lore.kernel.org/r/CAD**AjLm6HzEU1TM-c=Vtjv3FJEBecVP7TyxSgq_Q0zF-YwT6NA@mail.gmail.com/__;Kys!!PeEy7nZLVv0!j8LqPRT2bzim1iC2xrU0AW4QUYvJ4oc4JqHIP3DMrOJVI-SdMHNYj2KIirs8ySAtvDwx1-Glz56DsGX6v1vzzCpWOGOb9LYXjg$
>
> > -----Original Message-----
> > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Sent: Friday, August 14, 2026 19:53
> > On Fri, Aug 14, 2026 at 09:33:45AM +0000, Long Zhao wrote:
> >> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> >> Sent: Friday, August 14, 2026 16:56
> >> On Thu, Aug 13, 2026 at 06:35:13PM +0800, Long Zhao via B4 Relay wrote:
> >>
> >>> Add CV75 platform data with an ETOI IER mask and skip-set-rate so
> >>> the DesignWare 8250 driver can drive the Ambarella UART for console use.
> >
> >> Thanks for the review. Agreed the commit message was too brief.
...
> >>> + /* Keep variant-specific bits in the shadow across subsequent
> >>> +updates. */
> >>
> >> This says what code is doing. Instead it must say "why?" the code is doing this.
> >>
> >>> + up->ier |= d->pdata->ier_mask;
> >>> + serial_port_out(p, UART_IER, up->ier);
...
> >> In case there is an HW bug, where can we get the errata, please? (For
> >> a bare minimum add a reference to the Errata document you give to the
> >> customers.)
> >
> >> This is not a silicon erratum. The Ambarella UART is not Synopsys
> >> DesignWare IP; it is an Ambarella 8250-compatible UART. We still use
> >> the snps-dw-apb-uart binding / 8250_dw because the programming model
> >> matches closely enough, with two quirks (ETOI IER bit and
> >> SKIP_SET_RATE). I will expand the commit message and rewrite the
> >> comment to explain why in the next revision.
> >
> > Okay, what does it make to think that 8250_dw is a suitable choice?
> > What are the features that are repetitive would be if you use a custom
> > 8250-based driver (using the generic 8250 code)?
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-08-15 8:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 10:35 [PATCH v3 0/2] Ambarella CV75: 8250_dw UART Long Zhao via B4 Relay
2026-08-13 10:35 ` [PATCH v3 1/2] dt-bindings: serial: snps-dw-apb-uart: add ambarella,cv75-uart Long Zhao via B4 Relay
2026-08-13 10:42 ` sashiko-bot
2026-08-14 6:58 ` Linus Walleij
2026-08-13 10:35 ` [PATCH v3 2/2] serial: 8250_dw: add Ambarella CV75 quirks Long Zhao via B4 Relay
2026-08-13 10:46 ` sashiko-bot
2026-08-14 6:59 ` Linus Walleij
2026-08-14 7:10 ` Long Zhao
2026-08-14 8:53 ` Andy Shevchenko
2026-08-14 8:56 ` Andy Shevchenko
2026-08-14 9:33 ` [EXT] " Long Zhao
2026-08-14 11:52 ` Andy Shevchenko
2026-08-14 12:10 ` Long Zhao
2026-08-14 12:16 ` Greg Kroah-Hartman
2026-08-14 12:31 ` Andy Shevchenko
2026-08-14 12:39 ` Long Zhao
2026-08-15 8:34 ` Andy Shevchenko [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=aoAkkJQ8W_3gsQlx@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=longzhao@ambarella.com \
--cc=robh@kernel.org \
/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