Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp380731ybm; Fri, 29 May 2020 02:28:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQJLvaJ+dy4qTSpHBVNr5/XSFt+WedEWBvZT9JMXl+gbCcf24LpA0+rHA8Qb7huAk8cH7+ X-Received: by 2002:a17:906:eb44:: with SMTP id mc4mr6630883ejb.234.1590744507832; Fri, 29 May 2020 02:28:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590744507; cv=none; d=google.com; s=arc-20160816; b=AaQcOjMC+bYqd3xZSSVoKC/Y7SjIkLJTZ7h2p2cyMBjjOut+DP3soERqD9qB159ykA UZQK9nBs+qVmqLoX5AVIchQk+qwwn1ZgMIlb2jx8+6s4729dVnGO+qdUb4U9GiRUvlmG qoayGtlpZRknPpKwbM4mGjpHpoYC5C6UTSzfFAqPgDxTwM5a1x0AcA0l5wXB6U1c+4ff NbtMCEt7XxcVNyHf1ySBmIhU4HjbkSq2TqGiTwS1fPkJ7lW7pnXg3OTGkCvjNaTIJ9V1 OSaA44rPbLTb9W1DcozgRfh7lWGfERITotxNK5TuU+kn99L6G2y3X3QiB/i16BVIxv8H Otag== 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=ew+RGCuaV2Y1qHcybtLqf6q5Y9tu1r8jPZYZhoV+ToI=; b=SEwQRIUQb9AEast38hA/bHqY4vr67i7AoBaybPhTAkGqB2SlCVDm60Ve3RCPEe1aI2 KnWFp3LLvBRMxOnQ89NqeP7rtcPfvX11v2wuz08fbchMiwoiiek2IfE3qrylqOR3FFZK We74zluJgyUWhXLEvUaZAvZxrpCDtbSyHspkjTmQqG9DNM0BFg2JVABfqCsUjjqVY0wh IfdPwQoX6U6R5jlZW5YhHUFL/meyeRgA0VcLpPiwx9+hZDhqelGpxk5cvT3vKuojLwMs rEK5Ki3Mk4ZTUdxjbeVRgvy/QJwpwpttr1NMBz1A7zX0caZrJRYTOB/e3duIs/Dn3ELq zF2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=uX2clnuH; 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 e9si1813723edn.18.2020.05.29.02.28.04; Fri, 29 May 2020 02:28:27 -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=uX2clnuH; 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 S1726866AbgE2JXa (ORCPT + 99 others); Fri, 29 May 2020 05:23:30 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:37427 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726487AbgE2JXR (ORCPT ); Fri, 29 May 2020 05:23:17 -0400 X-UUID: e73b78c6067148eeaebfdf9f45aa441d-20200529 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=ew+RGCuaV2Y1qHcybtLqf6q5Y9tu1r8jPZYZhoV+ToI=; b=uX2clnuHFeTnEABY73ouX/22G12TdLGnSzsxsTAAl0A++gCX6UKLBna06mmK1MeiuabF6x9VCvZfkzyx7dMW4qffuWutCXtV/1FGpxfdMRzZhjKS622gF4/O3rpTqYkVr3CsdcINRgG0/1Dqo0CADBIwfOYMIr/RIrvH5/7Q8Z8=; X-UUID: e73b78c6067148eeaebfdf9f45aa441d-20200529 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1831169926; Fri, 29 May 2020 17:23:14 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 29 May 2020 17:23:10 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 29 May 2020 17:23:10 +0800 From: Stanley Chu To: , , , , CC: , , , , , , , , , , , , , , , Stanley Chu Subject: [PATCH v2 2/5] scsi: ufs-mediatek: Do not gate clocks if auto-hibern8 is not entered yet Date: Fri, 29 May 2020 17:23:07 +0800 Message-ID: <20200529092310.1106-3-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200529092310.1106-1-stanley.chu@mediatek.com> References: <20200529092310.1106-1-stanley.chu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 179AB46C744F75B7EDC9180CC11DB5285C4CC2C633C70B26C2D576272C883EEC2000:8 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 VGhlcmUgYXJlIHNvbWUgY2hhbmNlcyB0aGF0IGxpbmsgZW50ZXJzIGhpYmVybjggbGF0ZWx5IGJ5 IGF1dG8taGliZXJuOA0Kc2NoZW1lIGR1cmluZyB0aGUgY2xvY2stZ2F0aW5nIG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