Skip to contentSkip to conversation

stmmac: intel: minor clean-up

PATCH Applied Wong Vee Khee 2 participants 4 messages Jun 11, 2021 – Jun 12, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover stmmac: intel: minor clean-up

This patch series include two minor-cleanup patches:

1. Move all the hardcoded DEFINEs to dwmac-intel header file.
2. Fix the wrong kernel-doc on the intel_eth_pci_remove() function.

Since the changes are minor, only basic sanity tests are done on a Intel TigerLake with Marvell88E2110 PHY:-

- Link is up and able to perform ping.
- phc2sys and ptp4l are running without errors.

Wong Vee Khee (2):
stmmac: intel: move definitions to dwmac-intel header file
stmmac: intel: fix wrong kernel-doc

 .../net/ethernet/stmicro/stmmac/dwmac-intel.c  | 18 +-----------------
 .../net/ethernet/stmicro/stmmac/dwmac-intel.h  | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 17 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/2 stmmac: intel: move definitions to dwmac-intel header file

Currently some of the dwmac-intel definitions are in the header file, while some are in the driver source file. Cleaning this by moving all the definitions to the header file.

---
 .../net/ethernet/stmicro/stmmac/dwmac-intel.c    | 16 ----------------
 .../net/ethernet/stmicro/stmmac/dwmac-intel.h    | 16 ++++++++++++++++
 2 files changed, 16 insertions(+), 16 deletions(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +0 -16
index 6a9a19b0844c..a38e47e6d470 100644
@@ -10,22 +10,6 @@
 #include "stmmac.h"
 #include "stmmac_ptp.h"
 
-#define INTEL_MGBE_ADHOC_ADDR	0x15
-#define INTEL_MGBE_XPCS_ADDR	0x16
-
-/* Selection for PTP Clock Freq belongs to PSE & PCH GbE */
-#define PSE_PTP_CLK_FREQ_MASK		(GMAC_GPO0 | GMAC_GPO3)
-#define PSE_PTP_CLK_FREQ_19_2MHZ	(GMAC_GPO0)
-#define PSE_PTP_CLK_FREQ_200MHZ		(GMAC_GPO0 | GMAC_GPO3)
-#define PSE_PTP_CLK_FREQ_256MHZ		(0)
-#define PCH_PTP_CLK_FREQ_MASK		(GMAC_GPO0)
-#define PCH_PTP_CLK_FREQ_19_2MHZ	(GMAC_GPO0)
-#define PCH_PTP_CLK_FREQ_200MHZ		(0)
-
-/* Cross-timestamping defines */
-#define ART_CPUID_LEAF		0x15
-#define EHL_PSE_ART_MHZ		19200000
-
 struct intel_priv_data {
 	int mdio_adhoc_addr;	/* mdio address for serdes & etc */
 	unsigned long crossts_adj;
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.h +16 -0
index 20d14e588044..0a37987478c1 100644
@@ -34,4 +34,20 @@
 #define SERDES_RATE_PCIE_SHIFT	8
 #define SERDES_PCLK_SHIFT	12
 
+#define INTEL_MGBE_ADHOC_ADDR	0x15
+#define INTEL_MGBE_XPCS_ADDR	0x16
+
+/* Cross-timestamping defines */
+#define ART_CPUID_LEAF		0x15
+#define EHL_PSE_ART_MHZ		19200000
+
+/* Selection for PTP Clock Freq belongs to PSE & PCH GbE */
+#define PSE_PTP_CLK_FREQ_MASK		(GMAC_GPO0 | GMAC_GPO3)
+#define PSE_PTP_CLK_FREQ_19_2MHZ	(GMAC_GPO0)
+#define PSE_PTP_CLK_FREQ_200MHZ		(GMAC_GPO0 | GMAC_GPO3)
+#define PSE_PTP_CLK_FREQ_256MHZ		(0)
+#define PCH_PTP_CLK_FREQ_MASK		(GMAC_GPO0)
+#define PCH_PTP_CLK_FREQ_19_2MHZ	(GMAC_GPO0)
+#define PCH_PTP_CLK_FREQ_200MHZ		(0)
+
 #endif /* __DWMAC_INTEL_H__ */
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/2 stmmac: intel: fix wrong kernel-doc

In reply to Wong Vee Khee

Kernel-doc for intel_eth_pci_remove is incorrect, pdev datatype is struct pci_dev. Changed it to the 'pci device pointer'.

---
 drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +1 -1
index a38e47e6d470..e0a7d2b17921 100644
@@ -1087,7 +1087,7 @@ static int intel_eth_pci_probe(struct pci_dev *pdev,
 /**
  * intel_eth_pci_remove
  *
- * @pdev: platform device pointer
+ * @pdev: pci device pointer
  * Description: this function calls the main to free the net resources
  * and releases the PCI resources.
  */
Signature · 1 line
2.25.1
#3 lore raw
In reply to Wong Vee Khee
This series was applied to netdev/net-next.git (refs/heads/master):

Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

Quoted 9 lines · On Fri, 11 Jun 2021 21:16:07 +0800 you wrote:

This patch series include two minor-cleanup patches:

1. Move all the hardcoded DEFINEs to dwmac-intel header file.
2. Fix the wrong kernel-doc on the intel_eth_pci_remove() function.

Since the changes are minor, only basic sanity tests are done on a Intel TigerLake with Marvell88E2110 PHY:-

[...]

Here is the summary with links:
- [net-next,1/2] stmmac: intel: move definitions to dwmac-intel header file

    https://git.kernel.org/netdev/net-next/c/fb9349c4163e
  - [net-next,2/2] stmmac: intel: fix wrong kernel-doc
    https://git.kernel.org/netdev/net-next/c/3c3ea630e87c

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html