From: Thomas Gleixner <tglx@linutronix.de>
To: Vitaly Wool <vitalywool@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [patch/respin] generic nand driver for SoCs
Date: Wed, 02 May 2007 19:24:41 +0200 [thread overview]
Message-ID: <1178126681.25504.30.camel@localhost.localdomain> (raw)
In-Reply-To: <20070502153859.00005173.vitalywool@gmail.com>
On Wed, 2007-05-02 at 15:38 +0400, Vitaly Wool wrote:
> +#ifdef CONFIG_MTD_PARTITIONS
> + if (pdata->chip.part_probe_types) {
> + res = parse_mtd_partitions(&data->mtd,
> + pdata->chip.part_probe_types,
> + &data->parts, 0);
> + if (res > 0) {
> + add_mtd_partitions(&data->mtd, data->parts, res);
> + return 0;
> + }
> + } else if (pdata->chip.partitions) {
> + data->parts = pdata->chip.partitions;
> + res = add_mtd_partitions(&data->mtd, data->parts,
> + pdata->chip.nr_partitions);
> + }
Hmm, this looks wrong. When the probing fails, then you do not add
anything at all. You might at least add the device then.
> +config MTD_NAND_PLATFORM
> + tristate "Support for generic NAND driver"
s/generic/generic platform /
> + depends on MTD_NAND
> + help
> + This driver enables support for common on-SoC NAND devices.
> +
> endmenu
> Index: linux-2.6/drivers/mtd/nand/Makefile
> ===================================================================
> --- linux-2.6.orig/drivers/mtd/nand/Makefile
> +++ linux-2.6/drivers/mtd/nand/Makefile
> @@ -25,6 +25,7 @@ obj-$(CONFIG_MTD_NAND_CS553X) += cs553x
> obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o
> obj-$(CONFIG_MTD_NAND_AT91) += at91_nand.o
> obj-$(CONFIG_MTD_NAND_BASLER_EXCITE) += excite_nandflash.o
> +obj-$(CONFIG_MTD_NAND_PLATFORM) += gen_nand.o
Can you please rename to plat_nand so we have am immidiate idea what it
is ?
> nand-objs := nand_base.o nand_bbt.o
> cafe_nand-objs := cafe.o cafe_ecc.o
> Index: linux-2.6/include/linux/mtd/nand.h
> ===================================================================
> --- linux-2.6.orig/include/linux/mtd/nand.h
> +++ linux-2.6/include/linux/mtd/nand.h
> @@ -559,6 +559,7 @@ extern int nand_do_read(struct mtd_info
> * @chip_delay: R/B delay value in us
> * @options: Option flags, e.g. 16bit buswidth
> * @ecclayout: ecc layout info structure
> + * @part_probe_types: NULL-terminated array of probe types
> * @priv: hardware controller specific settings
> */
> struct platform_nand_chip {
> @@ -569,6 +570,7 @@ struct platform_nand_chip {
> struct nand_ecclayout *ecclayout;
> int chip_delay;
> unsigned int options;
> + const char **part_probe_types;
> void *priv;
> };
Please fold this into the other patch, which touches nand.h and add a
proper changelog.
Please add proper changelog description for the platform driver as well.
Thanks,
tglx
prev parent reply other threads:[~2007-05-02 17:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-02 11:38 [patch/respin] generic nand driver for SoCs Vitaly Wool
2007-05-02 17:24 ` Thomas Gleixner [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=1178126681.25504.30.camel@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=linux-mtd@lists.infradead.org \
--cc=vitalywool@gmail.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