From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933819AbcIUTaY convert rfc822-to-8bit (ORCPT ); Wed, 21 Sep 2016 15:30:24 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:63906 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932457AbcIUTaU (ORCPT ); Wed, 21 Sep 2016 15:30:20 -0400 From: Arnd Bergmann To: zhichang Cc: linux-arm-kernel@lists.infradead.org, "zhichang.yuan" , devicetree@vger.kernel.org, lorenzo.pieralisi@arm.com, gabriele.paoloni@huawei.com, minyard@acm.org, gregkh@linuxfoundation.org, benh@kernel.crashing.org, john.garry@huawei.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, xuwei5@hisilicon.com, linuxarm@huawei.com, linux-serial@vger.kernel.org, linux-pci@vger.kernel.org, zourongrong@gmail.com, liviu.dudau@arm.com, kantyzc@163.com Subject: Re: [PATCH V3 3/4] ARM64 LPC: support serial based on low-pin-count Date: Wed, 21 Sep 2016 21:29:22 +0200 Message-ID: <4518414.hTLWuvFlBl@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <815bebc1-96c9-2131-930d-bccdd4bf1c55@gmail.com> References: <1473855354-150093-1-git-send-email-yuanzhichang@hisilicon.com> <5525856.MfDSSsiP5d@wuerfel> <815bebc1-96c9-2131-930d-bccdd4bf1c55@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K0:qOIjT8gvGnE+qtbH80r30yZOR9f2peErN41YlG6wFgWsaLy3zyG 7ql9AxR+lrgXKn3cYOhJBrpinpBiBmdTIjMsRb0Y8gJ3m3SzaHga1GbrP8SznI+TyXqzvk4 28cHnY25S14jnUE8I4gjoUXdpvdJ/iS4nJkxR9PwPGdRTFazzAQscZkjl79V6YVz1a6bRdR h3VVH81SvgK8mlCRMoQ/w== X-UI-Out-Filterresults: notjunk:1;V01:K0:33pOFKh22cY=:9tGKCLfsGOKRaydCodSkbh wuCGecfFwIuiI6J2tY48ISKuJ2eQxot60dm9RgcqyqL8GL9826s4MXw5INLR9Br6n5KOZV6N6 cpMDYh5AvfSuTidE5bEIw4QFGmrCiikXksr2C6I6d0Rt94XbAl4LR49+74ZPu7YzgLiME+ge0 0kl45vCpdMYJpsRa9SfvFQX5vQTg2u1FTuje5HBEzRBVxntG5TnoJcOrsFmT+2f0kuzfE5o7i gYpy7VHLZfcuuWixzP89Hh2QzRV7ZYMRGaR3OEnAD08Gci8S148yiBkIV9PX6FCAZR9VZ76Zk Ra9FX1Wje9jHOiUSTNCtRR9xmX/ArtVS2/zlxnvtmiWtOlKGp7P5HN2y5Z3VLZH4gMIv9cnlt fvgq+RFevRIt0xXMARQ5h3hCaokAbqUtezyI1CdcfOxrreZqeSqtyVh3F9iN9jnXK2Gmvwhvo OIPznznDRXOH9Va0rkImJc5deyHwy8qbjHf+VBqiXs+QlHg1SgMNpebn3UXifSF3ETitU4w2h GDFGjULVkZ+QUn4qFl0JRtl88hmaUPnS1YhqWcDF+NQHDLSfWcU2ePCAUCn4FygtI1BJopL6l QMsmApyoKgjD3iFivdYh7yrMuKAB0eNKTQaQF4lTeKICTNZNxbwn+BTM1HzTlUFcVGHDnOp4s KFGfbnQL935DgOED/HmDEF7RXL4QEGDKG34S2bXzR17v+BIRHKFqILKRtHpTOxAxtxOvMPGkD 0p/RtCLaZ6IW+YeS Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, September 21, 2016 6:12:28 PM CEST zhichang wrote: > On 2016年09月15日 05:33, Arnd Bergmann wrote: > > On Wednesday, September 14, 2016 11:04:33 PM CEST zhichang.yuan wrote: > >> The 8250_hisi_lpc.c support both ACPI and dts similar to 8250_dw : > >> > >> +static struct platform_driver hs_lpc8250_driver = { > >> + .driver = { > >> + .name = "hisi-lpc-uart", > >> + .of_match_table = hs8250_of_match, > >> + .acpi_match_table = ACPI_PTR(hs8250_acpi_match), > >> > >> So, I am a little confused why we need to support dts in 8250_of.c and support ACPI in another > >> driver file. > >> > > > > After looking again, I'm pretty sure that drivers/tty/serial/8250/8250_pnp.c > > will handle the ACPI case without modifications, you just need to adapt > > the 8250_of driver to handle IORESOURCE_IO ports. This will be required > > anyway with the next version once the LPC bridge is on the PCI bus. > > > > Yes. You are right. > > When the indirectIO patch is accepted, no much changes needed in these two file to support LPC UART. > > BTW, what is your target to change these two files to support LPC uart? > Do you think we don't need to add many new c files?? I think by modifying 8250_of.c, you should be able to make any UART on some LPC bus work, regardless of what controller is used. The ACPI version (8250_pnp.c) shouldn't need any changes at all if I read that correctly. Arnd