From: Baruch Siach <baruch@tkos.co.il>
To: Ryan Mallon <ryan@bluewatersys.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org,
spi-devel-general@lists.sourceforge.net, mike@steroidmicros.com,
linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [spi-devel-general] [PATCH] SST25L (non JEDEC) SPI Flash driver
Date: Mon, 22 Jun 2009 07:14:57 +0300 [thread overview]
Message-ID: <20090622041457.GC6027@tarshish> (raw)
In-Reply-To: <4A3F017B.2010409@bluewatersys.com>
Hi Ryan,
On Mon, Jun 22, 2009 at 03:58:51PM +1200, Ryan Mallon wrote:
> +static int sst25l_erase_block(struct sst25l_flash *flash, u32 offset)
> +{
> + u8 command[4];
> + int err;
> +
> + err = sst25l_write_enable(flash, 1);
Is this enable/disable strictly required for each write/erase? Can't we just
enable write once?
> + if (err)
> + return err;
> +
> + command[0] = SST25L_CMD_BLOCK_ERASE;
> + command[1] = offset >> 16;
> + command[2] = offset >> 8;
> + command[3] = offset;
> + err = spi_write(flash->spi, command, 4);
> + if (err)
> + return err;
> +
> + err = sst25l_wait_till_ready(flash);
> + if (err)
> + return err;
> +
> + return sst25l_write_enable(flash, 0);
> +}
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
next prev parent reply other threads:[~2009-06-22 4:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 3:58 [PATCH] SST25L (non JEDEC) SPI Flash driver Ryan Mallon
2009-06-22 4:14 ` Baruch Siach [this message]
2009-06-22 4:25 ` [spi-devel-general] " Ryan Mallon
2009-06-22 8:15 ` Artem Bityutskiy
2009-06-22 8:22 ` Linus Walleij
2009-06-22 21:56 ` Ryan Mallon
2009-06-23 7:04 ` Linus Walleij
2009-06-23 20:48 ` Ryan Mallon
2009-06-24 22:43 ` Linus Walleij
2009-06-24 22:49 ` Ryan Mallon
2009-06-24 23:49 ` Linus Walleij
2009-06-25 1:39 ` [spi-devel-general] " H Hartley Sweeten
2009-06-25 2:06 ` Ryan Mallon
2009-06-25 2:30 ` H Hartley Sweeten
2009-06-25 2:52 ` Ryan Mallon
2009-06-25 7:49 ` Linus Walleij
-- strict thread matches above, loose matches on Subject: below --
2009-06-24 23:59 Ryan Mallon
2009-06-25 0:08 ` Linus Walleij
2009-07-03 0:50 ` [spi-devel-general] " David Brownell
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=20090622041457.GC6027@tarshish \
--to=baruch@tkos.co.il \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mike@steroidmicros.com \
--cc=ryan@bluewatersys.com \
--cc=spi-devel-general@lists.sourceforge.net \
/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