From: Jagan Teki <jagannadh.teki@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 3/4] sf: Add debug messages on spi_flash_read_common
Date: Sun, 23 Jun 2013 23:35:41 +0530 [thread overview]
Message-ID: <51C738F5.90509@gmail.com> (raw)
In-Reply-To: <c8ecd7ef-2064-4389-bedb-d481bd1d7c54@CH1EHSMHS023.ehs.local>
On 21-06-2013 19:19, Jagannadha Sutradharudu Teki wrote:
> - Added debug's on spi_flash_read_common()
> - Added space
>
> Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
> ---
> Changes for v3:
> -
> Changes for v2:
> -
>
> drivers/mtd/spi/spi_flash.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
> index a329850..51142d8 100644
> --- a/drivers/mtd/spi/spi_flash.c
> +++ b/drivers/mtd/spi/spi_flash.c
> @@ -254,8 +254,18 @@ int spi_flash_read_common(struct spi_flash *flash, const u8 *cmd,
> struct spi_slave *spi = flash->spi;
> int ret;
>
> - spi_claim_bus(spi);
> + ret = spi_claim_bus(flash->spi);
> + if (ret) {
> + debug("SF: unable to claim SPI bus\n");
> + return ret;
> + }
> +
> ret = spi_flash_cmd_read(spi, cmd, cmd_len, data, data_len);
> + if (ret < 0) {
> + debug("SF: read cmd failed\n");
> + return ret;
> + }
> +
> spi_release_bus(spi);
>
> return ret;
>
Applied to u-boot-spi/master
--
Thanks,
Jagan.
next prev parent reply other threads:[~2013-06-23 18:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1371822543-7929-1-git-send-email-jaganna@xilinx.com>
2013-06-21 13:49 ` [U-Boot] [PATCH v3 2/4] sf: Place the sf calls in proper order Jagannadha Sutradharudu Teki
2013-06-23 18:05 ` Jagan Teki
2013-06-21 13:49 ` [U-Boot] [PATCH v3 3/4] sf: Add debug messages on spi_flash_read_common Jagannadha Sutradharudu Teki
2013-06-23 18:05 ` Jagan Teki [this message]
2013-06-21 13:49 ` [U-Boot] [PATCH v3 4/4] sf: Warn to use BAR for > 16MiB flashes Jagannadha Sutradharudu Teki
2013-06-23 18:05 ` Jagan Teki
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=51C738F5.90509@gmail.com \
--to=jagannadh.teki@gmail.com \
--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