summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-06-06 14:16:43 +0300
committerTom Rini <trini@konsulko.com>2018-06-06 14:16:43 +0300
commit5b2e9a8cf98c0c074a45d497136af63d29b62fff (patch)
treec8967389aa70e922c58f6f1af14c976ceba57815 /drivers
parent6b6255cd8a7752b95ec6ea3d76d446c5b42cf64d (diff)
parentb1f2b72e39465f2d4582bb4d8c426489ee94e2d9 (diff)
downloadu-boot-5b2e9a8cf98c0c074a45d497136af63d29b62fff.tar.xz
Merge branch 'master' of git://git.denx.de/u-boot-spi
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/spi/spi_flash.c1
-rw-r--r--drivers/mtd/spi/spi_flash_ids.c1
-rw-r--r--drivers/spi/cadence_qspi.c13
3 files changed, 4 insertions, 11 deletions
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 0ed2317554..c159124259 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -128,6 +128,7 @@ static int clean_bar(struct spi_flash *flash)
if (flash->bank_curr == 0)
return 0;
cmd = flash->bank_write_cmd;
+ flash->bank_curr = 0;
return spi_flash_write_common(flash, &cmd, 1, &bank_sel, 1);
}
diff --git a/drivers/mtd/spi/spi_flash_ids.c b/drivers/mtd/spi/spi_flash_ids.c
index 5d146e36c6..c45d2e80be 100644
--- a/drivers/mtd/spi/spi_flash_ids.c
+++ b/drivers/mtd/spi/spi_flash_ids.c
@@ -63,6 +63,7 @@ const struct spi_flash_info spi_flash_ids[] = {
#endif
#ifdef CONFIG_SPI_FLASH_GIGADEVICE /* GIGADEVICE */
{"gd25q64b", INFO(0xc84017, 0x0, 64 * 1024, 128, SECT_4K) },
+ {"gd25q32b", INFO(0xc84016, 0x0, 64 * 1024, 64, SECT_4K) },
{"gd25lq32", INFO(0xc86016, 0x0, 64 * 1024, 64, SECT_4K) },
#endif
#ifdef CONFIG_SPI_FLASH_ISSI /* ISSI */
diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c
index b88837c0eb..91742ba5f1 100644
--- a/drivers/spi/cadence_qspi.c
+++ b/drivers/spi/cadence_qspi.c
@@ -283,18 +283,9 @@ static int cadence_spi_ofdata_to_platdata(struct udevice *bus)
const void *blob = gd->fdt_blob;
int node = dev_of_offset(bus);
int subnode;
- u32 data[4];
- int ret;
- /* 2 base addresses are needed, lets get them from the DT */
- ret = fdtdec_get_int_array(blob, node, "reg", data, ARRAY_SIZE(data));
- if (ret) {
- printf("Error: Can't get base addresses (ret=%d)!\n", ret);
- return -ENODEV;
- }
-
- plat->regbase = (void *)data[0];
- plat->ahbbase = (void *)data[2];
+ plat->regbase = (void *)devfdt_get_addr_index(bus, 0);
+ plat->ahbbase = (void *)devfdt_get_addr_index(bus, 1);
plat->is_decoded_cs = fdtdec_get_bool(blob, node, "cdns,is-decoded-cs");
plat->fifo_depth = fdtdec_get_uint(blob, node, "cdns,fifo-depth", 128);
plat->fifo_width = fdtdec_get_uint(blob, node, "cdns,fifo-width", 4);