lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <260b3220c1d12366a94ecd8c8740fefcf4491f50.1722924540.git.siyanteng@loongson.cn>
Date: Tue,  6 Aug 2024 18:59:41 +0800
From: Yanteng Si <siyanteng@...ngson.cn>
To: andrew@...n.ch,
	hkallweit1@...il.com,
	peppe.cavallaro@...com,
	alexandre.torgue@...s.st.com,
	joabreu@...opsys.com,
	fancer.lancer@...il.com,
	diasyzhang@...cent.com
Cc: Yanteng Si <siyanteng@...ngson.cn>,
	Jose.Abreu@...opsys.com,
	chenhuacai@...nel.org,
	linux@...linux.org.uk,
	guyinggang@...ngson.cn,
	netdev@...r.kernel.org,
	chris.chenfeiyang@...il.com,
	si.yanteng@...ux.dev,
	Huacai Chen <chenhuacai@...ngson.cn>
Subject: [PATCH net-next v16 08/14] net: stmmac: dwmac-loongson: Init ref and PTP clocks rate

Reference and PTP clocks rate of the Loongson GMAC devices is 125MHz.
(So is in the GNET devices which support is about to be added.) Set
the respective plat_stmmacenet_data field up in accordance with that
so to have the coalesce command and timestamping work correctly.

Fixes: 30bba69d7db4 ("stmmac: pci: Add dwmac support for Loongson")
Signed-off-by: Feiyang Chen <chenfeiyang@...ngson.cn>
Signed-off-by: Yinggang Gu <guyinggang@...ngson.cn>
Reviewed-by: Serge Semin <fancer.lancer@...il.com>
Acked-by: Huacai Chen <chenhuacai@...ngson.cn>
Signed-off-by: Yanteng Si <siyanteng@...ngson.cn>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
index 9b2e4bdf7cc7..327275b28dc2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
@@ -35,6 +35,9 @@ static void loongson_default_data(struct plat_stmmacenet_data *plat)
 	/* Disable RX queues routing by default */
 	plat->rx_queues_cfg[0].pkt_route = 0x0;
 
+	plat->clk_ref_rate = 125000000;
+	plat->clk_ptp_rate = 125000000;
+
 	/* Default to phy auto-detection */
 	plat->phy_addr = -1;
 
-- 
2.31.4


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ