Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2380984rwa; Mon, 22 Aug 2022 06:56:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR67Xfwq+5scrpZImZWY8rmC+Vi/SLe+snWF66h3/GBQm/klR+LxjS9wMfkzccj2w3lxxXLR X-Received: by 2002:a63:5809:0:b0:42a:3145:507d with SMTP id m9-20020a635809000000b0042a3145507dmr14410634pgb.428.1661176572034; Mon, 22 Aug 2022 06:56:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661176572; cv=none; d=google.com; s=arc-20160816; b=uq8YIRBuq9N5AjXzZdft3oTXu6VLx0ATMS0byPhrRtffxOWaExoyJTmRSFrZyodNV9 VzCo3lSwdyAb4TWeGAKu2X0yYowKCVV6cycjy4KPGwDaBqguTFJP5p3YIxTPxZSVr0oD OV0Re1PE6/DV6SJc933EbElAI8GY/evzLnhDihrAeZc0BBThLrFBJTEpebu5zciW7ac6 0objw6IUkaFGHUadcODsXVoGambt5yfVcGrYMRZtUvOSmNjxOB9MCzH3UO9PH759Hjh3 7FvmhtQyi/hUEfa9gRjGMm+H0NBBhpeRdYjZSs7jxyNtNiPdlGV6fec2Z/8rcZHDGwUy 2m4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=bI1q3aQJ0FR56tCis9DehQTcUXe+uQyzdXBSSTxvGFk=; b=SxALDcxagusbFDC1K3RnHUJ6Pc86q1mp8XRJIGhgSpGUS73GIG8JarV2oKWjDzC5d3 Uizn8/Lw4eFMyrz+P/12l++KnuJglF5/NyXNJp4Jwg/K1ru5EzBdrdX2MSnPaLQiLGZZ Ah3rUO8WOePj08s2uTstCdSa37ufCqCAn8KOiH7wYsmRYztdR8fnmwmZfC18ncfsAMGG QWq+t2YsgkYlxuy0YI4xZGxbbF8OWubQrkiIu4XOyX82Im3RNxtSrhtKIJY3XCMuYafd 0miGJo6xG12GM8vk1pe9UggASi6zoyIeYcJ8mIrVvtBEPVz3ReJaeUSQMlS9ajUxcyXf Q6uw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7-20020a170902c40700b0016d09df65d8si14207396plk.411.2022.08.22.06.55.59; Mon, 22 Aug 2022 06:56:12 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231395AbiHVN2k (ORCPT + 99 others); Mon, 22 Aug 2022 09:28:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235033AbiHVN2U (ORCPT ); Mon, 22 Aug 2022 09:28:20 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57F1DF05; Mon, 22 Aug 2022 06:28:18 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E6ABB2000FB; Mon, 22 Aug 2022 15:28:16 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id AB799200002; Mon, 22 Aug 2022 15:28:16 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 0D8F61820F59; Mon, 22 Aug 2022 21:28:14 +0800 (+08) From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, lorenzo.pieralisi@arm.com, vkoul@kernel.org, marcel.ziswiler@toradex.com, kishon@ti.com Cc: hongxing.zhu@nxp.com, linux-phy@lists.infradead.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v1 2/2] phy: freescale: imx8m-pcie: Fix the wrong order of phy_init() and phy_power_on() Date: Mon, 22 Aug 2022 21:10:56 +0800 Message-Id: <1661173856-1192-3-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1661173856-1192-1-git-send-email-hongxing.zhu@nxp.com> References: <1661173856-1192-1-git-send-email-hongxing.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Refer to phy_core driver, phy_init() must be called before phy_power_on(). Fix the wrong order of phy_init() and phy_power_on() here. Fixes: 1aa97b002258 ("phy: freescale: pcie: Initialize the imx8 pcie standalone phy driver") Signed-off-by: Richard Zhu --- drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c index ad7d2edfc414..c93286483b42 100644 --- a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c +++ b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c @@ -59,7 +59,7 @@ struct imx8_pcie_phy { bool clkreq_unused; }; -static int imx8_pcie_phy_init(struct phy *phy) +static int imx8_pcie_phy_power_on(struct phy *phy) { int ret; u32 val, pad_mode; @@ -137,14 +137,14 @@ static int imx8_pcie_phy_init(struct phy *phy) return ret; } -static int imx8_pcie_phy_power_on(struct phy *phy) +static int imx8_pcie_phy_init(struct phy *phy) { struct imx8_pcie_phy *imx8_phy = phy_get_drvdata(phy); return clk_prepare_enable(imx8_phy->clk); } -static int imx8_pcie_phy_power_off(struct phy *phy) +static int imx8_pcie_phy_exit(struct phy *phy) { struct imx8_pcie_phy *imx8_phy = phy_get_drvdata(phy); @@ -155,8 +155,8 @@ static int imx8_pcie_phy_power_off(struct phy *phy) static const struct phy_ops imx8_pcie_phy_ops = { .init = imx8_pcie_phy_init, + .exit = imx8_pcie_phy_exit, .power_on = imx8_pcie_phy_power_on, - .power_off = imx8_pcie_phy_power_off, .owner = THIS_MODULE, }; -- 2.25.1