From: Brian Norris <computersforpeace@gmail.com>
To: John Crispin <blogic@openwrt.org>
Cc: David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org,
Boris Brezillon <boris.brezillon@free-electrons.com>
Subject: Re: [PATCH 4/6] MTD: lantiq: xway: add missing write_buf and read_buf to nand driver
Date: Mon, 4 Jan 2016 15:45:15 -0800 [thread overview]
Message-ID: <20160104234515.GG128501@google.com> (raw)
In-Reply-To: <1451941501-42952-5-git-send-email-blogic@openwrt.org>
On Mon, Jan 04, 2016 at 10:04:59PM +0100, John Crispin wrote:
> Signed-off-by: John Crispin <blogic@openwrt.org>
> ---
> drivers/mtd/nand/xway_nand.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/drivers/mtd/nand/xway_nand.c b/drivers/mtd/nand/xway_nand.c
> index c75a2bc..ef7c7ce 100644
> --- a/drivers/mtd/nand/xway_nand.c
> +++ b/drivers/mtd/nand/xway_nand.c
> @@ -136,6 +136,32 @@ static unsigned char xway_read_byte(struct mtd_info *mtd)
> return ret;
> }
>
> +static void xway_read_buf(struct mtd_info *mtd, u_char *buf, int len)
> +{
> + struct nand_chip *this = mtd->priv;
This is no longer legal. Use mtd_to_nand().
And please rebase (and test) your entire series on l2-mtd.git. It
doesn't apply:
http://linux-mtd.infradead.org/source.html
Thanks,
Brian
> + unsigned long nandaddr = (unsigned long) this->IO_ADDR_R;
> + unsigned long flags;
> + int i;
> +
> + spin_lock_irqsave(&ebu_lock, flags);
> + for (i = 0; i < len; i++)
> + buf[i] = ltq_r8((void __iomem *)(nandaddr | NAND_READ_DATA));
> + spin_unlock_irqrestore(&ebu_lock, flags);
> +}
> +
> +static void xway_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
> +{
> + struct nand_chip *this = mtd->priv;
> + unsigned long nandaddr = (unsigned long) this->IO_ADDR_W;
> + unsigned long flags;
> + int i;
> +
> + spin_lock_irqsave(&ebu_lock, flags);
> + for (i = 0; i < len; i++)
> + ltq_w8(buf[i], (void __iomem *)(nandaddr | NAND_WRITE_DATA));
> + spin_unlock_irqrestore(&ebu_lock, flags);
> +}
> +
> static int xway_nand_probe(struct platform_device *pdev)
> {
> struct nand_chip *this = platform_get_drvdata(pdev);
> @@ -177,6 +203,8 @@ static struct platform_nand_data xway_nand_data = {
> .dev_ready = xway_dev_ready,
> .select_chip = xway_select_chip,
> .read_byte = xway_read_byte,
> + .read_buf = xway_read_buf,
> + .write_buf = xway_write_buf,
> }
> };
>
> --
> 1.7.10.4
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2016-01-04 23:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 21:04 [PATCH 0/6] MTD: lantiq: xway: various nand fixes John Crispin
2016-01-04 21:04 ` [PATCH 1/6] MTD: lantiq: xway: fix invalid operator John Crispin
2016-01-04 23:33 ` Brian Norris
2016-01-04 21:04 ` [PATCH 2/6] MTD: lantiq: xway: the latched command should be persistent John Crispin
2016-01-04 21:04 ` [PATCH 3/6] MTD: lantiq: xway: remove endless loop John Crispin
2016-01-04 23:39 ` Brian Norris
2016-01-04 21:04 ` [PATCH 4/6] MTD: lantiq: xway: add missing write_buf and read_buf to nand driver John Crispin
2016-01-04 23:35 ` Brian Norris
2016-01-04 23:45 ` Brian Norris [this message]
2016-01-04 21:05 ` [PATCH 5/6] MTD: lantiq: xway: fix nand locking John Crispin
2016-01-04 23:36 ` Brian Norris
2016-01-04 21:05 ` [PATCH 6/6] MTD: lantiq: xway: allow request line masking John Crispin
2016-01-04 23:37 ` Brian Norris
2016-01-04 23:30 ` [PATCH 0/6] MTD: lantiq: xway: various nand fixes Brian Norris
2016-01-05 7:34 ` John Crispin
2016-01-05 17:53 ` Brian Norris
2016-01-05 18:44 ` John Crispin
2016-01-05 18:55 ` Brian Norris
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=20160104234515.GG128501@google.com \
--to=computersforpeace@gmail.com \
--cc=blogic@openwrt.org \
--cc=boris.brezillon@free-electrons.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
/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).