Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2091197ybg; Thu, 24 Oct 2019 04:42:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVwJN9aBgWSaYfiGA0CzNrdXShEq3Bp5ljtGNrPPASBb7HLQfiEWhz1CjoJAzHbtTbz62q X-Received: by 2002:a50:b901:: with SMTP id m1mr42993411ede.203.1571917370285; Thu, 24 Oct 2019 04:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571917370; cv=none; d=google.com; s=arc-20160816; b=PPBr+fHMfVEIfh1vTLsZ6bDlYi6v5rA29nk0wDofzwr9RXP6vFM8PW9aK2rFfabVXJ mVmbngQKw1/ynmzd0Ta6OxhHWj9nivUP5y40oV/X15D2aU0FulgE6ii4qpDhctyWL8KS v5guacivWuHK1vXGsZrev/6CBFAypipIwzzlkjRNC0rhij/MMEtt2tJwQbj+dVB2JSRC V3PG/QKPZDNDezg45Zq2gR39dz7gu2iHYpcChbjSk0KJXgn1h5SqnJjnsu5zVdTlP0tb Bp9IflDN9OzxeFkETVca+/Oh87zaYEf0Bc0YCc9gXx3k4ZXwpXPevIjnK983UYIOB25Q mt5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :ironport-sdr; bh=Xek7zyPKwS4ep68BZ+BXe1o+aSE8qzphvQ+KwA7kZbY=; b=tk/LS0ZPcXNRGq4FBgaQQ3n8X8oAWbmLye4FynWDqEZ81kfRYmXGR4Lk7uXvDX3vQX X87h19W3SDjli6rehFriJJ/e/HT/ogOo1HSUviebEkTuse2+aIcGwxiK7y3aXg+xtqIl LlsSqg9GEd5cY4nggJRlsK6YPuQ6TNDpzESHlSGFKntA9vPImODSkIMu2DWUUyQpAipY IfJi4dgv4vabhYadeT8G0UQjmdT9BxQEIwZXqkAjEtjgtSBl0BYbvN8eGjpunJGVu4AJ 6g3niZhwznm/yGq9WMlrFH9udrqm/rgX5i3wBIZ0Y1gd1duCSwY2H5KFIb0thqSQtX1l NnmA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b20si15800150edc.359.2019.10.24.04.42.25; Thu, 24 Oct 2019 04:42:50 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726475AbfJWQtP (ORCPT + 99 others); Wed, 23 Oct 2019 12:49:15 -0400 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:58675 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726350AbfJWQtO (ORCPT ); Wed, 23 Oct 2019 12:49:14 -0400 Received: from unknown (HELO ironmsg-SD-alpha.qualcomm.com) ([10.53.140.30]) by alexa-out-sd-01.qualcomm.com with ESMTP; 23 Oct 2019 09:49:14 -0700 IronPort-SDR: aU3DnqRCFkZmOkajL0Sr2Bg7tG5AnKS/LzDPTpWTkWwJ2XQGTVsRBrWQhWbaQfKUFGgMmHSpjr ml9qL1VHdb9Lp7UfOkzBYoNz5XBKw0IcU= Received: from asutoshd-linux1.qualcomm.com ([10.46.160.39]) by ironmsg-SD-alpha.qualcomm.com with ESMTP; 23 Oct 2019 09:49:13 -0700 Received: by asutoshd-linux1.qualcomm.com (Postfix, from userid 92687) id 50C3A2135A; Wed, 23 Oct 2019 09:49:13 -0700 (PDT) From: Asutosh Das To: cang@codeaurora.org, rnayak@codeaurora.org, vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, Asutosh Das , Alim Akhtar , Avri Altman , Pedro Sousa , "James E.J. Bottomley" , Stanley Chu , Bean Huo , Tomas Winkler , Subhash Jadavani , Bjorn Andersson , Arnd Bergmann , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 1/2] scsi: ufs: export hibern8 entry and exit Date: Wed, 23 Oct 2019 09:49:08 -0700 Message-Id: <1571849351-819-1-git-send-email-asutoshd@codeaurora.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Qualcomm controllers need to be in hibern8 before scaling up or down the clocks. Hence, export the hibern8 entry and exit functions. Signed-off-by: Asutosh Das --- drivers/scsi/ufs/ufshcd.c | 8 ++++---- drivers/scsi/ufs/ufshcd.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index c28c144..57d9315 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -250,8 +250,6 @@ static int ufshcd_probe_hba(struct ufs_hba *hba); static int __ufshcd_setup_clocks(struct ufs_hba *hba, bool on, bool skip_ref_clk); static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on); -static int ufshcd_uic_hibern8_exit(struct ufs_hba *hba); -static int ufshcd_uic_hibern8_enter(struct ufs_hba *hba); static inline void ufshcd_add_delay_before_dme_cmd(struct ufs_hba *hba); static int ufshcd_host_reset_and_restore(struct ufs_hba *hba); static void ufshcd_resume_clkscaling(struct ufs_hba *hba); @@ -3904,7 +3902,7 @@ static int __ufshcd_uic_hibern8_enter(struct ufs_hba *hba) return ret; } -static int ufshcd_uic_hibern8_enter(struct ufs_hba *hba) +int ufshcd_uic_hibern8_enter(struct ufs_hba *hba) { int ret = 0, retries; @@ -3916,8 +3914,9 @@ static int ufshcd_uic_hibern8_enter(struct ufs_hba *hba) out: return ret; } +EXPORT_SYMBOL_GPL(ufshcd_uic_hibern8_enter); -static int ufshcd_uic_hibern8_exit(struct ufs_hba *hba) +int ufshcd_uic_hibern8_exit(struct ufs_hba *hba) { struct uic_command uic_cmd = {0}; int ret; @@ -3943,6 +3942,7 @@ static int ufshcd_uic_hibern8_exit(struct ufs_hba *hba) return ret; } +EXPORT_SYMBOL_GPL(ufshcd_uic_hibern8_exit); static void ufshcd_auto_hibern8_enable(struct ufs_hba *hba) { diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index e0fe247..1e3daf5 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -1107,5 +1107,6 @@ static inline u8 ufshcd_scsi_to_upiu_lun(unsigned int scsi_lun) int ufshcd_dump_regs(struct ufs_hba *hba, size_t offset, size_t len, const char *prefix); - +int ufshcd_uic_hibern8_enter(struct ufs_hba *hba); +int ufshcd_uic_hibern8_exit(struct ufs_hba *hba); #endif /* End of Header */ -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.