public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Reinhard Meyer <u-boot@emk-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] sf: ramtron: new spi fram driver
Date: Wed, 13 Oct 2010 09:44:52 +0200	[thread overview]
Message-ID: <4CB56374.7040901@emk-elektronik.de> (raw)
In-Reply-To: <1286785742-1772-2-git-send-email-vapier@gentoo.org>

Dear Mike Frysinger,
> From: Reinhard Meyer <u-boot@emk-elektronik.de>
> 
> Supports most types that support Read-Id and the FM25H20.
> 
> Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---

[snippebedip]


> +#ifdef CONFIG_SPI_FRAM_RAMTRON
> +	{ 6, 0xc2, spi_fram_probe_ramtron, },
> +# undef IDCODE_CONT_LEN
> +# define IDCODE_CONT_LEN 6
> +#endif

That code should only increase the IDCODE_CONT_LEN, not
set it to a value. It might have been set larger by a 
previous #ifdef.

+#ifdef CONFIG_SPI_FRAM_RAMTRON
+	{ 6, 0xc2, spi_fram_probe_ramtron, },
+# if IDCODE_CONT_LEN < 6
+#  undef IDCODE_CONT_LEN
+#  define IDCODE_CONT_LEN 6
+# endif
+#endif

Even "nicer" and maybe better understandable could be:

+#ifdef CONFIG_SPI_FRAM_RAMTRON
+# define RAMTRON_CONT_LEN 6
+	{ RAMTRON_CONT_LEN, 0xc2, spi_fram_probe_ramtron, },
+# if IDCODE_CONT_LEN < RAMTRON_CONT_LEN
+#  undef IDCODE_CONT_LEN
+#  define IDCODE_CONT_LEN RAMTRON_CONT_LEN
+# endif
+#endif

I cannot test all this right now. Maybe you put just the probing
part (1/2) into mainline, once all my local ahead-of-MASTER and posted
patches are in mainline, I'll do a big rebase and fix session here and
post a new ramtron patch.

Reinhard

  reply	other threads:[~2010-10-13  7:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05 14:56 [U-Boot] [PATCH V5 0/2] Patches to support Ramtron FRAMs Reinhard Meyer
2010-10-05 14:56 ` [U-Boot] [PATCH V5 1/2] MTD/SPI: introduce table driven probing Reinhard Meyer
2010-10-05 14:56   ` [U-Boot] [PATCH V5 2/2] MTD/SPI: add support for Ramtron FRAMs Reinhard Meyer
2010-10-11  7:33     ` Mike Frysinger
2010-10-11  7:28   ` [U-Boot] [PATCH V5 1/2] MTD/SPI: introduce table driven probing Mike Frysinger
2010-10-11  7:56     ` Reinhard Meyer
2010-10-11  8:17       ` Mike Frysinger
2010-10-11  8:30         ` Reinhard Meyer
2010-10-13  1:19           ` Mike Frysinger
2010-10-11  7:31   ` [U-Boot] [PATCH] sf: turn probe switch into a lookup table Mike Frysinger
2010-10-11  8:29 ` [U-Boot] [PATCH 1/2] " Mike Frysinger
2010-10-11  8:29 ` [U-Boot] [PATCH 2/2] sf: ramtron: new spi fram driver Mike Frysinger
2010-10-13  7:44   ` Reinhard Meyer [this message]
2010-10-13 13:43     ` Mike Frysinger

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=4CB56374.7040901@emk-elektronik.de \
    --to=u-boot@emk-elektronik.de \
    --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