Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp697029ybv; Thu, 20 Feb 2020 05:49:37 -0800 (PST) X-Google-Smtp-Source: APXvYqymFT4rPLmvKf8gFS8qzovIbb8PUw8vv1EWYpauxgCYPLO2iZxccC1hHa4dfanbwglhNntX X-Received: by 2002:aca:acc4:: with SMTP id v187mr2092988oie.130.1582206577693; Thu, 20 Feb 2020 05:49:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582206577; cv=none; d=google.com; s=arc-20160816; b=dnWPMBuGB9wWFNC51uBibCpNIcKGV9G3zE2t3PbPwFtT0kCs7VmrO57+KXY8nWYgSl 8jiBcuh7VXVhJksaRzxC9f+nFDlPOGg3oSoLsmROXf6HAxfnxPhRZ/ctOMgb00Kbo8su lyiNu/fjuMkkxfa/iHPx8y208yJ5toH/dX8SqR3wJwbTRZBkMOcR+dwg4euOXFBN7z5K mPUiliUBSptr9/lcxDF/j8vOOGZsjE3Jbnhqb4w65eShx6a47g+4TVR35EMaEnWbvTS5 aWYhgpb3wZUWjtp1mfldfn+Hg9CLwn1pfsw/Oj5q0v2PpXD5No3rbKCB+fpEP/8IoYJ7 9F/g== 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=j1shUdhIMGXtvTw4SkKdC2CAhrzkCOkweoDSyilUUBo=; b=yAVJOfhN9ZBQ2TLEpS+fSZitkVSCiWuGpwqFqmQSrRf9MyBLBlfj3zdbOn80y7Z0fB g+7SBf8u3A9kO6iVemV0Ff9zkBNc1L4UvNBNb2luwJPFUwwkIc9U9Q57yw3cXahpt4qs NmV7D3IxIJElHqox+X4oh0xHbWaSuBUmRdYbbG/zgwEtAQIGLskBTYCLWG8OrV5dluHd O9Jt4Q1VaOgSFkVGr9Djjpx3MzRnWi6utSDk8OIGDPeIG2r9MQ9hotAsn7D5pLSZLoLE CJidw2U14Pmy+ZRstwbBMQ/rNA1wuSn985JCkDBIAcD7iIsC+RgjPC66OJm2HLlIN9+J Z2Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=JuGyWgg0; 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 m9si10552239oie.148.2020.02.20.05.49.24; Thu, 20 Feb 2020 05:49:37 -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=JuGyWgg0; 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 S1728286AbgBTNs7 (ORCPT + 99 others); Thu, 20 Feb 2020 08:48:59 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:52875 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728042AbgBTNs6 (ORCPT ); Thu, 20 Feb 2020 08:48:58 -0500 X-UUID: 51e40b998c3d4425bad56456e53047c9-20200220 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=j1shUdhIMGXtvTw4SkKdC2CAhrzkCOkweoDSyilUUBo=; b=JuGyWgg0RsaKFLxSk6fjV3FIRJ1bjIHfLJD/lwDYvFI29QK150I1/LVKDfZhQPlZP2R3f4maAU7TjKRmtV5IuQ7BLtPmwL3qjPPKXghufc0F24H7uYSZ1m5f0+0qR8DN1YiDSd7vi8ie7gLwSBMWpndL7+idFV/LgUtqHsiPA9U=; X-UUID: 51e40b998c3d4425bad56456e53047c9-20200220 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 1621483974; Thu, 20 Feb 2020 21:48:51 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 20 Feb 2020 21:49:57 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 20 Feb 2020 21:46:45 +0800 From: Stanley Chu To: , , , , CC: , , , , , , , , , , , , Stanley Chu Subject: [PATCH v2 1/1] scsi: ufs: ufs-mediatek: add waiting time for reference clock Date: Thu, 20 Feb 2020 21:48:48 +0800 Message-ID: <20200220134848.8807-2-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200220134848.8807-1-stanley.chu@mediatek.com> References: <20200220134848.8807-1-stanley.chu@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 U29tZSBkZWxheXMgbWF5IGJlIHJlcXVpcmVkIGVpdGhlciBhZnRlciBnYXRpbmcgb3IgYmVmb3Jl IHVuZ2F0aW5nDQpyZWZlcmVuY2UgY2xvY2sgZm9yIGRldmljZSBhY2NvcmRpbmcgdG8gdmVuZG9y IHJlcXVpcmVtZW50cy4NCg0KTm90ZSB0aGF0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