From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753762AbbDPRCe (ORCPT ); Thu, 16 Apr 2015 13:02:34 -0400 Received: from down.free-electrons.com ([37.187.137.238]:33770 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751628AbbDPRC0 (ORCPT ); Thu, 16 Apr 2015 13:02:26 -0400 Message-ID: <552FEA74.5020909@free-electrons.com> Date: Thu, 16 Apr 2015 13:59:32 -0300 From: Ezequiel Garcia User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Sebastian Hesselbarth , Antoine Tenart , dwmw2@infradead.org, computersforpeace@gmail.com CC: boris.brezillon@free-electrons.com, zmxu@marvell.com, jszhang@marvell.com, linux-arm-kernel@lists.infradead.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Robert Jarzmik Subject: Re: [PATCH v4 04/10] mtd: pxa3xx_nand: rework flash detection and timing setup References: <1429118648-19416-1-git-send-email-antoine.tenart@free-electrons.com> <1429118648-19416-5-git-send-email-antoine.tenart@free-electrons.com> <552EB7F0.2090106@gmail.com> <552FB4DF.1030403@free-electrons.com> <552FBC0E.20004@gmail.com> In-Reply-To: <552FBC0E.20004@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/16/2015 10:41 AM, Sebastian Hesselbarth wrote: > On 04/16/2015 03:10 PM, Ezequiel Garcia wrote: >> On 04/15/2015 04:11 PM, Sebastian Hesselbarth wrote: >>> On 15.04.2015 19:24, Antoine Tenart wrote: >>>> Rework the pxa3xx_nand driver to allow using functions exported by the >>>> nand framework to detect the flash and to configure the timings. >>>> >>>> Because this driver supports some non-ONFI devices, we also keep the >>>> custom timing setup of this driver so these devices won't break. >>>> >>>> Signed-off-by: Antoine Tenart >>>> --- >>> [...] >>> How about we get rid of the driver specific timings completely >>> and pick up the best onfi timing match instead? The nand_ids table >>> allows for a default_onfi_timing parameter even if onfi itself is >>> not supported. >>> >>> For generic flash, i.e. no specific entry in the nand_ids table, >>> we either choose onfi mode 0 (most conservative) or an even slower >>> one. >>> >> >> I think Robert mentioned [1] that using "ONFI default timings" on >> non-ONFI devices didn't work for him. >> >> [1] https://lkml.org/lkml/2015/3/8/124 > > Ok, I see. But there is still the option to pass board specific > timings with driver's platform_data. We could use > > (a) pdata timings if passed > (b) onfi timings if available > (c) equivalent onfi timings if set > (d) conservative equivalent onfi timings otherwise > Right, using platform_data sounds like a nice compromise solution. I'm willing to accept this series with the current timing rework; and leave the timing setup in-driver replacement for followup patches. > All we need is a function to convert sdr_timings to sane driver > timings. And we really need to split this patch into tiny pieces > otherwise it is not reviewable - or at least I need a full overview > about the driver first. > I think that's a bit of a different issue. This patch seems to be doing two things: it removes the in-driver flash detection *and* reworks timing setup. How about we split this in two or even three patches? Along these lines: 1) introduce timing helpers, 2) rework timing setup, 3) remove in-driver flash detection. Not sure how feasible it is. > Also, as soon as Robert moves pxa3xx boards fully to DT, we'll loose > the pdata timings option above. *sigh* > Well, such move would include proper timing DT properties for non-ONFI devices. -- Ezequiel García, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com