[PATCH] NAND Framework ONFI chip detection

From: Alexander Fedorov <alexander.fedorov_at_rtlservice.com>
Date: Tue, 21 May 2013 21:03:46 +0400
Hi all!

I'm writing NAND Flash controller driver for my Hackberry board.
And I found that NAND Framework does not properly detecting ONFI
compiliant chips.

First, ONFI specification says (p. 40
http://www.onfi.org/~/media/ONFI/specs/ONFI_1_0_Gold.pdf):

>The ONFI signature is the ASCII encoding of 'ONFI' where 'O' = 4Fh, 'N' = 4Eh, 'F' = 46h, 'I' = 49h.

But, current code check it for 'o', 'n', 'f', 'I'.

Second, function "onfi_read_parameter" (nand_generic.c) read
parameters page using this construction:
>NANDBUS_READ_BUFFER(nandbus, params, sizeof(struct onfi_params));

So, structure onfi_params must be declared as packed.

Proposed patch solves the problem for me.
Is this patch ok?

Received on Tue May 21 2013 - 15:03:48 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:37 UTC