From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161523AbcFHIVT (ORCPT ); Wed, 8 Jun 2016 04:21:19 -0400 Received: from lucky1.263xmail.com ([211.157.147.135]:51458 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756477AbcFHIVQ (ORCPT ); Wed, 8 Jun 2016 04:21:16 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: ulf.hansson@linaro.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Shawn Lin To: Ulf Hansson Cc: Jaehoon Chung , Rob Herring , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Doug Anderson , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, Shawn Lin Subject: [RFC PATCH 3/4] mmc: core: add cap-no-sd and cap-no-mmc properties Date: Wed, 8 Jun 2016 16:20:57 +0800 Message-Id: <1465374057-2608-1-git-send-email-shawn.lin@rock-chips.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1465373996-2485-1-git-send-email-shawn.lin@rock-chips.com> References: <1465373996-2485-1-git-send-email-shawn.lin@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce cap-no-sd and cap-no-mmc properties to skip sending sd and mmc commands during initialization respectively. Signed-off-by: Shawn Lin --- drivers/mmc/core/host.c | 4 ++++ include/linux/mmc/host.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 933eeea..c760097 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -298,6 +298,10 @@ int mmc_of_parse(struct mmc_host *host) host->caps2 |= MMC_CAP2_FULL_PWR_CYCLE; if (of_property_read_bool(np, "cap-no-sdio")) host->caps2 |= MMC_CAP2_NO_SDIO; + if (of_property_read_bool(np, "cap-no-sd")) + host->caps2 |= MMC_CAP2_NO_SD; + if (of_property_read_bool(np, "cap-no-mmc")) + host->caps2 |= MMC_CAP2_NO_MMC; if (of_property_read_bool(np, "keep-power-in-suspend")) host->pm_caps |= MMC_PM_KEEP_POWER; if (of_property_read_bool(np, "wakeup-source") || diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index d72c0c3..1bd77c7 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -309,6 +309,8 @@ struct mmc_host { #define MMC_CAP2_NO_WRITE_PROTECT (1 << 18) /* No physical write protect pin, assume that card is always read-write */ #define MMC_CAP2_NO_SDIO (1 << 19) /* Do not send SDIO commands during initialization */ #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 MMC commands during initialization */ mmc_pm_flag_t pm_caps; /* supported pm features */ -- 2.3.7