Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4455070ybv; Sun, 16 Feb 2020 22:57:42 -0800 (PST) X-Google-Smtp-Source: APXvYqxtACQU2Cf/sPUomhd/NXkXBsHNCMDLxhs0plDJ9Ev1ClDwdn5gHuB2m2zrSQfEXWcmX+zD X-Received: by 2002:a9d:7a47:: with SMTP id z7mr11481161otm.179.1581922662757; Sun, 16 Feb 2020 22:57:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581922662; cv=none; d=google.com; s=arc-20160816; b=ne/wdvbGMOqnqA94cic6yeB3b6MHjwMGwusxGEEps6CK3AC4xUm01qlBivH0WX4z5q rTY4OeNEnpl4Jh6/iHRT3SYhhMnabAE6aVaFbN97cTkR30ooYWrC0jrNK7NYtUaGvspp gIqaLLPvZD9Jhs568qC+y/1MiAWkcDFW8a2BBemP1maW8k2LTOJgy9i2ynk4K8wXEjZV 56S1bXjgxLY4UyE9+gfWcUKi6VOSmPGyF+89go7EdXaBaX5LAf7Ji19ihZDgZvmFzcci UyISKJ1FddptZPhFVicbT8zk1id59mdJNRcd2NsMTv+tYoSsa8pIHqutXQIzHvAYEl8+ mEMw== 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=hxYCCL3/k4cibEcsvPHtckq0NXx5A2Fj9khz3ehuN+o=; b=eoIUT4Z+mY2z0h8Kwwh8wVp1KK3XPjQp4MKQ7aXQo1REQa0dSeRXBOKWKfFvAe9/hl hTd8bURLazLFU955XTOV8YznWFHohDH2G0c499kN1d5PsgHHpX5GXzTK695dGH8WqXwi RmpRLp8M7sPgc4OlX9Ahhb2NtNGJ/7w7Euf4poLoITnPy+b+K6IHG8XAKgqvroFMvskI 1feRKWYnarh5Q8N8ABracWlJXpGv9GnrkKb0bTdDUqVe1fEK8XP1e/yNnA69LqYgZSfz CzvHXAOUvVdp7wFBreG3NLIb06cbkgfua+XRK0L7MJ7JMId2Rr9m85SBFC3NtwMRElJY +uVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=p4SeIOL2; 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 e26si6084245oii.88.2020.02.16.22.57.30; Sun, 16 Feb 2020 22:57:42 -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=p4SeIOL2; 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 S1726707AbgBQG4s (ORCPT + 99 others); Mon, 17 Feb 2020 01:56:48 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:6658 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725855AbgBQG4s (ORCPT ); Mon, 17 Feb 2020 01:56:48 -0500 X-UUID: 1802d54c9eda4d11bb9fbeb245679826-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=hxYCCL3/k4cibEcsvPHtckq0NXx5A2Fj9khz3ehuN+o=; b=p4SeIOL24J0WiZxgC4Ufbtv9qKDlfLq9rAF6TMXhyC/K5RNG7uyDjSd/Dmz4aKVKHtn36+Kq8e4RUNFYJrq11HLkxT7PWXfrIbEC8jh70vvwuXdJ6+0yS5yFFqNVIOsPJco0mEGZWK6zZdJQngGjyFnPr666ihOwAMeCuRAOzes=; X-UUID: 1802d54c9eda4d11bb9fbeb245679826-20200217 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 3879307; Mon, 17 Feb 2020 14:56:42 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs05n1.mediatek.inc (172.21.101.15) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 17 Feb 2020 14:55:46 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 17 Feb 2020 14:54:43 +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 v3 2/4] mmc: mediatek: refine msdc timeout api Date: Mon, 17 Feb 2020 14:56:02 +0800 Message-ID: <1581922564-24914-3-git-send-email-chun-hung.wu@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1581922564-24914-1-git-send-email-chun-hung.wu@mediatek.com> References: <1581922564-24914-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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