From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] sf: stmicro: support JEDEC standard two-byte signature
Date: Wed, 1 Aug 2012 13:53:04 -0400 [thread overview]
Message-ID: <201208011353.05315.vapier@gentoo.org> (raw)
In-Reply-To: <1342202839-6110-1-git-send-email-linz@li-pro.net>
On Friday 13 July 2012 14:07:18 Stephan Linz wrote:
> There are more than the M25Pxx serial flashs that can be
> used with the stmicro driver, for example: the M25PXxx or
> N25Qxx serie. All these chips have burned in the original
> stmicro manufacture id 0x20 together with a standard
> two-byte signature.
can you rebase onto mainline and re-post ?
> --- a/drivers/mtd/spi/stmicro.c
> +++ b/drivers/mtd/spi/stmicro.c
>
> for (i = 0; i < ARRAY_SIZE(stmicro_spi_flash_table); i++) {
> params = &stmicro_spi_flash_table[i];
> - if (params->idcode1 == idcode[2]) {
> + if (params->id == ((idcode[1] << 8) | idcode[2]))
> break;
> - }
> }
can you add a local u16 variable and store the computation of the idcode here
to that above the for loop ?
> if (i == ARRAY_SIZE(stmicro_spi_flash_table)) {
> - debug("SF: Unsupported STMicro ID %02x\n", idcode[1]);
> + debug("SF: Unsupported STMicro ID %02x%02x\n",
> + idcode[1], idcode[2]);
then here you can simply change:
%02x -> %04x
idcode[1] -> <new var>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120801/96268ffa/attachment.pgp>
prev parent reply other threads:[~2012-08-01 17:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-13 18:07 [U-Boot] [PATCH 1/2] sf: stmicro: support JEDEC standard two-byte signature Stephan Linz
2012-07-13 18:07 ` [U-Boot] [PATCH 2/2] sf: stmicro: add support N25Q128 parts Stephan Linz
2012-08-01 17:53 ` Mike Frysinger
2012-08-01 21:24 ` Stephan Linz
2012-08-01 17:53 ` Mike Frysinger [this message]
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=201208011353.05315.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=u-boot@lists.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