Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4350064ybv; Sun, 16 Feb 2020 20:13:50 -0800 (PST) X-Google-Smtp-Source: APXvYqydve0AYePxiwWWquZfQPDGP4co/vHMP45OVMMmxsHbbCr3fVlSWNT1qmmLU2+AMRIfEDtM X-Received: by 2002:a9d:6d1a:: with SMTP id o26mr10358173otp.141.1581912829911; Sun, 16 Feb 2020 20:13:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581912829; cv=none; d=google.com; s=arc-20160816; b=Umrt9+flVaCAOO7eZoVvg7WWbt9U37auBqpgL4KQry5r2YLbrrVtzQr72Vj5Ap+RgJ tu3gq+18VSLsSa2fdAl/pVjiN3AwRripUEttvCRNQWvcxcNeRmSQg/7IL9pSUVEp2zSu vMIzuRuyqNLbqD2oavejJTHUiozkohLiuJ/TECpNQWEolmPsp0xYOiCanFV9IGzg9Vqc AkBN+EBlFaLGO8SM9DPB8xbCw+VcitfULxQNRHoippatk26QQxQoOWdQSW8rB2+XQFyy hHTTJ+iHtUDEK74NPiwxVz04rODkZ9NMoq8pcHa+OAB1Ju+JK9lXTHZAmQvKw3rc2VXu c7xg== 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=e3oElr3gicN7QFfheHk5xORjiGuPjtEq84x6gTNgrsM=; b=MD6z50JMfPc6bgJvON6tj1upGBr3EP9M0aP305m8s1neNx6yIisjfFxiFJAlcP4u6k dFQMN5VcCLY5hQsNZwxfv0vfhVzyFv5XoEbX7HCWGUpsiL7ueDjMh2QTAFW5OS1JX1zM UUxci/pwA1m1uFB86BjAVrzQSA0H4+FHW9bdbAYQxNdn9L7pIQ4F9AtFrJIxOFkZyaF7 CsAqZdnvXIS4JzYucLhiBLtOmGG0217Aerb5mlJ11S7udObMtFQ+Lg/THdXF2/ju6Ka4 i4ID3sr2sMnEcJiezJmGKOPGSeqXaq6M0AQbiUU3zJfZoX3jOGp6y5Rq562jpgtZ7jAk /Djw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=dWvdZLqB; 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=pass (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 i23si6302965oto.206.2020.02.16.20.13.38; Sun, 16 Feb 2020 20:13:49 -0800 (PST) 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; dkim=pass header.i=@mediatek.com header.s=dk header.b=dWvdZLqB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728028AbgBQENX (ORCPT + 99 others); Sun, 16 Feb 2020 23:13:23 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:44511 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727953AbgBQENU (ORCPT ); Sun, 16 Feb 2020 23:13:20 -0500 X-UUID: 7ecbd445ffae48f6971e1a331c13610b-20200217 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=e3oElr3gicN7QFfheHk5xORjiGuPjtEq84x6gTNgrsM=; b=dWvdZLqBGft6KhMeOvRt0L6KlB3Yfp+j4R7H3vns5LQROU5BKREjCdapnURYpkiGe+Wxej5GohoBvoM11DY/mBgk6D+TYXEdUqHdDmU5UcMyIIhLTg+zytwDkwBYl7ZXwqGP5ELj/l6OwMNxYCLYG/7YYRQUbtw4eTj16IV7uo8=; X-UUID: 7ecbd445ffae48f6971e1a331c13610b-20200217 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1438797571; Mon, 17 Feb 2020 12:13:17 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 17 Feb 2020 12:12:23 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 17 Feb 2020 12:13:02 +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 , Allison Randal , Mathieu Malaterre , Stanley Chu , Kuohong Wang CC: , , , , , , , Chun-Hung Wu Subject: [PATCH v2 3/4] [3/4] mmc: mediatek: command queue support Date: Mon, 17 Feb 2020 12:13:09 +0800 Message-ID: <1581912790-19382-4-git-send-email-chun-hung.wu@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1581912790-19382-1-git-send-email-chun-hung.wu@mediatek.com> References: <1581912790-19382-1-git-send-email-chun-hung.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain 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 U3VwcG9ydCBjb21tYW5kIHF1ZXVlIGZvciBtdDY3NzkgcGxhdG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