From patchwork Mon Feb 20 08:03:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 9582107 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BF7AD6047C for ; Mon, 20 Feb 2017 08:04:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF3EC28851 for ; Mon, 20 Feb 2017 08:04:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3B4228860; Mon, 20 Feb 2017 08:04:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5617628851 for ; Mon, 20 Feb 2017 08:04:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752366AbdBTIEE (ORCPT ); Mon, 20 Feb 2017 03:04:04 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:44630 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752356AbdBTIEB (ORCPT ); Mon, 20 Feb 2017 03:04:01 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8ECC460D07; Mon, 20 Feb 2017 08:03:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1487577840; bh=a12WA6S3ezj9jNew0TwIoO4/fHRl0cZa7wLjLZzMsy0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iLChx4G4gJ2MZrran4SmdNdMQcU4tXrqKjwjQpjy9yN9VzWMTJFVvwCRYaCUKnsKY kPHwvDISmNVVuHfh84kJYnuYgcIpxZK4437cZaVsJiUVSQfJrQZFQddg+j976JLhFk G8oQV5EYKCZlRlY0zKVmPxJSJZFXzACzuvD6q/sU= Received: from rharjani-linux.qualcomm.com (unknown [202.46.23.54]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: riteshh@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id BE921607C9; Mon, 20 Feb 2017 08:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1487577838; bh=a12WA6S3ezj9jNew0TwIoO4/fHRl0cZa7wLjLZzMsy0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oMcl2pD1wq4MFUsOZ7sUhAZYIvtj15oGWb+bFYjVBALtG7ivH+GvtVXTtMF27rFxy 4QLJNE1RGAEF5sjTrrKbGFoTrMwtZLoDqnZTsAfd/OQpfqhj/yGXDMYSk7UP3/dtjE gJnFuZy0BD8uEiLYMWYWjw0tmTGYogsSyppKojTE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BE921607C9 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=riteshh@codeaurora.org From: Ritesh Harjani To: ulf.hansson@linaro.org, linux-mmc@vger.kernel.org, adrian.hunter@intel.com Cc: shawn.lin@rock-chips.com, devicetree@vger.kernel.org, andy.gross@linaro.org, linux-arm-msm@vger.kernel.org, georgi.djakov@linaro.org, alex.lemberg@sandisk.com, mateusz.nowak@intel.com, Yuliy.Izrailov@sandisk.com, asutoshd@codeaurora.org, david.griego@linaro.org, stummala@codeaurora.org, venkatg@codeaurora.org, pramod.gurav@linaro.org, jeremymc@redhat.com, linux-kernel@vger.kernel.org, Ritesh Harjani Subject: [RFC PATCH 2/4] mmc: core: add mmc-sleep-awake caps Date: Mon, 20 Feb 2017 13:33:10 +0530 Message-Id: <1487577792-12510-3-git-send-email-riteshh@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1487577792-12510-1-git-send-email-riteshh@codeaurora.org> References: <1487577792-12510-1-git-send-email-riteshh@codeaurora.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch introduce mmc-sleep-awake for platforms which want to enable CMD5 awake & partial_init. Signed-off-by: Ritesh Harjani --- drivers/mmc/core/host.c | 2 ++ include/linux/mmc/host.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 3f8c85d..e798814 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -320,6 +320,8 @@ int mmc_of_parse(struct mmc_host *host) host->caps2 |= MMC_CAP2_NO_SD; if (of_property_read_bool(np, "no-mmc")) host->caps2 |= MMC_CAP2_NO_MMC; + if (of_property_read_bool(np, "mmc-sleep-awake")) + host->caps2 |= MMC_CAP2_SLEEP_AWAKE; host->dsr_req = !of_property_read_u32(np, "dsr", &host->dsr); if (host->dsr_req && (host->dsr & ~0xffff)) { diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 83f1c4a..df7882b 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -303,6 +303,7 @@ struct mmc_host { #define MMC_CAP2_HS400_ES (1 << 20) /* Host supports enhanced strobe */ #define MMC_CAP2_NO_SD (1 << 21) /* Do not send SD commands during initialization */ #define MMC_CAP2_NO_MMC (1 << 22) /* Do not send (e)MMC commands during initialization */ +#define MMC_CAP2_SLEEP_AWAKE (1 << 23) /* Use Sleep/Awake (CMD5) */ mmc_pm_flag_t pm_caps; /* supported pm features */