Re: [PATCH] nand_base: detect more ONFI flash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sascha,

Le Wed, 10 Apr 2013 11:29:18 +0200,
Eric Bénard <eric@xxxxxxxxxx> a écrit :

> if the flash has a known type, the ONFI detection won't occur
> and thus we may not detect the right parameters.
> By testing both namd and pagesize, as done in the kernel, we
> can detect ONFI flash with know IDs.
> 
> As an example on an i.MX53 board :
> - without the patch :
> NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3
> (Micron NAND 1GiB 3,3V 8-bit), page size: 4096, OOB size: 128
> 
> - with the patch :
> ONFI flash detected ... ONFI param page 0 valid
> NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3
> (Micron MT29F8G08ABACAWP), page size: 4096, OOB size: 224
> 
> in the first case the OOB size is wrong.
> 
> Signed-off-by: Eric Bénard <eric@xxxxxxxxxx>
> ---
>  drivers/mtd/nand/nand_base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index fa10d95..5a4a52d 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -1188,7 +1188,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
>  	}
>  
>  	chip->onfi_version = 0;
> -	if (!type) {
> +	if (!type->name || !type->pagesize) {
>  		/* Check is chip is ONFI compliant */
>  		ret = nand_flash_detect_onfi(mtd, chip, &busw);
>  		if (ret)

please dont apply this patch as it breaks the support with an ONFI flash
not listed in the id tables. I'm reworking it right now.

Eric

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux