Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8649243ybl; Thu, 16 Jan 2020 21:47:02 -0800 (PST) X-Google-Smtp-Source: APXvYqxrGiIounNRXFqIdTfd6QrGdCqHZHh0NwtYHK9+WdEDdel05UMBo1H7PTUgHXTwrE9lCpUj X-Received: by 2002:a9d:242:: with SMTP id 60mr4889198otb.253.1579240022297; Thu, 16 Jan 2020 21:47:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579240022; cv=none; d=google.com; s=arc-20160816; b=j0YHxsVWoP1NMVASR1n+xAD7Nk3G1VFQBZvMQ3+b4HRi960VZHFnflCueupkqM1qyP 7gQEeKTbo6LwIz0nCwAGafI2gpSxYhc09Gg+4e0tQw7JQJ341IGKuhj/dgNnOOLOog9/ K5x279GvzHJSObjm5RLH4SV6yLrvqGURU+bDjb7IY5hpkjDBUpdQ8P9jBxJ4AuOLSpDG 0JDlhBYNj74Qq8jndkdjtloetN7eMLU4FKbfLg6qiBwq0HGsnaHLmdsrJbG5/3JUl7uz LdXm1cSXZ7V1LfUEoSimFQI6BVTJInWwDA/X8VvcCVqLMW5TmOs3V4Pczz6iXc7TJ+is qQIA== 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=p2qxacDfCCVqjUwwOgx8vmOgcBiOvdFZh2JOvNF4dco=; b=BsOCrx9mkQ8yCyaq0sqtMBF0E9O5HuXSZmFwf8FNI6YRXogMeemu+Sv+sFtcxJZEpo gqQDX+kzG2SNeR/bYZiz8tujCqec1k1FH0Bvw3R0nDDkA3BbuKm9WD7l1rK3Kn7edJTP xFPvtNd/GKnWftVddf0/a3FC3/iPjVO5l9d1bfAtJcs0N0gRykylqBytRDO0/y7s9LP+ tO9WeZ7pWOwER+lV20+DBDeGutgyWURczgJu1+c+ZNAwSV8Cp/NQQinHgVDRUc+EOzs+ vbHQg7KUBwHZYaEcZSu1XxmYFDteL5iEqSL/7A6BLT5ZH4W7FpuR8vZP+dAeBlrLOtnw UQmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=QfqQN30y; 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 w68si13816846oia.223.2020.01.16.21.46.47; Thu, 16 Jan 2020 21:47:02 -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=QfqQN30y; 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 S1730850AbgAQDvQ (ORCPT + 99 others); Thu, 16 Jan 2020 22:51:16 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:19074 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729702AbgAQDvP (ORCPT ); Thu, 16 Jan 2020 22:51:15 -0500 X-UUID: 293089afc62f468dab02df4adaa8fa7e-20200117 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=p2qxacDfCCVqjUwwOgx8vmOgcBiOvdFZh2JOvNF4dco=; b=QfqQN30yiN5NPwUOijX/BKDmh5xRxb0wtMVKh/cRHgS+vpkRmU15dd2elGQzcgLw7yYw3qYrfhRIhiNzlV44WWwX/xHnk1YO4dAtUFTgtvlA3bU6r4C4mhmeYYdbsyJDAU5FWJytmbYRS/aGdeSkzZ0aJDg9Tvw+crpRjld/yOQ=; X-UUID: 293089afc62f468dab02df4adaa8fa7e-20200117 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 278267192; Fri, 17 Jan 2020 11:51:10 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 17 Jan 2020 11:50:03 +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.1395.4 via Frontend Transport; Fri, 17 Jan 2020 11:51:09 +0800 From: Stanley Chu To: , , , , CC: , , , , , , , , , , , , Stanley Chu Subject: [PATCH v1 3/3] scsi: ufs-mediatek: enable low-power mode for hibern8 state Date: Fri, 17 Jan 2020 11:51:08 +0800 Message-ID: <20200117035108.19699-4-stanley.chu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200117035108.19699-1-stanley.chu@mediatek.com> References: <20200117035108.19699-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 SW4gTWVkaWFUZWsgQ2hpcHNldHMsIFVuaVBybyBsaW5rIGFuZCB1ZnNoY2kgY2FuIGVudGVyIHBy b3ByaWV0YXJ5DQpsb3ctcG93ZXIgbW9kZSB3aGlsZSBsaW5rIGlzIGluIGhpYmVybjggc3RhdGUu DQoNClNpZ25lZC1vZmYtYnk6IFN0YW5sZXk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