Message ID | 20240517054745.4111922-3-vineeth.karumanchi@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1EE42C04FFE for <linux-arm-kernel@archiver.kernel.org>; Fri, 17 May 2024 05:48:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CPbjz/WqaKC1yxa+9U1hObWiPmVub0JYUU6mjdX6OP8=; b=eeFlXROQssPYAb y1C2fvbTw5B1y5Ci/f9f+nfUj2owyLndXVdl36YVjjuqHdb1A6gY1jeBkDYKvXl1AqERVq7c8WzFD 423dmhKhmRgkDxS8iAPQQLdB79A/Hyk8I1bIiJi3xXV9jQ+1GUJyJXS24VeEYmy7/2+72Q4kGNPay 2j4OBT34WASe963gPv/voqATFk56h0NlpBJzTLrKMAXz5CSm96tkSmiyyK+/hW7EAm6kA5sdE0BBR z4Td1j01GTncV6kx1Yuhq1VEwPWj09XcUJePuObhrnfbwqB69FhWEmfkIOBnwn8EV/DV43lSdCLYC T46gjRdlqY3ZuKCFQOVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7qRz-00000006sla-480m; Fri, 17 May 2024 05:48:15 +0000 Received: from mail-bn8nam11on20600.outbound.protection.outlook.com ([2a01:111:f403:2414::600] helo=NAM11-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7qRv-00000006sif-1uGN for linux-arm-kernel@lists.infradead.org; Fri, 17 May 2024 05:48:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UYCCYQm+tA/IEdJA83YKVOnRvoXcWBHHx4yRkmMMy1+AOkdJrn992cWZw2tMLGBS9dRfttCQjbyxA/lkP7ymi+pCow6l8VSNkgDy+9Anx95RYFoPuTAFwTsAZ85PUzR6tMfnllqm31Bmzupm9r9Q/R5wNb8C2wYGfVzM6SajpPfFo2LhNbneAslwyTUrcMbNKc3ZCkHwGb25lJg+zx5vdCu3qb4gWWdakkNd/B5A2bR5DpdewSa9i2UwMGfZvxwvSO7quo3aZNbXnRPX6xrWH8pfMHoPF1dLfkJ/5Uc+1i+YsRl7l1YSufAZ8AgjxqKVf5k/IgUIMJ3aQ+c8prn2DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RKz2fyvnyIieCzaxrW453Xa2ySv/BXkmtHsBH8UfvLc=; b=WFKtcBOdfEWK8FHnb4RlsG2yZsnNGtCGIXbV5eXDN4Mpb3dO9lvSJal8TJWfs0CM7ogQwIiTDIEe4/wpqef/d4uXBWfyBA3To/uj6oZnNKMCRguZdZR5xRM2XTDkDbtaF8CM9Wt+9ups2N/wRQ5CBrw0qyHP48AL7h3MbPlggRcgZA7HZEw1X1qPRQQvJZLpHulVBp5Xe8HrRNjV2huPpGzXQsamNAhbng55ApSET8rhVbx5hyF/BzoU4+OY8737QPXBkZ9zEJ+rAxtr+EJTtKBsCXFdahF4J4IwaJeX5WbWMWUQrNVc93FzxjoOJpWzI3EjwlG/yKOQaNchmH5v/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=davemloft.net smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RKz2fyvnyIieCzaxrW453Xa2ySv/BXkmtHsBH8UfvLc=; b=3Et1jeXCKYSQO4VItQbLR9KWnseTT48O6KOIPH+OpRsW75FGJntvkigkFSGe56jE9cv3z/okSw0Yd+tZe2984PRysDno0A41SFvqcBHYBivS/beN9qmfqLTSH8weYbDyHjEo062seIemUFU/xRybFw4kC133YdrtJicsuw7kZaY= Received: from PH0P220CA0014.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:d3::28) by MW4PR12MB5643.namprd12.prod.outlook.com (2603:10b6:303:188::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.30; Fri, 17 May 2024 05:48:01 +0000 Received: from SN1PEPF000252A2.namprd05.prod.outlook.com (2603:10b6:510:d3:cafe::81) by PH0P220CA0014.outlook.office365.com (2603:10b6:510:d3::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.30 via Frontend Transport; Fri, 17 May 2024 05:48:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF000252A2.mail.protection.outlook.com (10.167.242.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7587.21 via Frontend Transport; Fri, 17 May 2024 05:48:00 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 17 May 2024 00:47:59 -0500 Received: from xhdvineethc40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Fri, 17 May 2024 00:47:55 -0500 From: Vineeth Karumanchi <vineeth.karumanchi@amd.com> To: <git@amd.com>, <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>, <robh@kernel.org>, <krzk+dt@kernel.org>, <conor+dt@kernel.org>, <harini.katakam@amd.com>, <andrew@lunn.ch>, <hkallweit1@gmail.com>, <linux@armlinux.org.uk>, <michal.simek@amd.com> CC: <vineeth.karumanchi@amd.com>, <netdev@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org> Subject: [PATCH net-next v2 2/2] net: phy: xilinx-gmii2rgmii: Adopt clock support Date: Fri, 17 May 2024 11:17:45 +0530 Message-ID: <20240517054745.4111922-3-vineeth.karumanchi@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240517054745.4111922-1-vineeth.karumanchi@amd.com> References: <20240517054745.4111922-1-vineeth.karumanchi@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: vineeth.karumanchi@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF000252A2:EE_|MW4PR12MB5643:EE_ X-MS-Office365-Filtering-Correlation-Id: 4454c9ba-e816-4cab-6c95-08dc7634e993 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|7416005|1800799015|36860700004|82310400017|921011; X-Microsoft-Antispam-Message-Info: f82vIei56SXGN+XmAQXnUXRtYrpKFcQRc0I19QPecDCiyWgGDF7J5Ke8eHCInXRy0WCgpVOzHI136uivAfRqra03VTqeaqyZpXdjvvcFQy9J4Jo2/ufcDHxhfAZ2MwjGUYfikdVt/RtpwPx1iJMt1NYblowKcA+CozdT6mDVws9Mz+nge1/4/pJkgU+BsEtK3khzETHRrAGY5HbEzO20QJrrj5wTSWt4nxVn9EaEJF9zTDmH2V5xo6+tzWsV6XJSQh1YuJLnfc1a8cb27GCwLCUlmaagAQ3LKNWgiOTPTk+Di1t/pS6DYk/uQGtr4ICamki7fv6ndymR9T60KNPqXUvZ9HdAH3LraWBU/Kb72bLOXMPbb8Jz6WqWxVWwitxV883xw+p3lgWvsdVCggBcizgE9ziW/2HEy2QZRM6sOm+VL3y0fDClq574LjRjsn413zYzdQQH5DBJTaBTjeNAajsiLg80trlzly01731B2wi+4UjXBiOgyJv2KSwuNaZu0BNdKtFbo6JqtP6+ddXBxLohSJqU95PLxN8R1wKA1PKSXtrsW7cZWatbzQmtuKc9Z5XLDeF45MzbVxzDPrYny/VaatWBtpj3zuhPHI2rG8S2UDK7vfmJfQ+HerecvpX0tE1vz71nwPnj2Rrh8DJv1CVO6JzXkdue3W/lqCFf7AB3UaA11vrM/qGz3l8sgrd5wFphj53wZksXCOrrJiIzAe1aKyg5eYcwefG3vq8Lq3Eso7weK1HToShTuMecU2/Yyh4vTpbb/n3366El3UoeJhNlqXYgjFC9INqn6YRRG9uvbR5Ifc+goj++8wLVOq1JqYtCL6ArAxcBylhKo3LnXQp09Vr5CsMXeZxLiPhTpRUIH/oWnPqZwciyxB9hLNWkJILX6seW/a3gBLqI3i5cZPtriNztNpDeFeSnMrkhmM8ODPctiSyGgXoEzDhHxB2kTn13MRt+XvkB4+7/zJQ/wlO/IJs1UGFGmnlF6T8oFSZCCn+p9WOgjln0ZoMOLDKAyquNFNHPYIirAiA4ruoPrRi509uI2bZbHRc/589mgeSPreUoTRcvWYpILnhpCOIkpgDo69VBuPYeFgBNgfiZ5ltX2AtE8C/ujlxFWq20eAe4PF6xu9w01obLgr/g9K33bLpAJWOuBAsOa2aICMVN5p5NK5pAuO8ZoC0qx1i+JoV7TQUVvIgCp7g149mx85UI+Of0B5OOP3bkNBKRtYuLykXFkh1NoZZRoJrnR76g/skEcHK0lDLfqGVSBGZyu5TW2iTXz6QgOkdOpfXIogFw/RbDbmIK4CV7S3GSUKQKEt+/hAlX/rOehTeOb1EUAKA5Kdxbl/m48fJIQtMuKj4MBZcd1RfZ0JhoNLNrKyqMQzauBD30Sm0LionIZ6YJMtuQ X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(376005)(7416005)(1800799015)(36860700004)(82310400017)(921011);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2024 05:48:00.8116 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4454c9ba-e816-4cab-6c95-08dc7634e993 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF000252A2.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB5643 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240516_224811_618483_0149E373 X-CRM114-Status: GOOD ( 13.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
net: xilinx_gmii2rgmii: Add clock support
|
expand
|
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c index 7b1bc5fcef9b..7c51daecf18e 100644 --- a/drivers/net/phy/xilinx_gmii2rgmii.c +++ b/drivers/net/phy/xilinx_gmii2rgmii.c @@ -15,6 +15,7 @@ #include <linux/mii.h> #include <linux/mdio.h> #include <linux/phy.h> +#include <linux/clk.h> #include <linux/of_mdio.h> #define XILINX_GMII2RGMII_REG 0x10 @@ -85,11 +86,17 @@ static int xgmiitorgmii_probe(struct mdio_device *mdiodev) struct device *dev = &mdiodev->dev; struct device_node *np = dev->of_node, *phy_node; struct gmii2rgmii *priv; + struct clk *clkin; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; + clkin = devm_clk_get_optional_enabled(dev, NULL); + if (IS_ERR(clkin)) + return dev_err_probe(dev, PTR_ERR(clkin), + "Failed to get and enable clock from Device Tree\n"); + phy_node = of_parse_phandle(np, "phy-handle", 0); if (!phy_node) { dev_err(dev, "Couldn't parse phy-handle\n");
Add clock support to the gmii_to_rgmii IP. Make clk optional to keep DTB backward compatibility. Signed-off-by: Vineeth Karumanchi <vineeth.karumanchi@amd.com> --- drivers/net/phy/xilinx_gmii2rgmii.c | 7 +++++++ 1 file changed, 7 insertions(+)