Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp102611ybx; Thu, 31 Oct 2019 23:55:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqz0AB0QCvMvfIhDAfSYfqViuVZCQ1U1zlsq3WjKu5mjtVtUx0jzhENlTeEiV8JApeKg+r/O X-Received: by 2002:a17:906:a981:: with SMTP id jr1mr8131253ejb.255.1572591325159; Thu, 31 Oct 2019 23:55:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572591325; cv=none; d=google.com; s=arc-20160816; b=kIK6Fy5rGBXiyGh1w3jybc1pw14mt7ICOpf/aSInzpezIKUup5OCE5ve7v3nOTKAWI Lu8GMqWbSIaMn6dJlBGrlXA28EdrMA4dz8LtcZGeZ2ImD5aBfHAq2lzbyko5y43v4Quq iW7SMgXiaLPYTCjceSgpKUlML0E0zQ2Ucu65/00jR5Jyig1VKHsYXUTTWyQBjcq0XBxx T0zbLpxUEFtiQKS259ou8/AYmTF9KkA2oHhqoDDwlQCZ3r328KLRsGuDiCS9cGfKxrgF R9gJh0bauqFy8KWlJdXc2nDAgmvq08hS7Q1K4GA/3oUtSvW1NJUofvYyWbIlMCfr9odb 0sXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=LLaYN6Ml1dKiVG3OkM73ZSv3xn50MmBJKC2pI8JNjIY=; b=fCQap8EriWFOkDMZzWvjEwL1lF4ofgXNZ21VcfIwzROdLaRXKblYk5Cb6aWbiuEHBu 3OJhqjaj5f4Zv5ghuWDc7VU47ZSjZDeEOxapCWT9EI1EXbtNaMl2zsHaaVSgJBW1wTri KI+r0vUQwonYRCR0o51vVWsq108hK68AgfInYPmxTqpqKLbjymjd+0D4X3JZc8vd4KgZ P1f9Wo6R71VR6jaaYGNIKfSh9aFcfppDAn3yiSs21HIG3bFMqY7nq2sZRQx/r89QDfay ZHZyTHRstT7YB+DJj+uvrkXPhtryZtWH24SKxEWvBILuJs6foON5b1pcu6DpisIPIybP 39lA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v29si6195816edc.436.2019.10.31.23.54.54; Thu, 31 Oct 2019 23:55:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727486AbfKAGnh (ORCPT + 99 others); Fri, 1 Nov 2019 02:43:37 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:55978 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725280AbfKAGng (ORCPT ); Fri, 1 Nov 2019 02:43:36 -0400 X-UUID: 4cbeed378d1743dfb3ed0ccfbb2398f3-20191101 X-UUID: 4cbeed378d1743dfb3ed0ccfbb2398f3-20191101 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1901611303; Fri, 01 Nov 2019 14:43:31 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 1 Nov 2019 14:43:24 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 1 Nov 2019 14:43:24 +0800 From: Chun-Hung Wu To: Chaotian Jing , Ulf Hansson , Rob Herring , Mark Rutland , Matthias Brugger , Linus Walleij , Pavel Machek , Kate Stewart , Greg Kroah-Hartman , Martin Blumenstingl , Pan Bian , Thomas Gleixner , Stanley Chu , Kuohong Wang CC: , , , , , , Chun-Hung Wu Subject: [PATCH 1/3] [1/3] mmc: core: expose MMC_CAP2_CQE* to dt Date: Fri, 1 Nov 2019 14:43:00 +0800 Message-ID: <1572590582-11056-1-git-send-email-chun-hung.wu@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 1790563609A4B527A36D226ACFB9CECC63DA74F3C4E3D57248FE8956863EA0C82000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Expose MMC_CAP2_CQE and MMC_CAP2_CQE_DCMD to host->caps2 if 1. "supports-cqe" is defined in dt and 2. "disable-cqe-dcmd" is not defined in dt. Change-Id: I3d172e6bcfac34520c3932a6f8df2e20f2c0d05b CR-Id: Feature: Signed-off-by: Chun-Hung Wu --- drivers/mmc/core/host.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 105b7a7..efb0dbe 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -319,6 +319,14 @@ int mmc_of_parse(struct mmc_host *host) host->caps2 |= MMC_CAP2_NO_SD; if (device_property_read_bool(dev, "no-mmc")) host->caps2 |= MMC_CAP2_NO_MMC; + if (device_property_read_bool(dev, "supports-cqe")) + host->caps2 |= MMC_CAP2_CQE; + + /* Must be after "supports-cqe" check */ + if (!device_property_read_bool(dev, "disable-cqe-dcmd")) { + if (host->caps2 & MMC_CAP2_CQE) + host->caps2 |= MMC_CAP2_CQE_DCMD; + } /* Must be after "non-removable" check */ if (device_property_read_u32(dev, "fixed-emmc-driver-type", &drv_type) == 0) { -- 1.9.1