Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5721643rwr; Tue, 9 May 2023 05:38:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7MJlCUpr1Wr+79Lu2fvcOX7pSHhpakH8W2g4P46ApDl0sPX1btn0Jg/mQmrRq5EUcCcaon X-Received: by 2002:a05:6a20:8e1b:b0:100:640b:be3c with SMTP id y27-20020a056a208e1b00b00100640bbe3cmr10050791pzj.33.1683635892018; Tue, 09 May 2023 05:38:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683635892; cv=none; d=google.com; s=arc-20160816; b=urac1UmkZN1H4dM2dv3EF1KZQImXQp965CxAPo+vxVxeo+n80YMJwi+MnGMcl3Q+mf Y4dlnF6/E7pPPojA1sb0644vI3aNHCYGYgNc/p/1jAx65Nh/6a7cdIr8MC2of72mBtHc miMumjvYPGuOhRGiE8ZzAVnC0ow+Vdf7jAZRlnQRQPUR5JyF2JrzRckfCMNyNsk23O96 P9pCyZTf++UrpUv2wFz3bYyfUVNSNjyLXs1so9SKZLqKlCwhpJkwuIjCFtrKLz1YdDWj DqAz5vk+sF20S/cqsEXp5QAOR9ZYq9DdhXNzs/7fHHbpCC6IBGb1PN1W9AnoLGvqhXXP jW+w== 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=j4Tty1TtH2xu1KFfX5U4nu0r+YPVUX+H4xdKGXYuqL0=; b=qGrmI/9+TWfz7ELMAfG3dBGdBa7jETRMPKs4Zmv8JSF+tga4+pxV/uTZzrSDe2usEI 4JTcFNihKd+mw0HKUUTjS++f/JBgLEIVOst0ICCbTs9uWoyAGhr/LPsD9MvuvBodhbSH JUI3lse3x5PchCNtrxs8j7SXAtKB/9K7Dgp+YdY9/28lZBh9RRdy0veYv9Qx4hd1j/i9 w6D5y5PQ7vB1uKnfO+N6n2QOZrI/TOob9ML19PNYDm1D8448TkuO6Cz1U63HMjtgSh3O tlzKOdL1jjMysyspkiwqVoaF0Xa+h52weKbvDE7gRGDbec7Q15kX5DuJAfhJDTFU4MTk PoIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=PY6m7Gib; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ZeOUA0S5; 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 b5-20020a63eb45000000b0050beb800603si1447225pgk.39.2023.05.09.05.37.56; Tue, 09 May 2023 05:38:11 -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=PY6m7Gib; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ZeOUA0S5; 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 S235383AbjEIMcl (ORCPT + 99 others); Tue, 9 May 2023 08:32:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233731AbjEIMcj (ORCPT ); Tue, 9 May 2023 08:32:39 -0400 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0AE340D9; Tue, 9 May 2023 05:32:37 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id B8F8432005B5; Tue, 9 May 2023 08:32:35 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Tue, 09 May 2023 08:32:37 -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= 1683635555; x=1683721955; bh=j4Tty1TtH2xu1KFfX5U4nu0r+YPVUX+H4xd KGXYuqL0=; b=PY6m7GibKw4PfF6fRztVM9LkBonnvWm5DeTxdFnAW2PoE9PKecY Y8T65aT+fuKPhFLh58f+BN4Vdi1g54CC//3QKlRahsuANgb+rF0vHDOnRZo9jQ5y t7sjZez37bCeiRGmGEy0AqWffdjCyQSCUEV09xbZVUdUCN010K+DaYCBqrk/JJEM iB+vrxcD6FEGJ6I+cY5miTEr90yhzO03XBdXt+s8+aY+tswsab0A6o34NWe3jpUm PX3eSAeE6j+G6BVtklJv0LXtCTYoczeuvqILQYliVzLMaMmSKQjEE74cm9ism2dG ySSHm/m1iVu/S2YcMvFGncu1w2Jhd+/LVLw== 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= 1683635555; x=1683721955; bh=j4Tty1TtH2xu1KFfX5U4nu0r+YPVUX+H4xd KGXYuqL0=; b=ZeOUA0S57AXSFRxJ6nTctd/UvAhAW+Lbtc87ncxN9+7iUP2ooJH 0dD6l6S2voRJfKViUYPLscVkDCm++jDaFY0/qc9iCxwZQEQsjxlOoZWbLCU0clWQ 9+FMI0/9C4aqAWqi+6Q3PzJjfN7yVKwAhtoSWKxn1LfvFDj2UqFfrYwdqcwW1M/h QcrTg43pbhxJQaLzdJe71ps+yg63gY/xgB8fw4pVYJLzHnHpJJHmgAFFTEiR6P3U 9dCyUBGaNu/SAgOkWJZOQUw4Wj2kvQFzsBESt2Ym4ieqkHcZeVV3vCkJEdXEAS81 3airv3DjwjENAplSYkYJQqFZyVnbH36f66w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeegtddghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeegfeejhedvledvffeijeeijeeivddvhfeliedvleevheejleetgedukedt gfejveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 95BB3B60086; Tue, 9 May 2023 08:32:34 -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: <72983689-0e98-4482-b549-ba2530274943@app.fastmail.com> In-Reply-To: References: <20230508025936.36776-1-ychuang570808@gmail.com> <20230508025936.36776-11-ychuang570808@gmail.com> <2ba483e9-267f-2159-1ea8-75a2618fcdf9@linux.intel.com> Date: Tue, 09 May 2023 14:32:12 +0200 From: "Arnd Bergmann" To: =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= Cc: "Jacky Huang" , "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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,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 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 o= nes=20 >> > directly. >> > >> > Setup regshift too and use it in serial_in. >>=20 >> 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 t= he=20 > others? > > It might not be compatible in everything but surely 8250 influence is=20 > 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