All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Shijie <b32955@freescale.com>
To: "Gupta, Pekon" <pekon@ti.com>
Cc: Brian Norris <computersforpeace@gmail.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"Balbi, Felipe" <balbi@ti.com>,
	"ezequiel.garcia@free-electrons.com"
	<ezequiel.garcia@free-electrons.com>,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH] mtd: nand: auto-detection of NAND bus-width from ONFI param or nand_id[]
Date: Tue, 26 Nov 2013 17:22:03 +0800	[thread overview]
Message-ID: <5294683B.6010704@freescale.com> (raw)
In-Reply-To: <20980858CB6D3A4BAE95CA194937D5E73EA4ECA1@DBDE04.ent.ti.com>

于 2013年11月26日 15:49, Gupta, Pekon 写道:
>> From: Huang Shijie [mailto:b32955@freescale.com]
> [...]
>>> @@ -3033,6 +3028,12 @@ static int nand_flash_detect_onfi(struct
>> mtd_info *mtd, struct nand_chip *chip,
>>>    	}
>> If it is 16bit bus, could we reconfigure the bus width in here?
>> it's better to limit the influence only in the ONFI code.
>>
> Yes I too wanted same, but then once a device is found in
> nand_flash_id[] table, ONFI probe is not done ..
> Refer below code in nand_base.c
> 	@@ nand_get_flash_type()
> 	if (!type->name || !type->pagesize) {
> 			/* Check is chip is ONFI compliant */
> 			if (nand_flash_detect_onfi(mtd, chip,&busw))
>
> Thus, if we want to truly auto-detection, then we need to
> set bus-width in both cases
> (1) when NAND device is detected based on nand_flash_id[] table
If the bus-width is not the same. we'd better return with -EINVAL to tell
the user that he has a wrong configuration.

so i do not suggest we remove the -EINVAL code of nand_get_flash_type().
(I am not sure whether we should remove the NAND_BUSWIDTH_AUTO, let 
Brian judge it)


> (2) when NAND device is detected based on ONFI probe
>
Just as suspend/resume, if we do the same thing in the ONFI probe,

we do not need to remove the -EINVAL code of the nand_get_flash_type().


thanks
Huang Shijie

  reply	other threads:[~2013-11-26  9:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 12:32 [PATCH] mtd: nand: auto-detection of NAND bus-width from ONFI param or nand_id[] Pekon Gupta
2013-11-25 12:56 ` Ezequiel Garcia
2013-11-25 13:26   ` Gupta, Pekon
2013-11-25 13:32     ` Gupta, Pekon
2013-11-25 14:52     ` Ezequiel Garcia
2013-11-26  7:59       ` Gupta, Pekon
2013-11-26 12:42         ` Ezequiel Garcia
2013-11-27  6:03           ` Gupta, Pekon
2013-11-26  7:31 ` Huang Shijie
2013-11-26  7:49   ` Gupta, Pekon
2013-11-26  9:22     ` Huang Shijie [this message]
2013-11-26 12:45       ` Ezequiel Garcia
2013-11-29 12:18 ` Ezequiel Garcia
2013-11-29 12:28   ` Gupta, Pekon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5294683B.6010704@freescale.com \
    --to=b32955@freescale.com \
    --cc=balbi@ti.com \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=pekon@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.