Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4440788ybv; Sun, 16 Feb 2020 22:34:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwmmFfHYUWfyHNIscAlVA8fARzC8pzBPBwmw3YHM1lwh9EbMsiJ5bOkraOuC3z6sYNA+Bdu X-Received: by 2002:aca:6543:: with SMTP id j3mr8910946oiw.150.1581921252557; Sun, 16 Feb 2020 22:34:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581921252; cv=none; d=google.com; s=arc-20160816; b=xnL5Kfi3LcwIhRW5iciEfnO05eH/m9yzIgczPjTaGtHrHdEZ5C9+WO6Oz3JNEp5KCG yQ6wY7Xs91ReAtaocuhAxSkhRBbb8SgVzFran0rbKCKLE7cEHCSjVUCjymfbx1Nn9VGc oqKWioYEwqjjr/mLDjdsxcgfivrBkCWOthwEt+u4Cdw5fC6MZL8axemUNETg3jq2sHYz IKaaSjCa/u+52qHCYfEHvkwN5l/K48MbgbObGwdE6ld/WFoc1Cxpypnbf7ewW6QHCF+m oR7/c5EkyXj0eBzKkoFTufjeKS72DGHGOKuUjmgNdUXn0NL1XXg85yX+tJDNqQkX9bXD +wAw== 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=WYx1V8Osq0iQkb+UkrJSujefBvXaNKZQHcahWYlLcGA=; b=LaiVlh/7PUsLWjx8dlLs4eJ2+7kQ3VSSRY3g4oMBFIF4X3jCatlBLD89XkWVDwH1yK ywOjAfqngtKVM24OkoFBJuWtizNQyE71iC0oBCn4KcKWOGlZAdCyAumzcpCWYh1hKb7C 0UnIzXhsLP1Y04hc/jw5zw8Z/hkUVRC13hNELNbgsi1YvZqvPC5V8tP8+Wq76qkLZyfV 7UXdLPFe2zcZPcBI+0eN3azr/XlbQge04SzZL8k/5JMYzjITDAySYfGKJoxC4IsP1Cwn kqX1FJFOneVAgIAvwwxOWhHE/IK8zvQnU0/a+xABE6lsJKzncAO7Y+n+l9vjbtC3CfjG syDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=A81Ztok7; 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 i13si6815776otc.228.2020.02.16.22.34.00; Sun, 16 Feb 2020 22:34:12 -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=A81Ztok7; 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 S1726829AbgBQGd2 (ORCPT + 99 others); Mon, 17 Feb 2020 01:33:28 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:24173 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725873AbgBQGd0 (ORCPT ); Mon, 17 Feb 2020 01:33:26 -0500 X-UUID: 33d03442a80b45818016830bac03c631-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=WYx1V8Osq0iQkb+UkrJSujefBvXaNKZQHcahWYlLcGA=; b=A81Ztok7n5oayCZFay/n5UgoCa/bHMW0QHFFpScP7s/AsZ29s+7izC504WJZAbE/ltWhBeMOvpoim4XHllaIGwcYko8AOAztwyD2KdOuXpH7ximaTyWKUh3bvYL0LiYibnA69YN+WbdT68Glny2tER/NiRRKb/ezczUp9QV3r8A=; X-UUID: 33d03442a80b45818016830bac03c631-20200217 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1399197989; Mon, 17 Feb 2020 14:33:22 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 17 Feb 2020 14:30:48 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 17 Feb 2020 14:32:50 +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 3/4] [3/4] mmc: mediatek: command queue support Date: Mon, 17 Feb 2020 14:31:50 +0800 Message-ID: <1581921111-24172-4-git-send-email-chun-hung.wu@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1581921111-24172-1-git-send-email-chun-hung.wu@mediatek.com> References: <1581921111-24172-1-git-send-email-chun-hung.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 2E6A57CB961ABC6A122E2C84D8AC657D3952C522319E6AD4B7E0D657E719A1072000: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.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