Commit efe6a8ad authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

sh_mmcif / PM: Use PM QoS latency constraint

Make sh_mmcif call dev_pm_qos_expose_latency_limit() to expose
the PM QoS latency limit to user space and specify the initial
value of it as 100 microseconds.
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent c419e611
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
#include <linux/mmc/sh_mmcif.h> #include <linux/mmc/sh_mmcif.h>
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pm_qos.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -1347,6 +1348,8 @@ static int __devinit sh_mmcif_probe(struct platform_device *pdev) ...@@ -1347,6 +1348,8 @@ static int __devinit sh_mmcif_probe(struct platform_device *pdev)
mmc_detect_change(host->mmc, 0); mmc_detect_change(host->mmc, 0);
dev_pm_qos_expose_latency_limit(&pdev->dev, 100);
dev_info(&pdev->dev, "driver version %s\n", DRIVER_VERSION); dev_info(&pdev->dev, "driver version %s\n", DRIVER_VERSION);
dev_dbg(&pdev->dev, "chip ver H'%04x\n", dev_dbg(&pdev->dev, "chip ver H'%04x\n",
sh_mmcif_readl(host->addr, MMCIF_CE_VERSION) & 0x0000ffff); sh_mmcif_readl(host->addr, MMCIF_CE_VERSION) & 0x0000ffff);
...@@ -1374,6 +1377,8 @@ static int __devexit sh_mmcif_remove(struct platform_device *pdev) ...@@ -1374,6 +1377,8 @@ static int __devexit sh_mmcif_remove(struct platform_device *pdev)
host->dying = true; host->dying = true;
pm_runtime_get_sync(&pdev->dev); pm_runtime_get_sync(&pdev->dev);
dev_pm_qos_hide_latency_limit(&pdev->dev);
mmc_remove_host(host->mmc); mmc_remove_host(host->mmc);
sh_mmcif_writel(host->addr, MMCIF_CE_INT_MASK, MASK_ALL); sh_mmcif_writel(host->addr, MMCIF_CE_INT_MASK, MASK_ALL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment