From patchwork Sun Aug 18 21:50:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Petrous X-Patchwork-Id: 13767632 X-Patchwork-Delegate: kuba@kernel.org Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013058.outbound.protection.outlook.com [52.101.67.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01187155C94; Sun, 18 Aug 2024 21:50:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724017835; cv=fail; b=iL7M3TIdwXVKpr2P4SHYnM5CgNnyhxovWKpSd70s5uy7//bUC8Kke9dfJhPkm1r6Ieh1QivS2m01SVLXfFztiOrQxiSyge/mrj6+q4xcAgueMt14VmqeX/yKExTZTAL91i752Dj8jS3A1xpEVTAqwiXk8cXd6v8by4kHXUfdULs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724017835; c=relaxed/simple; bh=iRqankLAXuQiYNzZ8rtVhDwqW23ovkglwHZ4pD9nypM=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=SOZSuFizgKdMWA1E6p9xRuGrXfp8znWdBurCWUujprDzqveorIVkFDtAoPJk6csAJiIFz0lfLciWrbf7/nSljZuCL20zs5tE93yk1nPUqQhwyLUA2alOQzjXtzOtZkgWkiWEpuowvFebHnZtIDut6r8tWMX1v2nVX1v86cC9n+w= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=uLNKEpx0; arc=fail smtp.client-ip=52.101.67.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="uLNKEpx0" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xvM2fbTGQZ5T+G4kPJ1qcNY86KKzAnUnsypD25C60ELiimpsG3XLhj7elEzuyJSsJEe+yWfQ67cs/n62VdvLmj8AV4FHF73z14b8I4tlB8IhT+Qh0shfh/NuMb75b8+ku1kG0pVHcLDQxKzTFpt5aZtj9l/nwIqj1jsJF+GC5IkbtlxNedrl4IjUA87fJytQqMWHFNruS/8J2k6jIa8BXIzoWyLkejpaQh7n2NyOI1lxP5g8NTCVdVwW+1aNFQgFWWRCO8qtCWwNSaWzaV1yjiQwL7SqflqO7ux3FX/hcHBnnNR65SKyziCJia9KX3WNKcedmkjOo613p5U0o1/nTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=XfNkawFp1Rk9p112g0TRi12UXdfkHBlxgcWqiq1glDE=; b=MtYa2tUoGt7dTjb0cMi/84qcoEdiL5FFrRkwbLZCznmd/naK8w/Oqvmiw76i3LQJiW6qXReAmrVKOEC6JWTWvzn87BRpdrtVZyOHACtEyuCi0iUWM9p+gM9KAiShxMdVya2c9kLN8T3M60ZITmVLnw9k0CA2lNwXTyA6TzRM17mJUVpIr3VGj7pDnbRPOkMaK6ke3JnMTfj3GaSd5oWeZlLuYyIQQ3G22Iq2bJ92rFNducOyrfS4Fz03Zj+TWK56XDpZtReRwTYqTxFiwYzki0A8w65KFg+X7vun6kmJPt6fWg0F2xliIxYnC6NPYjXHBe3xG7lRxVhToDFL3Jyngw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XfNkawFp1Rk9p112g0TRi12UXdfkHBlxgcWqiq1glDE=; b=uLNKEpx0o5+QhrWAeGbQ10DpB56PDFWtvkTVOA4cDBSWIFQA6q/X5gik1aXuCBqvvrm4QmwJeU1cGsWb4iErt/zLRlOSXqzdi/OMhQgwkjFIqyv49JiH5g9POoUQN7v7LoB7s9+qlPjoRJs6DcvT/T1fle9t4hU4hBc4BHiLh4VoXhL+4d3XfPvGlpzIbzn9IExAtiAg+fmEDTW43rqIhTombd3Caf7vcOp/9W3JiOkzV5zqReBoQaURVv2duyXeKuTP6w7pCWZ63oIWkxESFzzVVH718w+GRUfZnwSt05FsMx7XwmcdqRm5nO93tCH4tv1kicxuOjoPoiyJCdTBCg== Received: from AM9PR04MB8506.eurprd04.prod.outlook.com (2603:10a6:20b:431::16) by AS8PR04MB8183.eurprd04.prod.outlook.com (2603:10a6:20b:3f1::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Sun, 18 Aug 2024 21:50:30 +0000 Received: from AM9PR04MB8506.eurprd04.prod.outlook.com ([fe80::5f7:9bab:66a3:fe27]) by AM9PR04MB8506.eurprd04.prod.outlook.com ([fe80::5f7:9bab:66a3:fe27%4]) with mapi id 15.20.7875.019; Sun, 18 Aug 2024 21:50:30 +0000 From: "Jan Petrous (OSS)" To: "Jan Petrous (OSS)" , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Vinod Koul , Andrew Lunn , Heiner Kallweit , Russell King , Richard Cochran , Giuseppe Cavallaro CC: "netdev@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "linux-arm-msm@vger.kernel.org" , dl-S32 Subject: [PATCH v2 2/7] net: stmmac: Expand clock rate variables Thread-Topic: [PATCH v2 2/7] net: stmmac: Expand clock rate variables Thread-Index: AdrxtUOqu8labnA+TUKEes18Ol/IZw== Date: Sun, 18 Aug 2024 21:50:30 +0000 Message-ID: Accept-Language: cs-CZ, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM9PR04MB8506:EE_|AS8PR04MB8183:EE_ x-ms-office365-filtering-correlation-id: 5978d163-af02-43e2-e460-08dcbfcfc73f x-ms-exchange-sharedmailbox-routingagent-processed: True x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|366016|376014|1800799024|7416014|921020|38070700018; x-microsoft-antispam-message-info: 4A2gQpQPsMNFswy8qA9eHEJf4GN8U1TnyeeGi9vUQAvj+fjGNUAZI0eMGhb07HQnk4a7mG6aSWWvMG6lyWmlfqTvvcRinv86gqPGQaZE3xw/RDiAe+W54ab2cHg2DiTNrX4FpKycbwQqzTqeY6n3Bx/2Iu7j08zCT99sW72BoORCg2dnCf8BYUHwG1DAyPO8CT4kCjqf3djdwB30FId7bKP/NIQGnGhjBCb6k1MpPYQG8WXkDwM70uRJS5W2BZ3bvwkkfgVvu013VJBGrZbCz6M7E8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yynQq02U/DA+X2Zhpj3ATlisFBh5ckclMEy91qYtbjez+DyynrsmYyCrrhlUSreV6MHjMqMP8DvKM= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8506.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024)(7416014)(921020)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: dSJcnkImlEfSijvLz/n2xmElGoEskDrHu6LmJDdaCgyKaRTy7OO71ljO21qeiDqujC0FicREwg1XFt27KsH3E0Xn7iHTs+OgcBgK0aJ7oKlxQYmjE6q8xWdPOygi5cKo6J8gGQWllHLHcvURpUgAtIo7Cr6RM5t6U3tGN3vZdLOvI97E/3u7T8+KQ45kYECr8lIqC/bznDkvwd1wXlM241VwtWQ0We7ZmFzaxmnXSVdq/Y9F4ZbKy4SSvQ6geUSPqTuOMOL+9Zb7p4gtsDsW6ZacJ9joT7qwF5ada5jsnnUMR2CzIDB/SHorFTFqHxPEN4fIYtJYBr5oolZbToXsxjLMgqj82K104/r4r/B3pcdh+Gd/YlH/PbcaeEiXP+1Y/DH3EiTngCTsxk/AJ8hgkE1uSU1r1/7Aby11BVxyMM5cSg3fBKCMnBm/lTMAWEmroAM6zM8DcxZKPA40VVUF8eyYc3vob+OcJ/uU5702btECGyFdQZsL1HHIOrY1Q3xubB2tiqTZ1jGZrm3BOZIUfE6JAeQsM8+fdGJ3aKdFl1BjEVmY+jsBKtJOI9wJWNVpT3OJnBWQZHd9sARXFh+pxqdKzsOd/1cSPdva0t+e1/hEBun3gEGEDW3kx3deXduQIPNwEXaJcb4IjL+SdqttQIbwuGdA2x9D8NsvYEfn4rmBG27WYosyLx/+/NijeiPB6mdQMYoqzOYEPFjQM4893OjA4VHL8D9qz9EsPxqAqLoE1UldjXQoceUZxe004pjf8apRlVk0PkD0JYrKNQ3XorvjXYLnsbfd1rn+p9JhFeL5IlF64tahQQNPqhZ86aivDNgx7+TSaV9rCCuApH8nhzmbDBljmWXzLVOnKtRxzCmtmbT26I/5mRa0CY/EHZtm9LnLRcKMImWJ+IIGc7NI22jLNxt4+GB6oJb9fVMEvcirDT3YNQy/YodyMkpmCTQeGIiI5BODpxrN7X5rovsCNI3cXnw+ZFXeQaYSdIyYtOkfBAphQKrbmzdo63uhkHqtye8OmrSGp/aDSyBF7QiRknm1tQLokxlRCVG6MO0pRCz7kFqys6o4i8M+6a2oWtPgMr+8L9U7A/BrYtZBUPnl1c7aKgvdD3bKGcaH6WvT6mO1B1yLVHMiS2k+G7meOJ3cAUq6ZElO95I/D4DrxvRyeutISbzOiU7+axJ6I0i6jfq+6nbzWai7WovUymKFXz6ALz1pczsKxzviKYcge0fY8WB9A19k5LNlVUEO+SFTDpiNv38JIVf358790DPK635osFdUpr51vOIi7aN3E3f2qraV3MFxY4ZdBO4SR+jubs6F6vQucupSdhJusXZjj7ud21QQAJnDG0FEm3WbJ55g/tAQB0UDPgQjDB53OXv8LS+zk63w2OjPoYkIz3UbFKnr0owrjkAVdci0rd6rOt+4T6Ynyo6DJ74gl5zOH6W1VK7H6WueqxXPRKE7QA506X+eOanSEWNv6MImuGsx7EGcq2mhhC8CzOhfDGY07vnaoa3/n9aZQPraqFErEtUydpDKDMaO3bsLYDgtEaJj42ONuJtGzJG1PWT7yFL/ZStIpift5nEPerm2KhMSkSI6pUeJ Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8506.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5978d163-af02-43e2-e460-08dcbfcfc73f X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Aug 2024 21:50:30.1549 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /GEy7FhY4lvA7zhtF0UYDg+dQsh/ChsiCOKS4iSgKFSPfuo/ZqnC6wyNI5gnk7LGXpD6VKMnDjJjkBFcDPKsrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8183 X-Patchwork-Delegate: kuba@kernel.org The clock API clk_get_rate() returns unsigned long value. Expand affected members of stmmac platform data and convert the stmmac_clk_csr_set() and dwmac4_core_init() methods to defining the unsigned long clk_rate local variables. Signed-off-by: Jan Petrous (OSS) Reviewed-by: Andrew Lunn Reviewed-by: Serge Semin --- drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- include/linux/stmmac.h | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index 901a3c1959fa..2a5b38723635 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -777,7 +777,7 @@ static void ethqos_ptp_clk_freq_config(struct stmmac_priv *priv) netdev_err(priv->dev, "Failed to max out clk_ptp_ref: %d\n", err); plat_dat->clk_ptp_rate = clk_get_rate(plat_dat->clk_ptp_ref); - netdev_dbg(priv->dev, "PTP rate %d\n", plat_dat->clk_ptp_rate); + netdev_dbg(priv->dev, "PTP rate %lu\n", plat_dat->clk_ptp_rate); } static int qcom_ethqos_probe(struct platform_device *pdev) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c index 31c387cc5f26..82b102108478 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c @@ -25,7 +25,7 @@ static void dwmac4_core_init(struct mac_device_info *hw, struct stmmac_priv *priv = netdev_priv(dev); void __iomem *ioaddr = hw->pcsr; u32 value = readl(ioaddr + GMAC_CONFIG); - u32 clk_rate; + unsigned long clk_rate; value |= GMAC_CORE_INIT; diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index ac80d8a2b743..398a33bce00f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -300,7 +300,7 @@ static void stmmac_global_err(struct stmmac_priv *priv) */ static void stmmac_clk_csr_set(struct stmmac_priv *priv) { - u32 clk_rate; + unsigned long clk_rate; clk_rate = clk_get_rate(priv->plat->stmmac_clk); diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index ad868e8d195d..b1e4df1a86a0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -639,7 +639,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac) dev_info(&pdev->dev, "PTP uses main clock\n"); } else { plat->clk_ptp_rate = clk_get_rate(plat->clk_ptp_ref); - dev_dbg(&pdev->dev, "PTP rate %d\n", plat->clk_ptp_rate); + dev_dbg(&pdev->dev, "PTP rate %lu\n", plat->clk_ptp_rate); } plat->stmmac_rst = devm_reset_control_get_optional(&pdev->dev, diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 7caaa5ae6674..47a763699916 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -279,8 +279,8 @@ struct plat_stmmacenet_data { struct clk *stmmac_clk; struct clk *pclk; struct clk *clk_ptp_ref; - unsigned int clk_ptp_rate; - unsigned int clk_ref_rate; + unsigned long clk_ptp_rate; + unsigned long clk_ref_rate; unsigned int mult_fact_100ns; s32 ptp_max_adj; u32 cdc_error_adj; @@ -292,7 +292,7 @@ struct plat_stmmacenet_data { int mac_port_sel_speed; int has_xgmac; u8 vlan_fail_q; - unsigned int eee_usecs_rate; + unsigned long eee_usecs_rate; struct pci_dev *pdev; int int_snapshot_num; int msi_mac_vec;