From patchwork Wed Sep 27 08:59:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manu Gautam X-Patchwork-Id: 9973523 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 670D960365 for ; Wed, 27 Sep 2017 09:08:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CE0829100 for ; Wed, 27 Sep 2017 09:08:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5186B290EB; Wed, 27 Sep 2017 09:08:17 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 D1009290EB for ; Wed, 27 Sep 2017 09:08:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752489AbdI0JAb (ORCPT ); Wed, 27 Sep 2017 05:00:31 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:50440 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752281AbdI0JA1 (ORCPT ); Wed, 27 Sep 2017 05:00:27 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 28B1F6071B; Wed, 27 Sep 2017 09:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1506502826; bh=XgiuVaGEOMX0OEO/+RNlmoDkBqNm5SX3pkGtKVcaSI4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FI2VS/OpWXsjFiqiq2N0ZLX1cbcEVWML0cf3ZkGPw30Yny+yWqbxTxj4RBx1+Whto QrSrJ3VNkpGes3cXYfzx/7Zo6M1AWi51MR4ICiFLIZj9kJW6il/gaILe91amFg3MJa QEPJKLieY+MPPB/E4ygdxSnx2wZfoPhD5VaANzVE= Received: from mgautam-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 39E316095F; Wed, 27 Sep 2017 09:00:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1506502824; bh=XgiuVaGEOMX0OEO/+RNlmoDkBqNm5SX3pkGtKVcaSI4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RGfdHzhGCscmZCeuSxU1pmzvN6YtLEUAuniud0ijIs4EPgdELmcmEVQ6hXZUK0LSO x3nLrvthT/PaAeM38d6tz+Q9YfLUjz+fkCwIjFviZ2yKaCOY/Tl9cDm/+ilaE8K4g4 hOHYlZv7qQNGr0rfN2CDzYw99kvdrGywVFoIqKb8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 39E316095F 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=mgautam@codeaurora.org From: Manu Gautam To: Kishon Vijay Abraham I Cc: Felipe Balbi , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, Manu Gautam , Vivek Gautam , Varadarajan Narayanan , Heiko Stuebner , Wei Yongjun , Fengguang Wu , linux-kernel@vger.kernel.org (open list:GENERIC PHY FRAMEWORK) Subject: [PATCH v2 06/17] phy: qcom-qmp: Move SERDES/PCS START after PHY reset Date: Wed, 27 Sep 2017 14:29:02 +0530 Message-Id: <1506502753-27408-7-git-send-email-mgautam@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1506502753-27408-1-git-send-email-mgautam@codeaurora.org> References: <1506502753-27408-1-git-send-email-mgautam@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Driver is currently performing PHY reset after starting SERDES/PCS. As per hardware datasheet reset must be done before starting PHY. Hence, update the sequence. Signed-off-by: Manu Gautam --- drivers/phy/qualcomm/phy-qcom-qmp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c index aa27757..263cf50 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c @@ -882,12 +882,12 @@ static int qcom_qmp_phy_init(struct phy *phy) if (cfg->has_pwrdn_delay) usleep_range(cfg->pwrdn_delay_min, cfg->pwrdn_delay_max); - /* start SerDes and Phy-Coding-Sublayer */ - qphy_setbits(pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl); - /* Pull PHY out of reset state */ qphy_clrbits(pcs, cfg->regs[QPHY_SW_RESET], SW_RESET); + /* start SerDes and Phy-Coding-Sublayer */ + qphy_setbits(pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl); + status = pcs + cfg->regs[QPHY_PCS_READY_STATUS]; mask = cfg->mask_pcs_ready;