public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V4 2/2] MTD/SPI: add support for Ramtron FRAMs
Date: Tue, 14 Sep 2010 11:01:06 -0400	[thread overview]
Message-ID: <201009141101.07350.vapier@gentoo.org> (raw)
In-Reply-To: <1284475809-12509-3-git-send-email-u-boot@emk-elektronik.de>

On Tuesday, September 14, 2010 10:50:09 Reinhard Meyer wrote:
> JEDEC types
> non JEDEC types

this changelog is useless ... either make it say something, or just leave it 
empty

> +static int ramtron_common(struct spi_flash *flash,
> +		u32 offset, size_t len, void *buf, u8 command)
> +{
> +
> +	if (sn->params->addr_len == 3 && sn->params->merge_cmd == 0) {
> +		cmd[0] = command;
> +		cmd[1] = offset >> 16;
> +		cmd[2] = offset >> 8;
> +		cmd[3] = offset;
> +		cmd_len = 4;
> +	}
> +	else if (sn->params->addr_len == 2 && sn->params->merge_cmd == 0) {
> +		cmd[0] = command;
> +		cmd[1] = offset >> 8;
> +		cmd[2] = offset;
> +		cmd_len = 3;
> +	}
> +	else {

i thought i had mentioned this before, but those else statements need cuddling

> +	/* claim the bus */
> +	ret = spi_claim_bus(flash->spi);
> +	if (ret) {
> +		debug("SF: Unable to claim SPI bus\n");
> +		return ret;
> +	}

i'm thinking we should push the bus claim from the read/write funcs into the 
common spi flash layer ... not that this is specific to your flash.  we can do 
this after yours gets merged.

> +	sn = malloc(sizeof(struct ramtron_spi_fram));

sizeof(*sn)

otherwise, this looks good
-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/20100914/4d8ad000/attachment.pgp 

  reply	other threads:[~2010-09-14 15:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-12 14:35 [U-Boot] Patches to support Ramtron SPI FRAMs Reinhard Meyer
2010-09-12 14:35 ` [U-Boot] [PATCH v3] MTD/SPI: introduce table driven probing Reinhard Meyer
2010-09-12 14:35   ` [U-Boot] [PATCH v3] MTD/SPI: add support for Ramtron FRAMs Reinhard Meyer
2010-09-12 14:42 ` [U-Boot] Patches to support Ramtron SPI FRAMs Wolfgang Denk
2010-09-12 15:38   ` Reinhard Meyer
2010-09-12 17:41     ` Wolfgang Denk
2010-09-12 18:51       ` Reinhard Meyer
2010-09-12 19:06         ` Wolfgang Denk
2010-09-12 19:16           ` Reinhard Meyer
2010-09-12 19:28             ` Wolfgang Denk
2010-09-12 19:26           ` Mike Frysinger
2010-09-12 19:36             ` Reinhard Meyer
2010-09-14 14:50 ` [U-Boot] [PATCH V4 0/2] " Reinhard Meyer
2010-09-14 14:50   ` [U-Boot] [PATCH V4 1/2] MTD/SPI: introduce table driven probing Reinhard Meyer
2010-09-14 14:50     ` [U-Boot] [PATCH V4 2/2] MTD/SPI: add support for Ramtron FRAMs Reinhard Meyer
2010-09-14 15:01       ` Mike Frysinger [this message]
2010-10-04  6:31         ` Reinhard Meyer
2010-10-04  7:17           ` Wolfgang Denk
2010-09-14 14:53     ` [U-Boot] [PATCH V4 1/2] MTD/SPI: introduce table driven probing Mike Frysinger
2010-09-14 18:29       ` Reinhard Meyer
2010-09-14 19:15         ` 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=201009141101.07350.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