Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754462AbcKIVqs (ORCPT ); Wed, 9 Nov 2016 16:46:48 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:50142 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157AbcKIVqr (ORCPT ); Wed, 9 Nov 2016 16:46:47 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Anurup M , mark.rutland@arm.com, zhangshaokun@hisilicon.com, gabriele.paoloni@huawei.com, john.garry@huawei.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, xuwei5@hisilicon.com, linuxarm@huawei.com, shyju.pv@huawei.com, sanil.kumar@hisilicon.com, shiju.jose@huawei.com, Tan Xiaojun , anurup.m@huawei.com Subject: Re: [PATCH v1 03/11] drivers: soc: hisi: Add support for Hisilicon Djtag driver Date: Wed, 09 Nov 2016 22:40:14 +0100 Message-ID: <4812554.ng09YGQfZ9@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <5822A5F6.9040806@gmail.com> References: <1478101374-18778-1-git-send-email-anurup.m@huawei.com> <4657586.c5MJoh65Ux@wuerfel> <5822A5F6.9040806@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:Oen83KBMHFiZUTBzwDttpn63s+2/hgOPp3LdlxvlnQV6HoKVJk8 Nnfn1RxWuKQfKQh7mzsYPbyorvfaqwbtimrIwj208h5lDM3WDd1NqwTw1HHgIOJEWsw0NMo l56KvTuv1ipP1JHjILkvLmp6EDguZmIEjFdjvbHc7gkZdms8poO9HzbVlD7FHUA+DyjW26L yRdIpOoB1n6bICIWBIk4w== X-UI-Out-Filterresults: notjunk:1;V01:K0:C64O0P0bjRw=:vOIThThEdaN5d2KjpYWylH 9G8zvyJ74KWQVtPfson9gz3dZPK+shkz1RsDZhtS+LtYgNr698UpaDZSYPNug1B64o2Pv6k0N mfFTwnJGD04NqejV3K5Bx8zn2XLqFHKy7LRFYjxwCCn5iw5pzIOZq8R8NlmZSdKZSChxEth8K lKYVrQ8CtGhV69KRPRUBJ0zHxD8SGBI7htAeqzweqVy8S5pyiwIpUkKElwMGyol2xOcp8ywzk G1bNXFcKQcVMT1dGNGmi25TRG/GslaX29AqmzUq2J02GE6vAlrig/FqY2lC41tgXrkIub5lys 71zWMVktr3QL1HEtFXI5yPTdu32fy4cKxUlp0LZmEVdqswJtnjFkhfWKwevGx/tKuPPLSOU05 ViOfZ35NxsrOzQArde5pjfdDs3Lu4LXoda5JpnQHXm86f6md4J/pail/yMLmWku0jU+f+bH2z I3J7NLpiIcHxSE+Rno3hppUeu0LlF9MTMQ6ryJjexCS4URPUi7Qd4u02k8gHyOKnLWmugvkZ8 ldqdPjG0lHnoqnvhzR3o5WpHTAdOQ70RXKP7O4mRLPoOU+9pWWyo8yAnNNxgI/VHT+E6Ui1I5 CBBv1+gUIfDwuTNnKxeRF8Zm9JW584+26MkbE2C6MZjeKOgQ/B+TDiaVy0QAsyaE5EPjTja2X 7ITmTNs7mX8hzMMcnzOiKPQK+Oq+jUkW+X+tuBUDXM+gH+cM+00mXIyMmirVls6keLs2DUP3B kdbo7JYGMA1B7t7D Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1881 Lines: 39 On Wednesday, November 9, 2016 9:58:38 AM CET Anurup M wrote: > > > I also see that the compatible strings have the version included in > > them, and you can probably drop them by requiring them only in the > > fallback: > > > > compatible = "hisilicon,hip05-cpu-djtag", "hisilicon,djtag-v1"; > > compatible = "hisilicon,hip05-io-djtag", "hisilicon,djtag-v1"; > > compatible = "hisilicon,hip06-cpu-djtag", "hisilicon,djtag-v1"; > > compatible = "hisilicon,hip06-io-djtag", "hisilicon,djtag-v2"; > > compatible = "hisilicon,hip07-cpu-djtag", "hisilicon,djtag-v2"; > > compatible = "hisilicon,hip07-io-djtag", "hisilicon,djtag-v2"; > > > > We want to have the first entry be as specific as possible, but > > the last (second) entry is the one that can be used by the driver > > for matching. When a future hip08/hip09/... chip uses an existing > > interface, you then don't have to update the driver. > Thanks. I had a similar thought on this. So as I have the version string > in the > second entry "-v(1/2)". > I can use it in driver for matching. So i think I will change it as below. > Please correct me if my understanding is wrong. > > static const struct of_device_id djtag_of_match[] = { > - /* for hip05(D02) cpu die */ > - { .compatible = "hisilicon,hip05-cpu-djtag-v1", > + /* for hisi djtag-v1 cpu die */ > + { .compatible = "hisilicon,hisi-cpu-djtag-v1", > .data = djtag_readwrite_v1 }, > - /* for hip05(D02) io die */ > - { .compatible = "hisilicon,hip05-io-djtag-v1", > + /* for hisi djtag-v1 io die */ > + { .compatible = "hisilicon,hisi-io-djtag-v1", >From the code it looks like "hisilicon,hisi-io-djtag-v1" and "hisilicon,hisi-cpu-djtag-v1" have the same register-level interface, so we just need one compatible string for them to match the driver. Arnd