Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4350032ybv; Sun, 16 Feb 2020 20:13:46 -0800 (PST) X-Google-Smtp-Source: APXvYqyKx1PU6eQdG17VsesaygDAEI1noG1/crAF5azG7kfOzVUwkT76Ya1Z88Eae9K0FcSGQB7a X-Received: by 2002:aca:4ad8:: with SMTP id x207mr8459407oia.55.1581912826508; Sun, 16 Feb 2020 20:13:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581912826; cv=none; d=google.com; s=arc-20160816; b=azath2ADkGB6sqT1bNTcWHZLVteSE4tQV6tdi7jiVt5mEW1tHN7bnCWlXDZCmzACpV +kKkl0qzcwWuXiyFCeGt/5EcX3KAr/uXs/Py91QIlQRz/413lhjP5crLWJaGkVP2hrsy CJXia9u/cvSD8/2806nET27KGhqbAg71mtpwZVm70+Pk26WjZ9C4GBuympx6Xw+kMLmC +NnM3ZAGTNV6gCot/1ipi4iexdW1I5uxJvxSIcs2pbxvp/8Lin0f0B58RMV+hajXaFbE h093Lla63rD+bfB7iTk0OGF7E3+X/5ZPs9nF5tqsrKEAFD0gcvC4lIs9pKT3OIcBitNS c2vA== 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=gA92exK5mTm8/CG4HiiRVWxwEcrPVIB/LJ+HLulMGSQ=; b=n7blkK8P5ja+ctpB/koJNV55eREup0UiUHZ3zQcP1lTgDIM60Qjy2/Y+Prtr65Ncta 3ha4NqE99BslbWT5b2FIv5mhH/JgV2opwPXN4eA8MUEOjLYXIRro4uz01tkp4ftlv0D7 PAKFp2hpgHATwoPvUydyE9XW/GytimSEFtdCVIQNeV5vwlnoUnuvw4J3ZumcBSJTbmfO YcEP18jrVn+DFWcTcSA2hjLx6nzDIRQbvvQi0fvaNmtViYr+wAxjIiHl9qxRP7Nnsrj7 PouJ8DSsNPtkNGKpL/FmPNb5+qiKBpJSQ+zqCKI3dvJN5MpdvIHM5kh081tkBfpMOW4G ommw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=OnfzpuEV; 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 h11si6390897otr.197.2020.02.16.20.13.34; Sun, 16 Feb 2020 20:13:46 -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=OnfzpuEV; 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 S1728000AbgBQENW (ORCPT + 99 others); Sun, 16 Feb 2020 23:13:22 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:60480 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727974AbgBQENU (ORCPT ); Sun, 16 Feb 2020 23:13:20 -0500 X-UUID: cc2d3fdce6cf4d099ea4e287d2d84ec4-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=gA92exK5mTm8/CG4HiiRVWxwEcrPVIB/LJ+HLulMGSQ=; b=OnfzpuEVRC5/wb/av/q18nPJsB/WyghKnazSSZxHeQ85bmanzFqbj0r8zSZJX8PIjklJL7R5fmscv2fjDOXGHB0R12IH5Y761+phhRiAvnMcf0G7sYJd0ddaUtCEuud5QPhm7VFSbu+DAzgixEDR+iVVKnnoRh4zVtik0dRUMXA=; X-UUID: cc2d3fdce6cf4d099ea4e287d2d84ec4-20200217 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1491087829; Mon, 17 Feb 2020 12:13:16 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs05n1.mediatek.inc (172.21.101.15) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 17 Feb 2020 12:12:20 +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:01 +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 2/4] [2/4] mmc: mediatek: refine msdc timeout api Date: Mon, 17 Feb 2020 12:13:08 +0800 Message-ID: <1581912790-19382-3-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 RXh0cmFjdCBtc2RjIHRpbWVvdXQgYXBpIGNvbW1vbi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