Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1570509yba; Sat, 27 Apr 2019 02:19:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdIcvp1AqaPi/qu+4n8Jg8yhgiZJycn2hOo04nfgHpxKSc8Q1lq8J6Xt1VS2YjveM66P8v X-Received: by 2002:a63:fa54:: with SMTP id g20mr6418253pgk.242.1556356780745; Sat, 27 Apr 2019 02:19:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556356780; cv=none; d=google.com; s=arc-20160816; b=I6XpVWq8LOvSUjx70LSFpKzwDFO8gRE/z1S8ZV1bicRSRZihG8vqARa/TkuPr9JfSR xI1dLnsMSUo2b2RR0s91m7WMyUYdojoC60Szev1VI69nf75D6aXjTk1DEsZYglXMo3uX 3pRwzyurjdXy1rhS7YjYsLEU4qHfAj91Dwv30REvR2snNhVLcMYD6s4ZL9Hdx7kGYDTW mqGGqoQJUisjEWmEw4cqv6NIUXYlGCU6CZhv7jgBgCq/UWuzv2TcE4HVyE1xY7DYeBA9 4n5i1QuNDzSDny+Jc3gjsOalV9OIdXaTfCItBaFPoB6Y0PYfSiMoiYmMdSxX9TL2Z0Vn ThkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/hb48NMkmlzj9Z2K2KymFVflKlyk6IZOKN4i5SK2vlE=; b=BwdnfTIf7xM6N6cFD/xl07uDwVuKtb+px7ZQhtPKMvIjkKNFlE93I0Pwo4OECJQ8+M J6CmnC71PQEPtGCazNSxJJeizyi+2wW3/feG+me2+jHjnYvvpCWQl7qlPPp0nPmryL1Z UoiHZ6tRa0dc4QV1Esb+qDpX6z92Q5cII6U+lzhym2jLccr9Eo7U8n4Cr/G1fyZe50Hi jzsMTaDsl9pKBJNv2E6fDOt41pfwPxOcm6Z8wyq6tghRtWppMKKHUaT5LophIRqrjEKI XVwa6Rohf4u59TU8EeLtxR9SobQMSWAItKSyDXn6+6kraNIEPhN2WPbyy3dah49IYhaE 8C1g== 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 k9si16663384pls.343.2019.04.27.02.19.25; Sat, 27 Apr 2019 02:19:40 -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 S1726362AbfD0JST (ORCPT + 99 others); Sat, 27 Apr 2019 05:18:19 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:53606 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbfD0JST (ORCPT ); Sat, 27 Apr 2019 05:18:19 -0400 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990717AbfD0JSPYKUmC (ORCPT + 1 other); Sat, 27 Apr 2019 11:18:15 +0200 Date: Sat, 27 Apr 2019 11:18:06 +0200 From: Ladislav Michl To: Janusz Krzysztofik Cc: Miquel Raynal , Boris Brezillon , Aaro Koskinen , Tony Lindgren , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , linux-arm-kernel@lists.infradead.org, linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] mtd: rawnand: ams-delta: Drop board specific partition info Message-ID: <20190427091806.GA10143@lenoch> References: <20190324223344.24590-1-jmkrzyszt@gmail.com> <20190424180212.10830-1-jmkrzyszt@gmail.com> <20190424221428.GA4172@lenoch> <3173726.PU223hZCOI@z50> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3173726.PU223hZCOI@z50> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 25, 2019 at 08:42:22PM +0200, Janusz Krzysztofik wrote: > Hi Ladislav, > > On Thursday, April 25, 2019 12:14:28 AM CEST Ladislav Michl wrote: > > Hi Janusz, > > > > On Wed, Apr 24, 2019 at 08:02:12PM +0200, Janusz Krzysztofik wrote: > > > After recent modifications, only a hardcoded partition info makes > > > the driver device specific. Other than that, the driver uses GPIO > > > exclusively and can be used on any hardware. > > > > > > Drop the partition info and use MTD partition parser with default list > > > of parser names instead. For the OF parser to work correctly, pass > > > device of_node to mtd. > > > > > > Amstrad Delta users should append the following partition info to their > > > kernel command line, possibly embedding it in CONFIG_CMDLINE: > > > > > > mtdparts=ams-delta-nand:3584k(Kernel),256k(u-boot),256k(u-boot_params),\ > > > 256k(Amstrad_LDR),27m(File_system),768k(PBL_reserved) > > > > now, when driver is no longer Amstrad Delta specific, why would you want > > to have ams-delta-nand hardcoded on kernel cmdline? I'm assuming at some > > point this driver will become gpio-nand [*] or something like that and > > asking users to change their kernel cmdline twice is just unwise :) > > Hmm, I have no idea of a good name for the driver if not "gpio-nand". Can you > suggest one? gpio-nand is so good name that it should be worth merging gpio.c and ams-delta.c into gpio_nand.c :) > As a workaround, I can add a platform device id table to the driver with "ams- > delta-nand" as a supported device name in hope that survives possible future > driver renaming. > > > [*] btw, it is really shame gpio-nand name is already taken by driver > > living in drivers/mtd/nand/raw/gpio.c which is more likely gpio-mem-nand > > used by at least CompuLab CM-X255 and Picochip picoXcell. > > I think the best approach would be to expose NAND data ports of those machines > as GPIO ports, possibly reusing the "gpio-nand" driver code while creating a > new GPIO driver for them if "basic-mmio-gpio" occurs inappropriate, and use > the pure GPIO NAND driver on top. What about adding two fields into struct ams_delta_nand holding pointers to either ams_delta_{read,write}_buf (renamed to gpio_nand_...) or mmio r/w functions depending on driver configuration? > > Otherwise your work on this driver is so amazing that I just spent > > couple of hours finding that phone and compiling some decent userspace > > for it :) Thank you! > > I'm glad you like it :-) > Janusz Best regards, ladis