From: Angus Clark <angus.clark@st.com>
To: Huang Shijie <b32955@freescale.com>
Cc: Marek Vasut <marex@denx.de>, Angus CLARK <angus.clark@st.com>,
Brian Norris <computersforpeace@gmail.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH] mtd: m25p80: add support for Spansion s25fl128s chip
Date: Mon, 9 Dec 2013 08:52:39 +0000 [thread overview]
Message-ID: <52A584D7.9030200@st.com> (raw)
In-Reply-To: <20131206100220.GA16069@shlinux2.ap.freescale.net>
Hi Huang,
On 12/06/2013 10:02 AM, Huang Shijie wrote:
> On Thu, Dec 05, 2013 at 10:55:34AM +0000, Angus Clark wrote:
>> static struct flash_info *__devinit fsm_jedec_probe(struct stm_spi_fsm *fsm)
>> {
>> uint8_t readid[MAX_READID_LEN];
>
> How long is the MAX_READID_LEN? 5 or 8?
At the moment, I have it set to 6 (for the Spansion 'S' generation devices). It
just needs to be set to the maximum READID length given in the table.
> Brian doubt that some NOR can not be read out more then 5 bytes.
I believe it is always safe to over-read the READID data. I have found that
devices either repeat the READID, or start returning 0x00 bytes.
>> sort(flash_types, ARRAY_SIZE(flash_types) - 1,
>> sizeof(struct flash_info), cmp_flash_info_readid_len, NULL);
>>
> If we keep the flash_types table be inserted by a specific order.
> We can remove this sort code.
>
We could do, but that relies on people adding entries in the correct order, and
the correct order in terms of the search leads to a table that is not so easy to
read -- my first version required an ordered table! I'm easy either way though,
there are clearly benefits to having an ordered table.
Cheers,
Angus
next prev parent reply other threads:[~2013-12-09 8:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-20 8:52 [PATCH] mtd: m25p80: add support for Spansion s25fl128s chip Huang Shijie
2013-11-20 9:30 ` Marek Vasut
2013-11-20 10:16 ` Angus Clark
2013-11-21 8:18 ` Huang Shijie
2013-11-21 9:17 ` Angus Clark
2013-11-21 9:48 ` Huang Shijie
2013-11-21 11:08 ` Angus Clark
[not found] ` <528EBDAE.7070408@freescale.com>
2013-12-04 23:58 ` Brian Norris
2013-12-05 2:20 ` Huang Shijie
2013-12-05 2:51 ` Brian Norris
2013-12-05 10:55 ` Angus Clark
2013-12-06 10:02 ` Huang Shijie
2013-12-09 8:52 ` Angus Clark [this message]
2013-12-12 4:17 ` Huang Shijie
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=52A584D7.9030200@st.com \
--to=angus.clark@st.com \
--cc=b32955@freescale.com \
--cc=computersforpeace@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=marex@denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).