summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2013-12-19 14:22:12 -0500
committerTom Rini <trini@ti.com>2013-12-19 14:22:12 -0500
commit1bbba03d0e01ac466d063732afff3a5faadde2d3 (patch)
treec03ba850505b4e01835c796616c6c67879a7fc61 /drivers/mtd
parentef184040b74ebba48edbc3ae7bf84b2753b8774c (diff)
parentac5cce38de8f97a120b8c98f34be0d5eec50a6fb (diff)
downloadu-boot-imx-1bbba03d0e01ac466d063732afff3a5faadde2d3.zip
u-boot-imx-1bbba03d0e01ac466d063732afff3a5faadde2d3.tar.gz
u-boot-imx-1bbba03d0e01ac466d063732afff3a5faadde2d3.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-spi
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/spi/sf_ops.c6
-rw-r--r--drivers/mtd/spi/sf_probe.c3
2 files changed, 8 insertions, 1 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;
}
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index c1eb754..b863a98 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -60,6 +60,7 @@ static const struct spi_flash_params spi_flash_params_table[] = {
{"GD25LQ32", 0xc86016, 0x0, 64 * 1024, 64, SECT_4K},
#endif
#ifdef CONFIG_SPI_FLASH_MACRONIX /* MACRONIX */
+ {"MX25L2006E", 0xc22012, 0x0, 64 * 1024, 4, 0},
{"MX25L4005", 0xc22013, 0x0, 64 * 1024, 8, 0},
{"MX25L8005", 0xc22014, 0x0, 64 * 1024, 16, 0},
{"MX25L1605D", 0xc22015, 0x0, 64 * 1024, 32, 0},
@@ -67,7 +68,7 @@ static const struct spi_flash_params spi_flash_params_table[] = {
{"MX25L6405D", 0xc22017, 0x0, 64 * 1024, 128, 0},
{"MX25L12805", 0xc22018, 0x0, 64 * 1024, 256, 0},
{"MX25L25635F", 0xc22019, 0x0, 64 * 1024, 512, 0},
- {"MX25L51235F", 0xc2201A, 0x0, 64 * 1024, 1024, 0},
+ {"MX25L51235F", 0xc2201a, 0x0, 64 * 1024, 1024, 0},
{"MX25L12855E", 0xc22618, 0x0, 64 * 1024, 256, 0},
#endif
#ifdef CONFIG_SPI_FLASH_SPANSION /* SPANSION */