stmmac: intel: minor clean-up
Subsystems (4)
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
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
@@ -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
@@ -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
PATCH 2/2 stmmac: intel: fix wrong kernel-doc
In reply to Wong Vee KheeKernel-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
@@ -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
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 theintel_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