Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp4113825ybz; Tue, 28 Apr 2020 06:05:40 -0700 (PDT) X-Google-Smtp-Source: APiQypLgR+W6xjPC4MSuRfw3cWKkAbyR370jn4HYvBKHpIEZg1f76MgSQUmaqS7aZzARtfCaulvL X-Received: by 2002:a17:906:558a:: with SMTP id y10mr25559862ejp.192.1588079140052; Tue, 28 Apr 2020 06:05:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588079140; cv=none; d=google.com; s=arc-20160816; b=PUVJdNKWToN3uBqL59uYpNKZhoIc+V9utuaIvlgLmhF6edL+xc//le6ibW6RbNyqW7 tugcMCEKOg2OKQ3Kc4Xg2a3tPzcLTARq2nAXPYKNsXwTflmYmtPJDS964ZjzlLS+OT27 Febdx6/LUYLuNaEI3K50+xmzMnrxxESzERKJkQa7IRG5XR03XBzEcLiJG4BLXrtZWlDl hgP7DPzMpqiVdGjJkwZaMoWZokUvGCMx/4Ne6a4yL6aABf1srHX7fztcDK98+Z0swPqP uPn5SPnsUlCGV/2ggxt6mg7l8bYDA2rfsJsAQ09qm79YFn/hepY0F8Xc4tVNyY6PELnA eGcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=tAiU8DufUg5a+y6LZBlNyLKlmwCnn5CoVFDN0/EIDYc=; b=X1WtFS8nFQEm/d6dmxBwqNdJjo84kF1sMxzMUE3GDzSLhZ1zltW4bpKJsNgcPyfoay JTVO+WNY9/OyUuDsKCEXsf5OSgw0emHojkqwSMIGVOpngOfsl871oWiEwi38DTTIIe2W ++4etK9Yq3aSxaWjMvA/z9BiI9QF0+gvHD4xqLJ//b2l53whPxBGExcUDYWZk8HjIBSZ GKS/PzaECI8l/LjiNf3MvLJzSjoaHGaAa9IsOpw4CMO7KZdqo/kNKW/i3Wfxt49DFtEf 7I3veywThkrrLKI0bhLDtfVzxNRxTmere+zBP7ekLy/Gy8WC6Q17Ed4g10eNZSp9gVzH wUYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=NSCU00RN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u3si1499520edq.473.2020.04.28.06.05.13; Tue, 28 Apr 2020 06:05:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=NSCU00RN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726844AbgD1NDa (ORCPT + 99 others); Tue, 28 Apr 2020 09:03:30 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:18965 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726746AbgD1ND3 (ORCPT ); Tue, 28 Apr 2020 09:03:29 -0400 X-UUID: 0e6d1158628d4808a4178ec4f6e9d79a-20200428 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=tAiU8DufUg5a+y6LZBlNyLKlmwCnn5CoVFDN0/EIDYc=; b=NSCU00RN0Lhm1i9wBXCRug2Sruqc7RMnjoaB09brRK3mVrLPWnr2GzfLIrBt+vy9CfWJKb0gy444k5HPpjYV2cktmxfMfY6mvknsfL7HtA97QzaFXfRXIemqVhT3XD0wmvRG57lhuRd+80b+90XNN7VUHRR2kVBbfGWyL5pPKWQ=; X-UUID: 0e6d1158628d4808a4178ec4f6e9d79a-20200428 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1388229187; Tue, 28 Apr 2020 21:03:16 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 28 Apr 2020 21:03:14 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 28 Apr 2020 21:03:12 +0800 Message-ID: <1588078947.730.11.camel@mhfsdcap03> Subject: Re: [PATCH v5 4/5] mmc: mediatek: command queue support From: "yong.mao@mediatek.com" To: Chun-Hung Wu CC: , Jonathan Hunter , "Al Cooper" , Adrian Hunter , Florian Fainelli , , Andy Gross , Bjorn Andersson , Michal Simek , Thierry Reding , 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 , Allison Randal , Mathieu Malaterre , Stanley Chu , Kuohong Wang , , , , , , , , , Date: Tue, 28 Apr 2020 21:02:27 +0800 In-Reply-To: <1588031768-23677-5-git-send-email-chun-hung.wu@mediatek.com> References: <1588031768-23677-1-git-send-email-chun-hung.wu@mediatek.com> <1588031768-23677-5-git-send-email-chun-hung.wu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: B19EDFDF45EA2A4C07BC3620755AB4A39CAA9E16B388784C1B5A658AB4906C472000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gVHVlLCAyMDIwLTA0LTI4IGF0IDA3OjU2ICswODAwLCBDaHVuLUh1bmcgV3Ugd3JvdGU6DQo+ IFN1cHBvcnQgY29tbWFuZCBxdWV1ZSBmb3IgbXQ2Nzc5IHBsYXRmb3JtLg0KPiBhLiBBZGQgbXNk Y19zZXRfYnVzeV90aW1lb3V0KCkgdG8gY2FsY3VsYXRlIGVtbWMgd3JpdGUgdGltZW91dA0KPiBi LiBDb25uZWN0IG10ayBtc2RjIGRyaXZlciB0byBjcWhjaSBkcml2ZXIgdGhyb3VnaA0KPiAgICBo b3N0LT5jcV9ob3N0LT5vcHMgPSAmbXNkY19jbWRxX29wczsNCj4gYy4gbXNkY19jbWRxX2lycSgp IHdpbGwgbGluayB1cCB3aXRoIGNxY2hpX2lycSgpLiBCZXNpZGVzLCBpdCBwcm92aWRlcw0KPiAg ICBtb3JlIGlycSBlcnJvciBtZXNzYWdlcyBsaWtlIFJTUENSQ0VSUi9DTURUTy9EQVRBQ1JDRVJS L0RBVFRNTy4NCj4gZC4gVXNlIHRoZSBvcHRpb25zIGJlbG93IHRvIHNlcGFyYXRlIHN1cHBvcnQg Zm9yIENRSENJIG9yIG5vdCwgYmVjYXVzZQ0KPiAgICBzb21lIG9mIG91ciBwbGF0Zm9ybSBkb2Vz IG5vdCBzdXBwb3J0IENRSENJIGhlbmNlIG5vIGtlcm5lbCBvcHRpb246DQo+ICAgIENPTkZJR19N TUNfQ1FIQ0kuDQo+ICAgICNpZiBJU19FTkFCTEVEKENPTkZJR19NTUNfQ1FIQ0kpDQo+ICAgIFhY WCAvL1N1cHBvcnQgQ1FIQ0kNCj4gICAgI2Vsc2UNCj4gICAgWFhYIC8vTm90IHN1cHBvcnQgQ1FI Q0kNCj4gICAgI2VuZGlmDQo+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