summaryrefslogtreecommitdiff
path: root/drivers/spi/fsl_qspi.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-12-14 20:27:23 -0500
committerTom Rini <trini@konsulko.com>2015-12-14 20:27:23 -0500
commite6e3faa5c2da591cd3e0f2047a74cfc832e7b738 (patch)
tree08c12b0c61cb4edd70df347c61ea36d2088274d3 /drivers/spi/fsl_qspi.c
parent312db9f75f50b339310474d72c8524cef2bd7931 (diff)
parent989c5f0a8f8694ac92eb0d6cff8745ae8659364f (diff)
downloadu-boot-imx-e6e3faa5c2da591cd3e0f2047a74cfc832e7b738.zip
u-boot-imx-e6e3faa5c2da591cd3e0f2047a74cfc832e7b738.tar.gz
u-boot-imx-e6e3faa5c2da591cd3e0f2047a74cfc832e7b738.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
Diffstat (limited to 'drivers/spi/fsl_qspi.c')
-rw-r--r--drivers/spi/fsl_qspi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index ed39114..feec3e8 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -13,6 +13,7 @@
#include <linux/sizes.h>
#include <dm.h>
#include <errno.h>
+#include <watchdog.h>
#include "fsl_qspi.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -527,6 +528,8 @@ static void qspi_op_read(struct fsl_qspi_priv *priv, u32 *rxbuf, u32 len)
to_or_from = priv->sf_addr + priv->cur_amba_base;
while (len > 0) {
+ WATCHDOG_RESET();
+
qspi_write32(priv->flags, &regs->sfar, to_or_from);
size = (len > RX_BUFFER_SIZE) ?
@@ -574,6 +577,8 @@ static void qspi_op_write(struct fsl_qspi_priv *priv, u8 *txbuf, u32 len)
status_reg = 0;
while ((status_reg & FLASH_STATUS_WEL) != FLASH_STATUS_WEL) {
+ WATCHDOG_RESET();
+
qspi_write32(priv->flags, &regs->ipcr,
(SEQID_WREN << QSPI_IPCR_SEQID_SHIFT) | 0);
while (qspi_read32(priv->flags, &regs->sr) & QSPI_SR_BUSY_MASK)