summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJagannadha Sutradharudu Teki <jagannadha.sutradharudu-teki@xilinx.com>2013-06-21 19:19:02 +0530
committerJagannadha Sutradharudu Teki <jaganna@xilinx.com>2013-06-23 22:10:36 +0530
commit29fbfc10f4b3eee5773f7e1f0a56f936730b639d (patch)
treebb80871d23b96298452d0fadb1f3f822677fd1df /drivers
parent95e779e4f475f66995f383e71611081e225f01f4 (diff)
downloadu-boot-imx-29fbfc10f4b3eee5773f7e1f0a56f936730b639d.zip
u-boot-imx-29fbfc10f4b3eee5773f7e1f0a56f936730b639d.tar.gz
u-boot-imx-29fbfc10f4b3eee5773f7e1f0a56f936730b639d.tar.bz2
sf: Add debug messages on spi_flash_read_common
- Added debug's on spi_flash_read_common() - Added space Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/spi/spi_flash.c12
1 files changed, 11 insertions, 1 deletions
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;