From patchwork Mon Apr 9 13:24:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 10331317 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 471F66022E for ; Mon, 9 Apr 2018 13:24:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38FFA28A91 for ; Mon, 9 Apr 2018 13:24:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D43928A9D; Mon, 9 Apr 2018 13:24:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D755A28A91 for ; Mon, 9 Apr 2018 13:24:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751801AbeDINYT (ORCPT ); Mon, 9 Apr 2018 09:24:19 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59032 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750982AbeDINYS (ORCPT ); Mon, 9 Apr 2018 09:24:18 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9E41260807; Mon, 9 Apr 2018 13:24:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523280257; bh=Kcw4rNfjVqENlgHLZnFyrNrDyFtn22yYwBzKWVfFNXk=; h=From:To:Cc:Subject:Date:From; b=DofngqRcmGjtJYbpw+B7SeEapol0NZidzUefuZU9AGYe8q5JUzNAxWsKLY8R1ACu+ isxtGgyyjg6QNbxCW9rMf3FtJ4rQHuTndSuubKtnacNwp0rIXO6U2Q5rub+QC7LRCM xaG8PhFVuL3r1+aQ7cULivid21mmSYdjXxFINGBU= Received: from blr-ubuntu-41.ap.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek.gautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id DA8EF601D3; Mon, 9 Apr 2018 13:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1523280257; bh=Kcw4rNfjVqENlgHLZnFyrNrDyFtn22yYwBzKWVfFNXk=; h=From:To:Cc:Subject:Date:From; b=DofngqRcmGjtJYbpw+B7SeEapol0NZidzUefuZU9AGYe8q5JUzNAxWsKLY8R1ACu+ isxtGgyyjg6QNbxCW9rMf3FtJ4rQHuTndSuubKtnacNwp0rIXO6U2Q5rub+QC7LRCM xaG8PhFVuL3r1+aQ7cULivid21mmSYdjXxFINGBU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DA8EF601D3 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vivek.gautam@codeaurora.org From: Vivek Gautam To: martin.petersen@oracle.com, kishon@ti.com Cc: jejb@linux.vnet.ibm.com, subhashj@codeaurora.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vivek Gautam Subject: [PATCH 1/1] scsi/ufs: qcom: Don't enable PHY_QCOM_UFS by default Date: Mon, 9 Apr 2018 18:54:04 +0530 Message-Id: <20180409132404.20876-1-vivek.gautam@codeaurora.org> X-Mailer: git-send-email 2.16.1.72.g5be1f00a9a70 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While we try to transition from a separate ufs phy driver to a more integrated qmp phy driver, don't let SCSI_UFS_QCOM to enable PHY_QCOM_UFS config by default. The users should enable this in their defconfigs. Also add inline definitions for couple of functions - a) ufs_qcom_phy_set_tx_lane_enable() b) void ufs_qcom_phy_save_controller_version() to enable clean build for SCSI_UFS_QCOM. Signed-off-by: Vivek Gautam --- drivers/scsi/ufs/Kconfig | 1 - include/linux/phy/phy-qcom-ufs.h | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig index e27b4d4e6ae2..7e8898b6eb67 100644 --- a/drivers/scsi/ufs/Kconfig +++ b/drivers/scsi/ufs/Kconfig @@ -91,7 +91,6 @@ config SCSI_UFS_DWC_TC_PLATFORM config SCSI_UFS_QCOM tristate "QCOM specific hooks to UFS controller platform driver" depends on SCSI_UFSHCD_PLATFORM && ARCH_QCOM - select PHY_QCOM_UFS help This selects the QCOM specific additions to UFSHCD platform driver. UFS host on QCOM needs some vendor specific configuration before diff --git a/include/linux/phy/phy-qcom-ufs.h b/include/linux/phy/phy-qcom-ufs.h index 0a2c18a9771d..1388c2a2965e 100644 --- a/include/linux/phy/phy-qcom-ufs.h +++ b/include/linux/phy/phy-qcom-ufs.h @@ -31,8 +31,21 @@ void ufs_qcom_phy_enable_dev_ref_clk(struct phy *phy); */ void ufs_qcom_phy_disable_dev_ref_clk(struct phy *phy); +#if IS_ENABLED(CONFIG_PHY_QCOM_UFS) int ufs_qcom_phy_set_tx_lane_enable(struct phy *phy, u32 tx_lanes); void ufs_qcom_phy_save_controller_version(struct phy *phy, - u8 major, u16 minor, u16 step); + u8 major, u16 minor, u16 step); +#else +static inline int ufs_qcom_phy_set_tx_lane_enable(struct phy *phy, u32 tx_lanes) +{ + return -ENOSYS; +} + +static inline void ufs_qcom_phy_save_controller_version(struct phy *phy, + u8 major, u16 minor, + u16 step) +{ +} +#endif /* PHY_QCOM_UFS */ #endif /* PHY_QCOM_UFS_H_ */