diff options
author | 2019-04-02 13:03:02 +0900 | |
---|---|---|
committer | 2019-04-18 08:54:02 +0200 | |
commit | 0e604fc9cffc7c4e3226280bcb35d9870581afc8 (patch) | |
tree | 7375a169c123b446b821c259f1aab8be22dce317 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | mtd: rawnand: denali: use more nand_chip pointers for internal functions (diff) | |
download | linux-dev-0e604fc9cffc7c4e3226280bcb35d9870581afc8.tar.xz linux-dev-0e604fc9cffc7c4e3226280bcb35d9870581afc8.zip |
mtd: rawnand: denali: refactor raw page accessors
The Denali IP adopts the syndrome page layout (payload and ECC are
interleaved). The *_page_raw() and *_oob() callbacks are complicated
because they must hide the underlying layout used by the hardware,
and always return contiguous in-band and out-of-band data.
The Denali IP cannot reuse nand_{read,write}_page_raw_syndrome()
in nand_base.c because its hardware ECC engine skips some of first
bytes in OOB. That is why this driver implements specially-crafted
*_page_raw() and *_oob() hooks.
Currently, similar code is duplicated to reorganize the data layout.
For example, denali_read_page_raw() and denali_write_page_raw() look
almost the same. The complexity is partly due to the DMA transfer
used for better performance of *_page_raw() accessors.
On second thought, we do not need to care about their performance
because MTD_OPS_RAW is rarely used.
Let's focus on code cleanups rather than the performance. This commit
removes the internal buffer for DMA, and factors out as much code as
possible.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions