From: Ladislav Michl <ladis@linux-mips.org>
To: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
Boris Brezillon <bbrezillon@kernel.org>,
Aaro Koskinen <aaro.koskinen@iki.fi>,
Tony Lindgren <tony@atomide.com>,
Richard Weinberger <richard@nod.at>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>,
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
Date: Sat, 27 Apr 2019 11:18:06 +0200 [thread overview]
Message-ID: <20190427091806.GA10143@lenoch> (raw)
In-Reply-To: <3173726.PU223hZCOI@z50>
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
prev parent reply other threads:[~2019-04-27 9:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-19 22:37 [PATCH] mtd: rawnand: ams-delta: Drop board specific partition info Janusz Krzysztofik
2019-03-20 1:16 ` Aaro Koskinen
2019-03-24 16:48 ` Janusz Krzysztofik
2019-03-24 18:59 ` Aaro Koskinen
2019-03-24 19:24 ` H. Nikolaus Schaller
2019-03-24 20:40 ` Janusz Krzysztofik
2019-03-24 20:30 ` Janusz Krzysztofik
2019-03-24 22:33 ` [PATCH v2] " Janusz Krzysztofik
2019-04-17 9:40 ` Miquel Raynal
2019-04-17 23:09 ` Janusz Krzysztofik
2019-04-18 6:49 ` Miquel Raynal
2019-04-18 19:11 ` Janusz Krzysztofik
2019-04-24 18:02 ` [PATCH v3] " Janusz Krzysztofik
2019-04-24 22:14 ` Ladislav Michl
2019-04-25 18:42 ` Janusz Krzysztofik
2019-04-27 9:18 ` Ladislav Michl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190427091806.GA10143@lenoch \
--to=ladis@linux-mips.org \
--cc=aaro.koskinen@iki.fi \
--cc=bbrezillon@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=jmkrzyszt@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=marek.vasut@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).