aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/spi-nor
diff options
context:
space:
mode:
authorAllen Xu <b45815@freescale.com>2015-01-12 15:56:40 -0500
committerBrian Norris <computersforpeace@gmail.com>2015-01-15 22:30:30 -0500
commit45c6a0caeb2bde9e043bcd833af322db57a37498 (patch)
tree5ee56173e088019b4f92e39bcc16ad6b78f1816b /drivers/mtd/spi-nor
parent7c272ac5eefb329501aadbd9f21f86232c0f66a9 (diff)
mtd: spi-nor: fsl-qspi: support deep sleep mode for imx6 sx chip
i.mx6 sx support turn off fastmix and megamix power. qpsi controller can be turned off and all status lost when suspend/resume. add suspend/resume functions and reset qspi controller when resume. Signed-off-by: Allen Xu <b45815@freescale.com> Signed-off-by: Frank Li <Frank.Li@freescale.com> Acked-by: Huang Shijie <shijie.huang@intel.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/spi-nor')
-rw-r--r--drivers/mtd/spi-nor/fsl-quadspi.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
index 39763b94f67d..9d6080079a45 100644
--- a/drivers/mtd/spi-nor/fsl-quadspi.c
+++ b/drivers/mtd/spi-nor/fsl-quadspi.c
@@ -972,6 +972,22 @@ static int fsl_qspi_remove(struct platform_device *pdev)
972 return 0; 972 return 0;
973} 973}
974 974
975static int fsl_qspi_suspend(struct platform_device *pdev, pm_message_t state)
976{
977 return 0;
978}
979
980static int fsl_qspi_resume(struct platform_device *pdev)
981{
982 struct fsl_qspi *q = platform_get_drvdata(pdev);
983
984 fsl_qspi_nor_setup(q);
985 fsl_qspi_set_map_addr(q);
986 fsl_qspi_nor_setup_last(q);
987
988 return 0;
989}
990
975static struct platform_driver fsl_qspi_driver = { 991static struct platform_driver fsl_qspi_driver = {
976 .driver = { 992 .driver = {
977 .name = "fsl-quadspi", 993 .name = "fsl-quadspi",
@@ -980,6 +996,8 @@ static struct platform_driver fsl_qspi_driver = {
980 }, 996 },
981 .probe = fsl_qspi_probe, 997 .probe = fsl_qspi_probe,
982 .remove = fsl_qspi_remove, 998 .remove = fsl_qspi_remove,
999 .suspend = fsl_qspi_suspend,
1000 .resume = fsl_qspi_resume,
983}; 1001};
984module_platform_driver(fsl_qspi_driver); 1002module_platform_driver(fsl_qspi_driver);
985 1003