diff options
author | Allen Xu <b45815@freescale.com> | 2014-11-29 03:51:36 -0600 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-09-17 09:21:00 -0500 |
commit | 78e1c133f339481fc3ef06aba1276f31dea7e4ae (patch) | |
tree | 451e67e467f7a6c9811af2e997a7ac84ab46c03f /drivers/mtd | |
parent | ece2bf4307fab4409164b70fd2b6a0a2024b6e61 (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)
Diffstat (limited to 'drivers/mtd')
-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 27b9c4eff005..170fbc648d06 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 @@ -237,6 +238,7 @@ struct fsl_qspi { u32 clk_rate; unsigned int chip_base_addr; /* We may support two chips. */ struct mutex lock; + struct pm_qos_request pm_qos_req; }; static inline int is_vybrid_qspi(struct fsl_qspi *q) @@ -664,12 +666,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; |