Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4441356ybv; Sun, 16 Feb 2020 22:35:07 -0800 (PST) X-Google-Smtp-Source: APXvYqyunFQK3dmakFLL7QHfSu3cQrdz6fpJjByEFBBLshsLosk58NIxKS4vRvGK3BKrYCQzMW9m X-Received: by 2002:a9d:1928:: with SMTP id j40mr11160275ota.68.1581921307400; Sun, 16 Feb 2020 22:35:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581921307; cv=none; d=google.com; s=arc-20160816; b=GQL4zToaWBD3hViiu0pNZ38LWCBjauax4Z4v8Nd9iwVqRFW9Y0Iede8GQGsiIBs02l bBnwLrv+ZVtqnukVb5g52CefhvtW1CJ2q6FK4uxPuLwOCT/F89SJDEPpFDq8sbCBRjA2 v3D4qGDKwv0bEbjHCVm6Xnfh8ZbsTsMf0V9eO8ZZkYF0RMHOBzXk1jT7JWPUgqF5/2nD TBZJtxFcLXe5vbmkO5erR8xOy/ntG+fY94zN+UCCT3ddu9Go0jXNeQMU37MR0Y+z/QqZ +Tg98/N8dGrK8OH/ZLvTQFlIspllY2H4n6pfAMgeSr+9EBx8NQ0RyWxlSkgBTxzF4Mve fOZA== 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=UqyfYNy4x/PeVu5uBPlMP3PaioUduXQQRrrF8IqqBsU=; b=e2+/tlFKsS3/bHqnEtSeg9tP6QgGK76UzftBQMvO+9w3xEMOkag/fheiyHyQE53h2V yVPXF1FeTS0qQn7gP73K2s7lrPB08lswnwi2ztWvi+EwkirmzY/jTfKZHWo7BKgUstMz CDLhQM4zRBSEWu9/5P2Jq7OAvpsDcmbseSqvc+gk03JKsFa9ZbM5eusQaT9kvAkkvAqX VrK7oKuvmaVdopTf6+WAjlXKa0AOV8j9tqMwm51XWCVFO5Bt1IM5WAkpmjpj7KiVILG5 PZqYuBTyIKT8XFan8fLHm2NOPEIlRbDxhIJoy8r8b6Z+g45CG6TXHf/PwnfrTE9mbpLU SysA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=eSHNGl3n; 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 x25si6251888oie.261.2020.02.16.22.34.55; Sun, 16 Feb 2020 22:35:07 -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=eSHNGl3n; 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 S1726770AbgBQGdV (ORCPT + 99 others); Mon, 17 Feb 2020 01:33:21 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:17019 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726289AbgBQGdU (ORCPT ); Mon, 17 Feb 2020 01:33:20 -0500 X-UUID: 3ca73692839c4dd49d67780fb507cd2a-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=UqyfYNy4x/PeVu5uBPlMP3PaioUduXQQRrrF8IqqBsU=; b=eSHNGl3ngkklQ+DAeyKzOL1AGRCpEpnns5dAto+A/lEzKc7guvbdOGT907uEyWYjocScfLTDMeYuoNOWK7n8vQsE8MJF/rYqblhaNvAvHDtPwtrNIlU0FwxUA8gPNKtyIZrm1qzUYT7sNaupTNhNXosgmmo+nndDfLaEvq5R/7A=; X-UUID: 3ca73692839c4dd49d67780fb507cd2a-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 1788356166; Mon, 17 Feb 2020 14:33:16 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 17 Feb 2020 14:31:32 +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:49 +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 2/4] [2/4] mmc: mediatek: refine msdc timeout api Date: Mon, 17 Feb 2020 14:31:49 +0800 Message-ID: <1581921111-24172-3-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-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 RXh0cmFjdCBtc2RjIHRpbWVvdXQgYXBpI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