Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1664597
| From | Boris Brezillon <boris.brezillon@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 00/18] mtd: nand: denali: Denali NAND IP patch bomb |
| Date | 2017-06-13 10:40 +0200 |
| Message-ID | <tRPwK-5EB-11@gated-at.bofh.it> (permalink) |
| References | <tRMfv-3M1-1@gated-at.bofh.it> <tRO7E-4US-15@gated-at.bofh.it> <tRPdn-5yt-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 13 Jun 2017 17:17:41 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> Hi Boris,
>
>
> 2017-06-13 16:02 GMT+09:00 Boris Brezillon <boris.brezillon@free-electrons.com>:
>
> >
> > BTW, I also implemented ->read/write_buf_word() since the core may one
> > day call these functions, and the default implementations used by the
> > core when these hooks are NULL are not appropriate in your case.
> >
>
> BTW, why doesn't the default hook in the core do like this?
>
>
> static uint8_t nand_read_byte(struct mtd_info *mtd)
> {
> struct nand_chip *chip = mtd_to_nand(mtd);
> uint8_t byte;
>
> chip->read_buf(chip, &byte, 1);
> return byte;
> }
>
>
> ->read_byte() is a special case of ->read_buf() with length==1,
> so this should work.
Not sure it works for all implementation. ->read_byte() is expected
to return the lower 8 bits when interacting with a 16-bits bus. If we do
what you suggest, and ->read_buf() appears to be caching data in an
intermediate buffer if the amount of data is not aligned on 2 bytes,
you might retrieve data you don't care about when ->read_byte() is
called several times.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v6 00/18] mtd: nand: denali: Denali NAND IP patch bomb Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 02/18] mtd: nand: denali: remove unneeded find_valid_banks() Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 08/18] mtd: nand: denali: fix bank reset function to detect the number of chips Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 01/18] mtd: nand: denali: set NAND_ECC_CUSTOM_PAGE_ACCESS Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 16/18] mtd: nand: denali: use non-managed kmalloc() for DMA buffer Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 09/18] mtd: nand: denali: use interrupt instead of polling for bank reset Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 07/18] mtd: nand: denali: switch over to cmd_ctrl instead of cmdfunc Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 05/18] mtd: nand: denali: fix NAND_CMD_STATUS handling Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 18/18] mtd: nand: denali: avoid magic numbers and rename for clarification Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 15/18] mtd: nand: denali: skip driver internal bounce buffer when possible Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 03/18] mtd: nand: denali: handle timing parameters by setup_data_interface() Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 06/18] mtd: nand: denali: fix NAND_CMD_PARAM handling Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 13/18] mtd: nand: denali: fix raw and oob accessors for syndrome page layout Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 17/18] mtd: nand: denali: enable bad block table scan Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 11/18] mtd: nand: denali: merge struct nand_buf into struct denali_nand_info Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 14/18] mtd: nand: denali: support hardware-assisted erased page detection Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:10 +0200
[PATCH v6 12/18] mtd: nand: denali: use flag instead of register macro for direction Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:20 +0200
[PATCH v6 04/18] mtd: nand: denali: rework interrupt handling Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:20 +0200
[PATCH v6 10/18] mtd: nand: denali: propagate page to helpers via function argument Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 07:20 +0200
Re: [PATCH v6 00/18] mtd: nand: denali: Denali NAND IP patch bomb Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-13 09:10 +0200
Re: [PATCH v6 00/18] mtd: nand: denali: Denali NAND IP patch bomb Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 10:10 +0200
Re: [PATCH v6 00/18] mtd: nand: denali: Denali NAND IP patch bomb Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-13 10:30 +0200
Re: [PATCH v6 00/18] mtd: nand: denali: Denali NAND IP patch bomb Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 10:20 +0200
Re: [PATCH v6 00/18] mtd: nand: denali: Denali NAND IP patch bomb Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-06-13 10:40 +0200
Re: [PATCH v6 00/18] mtd: nand: denali: Denali NAND IP patch bomb Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-06-13 11:00 +0200
csiph-web