Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3490175ybz; Mon, 27 Apr 2020 17:01:47 -0700 (PDT) X-Google-Smtp-Source: APiQypKvIl27Yqs4eCZu/1mbIjKCyZ27wWuLm1LUvmDtTx0/b8larik6tIV1Wo/OzZfY7vvTgxSv X-Received: by 2002:a17:906:78c:: with SMTP id l12mr20851949ejc.189.1588032107650; Mon, 27 Apr 2020 17:01:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588032107; cv=none; d=google.com; s=arc-20160816; b=EBDWEc3A70Tyy1Xv7G1LljjNneyXlUMIL/ElnmXnHRRpeACX837v1HsdZocw7HPcDq o/tARiUtsj1aq3MQcJx+Z6cyd8yo8Iv6rqhHWzri7nt4+yIUJpP9OhEubloymq1B5QAZ TpanBkDNiCn4RvVtiz5gDRlM3Vu4rTiI8yJUz6GJbcYORTtVAwynGVepuSsGt8OSw4T1 GQkWLMperx5ZCDj2ou9hBcWNehYk6iHEOW6YaAmwwVZyaHnNFaJLN8/IleWzATJI4LGG V1R8RS0nkqqHvu6IgQIEA2CwPTK0BPL2oUleO6MCtvRdq/hMtOUqOaTcJv36aaeP3d5r exCg== 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=Ka1VpXu+0E+Smr9pkPy8HfDlYfiuvLYEfO8kgaZYtQM=; b=KzX4JGgh9H2ixL7zTV4Cbjc6iAoYIUbUVXCfQP8w5l7BqFqYfYb2qgVKdxFtRQFBei 5n/LTwO8O+PzN4/LcnRALmhbZZvJ6P3UOv2c50SscJ7/KwmuQhN5M0yqku7cGnuBkFmQ U7Uhow2BNX7scJP8mclTPhMTDDnm1uMkvEGZr8XWSMtKCyoc94YfQMWHXOy2Kgg6FSYf D/OAEnhw/82S+qxqKgMjxYltrMYRNtGdxP3xQ7Exgq+D34xtGL3YpvLOnOhiH3AqHE76 m890Tmchg32i57/K/HRjR8wxMpIvCWEmQmVJHg2507ALt8pTJD/cTu3uEsYVUD9JFh1x F5gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=mgUtCl3B; 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 u12si618525edb.262.2020.04.27.17.01.23; Mon, 27 Apr 2020 17:01:47 -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=mgUtCl3B; 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 S1726556AbgD0X52 (ORCPT + 99 others); Mon, 27 Apr 2020 19:57:28 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:64043 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726508AbgD0X5Y (ORCPT ); Mon, 27 Apr 2020 19:57:24 -0400 X-UUID: 178f777f09244bc28e223dc678b09c1f-20200428 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=Ka1VpXu+0E+Smr9pkPy8HfDlYfiuvLYEfO8kgaZYtQM=; b=mgUtCl3BylwJRMmKRwok4zYhDEqkV1+Ink18Ev18ic75DJdJVo1sz3p9p9fGDf0mnCKfu6gTJUntIloujK2YkZKppgCg5qjpsxjN0lzc2wcjCbeYZW4Ja1+2gOHVLcianuAt/0YSLXI8eRxKC8xwiVvv9wI/CiceGG4cxkDifnc=; X-UUID: 178f777f09244bc28e223dc678b09c1f-20200428 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 36155996; Tue, 28 Apr 2020 07:57:15 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 28 Apr 2020 07:57:13 +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.1497.2 via Frontend Transport; Tue, 28 Apr 2020 07:57:13 +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 , Yong Mao CC: , , , , , , , , , Chun-Hung Wu Subject: [PATCH v5 4/5] mmc: mediatek: command queue support Date: Tue, 28 Apr 2020 07:56:07 +0800 Message-ID: <1588031768-23677-5-git-send-email-chun-hung.wu@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1588031768-23677-1-git-send-email-chun-hung.wu@mediatek.com> References: <1588031768-23677-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-M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