From patchwork Thu Sep 26 14:54:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 20618 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f71.google.com (mail-qe0-f71.google.com [209.85.128.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 530AF24687 for ; Thu, 26 Sep 2013 14:56:25 +0000 (UTC) Received: by mail-qe0-f71.google.com with SMTP id a11sf1088246qen.2 for ; Thu, 26 Sep 2013 07:56:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=Lqs76VwFq6IC6LPARxcFNJl9NFnlFOr1KxrlDk42p/U=; b=RAaYS4TnC8opev2MnoNUYLpAwvgIGsFiQlwCf5ZQNlYRhPhlSbQvxN5rP2qjytDJeq VDiubniv73fht1ydhYvcyPlvu8insy5vcptiQHQ5tTEopEZddqZHEZyyGf7HNThSHxHF bN4rALRHng5Dme3gDJXvZg+2L0jU6js0EK6Xs6nS5k33Otmlb6OPRqgK3paCs3+EpOlU CYghGoNe83yBqFa1Rfa5raxBJUD1CZUM+O7q6dZcLfkn/Wl1R0BfJ1s6Z0by1TQW++UM OC/0gaR3E2frvDHlpsqmNygpaQckwz+PQq5K639nmnEU6dHSGdA0GQ9kDoVNwbhElkbZ OwDA== X-Gm-Message-State: ALoCoQkJEDaj+w4KCpDecQ4SW4m+2tE8ICFNKtsG6z8GrjvBxV2qgtrT8ktt+jHO+2J4W3ibp+xG X-Received: by 10.236.52.7 with SMTP id d7mr254160yhc.32.1380207385138; Thu, 26 Sep 2013 07:56:25 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.38.130 with SMTP id g2ls891977qek.99.gmail; Thu, 26 Sep 2013 07:56:25 -0700 (PDT) X-Received: by 10.220.94.206 with SMTP id a14mr1008417vcn.19.1380207385010; Thu, 26 Sep 2013 07:56:25 -0700 (PDT) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id st7si498166vdc.68.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Sep 2013 07:56:24 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.54; Received: by mail-vb0-f54.google.com with SMTP id q14so904852vbe.41 for ; Thu, 26 Sep 2013 07:55:54 -0700 (PDT) X-Received: by 10.52.165.131 with SMTP id yy3mr844664vdb.25.1380207354861; Thu, 26 Sep 2013 07:55:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp371121vcz; Thu, 26 Sep 2013 07:55:54 -0700 (PDT) X-Received: by 10.14.194.131 with SMTP id m3mr1870879een.45.1380207353910; Thu, 26 Sep 2013 07:55:53 -0700 (PDT) Received: from mail-ea0-f171.google.com (mail-ea0-f171.google.com [209.85.215.171]) by mx.google.com with ESMTPS id t3si1825973eeh.303.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Sep 2013 07:55:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.171 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=209.85.215.171; Received: by mail-ea0-f171.google.com with SMTP id n15so616918ead.16 for ; Thu, 26 Sep 2013 07:55:53 -0700 (PDT) X-Received: by 10.14.10.72 with SMTP id 48mr1954258eeu.82.1380207353334; Thu, 26 Sep 2013 07:55:53 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id x47sm4813555eea.16.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Sep 2013 07:55:52 -0700 (PDT) From: Ulf Hansson To: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, Chris Ball Cc: Ulf Hansson , Tony Prisk , linux-arm-kernel@lists.infradead.org Subject: [PATCH 17/27] mmc: wmt-sdmmc: Move away from using deprecated APIs Date: Thu, 26 Sep 2013 16:54:42 +0200 Message-Id: <1380207292-16968-18-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1380207292-16968-1-git-send-email-ulf.hansson@linaro.org> References: <1380207292-16968-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Suspend and resume of cards are being handled from the protocol layer and consequently the mmc_suspend|resume_host APIs are deprecated. This means we can simplify the suspend|resume callbacks by removing the use of the deprecated APIs. Cc: Tony Prisk Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Ulf Hansson --- drivers/mmc/host/wmt-sdmmc.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c index 34231d5..be94470 100644 --- a/drivers/mmc/host/wmt-sdmmc.c +++ b/drivers/mmc/host/wmt-sdmmc.c @@ -939,28 +939,23 @@ static int wmt_mci_suspend(struct device *dev) struct platform_device *pdev = to_platform_device(dev); struct mmc_host *mmc = platform_get_drvdata(pdev); struct wmt_mci_priv *priv; - int ret; if (!mmc) return 0; priv = mmc_priv(mmc); - ret = mmc_suspend_host(mmc); - - if (!ret) { - reg_tmp = readb(priv->sdmmc_base + SDMMC_BUSMODE); - writeb(reg_tmp | BM_SOFT_RESET, priv->sdmmc_base + - SDMMC_BUSMODE); + reg_tmp = readb(priv->sdmmc_base + SDMMC_BUSMODE); + writeb(reg_tmp | BM_SOFT_RESET, priv->sdmmc_base + + SDMMC_BUSMODE); - reg_tmp = readw(priv->sdmmc_base + SDMMC_BLKLEN); - writew(reg_tmp & 0x5FFF, priv->sdmmc_base + SDMMC_BLKLEN); + reg_tmp = readw(priv->sdmmc_base + SDMMC_BLKLEN); + writew(reg_tmp & 0x5FFF, priv->sdmmc_base + SDMMC_BLKLEN); - writeb(0xFF, priv->sdmmc_base + SDMMC_STS0); - writeb(0xFF, priv->sdmmc_base + SDMMC_STS1); + writeb(0xFF, priv->sdmmc_base + SDMMC_STS0); + writeb(0xFF, priv->sdmmc_base + SDMMC_STS1); - clk_disable(priv->clk_sdmmc); - } - return ret; + clk_disable(priv->clk_sdmmc); + return 0; } static int wmt_mci_resume(struct device *dev) @@ -969,7 +964,6 @@ static int wmt_mci_resume(struct device *dev) struct platform_device *pdev = to_platform_device(dev); struct mmc_host *mmc = platform_get_drvdata(pdev); struct wmt_mci_priv *priv; - int ret = 0; if (mmc) { priv = mmc_priv(mmc); @@ -987,10 +981,9 @@ static int wmt_mci_resume(struct device *dev) writeb(reg_tmp | INT0_DI_INT_EN, priv->sdmmc_base + SDMMC_INTMASK0); - ret = mmc_resume_host(mmc); } - return ret; + return 0; } static const struct dev_pm_ops wmt_mci_pm = {