From: Jacky Huang <ychuang570808@gmail.com>
To: "Arnd Bergmann" <arnd@arndb.de>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Rob Herring <robh+dt@kernel.org>,
krzysztof.kozlowski+dt@linaro.org, Lee Jones <lee@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Tomer Maimon <tmaimon77@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-serial <linux-serial@vger.kernel.org>,
schung@nuvoton.com, mjchen@nuvoton.com,
Jacky Huang <ychuang3@nuvoton.com>
Subject: Re: [PATCH v10 10/10] tty: serial: Add Nuvoton ma35d1 serial driver support
Date: Wed, 10 May 2023 09:26:53 +0800 [thread overview]
Message-ID: <6bee2314-043d-e1af-016b-779df88f1868@gmail.com> (raw)
In-Reply-To: <72983689-0e98-4482-b549-ba2530274943@app.fastmail.com>
Dear Arnd and Ilpo,
Thank you for the comments.
On 2023/5/9 下午 08:32, Arnd Bergmann wrote:
> On Tue, May 9, 2023, at 14:25, Ilpo Järvinen wrote:
>> On Tue, 9 May 2023, Arnd Bergmann wrote:
>>> On Tue, May 9, 2023, at 12:17, Ilpo Järvinen wrote:
>>>> On Mon, 8 May 2023, Jacky Huang wrote:
>>>>> +
>>>>> +#define UART_NR 17
>>>>> +
>>>>> +#define UART_REG_RBR 0x00
>>>>> +#define UART_REG_THR 0x00
>>>>> +#define UART_REG_IER 0x04
>>>>> +#define UART_REG_FCR 0x08
>>>>> +#define UART_REG_LCR 0x0C
>>>>> +#define UART_REG_MCR 0x10
>>>> These duplicate include/uapi/linux/serial_reg.h ones, use the std ones
>>>> directly.
>>>>
>>>> Setup regshift too and use it in serial_in.
>>> I think this came up in previous reviews, but it turned out that
>>> only the first six registers are compatible, while the later
>>> ones are all different, and it's not 8250 compatible.
>> So use the normal name for compatible ones and HW specific names for the
>> others?
>>
>> It might not be compatible in everything but surely 8250 influence is
>> visible here and there.
> I'd rename all of them and share nothing. I had the same thought as you
> when I first looked at the driver, and thought of how we merged the omap
> uart into 8250 for this reason, but after I found a datasheet for this
> one, my impression was that it's a much more distant cousin of 8250
> than the others,
>
> There is clearly some family lineage, but there are differences
> everywhere, and I don't think it was designed by extending a 8250
> compatible hardware block with extra features, but rather built
> from scratch (sigh) based only loosely on a register description
> but then extending it with no intent of retaining compatibility.
>
> Arnd
Yes, the design of this UART IP is indeed incompatible with the 8250, but it
does imitate the 8250 in some register and register bit field naming, and
even in usage definitions, which can easily lead to misunderstandings.
In order to distinguish it from the 8250 and make it clear that it has
nothing
to do with the 8250, I hope you can agree with me not to use the existing
register and bit field definitions of the 8250 in this driver.
In fact, this UART design has been used for more than 15 years and is used
in our M0/M23/M4, ARM7/ARM9 MCUs and MPUs. The MA35 series will also
continue to use this design. I will add the MA35_ prefix to all
registers and bit
fields, and make the modifications suggested by Ilpo that are unrelated to
this 8250 issue.
Best Regards,
Jacky Huang
next prev parent reply other threads:[~2023-05-10 1:27 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-08 2:59 [PATCH v10 00/10] Introduce Nuvoton ma35d1 SoC Jacky Huang
2023-05-08 2:59 ` [PATCH v10 01/10] arm64: Kconfig.platforms: Add config for Nuvoton MA35 platform Jacky Huang
2023-05-08 2:59 ` [PATCH v10 02/10] arm64: defconfig: Add support for Nuvoton MA35 family SoCs Jacky Huang
2023-05-08 2:59 ` [PATCH v10 03/10] dt-bindings: clock: nuvoton: add binding for ma35d1 clock controller Jacky Huang
2023-05-08 3:26 ` Rob Herring
2023-05-08 6:30 ` Krzysztof Kozlowski
2023-05-08 2:59 ` [PATCH v10 04/10] dt-bindings: reset: nuvoton: Document ma35d1 reset control Jacky Huang
2023-05-08 3:26 ` Rob Herring
2023-05-08 2:59 ` [PATCH v10 05/10] dt-bindings: arm: Add initial bindings for Nuvoton platform Jacky Huang
2023-05-08 3:26 ` Rob Herring
2023-05-08 2:59 ` [PATCH v10 06/10] dt-bindings: serial: Document ma35d1 uart controller Jacky Huang
2023-05-08 3:26 ` Rob Herring
2023-05-08 6:31 ` Krzysztof Kozlowski
2023-05-08 7:01 ` Jacky Huang
2023-05-08 8:05 ` Krzysztof Kozlowski
2023-05-08 8:15 ` Jacky Huang
2023-05-08 2:59 ` [PATCH v10 07/10] arm64: dts: nuvoton: Add initial ma35d1 device tree Jacky Huang
2023-05-08 2:59 ` [PATCH v10 08/10] clk: nuvoton: Add clock driver for ma35d1 clock controller Jacky Huang
2023-05-08 10:52 ` Ilpo Järvinen
2023-05-09 0:58 ` Jacky Huang
2023-05-08 2:59 ` [PATCH v10 09/10] reset: Add Nuvoton ma35d1 reset driver support Jacky Huang
2023-05-08 8:20 ` Philipp Zabel
2023-05-08 11:00 ` Ilpo Järvinen
2023-05-09 1:09 ` Jacky Huang
2023-05-08 2:59 ` [PATCH v10 10/10] tty: serial: Add Nuvoton ma35d1 serial " Jacky Huang
2023-05-09 10:17 ` Ilpo Järvinen
2023-05-09 12:14 ` Arnd Bergmann
2023-05-09 12:25 ` Ilpo Järvinen
2023-05-09 12:32 ` Arnd Bergmann
2023-05-10 1:26 ` Jacky Huang [this message]
2023-05-10 10:57 ` Arnd Bergmann
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=6bee2314-043d-e1af-016b-779df88f1868@gmail.com \
--to=ychuang570808@gmail.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mjchen@nuvoton.com \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=schung@nuvoton.com \
--cc=tmaimon77@gmail.com \
--cc=will@kernel.org \
--cc=ychuang3@nuvoton.com \
/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;
as well as URLs for NNTP newsgroup(s).