Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp126402ybg; Mon, 8 Jun 2020 18:21:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwryEDiH11nXWKFODzTlaoN6oRslh014BAigOz9llr2eS3mK/u3/09RqyQJbu7nEpQxzO/1 X-Received: by 2002:aa7:c9c9:: with SMTP id i9mr23997235edt.166.1591665714494; Mon, 08 Jun 2020 18:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591665714; cv=none; d=google.com; s=arc-20160816; b=ilYtjmQSdxY2T87htpqng2J4J4S94oBB8oz3XCtke5vA7zBqZp66mhKZfTzLN8/OZo oyF1eQFcUqLwU1/Tpr2E1QWg2CBPzNbYQ5IoG1dVUKzX8kwPr1JkyerOdj6mg+QbUjAk TpC64YsRqs7kvpNhDpGtbIoRcRS9O64U0hL3nz1/fLWRzj2Qsby7JDIcCMC4mZYVGTv2 BrxSo38gzWHlEaSfmav47+FEmiNgnLcLGeyYU00xqFbur1E5qYCSoqjtsR72zpdFs92K Y8biYMlx7a1Ci4wf7f3WagGoFowa6KgA9s63rR3fxDnEf7Uf4NYipr1FXppk85HYW0k2 yd3g== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=Sr4Ct7YRr6GdU1Hh9QPu1XqrlaBQaeLAksq4fKW7jgc=; b=H1wOtJUsZ7eXn/4GSRVEDQD923v6zqbr1R5z33kANj8RI49r4UYg/qDBbYnZo0z0vg zbXMF4TpV9H3oKEC1078BseHvLf5Ghd835f4z4GuikfACsyl9wTfr/x00u2ZGGyUNKNN gNk3Ii6tbURDLDTlztp9XK9hEmTCFZixXKhgoSkenlzQ8Lecr9WZWS0T22biTtPf5Y/1 tzGEnN7rh0Raq1CrI96nKe3Sbld/VO2Yh6uQ5D7Le/2NKQ1fqBTLxZwjjjWT16FF74Xv EIbhtEO3W2dZFMNQ+clEMZPNA9+P/thOU4ZYxHKYZmrq5URJ0idqNMop/t4LMTQHWMx8 WrHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=aCJIlyCI; 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 q22si8806626edb.325.2020.06.08.18.21.31; Mon, 08 Jun 2020 18:21:54 -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=aCJIlyCI; 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 S1727969AbgFIBTG (ORCPT + 99 others); Mon, 8 Jun 2020 21:19:06 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:50557 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726860AbgFIBSr (ORCPT ); Mon, 8 Jun 2020 21:18:47 -0400 X-UUID: 7d208eea7d584f089cb7031acb4386ac-20200609 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=Sr4Ct7YRr6GdU1Hh9QPu1XqrlaBQaeLAksq4fKW7jgc=; b=aCJIlyCIJej0iT+uabiHuuzIFxW5m666tRIrD2EB6U50Db8va4dIDY8CiLFwPiGo6PRe3PS3xXK+6dvTNgDpsUo/bVFxy91vf5pPseBv08Hvl70njRjBg0Ru2j8z5M9f8JQJRHxrArKSy8NHcljtN1SHkOyCV3f+FVPSIV4xD6o=; X-UUID: 7d208eea7d584f089cb7031acb4386ac-20200609 Received: from mtkcas36.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1704837095; Tue, 09 Jun 2020 09:18:36 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 9 Jun 2020 09:18:34 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 9 Jun 2020 09:18:34 +0800 From: Chun-Hung Wu To: , 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 CC: , , , , , , , , , Chun-Hung Wu Subject: [PATCH v6 3/4] mmc: mediatek: command queue support Date: Tue, 9 Jun 2020 09:18:21 +0800 Message-ID: <1591665502-6573-4-git-send-email-chun-hung.wu@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1591665502-6573-1-git-send-email-chun-hung.wu@mediatek.com> References: <1591665502-6573-1-git-send-email-chun-hung.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 75F9262C836C92A565B070B6470D6B95F206D05E1518A5724969ACA8D25EFAB32000: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 U3VwcG9ydCBjb21tYW5kIHF1ZXVlIGZvciBtdDY3NzkgcGxhdGZvcm0uDQphLiBBZGQgbXNkY19z ZXRfYnVzeV90aW1lb3V0KCkgdG8gY2FsY3VsYXRlIGVtbWMgd3JpdGUgdGltZW91dC4NCmIuIENv bm5lY3QgbXRrIG1zZGMgZHJpdmVyIHRvIGNxaGNpIGRyaXZlciB0aHJvdWdoDQogICBob3N0LT5j cV9ob3N0LT5vcHMgPSAmbXNkY19jbWRxX29wczsNCmMuIG1zZGNfY21kcV9pcnEoKSB3aWxsIGxp bmsgdXAgd2l0aCBjcWNoaV9pcnEoKS4gQmVzaWRlcywgaXQgcHJvdmlkZXMNCiAgIG1vcmUgaXJx IGVycm9yIG1lc3NhZ2VzIGxpa2UgUlNQQ1JDRVJSL0NNRFRPL0RBVEFDUkNFUlIvREFUVE1PLg0K ZC4gVXNlIHRoZSBvcHRpb25zIGJlbG93IHRvIHNlcGFyYXRlIHN1cHBvcnQgZm9yIENRSENJIG9y IG5vdCwgYmVjYXVzZQ0KICAgc29tZSBvZiBvdXIgcGxhdGZvcm0gZG9lcyBub3Qgc3VwcG9ydCBD UUhDSSBoZW5jZSBubyBrZXJuZWwgb3B0aW9uOg0KICAgQ09ORklHX01NQ19DUUhDSS4NCiAgICNp ZiBJU19FTkFCTEVEKENPTkZJR19NTUNfQ1FIQ0kpDQogICBYWFggLy9TdXBwb3J0IENRSENJDQog ICAjZWxzZQ0KICAgWFhYIC8vTm90IHN1cHBvcnQgQ1FIQ0kNCiAgICNlbmRpZg0KDQpTaWduZWQt b2ZmLWJ5OiBDaHVuLUh1bmcgV3UgPGNodW4taHVuZy53dUBtZWRpYXRlay5jb20+DQotLS0NCiBk cml2ZXJzL21tYy9ob3N0L210ay1zZC5jIHwgMTE5ICsrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKysrKysrKysrKysr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