From patchwork Mon Oct 17 06:50:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 3238 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1303681wrs; Sun, 16 Oct 2022 23:53:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6qM83G3DDuuWVbHSrzyrM6fcBeRdWBEhe4G63YDy3OgB3zsJzXU0BNTVVPGxeHAGYa+y+w X-Received: by 2002:a05:6a00:2a7:b0:562:7b47:e26f with SMTP id q7-20020a056a0002a700b005627b47e26fmr11083308pfs.30.1665989584284; Sun, 16 Oct 2022 23:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665989584; cv=none; d=google.com; s=arc-20160816; b=U80XCFyzxoRy8epL4AIAKwYEonexhrA/HBQzl+h5OpgWkX5LhLw2maAt92WfQ6gMvp wLTlirw9DxR3NBtqPog4sodKjTnH6CeNXhJ+atpTZ96ujzpQAp88+t1qZc+dsce99Zhe DSpyW2qPuiKVIH1jdBgjHrhepxnXVirDCZAWOkyAmJrmVI6FY5DrSuRhH+cFqv3eKY8R zYWkHAt71TQNogpsbltrEXu4z85iJzwbiYP86H4iRsm+yTQaOZ1tAQgDLQXa28W/28+K 9wj/eoEgXx/Rr4lkonIviBV2Orwfl/O2CL4gp+cLn7rErU0SLECBYMNWp/nwvtyMX2L0 1NOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AOTcvWCdobh3uU0xCyGExWCbiVPgCAXGdhyYBOq45Rc=; b=scYyUJ7gePFAUPHdgawe/O1atzuecSi//+tSpXNQXEe3+wg2mePKIDRIol4JoT4wXy X/qH627GZmeTiMSxbhcLto7sabKsdnFId63nexPD1Z8c3MlGOUm0wrUzjqzmHg+bp1Yh yjoUG12mbo1H1o334PVMR0ErWoCgQnhZqozY4tDUtbiXTh6ZkMjyHu6JN4DHDXB8vIMx sar13dqEGLriMfsnDbJP2njev+iHn8F7XukFUtY3sXx4oElf0Wcm1xhvp7Ic2bwBrVvO 3ek/XiQU9/q7RqW51D+G0tN7QjjFlcw+H9LwTN7Cs9MMNLoe29b4ucLswAL/Qt3MHbCJ fI0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BtcTHCoi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k128-20020a636f86000000b00463dbc5cebfsi10274439pgc.67.2022.10.16.23.52.51; Sun, 16 Oct 2022 23:53:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BtcTHCoi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230040AbiJQGvK (ORCPT + 99 others); Mon, 17 Oct 2022 02:51:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229850AbiJQGup (ORCPT ); Mon, 17 Oct 2022 02:50:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E52FA5726F; Sun, 16 Oct 2022 23:50:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 96F23B80F4B; Mon, 17 Oct 2022 06:50:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB95AC4314B; Mon, 17 Oct 2022 06:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665989440; bh=548g71Mb6f3vyWSHRoV49n/vXkaP5EyhH0HdMFKQL0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BtcTHCoicEPi1nMLshm7i6orRV55cIxtLnmJTdnrRdXSPGmbJjP2SpvGW7j73i2KM o/UsePjZheo3wKi8HbjdUar9uOBguU+WWIla/lGcaW5jIZTN8XlmHp4RZ+T/AexEGS FH4kD4q/PqBCCzT6wPyqezEWv6kJ1Z5TMXYAOs85YVO2mOoqmctYowGAgIXTQMyZuw kdzz0Uos3wUHbhMosVIFcSqhAFqSGnHgJG5gf+TT+NQJJVU09S9131EYkPc8m5Eo+T B7F4ffZk2K2u+tlIZR5TjA2+hl9U6SW6fOdNNQyVhlBPTo1VAcLh8srOxUZCNTQdyK NAqfATIQ9ygMQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1okJxG-00057i-LX; Mon, 17 Oct 2022 08:50:30 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v3 06/11] phy: qcom-qmp-pcie-msm8996: clean up power-down handling Date: Mon, 17 Oct 2022 08:50:08 +0200 Message-Id: <20221017065013.19647-7-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221017065013.19647-1-johan+linaro@kernel.org> References: <20221017065013.19647-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746916693993867898?= X-GMAIL-MSGID: =?utf-8?q?1746916693993867898?= This driver uses v2 registers only so drop the unnecessary POWER_DOWN_CONTROL override. Note that this register is already hard-coded when powering on the PHY. Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold --- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c index 707ec81c7a2a..5fdd85a1dc3e 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c @@ -91,7 +91,6 @@ enum qphy_reg_layout { QPHY_SW_RESET, QPHY_START_CTRL, QPHY_PCS_STATUS, - QPHY_PCS_POWER_DOWN_CONTROL, /* Keep last to ensure regs_layout arrays are properly initialized */ QPHY_LAYOUT_SIZE }; @@ -591,13 +590,8 @@ static int qmp_pcie_msm8996_power_off(struct phy *phy) qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl); /* Put PHY into POWER DOWN state: active low */ - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) { - qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - } else { - qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); - } + qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, + cfg->pwrdn_ctrl); return 0; }