Received: by 10.223.164.221 with SMTP id h29csp801592wrb; Wed, 1 Nov 2017 05:48:03 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SNVTNUv+dgjO79Y9inW/9yDtz3lh2Fnsa3zznAKfZdhIWgCD94tpBggm7F+PYzTkLhn+RT X-Received: by 10.98.178.22 with SMTP id x22mr6891645pfe.123.1509540483089; Wed, 01 Nov 2017 05:48:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509540483; cv=none; d=google.com; s=arc-20160816; b=OmiS77YK85dPQVskPruomU2UvMxnYW+CgyO25dD+4I2gLQp4pOBtG/MOioXZyOV5bB IXu6Op/vD3spUM/LF12c4Ur63gqiCVX5tvOwYL+OVXAD0rIVCYgVoSyBT34iZs7P8Q/M sInXCs3nH0DRdA0kvSaXWVUIVikG/SQVVV+EjrgwzCSyK0Ds1XFooVb97MbdJsMqvgiA c/WlisMB5lxwtODclSmZWcMfVBpQ9o0Ig6ZIPiVKkzVeLtvRbdPyRKWQW28lRCNFmiUS qujGxcDt8w0FBq2IZSrCVMkPuOQhRLkdloskKSIYvQzathqkFk9iWA800/Q5hkT6F0+/ /PIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=9VimQwz64gWyOthuD70O9gJrja/ZFiKWorBmqV6A5uA=; b=s6kP5FjnnwUBvlkMLgR3fHcT1/kZQNU/KE463MrkwTbl9WQiNt77iMSVydXahJrG0+ vR4wrJFLtj8IGaqt8OgFjg4xIZ+yS3BdgOIqkoIhXk/FaQWIyRVmZP7OdTFVDdpbaKTZ WK4Bkr8W7dfuYmhitjfNp1RkQ63lpBdmZ9IDlJiZQqBMPvKJ5PPcdAmwHV6JfXj8EZZx b49lnNibA8EFZFRva1ZegO5q/ZiF71EW6F0OxW2e3Spp7OY7hHPdH9muxY97PemWHM0b KJ0qFnTR/2EDsIx9h8J6++Ro2RGAL/a3F5buGIeRaYDDI1exXSjL3aDpXatbtcn1vK0m aohg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si828166pgq.361.2017.11.01.05.47.49; Wed, 01 Nov 2017 05:48:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754660AbdKAMrJ (ORCPT + 99 others); Wed, 1 Nov 2017 08:47:09 -0400 Received: from smtp3-g21.free.fr ([212.27.42.3]:35670 "EHLO smtp3-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754496AbdKAMrI (ORCPT ); Wed, 1 Nov 2017 08:47:08 -0400 Received: from mountainer.wedev4u.int (unknown [82.232.94.13]) by smtp3-g21.free.fr (Postfix) with ESMTP id 3258A13F8A2; Wed, 1 Nov 2017 13:47:04 +0100 (CET) Subject: Re: linux-next: manual merge of the spi-nor tree with the imx-mxs tree To: Shawn Guo , Arnd Bergmann Cc: Mark Brown , Yuan Yao , Hou Zhiqiang , Rob Herring , Philipp Puschmann , linux-arm-kernel@lists.infradead.org, Linux-Next Mailing List , Linux Kernel Mailing List , Marek Vasut , Linux MTD Development List References: <20171030181551.skcvt4mr4br7rtn2@sirena.co.uk> <20171031021650.GC6270@dragon> From: Cyrille Pitchen Message-ID: Date: Wed, 1 Nov 2017 13:47:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171031021650.GC6270@dragon> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org + linux-mtd Le 31/10/2017 à 03:16, Shawn Guo a écrit : > On Tue, Oct 31, 2017 at 01:42:30AM +0100, Cyrille Pitchen wrote: >> Hi all, >> >> + Marek >> >> Mark, thanks for this report. >> >> Shawn, Yuan, if I don't make a mistake, patch "dt-bindings: mtd: add sst25wf040b >> and en25s64 to sip-nor list" was not submitted to the linux-mtd mailing list >> hence was neither reviewed nor acked by any spi-nor maintainer. If so, such a >> patch should then be taken from the spi-nor/next branch of the l2-mtd tree. > > I see the patch was Acked by DT maintainer and so applied it as part of > the series. I will leave such mtd bindings patch to l2-mtd maintainers > in the future. > >> So Shawn, could you please remove this patch from your tree ? > > I have already sent the patch to my upstream maintainers (arm-soc). I > guess it's okay to leave such trivial conflict to Linus. @Arnd, what do > you think? > My concern is not about the conflict, which indeed is trivial, but about the fact that this patch should not be applied at all. I would have like to discuss it on the linux-mtd mailing list since the jedec,spi-nor.txt is maintained by MTD / spi-nor folks. Some memory parts like mr25h128 don't support at all the JEDEC READ ID (9Fh) command. In such a case, the "jedec,spi-nor" string is not suited as a value inside the 'compatible' DT property because the memory is not JEDEC compliant. In that precise case, we have no other choice but to use another 'compatible' value, that's why we rely on chip name. However, for memory parts that do support the JEDEC READ ID command, like en25s64 and sst25wf040b, we require that the 'compatible' DT property includes the "jedec,spi-nor" string. I guess for *legacy reasons*, the chip name MAY be included too but this is not needed and actually may have side effects, especially when the SPI NOR memory is handled by the m25p80 driver. When possible, it's better to set the 2nd parameter of spi_nor_scan() to NULL. My understanding is that is parameter is there for historical reason and is only used for: 1 - backward compatibility, when DT and the "jedec,spi-nor" 'compatible' string were not introduced yet. 2 - provide the chip name of non-JEDEC memories. So currently, I advise to avoid adding the chip name in the 'compatible' string when not needed then to set it to "jedec,spi-nor" alone. Also I think we should add new chip names in the "jedec,spi-nor.txt" file only for non JEDEC memory parts, that is to say, when we have no other choice. This is my current feeling and I would have like to have a chance to discuss it first with Marek and other MTD guys before taking a decision because at the spi-nor side we've already had bad surprises with chip names / Jedec ID mismatches. So IMHO, chip names are not so reliable and we should avoid to use them when possible. For instance, as long as they are not used in device trees, we can still try to fix inconsistent naming in the entries of the spi_nor_ids[] array of the drivers/mtd/spi-nor/spi-nor.c. In most cases the name is only informational, not use for other purpose than display. However, when the 2nd parameter of spi_nor_scan() is not NULL, which is not true in the general case, the name is used as an index to find out the relevant entry from the spi_nor_ids[] array. Such mechanism should be used only for non-JEDEC memories, though the spi-nor driver can handle the case where the 'compatible' DT property is set to compatible = ",", "jedec,spi-nor"; In such a case, and only when driven by the m25p80 driver, the string is provided as the 2nd argument of spi_nor_scan(). This function first tries to look up the proper spi_nor_ids[] entry based on the then reads the JEDEC ID and uses it as another index in the spi_nor_ids[] array to find the real entry. If both entries, the one found by name and the one found by JEDEC ID, don't match, the spi-nor driver display a warning and keep the entry found by ID. So adding the chip name in the 'compatible' string of JEDEC memories is in the best case useless. That's why, for now, I still think this patch should not be applied at all, at least, not before having been reviewed and accepted by MTD guys. Best regards, Cyrille > Shawn > >> Yuan, could you please submit your patch to the linux-mtd mailing list for >> proper review ? >> >> Best regards, >> >> Cyrille >> >> >> Le 30/10/2017 à 19:15, Mark Brown a écrit : >>> Hi Cyrille, >>> >>> Today's linux-next merge of the spi-nor tree got a conflict in: >>> >>> Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt >>> >>> between commit: >>> >>> b07815d4eaf65 ("dt-bindings: mtd: add sst25wf040b and en25s64 to sip-nor list") >>> >>> from the imx-mxs tree and commit: >>> >>> 282e45dc64d1 ("mtd: spi-nor: Add support for mr25h128") >>> >>> from the spi-nor tree. >>> >>> I fixed it up (see below) and can carry the fix as necessary. This >>> is now fixed as far as linux-next is concerned, but any non trivial >>> conflicts should be mentioned to your upstream maintainer when your tree >>> is submitted for merging. You may also want to consider cooperating >>> with the maintainer of the conflicting tree to minimise any particularly >>> complex conflicts. >>> >>> diff --cc Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt >>> index 4cab5d85cf6f,956bb046e599..000000000000 >>> --- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt >>> +++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt >>> @@@ -13,7 -13,7 +13,8 @@@ Required properties >>> at25df321a >>> at25df641 >>> at26df081a >>> + en25s64 >>> + mr25h128 >>> mr25h256 >>> mr25h10 >>> mr25h40 >>> >> From 1582739115455518122@xxx Tue Oct 31 02:40:43 +0000 2017 X-GM-THRID: 1582710934258317003 X-Gmail-Labels: Inbox,Category Forums