Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2384321rwb; Sun, 2 Oct 2022 22:49:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6rMrsuqIFZ5l7Fkr4bRmmdjW/3F2jEcG5Tq6p3rR0ktL33LasNdT8teaQFIvEZdCEPORpD X-Received: by 2002:a05:6402:4446:b0:457:eebd:fe52 with SMTP id o6-20020a056402444600b00457eebdfe52mr17220381edb.234.1664776165727; Sun, 02 Oct 2022 22:49:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664776165; cv=none; d=google.com; s=arc-20160816; b=Fu68Hta9ncx/f7V48RPCKXzy7CmpxZ8vBhVKaw6jwHs0mGHl58S7j/h5cLK2S7KpUu NQWEEtdC/IVZR0dj8CBNXjchPHXAs5jytQcxnzclE7OKOD0N93gyL/NYL+iXsn/ImHN+ Jv3+cFKxNIGSKjvGhT84tNru3rwWYBct68vO1SAF/lzZyoKLDhY+JJZVBS6YYK54HvHy H1RwOl94JmlKZDYW9rL9WJGeMGx8G7a38MHx+x6vskbfOOXWDUCIG0Xcr9eVTU4P+916 CnigR63XLmFUc8p27sirqZvC1l8WhV7K4K4pudCu11TkTzcBnsoRw03j/7rWu4BRtGNs QFVA== 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=hYiK81Qr4X+Xc1KVKB2PA5sweSbnNOwIQ+6Jxm5DZSU=; b=0tZi9HDzzPTixmtmDqsIvtIaQ1ktadC/cKYz5ed8WYVEQqawoCnMypKJ8e/TEJ2eRv fjc7YWUfS4Irt7pIYmV9S2Cmkhs4Xagugm6B4XqHHNLiQ2gGRq+WoorYrQPWATyBLGXn sLAkP+kHk4umrMR5nKc5j/c6P1qcQe4+Mn+YXry8hRekn7fHK5fpkodSayTCSAjFWoe3 YGQxBRYNN7pObze4jhCPL+q0kuEKbZ34SMlXfz1u++TIHv0MJGm70PFsCra7JmKEUx1i zyWA0Hik5lRY5261uEAiGFdYcu9G9mA0fH9kqneTYpBxcGl3uQwWR0HoRSoYUt8vA0MX u61Q== 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 gn41-20020a1709070d2900b0077cb9bc7918si7082595ejc.30.2022.10.02.22.49.00; Sun, 02 Oct 2022 22:49:25 -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 S229653AbiJCFo2 (ORCPT + 99 others); Mon, 3 Oct 2022 01:44:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbiJCFoW (ORCPT ); Mon, 3 Oct 2022 01:44:22 -0400 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F0D033845; Sun, 2 Oct 2022 22:44:20 -0700 (PDT) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B4EB3212671; Mon, 3 Oct 2022 07:44:18 +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 7B47221266F; Mon, 3 Oct 2022 07:44:18 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 7071C1820F78; Mon, 3 Oct 2022 13:44:16 +0800 (+08) From: Richard Zhu To: vkoul@kernel.org, a.fatoum@pengutronix.de, p.zabel@pengutronix.de, l.stach@pengutronix.de, bhelgaas@google.com, lorenzo.pieralisi@arm.com, robh@kernel.org, shawnguo@kernel.org, alexander.stein@ew.tq-group.com, marex@denx.de, richard.leitner@linux.dev Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com, Richard Zhu Subject: [PATCH v11 2/4] phy: freescale: imx8m-pcie: Refine register definitions Date: Mon, 3 Oct 2022 13:24:53 +0800 Message-Id: <1664774695-23483-3-git-send-email-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1664774695-23483-1-git-send-email-hongxing.zhu@nxp.com> References: <1664774695-23483-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 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 No function changes, refine PHY register definitions. - Keep align with other CMN PHY registers, refine the definitions of PHY_CMN_REG75. - Remove two BIT definitions that are not used at all. Signed-off-by: Richard Zhu Signed-off-by: Lucas Stach Tested-by: Marek Vasut Tested-by: Richard Leitner Tested-by: Alexander Stein Reviewed-by: Lucas Stach --- drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c index ad7d2edfc414..2377ed307b53 100644 --- a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c +++ b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c @@ -31,12 +31,10 @@ #define IMX8MM_PCIE_PHY_CMN_REG065 0x194 #define ANA_AUX_RX_TERM (BIT(7) | BIT(4)) #define ANA_AUX_TX_LVL GENMASK(3, 0) -#define IMX8MM_PCIE_PHY_CMN_REG75 0x1D4 -#define PCIE_PHY_CMN_REG75_PLL_DONE 0x3 +#define IMX8MM_PCIE_PHY_CMN_REG075 0x1D4 +#define ANA_PLL_DONE 0x3 #define PCIE_PHY_TRSV_REG5 0x414 -#define PCIE_PHY_TRSV_REG5_GEN1_DEEMP 0x2D #define PCIE_PHY_TRSV_REG6 0x418 -#define PCIE_PHY_TRSV_REG6_GEN2_DEEMP 0xF #define IMX8MM_GPR_PCIE_REF_CLK_SEL GENMASK(25, 24) #define IMX8MM_GPR_PCIE_REF_CLK_PLL FIELD_PREP(IMX8MM_GPR_PCIE_REF_CLK_SEL, 0x3) @@ -131,9 +129,8 @@ static int imx8_pcie_phy_init(struct phy *phy) reset_control_deassert(imx8_phy->reset); /* Polling to check the phy is ready or not. */ - ret = readl_poll_timeout(imx8_phy->base + IMX8MM_PCIE_PHY_CMN_REG75, - val, val == PCIE_PHY_CMN_REG75_PLL_DONE, - 10, 20000); + ret = readl_poll_timeout(imx8_phy->base + IMX8MM_PCIE_PHY_CMN_REG075, + val, val == ANA_PLL_DONE, 10, 20000); return ret; } -- 2.25.1