diff options
author | Tom Rini <trini@ti.com> | 2013-12-19 19:22:12 (GMT) |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-12-19 19:22:12 (GMT) |
commit | 1bbba03d0e01ac466d063732afff3a5faadde2d3 (patch) | |
tree | c03ba850505b4e01835c796616c6c67879a7fc61 /drivers/mtd/spi/sf_ops.c | |
parent | ef184040b74ebba48edbc3ae7bf84b2753b8774c (diff) | |
parent | ac5cce38de8f97a120b8c98f34be0d5eec50a6fb (diff) | |
download | u-boot-fsl-qoriq-1bbba03d0e01ac466d063732afff3a5faadde2d3.tar.xz |
Merge branch 'master' of git://git.denx.de/u-boot-spi
Diffstat (limited to 'drivers/mtd/spi/sf_ops.c')
-rw-r--r-- | drivers/mtd/spi/sf_ops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c index 108665f..e316a69 100644 --- a/drivers/mtd/spi/sf_ops.c +++ b/drivers/mtd/spi/sf_ops.c @@ -273,9 +273,15 @@ int spi_flash_cmd_read_ops(struct spi_flash *flash, u32 offset, /* Handle memory-mapped SPI */ if (flash->memory_map) { + ret = spi_claim_bus(flash->spi); + if (ret) { + debug("SF: unable to claim SPI bus\n"); + return ret; + } spi_xfer(flash->spi, 0, NULL, NULL, SPI_XFER_MMAP); memcpy(data, flash->memory_map + offset, len); spi_xfer(flash->spi, 0, NULL, NULL, SPI_XFER_MMAP_END); + spi_release_bus(flash->spi); return 0; } |