Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757253AbcK3IIK (ORCPT ); Wed, 30 Nov 2016 03:08:10 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:46411 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757058AbcK3IHw (ORCPT ); Wed, 30 Nov 2016 03:07:52 -0500 Date: Wed, 30 Nov 2016 09:07:49 +0100 From: Boris Brezillon To: Masahiro Yamada Cc: linux-mtd@lists.infradead.org, Linux Kernel Mailing List , Marek Vasut , Brian Norris , Richard Weinberger , David Woodhouse , Cyrille Pitchen Subject: Re: [PATCH 28/39] mtd: nand: denali: move multi NAND fixup code to a helper function Message-ID: <20161130090749.37484fff@bbrezillon> In-Reply-To: References: <1480183585-592-1-git-send-email-yamada.masahiro@socionext.com> <1480183585-592-29-git-send-email-yamada.masahiro@socionext.com> <20161127172456.5dba79f2@bbrezillon> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1948 Lines: 60 On Wed, 30 Nov 2016 15:09:27 +0900 Masahiro Yamada wrote: > Hi Boris, > > > 2016-11-28 1:24 GMT+09:00 Boris Brezillon : > > On Sun, 27 Nov 2016 03:06:14 +0900 > > Masahiro Yamada wrote: > > > >> Collect multi NAND fixups into a helper function instead of > >> scattering them in denali_init(). > > > > Can you tell me more about this multi-NAND feature? > > The core is already able to detect multi-die NAND chips in a generic > > way, > > This is not the case. > > > but I fear this is something else, like "put two 8-bits chips on a > > 16bits bus to emulate a single 16bits chip". > > Yes, it is. > > (I have never used this controller like that. > But, I am pretty sure it is > from the code and the > Denali's User Guide mentions such usage.) > > > Just in case, I will clearly rephrase the comment block like follows in v2: > > /* > * Support for multi device: > * When the IP configuration is x16 capable and two x8 chips are > * connected in parallel, DEVICES_CONNECTED should be set to 2. > * In this case, the core framework knows nothing about this fact, > * so we should tell it the _logical_ pagesize and anything necessary. > */ > BTW, you should also set the NAND_BUSWIDTH_16 flag in this case. > > > > > If that's a case, and this feature is actually used, then it's a bad > > idea IMHO. > > For example, how do you handle the case where one block is bad on a > > chip but not on the other? And I fear this is not the only problem > > with this approach :-/. > > As you expect, if one block is bad, > the correspond block on the other chip can not be used. > Hm, last time I thought about this usage I found others things that could cause problems, but I can't remember exactly what. Anyway, if this feature is already used, let's keep it.