diff options
author | Allen Xu <b45815@freescale.com> | 2014-11-29 03:51:36 -0600 |
---|---|---|
committer | Allen Xu <b45815@freescale.com> | 2014-12-01 20:04:58 +0800 |
commit | f36b039371048233d1582f4579fa0a87caf4c27c (patch) | |
tree | 1b9a4990b7f35c54e372913429204ff274567cdd | |
parent | 9953eb70c1337e1003fe44e20a2a76fc1c63716a (diff) |
MLK-9924 mtd: qspi: QSPI1 cannot wake up WAIT mode workaround
QSPI1 cannot wake up CCM from WAIT mode on SX ARD board, add pmqos to
let CCM NOT enter WAIT mode when accessing QSPI1, refer to TKT245618.
Signed-off-by: Allen Xu <b45815@freescale.com>
(cherry picked from commit feb3b71bffc8afd440c0b972334f2479ebfefa1d)
-rw-r--r-- | drivers/mtd/spi-nor/fsl-quadspi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c index 8a4997a3dcc4..c1ad93c75a21 100644 --- a/drivers/mtd/spi-nor/fsl-quadspi.c +++ b/drivers/mtd/spi-nor/fsl-quadspi.c @@ -27,6 +27,7 @@ #include <linux/mtd/partitions.h> #include <linux/mtd/spi-nor.h> #include <linux/mutex.h> +#include <linux/pm_qos.h> /* The registers */ #define QUADSPI_MCR 0x00 @@ -242,6 +243,7 @@ struct fsl_qspi { bool ddr_io_mode; u32 ddr_smp; struct mutex lock; + struct pm_qos_request pm_qos_req; }; static inline int is_vybrid_qspi(struct fsl_qspi *q) @@ -702,12 +704,17 @@ static int fsl_qspi_clk_prep_enable(struct fsl_qspi *q) return ret; } + pm_qos_add_request(&q->pm_qos_req, + PM_QOS_CPU_DMA_LATENCY, + 0); + return 0; } /* This function was used to disable and unprepare QSPI clock */ static int fsl_qspi_clk_disable_unprep(struct fsl_qspi *q) { + pm_qos_remove_request(&q->pm_qos_req); clk_disable_unprepare(q->clk); clk_disable_unprepare(q->clk_en); return 0; |