From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752145AbdBUMDo (ORCPT ); Tue, 21 Feb 2017 07:03:44 -0500 Received: from mail1.bemta8.messagelabs.com ([216.82.243.199]:36144 "EHLO mail1.bemta8.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751936AbdBUMDe (ORCPT ); Tue, 21 Feb 2017 07:03:34 -0500 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOKsWRWlGSWpSXmKPExsVy+LrFKt3JOms iDJ5vFrM48GIhi8WRC2uZLe59P89sMXHlZGaL8+c3sFtsenyN1eLyrjlsFrublrFbHN1zj9mi 8/hJVovJO98wWvzdvonFYvOd2WwWt39tYHHg81jwayuLx+LT1xk9nmy6yOixc9Zddo/NK7Q8N q3qZPPYvKTe4+a8Qo/Nr18we/T/NfD4vEkugDuKNTMvKb8igTVj0/HP7AXvOCuavp5gbGDs5O hi5OIQEljGKPFpSztbFyMHh7BAhMT9B9xdjJwcIgIWEh0Pj7KB1DALNLJIPGrbyAySEBL4zig xpScDxGYTMJG4ef8cC4jNK+AsMffibFYQm0VAVeLL393sILaoQILExT9TWCFqBCVOznzCArKL U8BQomOrFEiYWUBfomnrHGYIW15i+9s5UKu0Jd5vXAzWKiGgIDF1civzBEb+WUgmzULSPgtJ+ wJG5lWMGsWpRWWpRbqGRnpJRZnpGSW5iZk5uoYGFnq5qcXFiempOYlJxXrJ+bmbGIERxgAEOx gnzHI+xCjJwaQkypsttSZCiC8pP6UyI7E4I76oNCe1+BCjDAeHkgSvjTZQTrAoNT21Ii0zBxj rMGkJDh4lEd5CkDRvcUFibnFmOkTqFKOilDivKEhCACSRUZoH1wZLL5cYZaWEeRmBDhHiKUgt ys0sQZV/xSjOwagkzGsOMoUnM68EbvoroMVMQItveqwEWVySiJCSamAUbW+486FdI/u4Q1nF3 buWLPLb+AIWVlfMt9qo1LXBV+Ov+aZSU/UPbcUHl/qts8ux2aRQsoehd1/bLnuvi+77T6zPVE 9TXrcvqLdtDldwbPXCS/zWiSebz1u9itwse3a53gcx5ikMmrEyi4MND2sevC2zY19P0JYXYYw Pvt2f7BK+S+9RZ6QSS3FGoqEWc1FxIgDZW4kUKgMAAA== X-Env-Sender: Marc_Gonzalez@sigmadesigns.com X-Msg-Ref: server-2.tower-94.messagelabs.com!1487678610!14473766!1 X-Originating-IP: [195.215.56.170] X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Subject: Re: [RESEND PATCH 1/3] mtd: nand: Pass the CS line to ->setup_data_interface() To: Boris Brezillon CC: Richard Weinberger , , Sascha Hauer , Sergio Prado , Wenyou Yang , Josh Wu , David Woodhouse , "Brian Norris" , Marek Vasut , Cyrille Pitchen , Krzysztof Kozlowski , , References: <1487625149-7234-1-git-send-email-boris.brezillon@free-electrons.com> <1487625149-7234-2-git-send-email-boris.brezillon@free-electrons.com> <20170221120648.19e0d32c@bbrezillon> From: Marc Gonzalez Message-ID: <45a843fb-c43e-711f-ce3a-4c0d44c48144@sigmadesigns.com> Date: Tue, 21 Feb 2017 13:02:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 SeaMonkey/2.48 MIME-Version: 1.0 In-Reply-To: <20170221120648.19e0d32c@bbrezillon> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.27.0.114] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/02/2017 12:06, Boris Brezillon wrote: > Marc Gonzalez wrote: > >> On 20/02/2017 22:12, Boris Brezillon wrote: >> >>> Some NAND controllers can assign different NAND timings to different >>> CS lines. Pass the CS line information to ->setup_data_interface() so >>> that the NAND controller driver knows which CS line is concerned by >>> the setup_data_interface() request. >> >> I'm confused, because I thought I was already doing that. >> On my platform, I have different timings for each chip. >> (thus, for each CS, right?) >> >> In chip->select_chip, I program the appropriate timings >> which the controller will be using. >> >> What am I missing? > > Maybe you don't have multi-dies chips, which is the case I'm fixing > here. If you have 2 separate chips, the existing hook should work just > fine. Right. You asked me to add an explicit: res = of_property_count_u32_elems(np, "reg"); if (res < 0) return res; if (res != 1) return -ENOTSUPP; /* Multi-CS chips are not supported */ I was under the impression that multi-die chips are seen as a single larger "composite" chip. And I had assumed that different dies would not only require identical timings, but would also be identical in all other aspects. This it incorrect? Regards.