[U-Boot] [PATCH 2/2] mtd: denali: support NAND_CMD_RNDOUT command
Scott Wood
scottwood at freescale.com
Fri Oct 10 00:31:29 CEST 2014
On Fri, 2014-10-03 at 20:03 +0900, Masahiro Yamada wrote:
> The function nand_flash_detect_ext_param_page() requires
> NAND_CMD_RNDOUT command supported. It is necessary to detect some
> types of ONFi-compliant devices. Without it, the error message
> "unsupported command received 0x5" is shown.
>
> Let's support this command on the Denali NAND controller driver.
>
> Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
> ---
>
> drivers/mtd/nand/denali.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
> index d9abc7e..308b784 100644
> --- a/drivers/mtd/nand/denali.c
> +++ b/drivers/mtd/nand/denali.c
> @@ -1072,6 +1072,13 @@ static void denali_cmdfunc(struct mtd_info *mtd, unsigned int cmd, int col,
> if (cmd == NAND_CMD_PARAM)
> udelay(50);
> break;
> + case NAND_CMD_RNDOUT:
> + addr = MODE_11 | BANK(denali->flash_bank);
> + index_addr(denali, addr | 0, cmd);
> + index_addr(denali, addr | 1, col & 0xFF);
> + index_addr(denali, addr | 1, col >> 8);
> + index_addr(denali, addr | 0, NAND_CMD_RNDOUTSTART);
> + break;
This usage of RNDOUT is a regression for other drivers as well, such as
fsl_ifc_nand... I really wish emulating a simple controller weren't the
API used to talk to higher level drivers. :-(
-Scott
More information about the U-Boot
mailing list