From: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: dwmw2@infradead.org, computersforpeace@gmail.com,
matthias.bgg@gmail.com, robh@kernel.org,
linux-mtd@lists.infradead.org, xiaolei.li@mediatek.com,
daniel.thompson@linaro.org, erin.lo@mediatek.com,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH v3 2/2] mtd: mediatek: driver for MTK Smart Device Gen1 NAND
Date: Tue, 19 Apr 2016 17:16:28 -0400 [thread overview]
Message-ID: <5716A02C.6090900@linaro.org> (raw)
In-Reply-To: <20160419222446.052cfa63@bbrezillon>
On 04/19/2016 04:24 PM, Boris Brezillon wrote:
> On Mon, 11 Apr 2016 12:56:12 -0400
> Jorge Ramirez-Ortiz<jorge.ramirez-ortiz@linaro.org> wrote:
>
>
>> >+static int mtk_nfc_read_oob(struct mtd_info *mtd, struct nand_chip *chip,
>> >+ int page)
>> >+{
>> >+ u8 *buf = chip->buffers->databuf;
> You're touching ->databuf here, and the core uses this buffer for its
> internal cache. If want to use this buffer you have to invalidate the
> cache by setting chip->pagebuf to -1 first.
>
ack. we will use our private buffer instead as discussed on IRC.
static int mtk_nfc_write_oob(struct mtd_info *mtd, struct nand_chip *chip,
int page)
{
- u8 *data = chip->buffers->databuf;
+ struct mtk_nfc *nfc = nand_get_controller_data(chip);
int ret;
- memset(data, 0xff, mtd->writesize);
+ memset(nfc->buffer, 0xff, mtd->writesize);
chip->cmdfunc(mtd, NAND_CMD_SEQIN, 0x00, page);
- ret = mtk_nfc_write_page_hwecc(mtd, chip, data, 1, page);
+ ret = mtk_nfc_write_page_hwecc(mtd, chip, nfc->buffer, 1, page);
if (ret < 0)
return -EIO;
prev parent reply other threads:[~2016-04-19 21:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-11 16:56 [PATCH v3 0/2] MTK Smart Device Gen1 NAND Driver Jorge Ramirez-Ortiz
2016-04-11 16:56 ` [PATCH v3 1/2] mtd: mediatek: device tree docs for MTK Smart Device Gen1 NAND Jorge Ramirez-Ortiz
2016-04-11 23:15 ` Boris Brezillon
2016-04-12 1:17 ` Jorge Ramirez-Ortiz
2016-04-11 16:56 ` [PATCH v3 2/2] mtd: mediatek: driver " Jorge Ramirez-Ortiz
2016-04-17 22:17 ` Boris Brezillon
2016-04-19 14:26 ` Jorge Ramirez-Ortiz
2016-04-19 16:42 ` Boris Brezillon
2016-04-19 22:39 ` Jorge Ramirez-Ortiz
2016-04-18 8:01 ` Boris Brezillon
2016-04-19 20:24 ` Boris Brezillon
2016-04-19 21:16 ` Jorge Ramirez-Ortiz [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=5716A02C.6090900@linaro.org \
--to=jorge.ramirez-ortiz@linaro.org \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=daniel.thompson@linaro.org \
--cc=dwmw2@infradead.org \
--cc=erin.lo@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=robh@kernel.org \
--cc=xiaolei.li@mediatek.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).