lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <6b35ee35-0567-473c-9f76-d8bdda0e90a3@app.fastmail.com>
Date:   Wed, 10 May 2023 12:57:26 +0200
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Jacky Huang" <ychuang570808@...il.com>,
        Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc:     "Rob Herring" <robh+dt@...nel.org>,
        krzysztof.kozlowski+dt@...aro.org, "Lee Jones" <lee@...nel.org>,
        "Michael Turquette" <mturquette@...libre.com>,
        "Stephen Boyd" <sboyd@...nel.org>,
        "Philipp Zabel" <p.zabel@...gutronix.de>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        "Jiri Slaby" <jirislaby@...nel.org>,
        "Tomer Maimon" <tmaimon77@...il.com>,
        "Catalin Marinas" <catalin.marinas@....com>,
        "Will Deacon" <will@...nel.org>, devicetree@...r.kernel.org,
        linux-clk@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        linux-arm-kernel@...ts.infradead.org,
        linux-serial <linux-serial@...r.kernel.org>, schung@...oton.com,
        mjchen@...oton.com, "Jacky Huang" <ychuang3@...oton.com>
Subject: Re: [PATCH v10 10/10] tty: serial: Add Nuvoton ma35d1 serial driver support

On Wed, May 10, 2023, at 03:26, Jacky Huang wrote:
> 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.
...
>>
>> 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.
>>
>
> 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.

Sounds good to me, thanks! It would be good if Jiri or GregKH can also
weigh in to make sure they agree on this approach.

On the topic of tty namespace, please also add the change that I suggested
to pick an unused major/minor number range. I'm not entirely sure about
whether using name="ttyS" is actually preferred here or if you should
pick something else here as well. I see that "ttyN" has no other users
are the moment, though "ttyn" is what drivers/tty/serial/jsm/ has.

Maybe Jiri can also recommend what to pick here.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ