Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3487545ybz; Mon, 27 Apr 2020 16:59:14 -0700 (PDT) X-Google-Smtp-Source: APiQypKW6TQLd9TpIQdyfYK25eAX7BJEaGZevY+w6zyqrgYVdCIFTE9+PraATOmfWifMSZay5V82 X-Received: by 2002:a05:6402:1597:: with SMTP id c23mr21479857edv.353.1588031954715; Mon, 27 Apr 2020 16:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588031954; cv=none; d=google.com; s=arc-20160816; b=klXe4EVfiIjMBD4vwJ1E+0QV8p6HX9OwF40jyY929Oj74qDsKwDXxHRmmiiHQ/vDEx bPX1EC+nrF0lYhpwmMtsTr7BQuzMU4+NxweWW6Breju2oeu9X+bjIROaccacrOrT3+iB 8052I5aih8NnNtv064BPHoUoUA8AJ3Q74XtCSpOQ01w23O+A9F19kI8um7A1xRxwuV7e DwpwD4Z/X0Tso3nozg9jphV1vshql89xVHRt+ngAdP6GkaOMiTyT1K6Sc9aYr/ceHe3s lpX/dsFFwFdNd1JrfqfzEhNFhXp5QTF/Z10w5z5cziP1yDTLFtAqPWAqESqRHFYlyFaY ph+A== 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=4PG5NDEBrD4fO5vzTmIM1OqLtc9TFzvj1Pom1O6bbj0=; b=B/MERDadAqppOMAeW00i1E03I8it+r+r+uFd1EodDieYqo4xJCsrCP/6rWj5IMZSl4 Nou1dCrgVkKsbDXvb5hHdUbiNXpNEaBaQzdoAL/Jkq14UvUna/ul/jWjzZbjqE11WpL1 scjUQJpU+s/6rVfq5/jlN3iT5zNf0hlyosZ5d5RwW1PXb4hllSApHEH7BO5MQmRE50Dl LI4bujjPZk6yBUOG4DkL5BVlq9ma1OlT5ONTLarUWyTPP8Ngdl4kyvMq4qiryYjYaCef AOLcNpVBFTKABodCOr4MdsphZRfoWKwgQP9IlrBkUYhN4+q3cB5ZMou6JaNbSFRtVRGW +faw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="hM855UT/"; 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 p16si674004ejd.448.2020.04.27.16.58.51; Mon, 27 Apr 2020 16:59:14 -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="hM855UT/"; 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 S1726501AbgD0X5U (ORCPT + 99 others); Mon, 27 Apr 2020 19:57:20 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:3807 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726472AbgD0X5T (ORCPT ); Mon, 27 Apr 2020 19:57:19 -0400 X-UUID: e4c8437aa40a471cb743922bcd70d065-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=4PG5NDEBrD4fO5vzTmIM1OqLtc9TFzvj1Pom1O6bbj0=; b=hM855UT/qYcScQoS1QHW0kcPRTdW/YiJuGwQfgDtFEHI2T/UP3H0PCKyrNtxZLKXRy4k+XCajPqUt9zlW8OhFmgoucPRP/4CdUHKQ8GXVU3bb7aUQaJqjXql4RVY2cq53bvMPHgmxdEDFrf3Bryz5aZHOVunv95zBUOlIZp4+XQ=; X-UUID: e4c8437aa40a471cb743922bcd70d065-20200428 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1814683827; Tue, 28 Apr 2020 07:57:14 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 28 Apr 2020 07:57:08 +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 3/5] mmc: mediatek: refine msdc timeout api Date: Tue, 28 Apr 2020 07:56:06 +0800 Message-ID: <1588031768-23677-4-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-Mailing-List: linux-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