OSDN Git Service

mtd: nand: denali: support direct addressing mode
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 22 Sep 2017 03:46:48 +0000 (12:46 +0900)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Fri, 22 Sep 2017 07:04:38 +0000 (09:04 +0200)
commit29c4dd928735d5668b3108d350c30be7d0dc68fb
tree353d1201d74855365fe512646a67c069e870db5b
parentc70b5eb20a5dd9b3e4f68e041ad7526c94a2945e
mtd: nand: denali: support direct addressing mode

The Denali NAND IP core decodes the lower 28 bits of the slave address
to get the control information; bit[27:26]=mode, bit[25:24]=bank, etc.
This means 256MB address range must be allocated for this IP.  (Direct
Addressing)

For systems with address space limitation, the Denali IP provides an
optional module that translates the addressing - address and data are
latched by the registers in the translation module. (Indexed Addressing)

The addressing mode can be selected when the delivered RTL is configured,
and it can be read out from the FEATURES register.

Most of SoC vendors would choose Indexed Addressing to save the address
space, but Direct Addressing is possible as well, and it can be easily
supported by adding ->host_{read,write} hooks.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/denali.c
drivers/mtd/nand/denali.h