From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Oleksij Rempel <linux@rempel-privat.de>
Cc: computersforpeace@gmail.com, linux-mtd@lists.infradead.org
Subject: Re: [PATCH RFC v2] mtd: nand: add asm9260 NFC driver
Date: Tue, 30 Dec 2014 20:09:46 +0100 [thread overview]
Message-ID: <20141230200946.277c56c0@bbrezillon> (raw)
In-Reply-To: <1419962972-5845-1-git-send-email-linux@rempel-privat.de>
Hi Oleksij,
I haven't reviewed the driver code yet, but highlighted warnings
reported by checkpatch.
I'll try to give a full review soon.
On Tue, 30 Dec 2014 19:09:32 +0100
Oleksij Rempel <linux@rempel-privat.de> wrote:
> Add driver for Nand Flash Controller used on Alphascales ASM9260 chips.
> The IP core of this controller has some similarities with
> Evatronix NANDFLASH-CTRL IP (unkown revision), so probably it can be reused
WARNING: 'unkown' may be misspelled - perhaps 'unknown'?
#20:
Evatronix NANDFLASH-CTRL IP (unkown revision), so probably it can be
reused
> by some other SoCs.
>
> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
> ---
> drivers/mtd/nand/Kconfig | 7 +
> drivers/mtd/nand/Makefile | 1 +
> drivers/mtd/nand/asm9260_nand.c | 989 ++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 997 insertions(+)
> create mode 100644 drivers/mtd/nand/asm9260_nand.c
>
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index dd10646..580a608 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -41,6 +41,13 @@ config MTD_SM_COMMON
> tristate
> default n
>
> +config MTD_NAND_ASM9260
> + tristate "NFC support for ASM9260 SoC"
> + depends on OF
> + default n
> + help
> + Enable support for the NAND controller found on Alphascale ASM9260 SoC.
> +
> config MTD_NAND_DENALI
> tristate "Support Denali NAND controller"
> depends on HAS_DMA
> diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
> index 9c847e4..08d660a 100644
> --- a/drivers/mtd/nand/Makefile
> +++ b/drivers/mtd/nand/Makefile
[...]
> +
> +static int __init asm9260_nand_cached_config(struct asm9260_nand_priv *priv)
> +{
> + struct nand_chip *nand = &priv->nand;
> + struct mtd_info *mtd = &priv->mtd;
> + u32 addr_cycles, col_cycles, pages_per_block;
> +
> + pages_per_block = mtd->erasesize / mtd->writesize;
> + /* max 256P, min 32P */
> + if (pages_per_block & ~(0x000001e0)) {
> + dev_err(priv->dev, "Unsuported erasesize 0x%x\n",
WARNING: 'Unsuported' may be misspelled - perhaps 'Unsupported'?
#732: FILE: drivers/mtd/nand/asm9260_nand.c:666:
+ dev_err(priv->dev, "Unsuported erasesize 0x%x\n",
> + mtd->erasesize);
> + return -EINVAL;
> + }
> +
> + /* max 32K, min 256. */
> + if (mtd->writesize & ~(0x0000ff00)) {
> + dev_err(priv->dev, "Unsuported writesize 0x%x\n",
Ditto
> + mtd->erasesize);
> + return -EINVAL;
> + }
> +
[...]
> +
> + return 0;
> +}
> +
> +static const struct of_device_id asm9260_nand_match[] = {
> + {
> + .compatible = "alphascale,asm9260-nand",
WARNING: DT compatible string "alphascale,asm9260-nand" appears
un-documented -- check ./Documentation/devicetree/bindings/ #1036:
FILE: drivers/mtd/nand/asm9260_nand.c:970:
+ .compatible = "alphascale,asm9260-nand",
Add a patch documenting the DT bindings used by your driver.
WARNING: DT compatible string vendor "alphascale" appears un-documented
-- check ./Documentation/devicetree/bindings/vendor-prefixes.txt #1036:
FILE: drivers/mtd/nand/asm9260_nand.c:970:
+ .compatible = "alphascale,asm9260-nand",
Regards,
Boris
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-12-30 19:10 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 11:45 [PATCH RFC] Alphascale ASM9260 NAND controller driver Oleksij Rempel
2014-12-17 11:45 ` [PATCH RFC] mtd: nand: add asm9260 NFC driver Oleksij Rempel
2014-12-17 16:15 ` Boris Brezillon
2014-12-30 18:09 ` [PATCH RFC v2] " Oleksij Rempel
2014-12-30 19:09 ` Boris Brezillon [this message]
2014-12-31 12:58 ` [PATCH v3 1/3] " Oleksij Rempel
2014-12-31 12:58 ` Oleksij Rempel
2014-12-31 12:58 ` [PATCH v3 2/3] mtd: nand: add asm9260-nand devicetree documentation Oleksij Rempel
2014-12-31 17:01 ` Boris Brezillon
2014-12-31 12:58 ` [PATCH v3 3/3] mtd: nand: add Toshiba TC58NVG0S3E to nand_ids table Oleksij Rempel
2014-12-31 16:55 ` Boris Brezillon
2015-08-25 19:25 ` Brian Norris
2015-08-26 4:00 ` Oleksij Rempel
2015-09-01 21:29 ` Brian Norris
2014-12-31 16:48 ` [PATCH v3 1/3] mtd: nand: add asm9260 NFC driver Boris Brezillon
2014-12-31 17:26 ` Boris Brezillon
2015-01-01 20:18 ` Oleksij Rempel
2015-01-01 21:03 ` Boris Brezillon
2015-01-01 12:58 ` Boris Brezillon
2015-01-01 21:14 ` Boris Brezillon
2014-12-17 13:24 ` [PATCH RFC] Alphascale ASM9260 NAND controller driver Boris Brezillon
2014-12-17 14:36 ` Oleksij Rempel
2014-12-17 15:01 ` Oleksij Rempel
2014-12-17 15:01 ` Boris Brezillon
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=20141230200946.277c56c0@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=linux@rempel-privat.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.