Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7106485rwr; Wed, 10 May 2023 04:06:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4RZ1stMDqngeAMenzjEMxtbNpL8gG7AC888+3E2O6bOCLbK5CoTrLQdsJk3uByA5uHO756 X-Received: by 2002:a05:6a00:198a:b0:641:39cb:1716 with SMTP id d10-20020a056a00198a00b0064139cb1716mr22732059pfl.20.1683716803397; Wed, 10 May 2023 04:06:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683716803; cv=none; d=google.com; s=arc-20160816; b=XaRQnPHiOlSSwkuYrWYrgO2vJgUS1f0VdwQi+/QrbUlDm4KaTAttjtFNqT1xti0rdZ W1SSe4MH1m/Dc/sQhnUkNSJqB6FzZJEq6zHuUVRXLd66XAZnSH8o0sTheslItJ+Bn0r2 ek144yHITvakFZ3jECSxxZguUepAhsKVc7wEMgY5ctWBgQ7sDRQMz8sPZISy1ZR0lbvE RpHGIJoloHsAg2AhwOOFpUSlLxTPPW4vdOtvx3w/BzsJGF9474qT/7gkzDdu0aTuwVj0 GwrmMyzpVUv1HpMIUgLlFLmKRsr29BKxHzr51Sua1vzAanoW0eRcDqqI2V2vtZBSfntQ M18A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=U322gBAbCdps6RWJ4IJe3DP7Q6UeQ5VwPYnRa4Qb9OY=; b=bDin38xsxfoatYLrOyR5hbFrY/7EYeJYfCwmUBV5ra2V/yS0g70CZy7vrgnJkBS7dd h6+Wclvx2qmM6O404w+2oJY4I2Pk/acKjO4V1r6DDmmNtCWZGVxL8GleVLrH7RUZYNwz WLc/YrG3QWB35JColedvRnZbmxLSD3YqByiY5oJ+Cb7C46Ea32SAMyQFrShPWkFgFEAU EDmbvFYGt5T9BRUTJCA1NUWvDp97VskaLHBy+ujdRzUH1krCptIZJgcSpEbaYL1ju5Yf CEMC68eW8XCsYupMhc5DYJsUV1tkF9phmwEzdCbYbUHmcP7j9xfwWhVBsWiwKLwdhGVC WhwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=rMEQzxhe; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=FBOsVLG+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 68-20020a621947000000b0063f18073138si4819514pfz.99.2023.05.10.04.06.21; Wed, 10 May 2023 04:06:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=rMEQzxhe; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=FBOsVLG+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236086AbjEJK6G (ORCPT + 99 others); Wed, 10 May 2023 06:58:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235609AbjEJK56 (ORCPT ); Wed, 10 May 2023 06:57:58 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87C5344A7; Wed, 10 May 2023 03:57:50 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 4912B5C0113; Wed, 10 May 2023 06:57:47 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Wed, 10 May 2023 06:57:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1683716267; x=1683802667; bh=U322gBAbCdps6RWJ4IJe3DP7Q6UeQ5VwPYn Ra4Qb9OY=; b=rMEQzxhepIevzd53zmr36ANsYcs/OOEySbJaannH74IKSpDs3Ju gQMYhehpV1GQ4LPVKnzIPDnQf1lvB33N9pE8YF9J32ReLyXJvx+S1B2QdpPlqls7 g7Imz420Hwf4wT9v+BT6fEXENLl6JfjhZ3j2i04OgLETYfOKqBC+m5JwP4wMq7Dc XOQVNCGKulmK3B7CMtfLUbmThrqcKJ/HGDjyllm09BbWX/8ZCtyjnvJPcytEuB6i HBYXczt2TA64uMydKCs26VNGSy3RljKUssaBGAj8MDahQYkRJ9AIqZSoj1ZZgzMO WFgs1ScRCk5ltE3iCiho20uMqpo0uyR9llg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1683716267; x=1683802667; bh=U322gBAbCdps6RWJ4IJe3DP7Q6UeQ5VwPYn Ra4Qb9OY=; b=FBOsVLG+2ibtxfa6a9Z4GIo550sXjdgJMAao+8N8dx0Xuoap1xM MjKBy9SK65QSPtvtZe0ZWbDS6DaH4z9nil80gzUvaLsV46e4kzOs8mKCrcLUfbOx /Hybut2I8CDYP7OID27ZALVJ45UVLxCHFeFct4xjRYMC1nknVZAr24VdmRewiWHY hXPbbXfP7LxHG00ssM+Q8rmN8xvO8KTHriPehyClwF5ZrRZoY/n0a4/9cIa3mB+c h6nipdq6Ii+nfWynKdUsbZN96onkevdcHpPvZmd4PtEVYj2+9r+Z2U4xCp3hb3/G A4dA4wSa3hNX1x/7kHx2Mfw+pufqvbLei0A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeegiedgudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeegfeejhedvledvffeijeeijeeivddvhfeliedvleevheejleetgedukedt gfejveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 3BAD4B60086; Wed, 10 May 2023 06:57:46 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-415-gf2b17fe6c3-fm-20230503.001-gf2b17fe6 Mime-Version: 1.0 Message-Id: <6b35ee35-0567-473c-9f76-d8bdda0e90a3@app.fastmail.com> In-Reply-To: <6bee2314-043d-e1af-016b-779df88f1868@gmail.com> References: <20230508025936.36776-1-ychuang570808@gmail.com> <20230508025936.36776-11-ychuang570808@gmail.com> <2ba483e9-267f-2159-1ea8-75a2618fcdf9@linux.intel.com> <72983689-0e98-4482-b549-ba2530274943@app.fastmail.com> <6bee2314-043d-e1af-016b-779df88f1868@gmail.com> Date: Wed, 10 May 2023 12:57:26 +0200 From: "Arnd Bergmann" To: "Jacky Huang" , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= Cc: "Rob Herring" , krzysztof.kozlowski+dt@linaro.org, "Lee Jones" , "Michael Turquette" , "Stephen Boyd" , "Philipp Zabel" , "Greg Kroah-Hartman" , "Jiri Slaby" , "Tomer Maimon" , "Catalin Marinas" , "Will Deacon" , devicetree@vger.kernel.org, linux-clk@vger.kernel.org, LKML , linux-arm-kernel@lists.infradead.org, linux-serial , schung@nuvoton.com, mjchen@nuvoton.com, "Jacky Huang" Subject: Re: [PATCH v10 10/10] tty: serial: Add Nuvoton ma35d1 serial driver support Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE, T_SPF_TEMPERROR,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 10, 2023, at 03:26, Jacky Huang wrote: > On 2023/5/9 =E4=B8=8B=E5=8D=88 08:32, Arnd Bergmann wrote: >> On Tue, May 9, 2023, at 14:25, Ilpo J=C3=A4rvinen wrote: >>> On Tue, 9 May 2023, Arnd Bergmann wrote: >>>> On Tue, May 9, 2023, at 12:17, Ilpo J=C3=A4rvinen 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=20 > nothing > to do with the 8250, I hope you can agree with me not to use the exist= ing > 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=20 > registers and bit > fields, and make the modifications suggested by Ilpo that are unrelate= d 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 suggest= ed to pick an unused major/minor number range. I'm not entirely sure about whether using name=3D"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