public inbox for linux-rockchip@lists.infradead.org
 help / color / mirror / Atom feed
From: Randy Li <ayaka@soulik.info>
To: linux-mmc@vger.kernel.org
Cc: jh80.chung@samsung.com, shawn.lin@rock-chips.com,
	randy.li@rock-chips.com, ulf.hansson@linaro.org, heiko@sntech.de,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Randy Li <ayaka@soulik.info>
Subject: [PATCH] Revert "mmc: dw_mmc-rockchip: add runtime PM support"
Date: Wed, 28 Dec 2016 23:34:48 +0800	[thread overview]
Message-ID: <1482939288-14950-1-git-send-email-ayaka@soulik.info> (raw)

This reverts commit f90142683f04bcb0729bf0df67a5e29562b725b9.
It is reported that making RK3288 can't boot from eMMC/MMC.

Signed-off-by: Randy Li <ayaka@soulik.info>
---
 drivers/mmc/host/dw_mmc-rockchip.c | 41 +++-----------------------------------
 1 file changed, 3 insertions(+), 38 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
index 9a46e46..3189234 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -14,7 +14,6 @@
 #include <linux/mmc/dw_mmc.h>
 #include <linux/of_address.h>
 #include <linux/mmc/slot-gpio.h>
-#include <linux/pm_runtime.h>
 #include <linux/slab.h>
 
 #include "dw_mmc.h"
@@ -327,7 +326,6 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
 {
 	const struct dw_mci_drv_data *drv_data;
 	const struct of_device_id *match;
-	int ret;
 
 	if (!pdev->dev.of_node)
 		return -ENODEV;
@@ -335,49 +333,16 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
 	match = of_match_node(dw_mci_rockchip_match, pdev->dev.of_node);
 	drv_data = match->data;
 
-	pm_runtime_get_noresume(&pdev->dev);
-	pm_runtime_set_active(&pdev->dev);
-	pm_runtime_enable(&pdev->dev);
-	pm_runtime_set_autosuspend_delay(&pdev->dev, 50);
-	pm_runtime_use_autosuspend(&pdev->dev);
-
-	ret = dw_mci_pltfm_register(pdev, drv_data);
-	if (ret) {
-		pm_runtime_disable(&pdev->dev);
-		pm_runtime_set_suspended(&pdev->dev);
-		pm_runtime_put_noidle(&pdev->dev);
-		return ret;
-	}
-
-	pm_runtime_put_autosuspend(&pdev->dev);
-
-	return 0;
+	return dw_mci_pltfm_register(pdev, drv_data);
 }
 
-static int dw_mci_rockchip_remove(struct platform_device *pdev)
-{
-	pm_runtime_get_sync(&pdev->dev);
-	pm_runtime_disable(&pdev->dev);
-	pm_runtime_put_noidle(&pdev->dev);
-
-	return dw_mci_pltfm_remove(pdev);
-}
-
-static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
-				pm_runtime_force_resume)
-	SET_RUNTIME_PM_OPS(dw_mci_runtime_suspend,
-			   dw_mci_runtime_resume,
-			   NULL)
-};
-
 static struct platform_driver dw_mci_rockchip_pltfm_driver = {
 	.probe		= dw_mci_rockchip_probe,
-	.remove		= dw_mci_rockchip_remove,
+	.remove		= dw_mci_pltfm_remove,
 	.driver		= {
 		.name		= "dwmmc_rockchip",
 		.of_match_table	= dw_mci_rockchip_match,
-		.pm		= &dw_mci_rockchip_dev_pm_ops,
+		.pm		= &dw_mci_pltfm_pmops,
 	},
 };
 
-- 
2.7.4

             reply	other threads:[~2016-12-28 15:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20161228153516epcas2p253c6bc0371ab0df464573b63218795ef@epcas2p2.samsung.com>
2016-12-28 15:34 ` Randy Li [this message]
2016-12-29  3:02   ` [PATCH] Revert "mmc: dw_mmc-rockchip: add runtime PM support" Jaehoon Chung
     [not found]     ` <e0cc8029-0155-4879-a643-ddc4239a55ab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-12-29  7:13       ` Jaehoon Chung
2016-12-29  7:25         ` Shawn Lin
2016-12-29 10:25           ` Randy Li
     [not found]             ` <04b667d9-2591-51ff-e024-047bbb6e17c3-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-12-29 12:55               ` ayaka
2016-12-29 14:04                 ` Jaehoon Chung
     [not found]                   ` <95648282-38f5-42c2-fd8b-ab603eb3a168-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-12-29 15:07                     ` ayaka
2016-12-30  2:35                       ` Jaehoon Chung
2016-12-30  2:44                         ` Randy Li
2016-12-30  2:50                           ` Jaehoon Chung
     [not found]                             ` <CABgxDo+3qMcHn6e2s_ZJy1crdi=ch5hQk6sy3W29Q12-ye33Qw@mail.gmail.com>
     [not found]                               ` <2cdd0b6c-a099-595d-1c0b-be7933b0d4a6@collabora.com>
2017-01-20  6:08                                 ` Jaehoon Chung
2017-01-23 11:24                                   ` John Keeping
2017-01-23 12:53                                     ` Jaehoon Chung
     [not found]                                       ` <845aea80-10a5-e8f9-5620-952bdcc37234-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-01-23 13:22                                         ` John Keeping

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1482939288-14950-1-git-send-email-ayaka@soulik.info \
    --to=ayaka@soulik.info \
    --cc=heiko@sntech.de \
    --cc=jh80.chung@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=randy.li@rock-chips.com \
    --cc=shawn.lin@rock-chips.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox