netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: stmmac: dwmac-sti: remove stih415/stih416/stid127
@ 2023-04-16 19:55 Alain Volmat
  2023-04-17 11:12 ` Horatiu Vultur
  2023-04-19  4:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Alain Volmat @ 2023-04-16 19:55 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Maxime Coquelin
  Cc: patrice.chotard, Alain Volmat, netdev, linux-stm32,
	linux-arm-kernel, linux-kernel

Remove no more supported platforms (stih415/stih416 and stid127)

Signed-off-by: Alain Volmat <avolmat@me.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
---
Patch sent previously as part of serie: https://lore.kernel.org/all/20230209091659.1409-8-avolmat@me.com/

 .../net/ethernet/stmicro/stmmac/dwmac-sti.c   | 60 +------------------
 1 file changed, 1 insertion(+), 59 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
index be3b1ebc06ab..465ce66ef9c1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
@@ -35,7 +35,7 @@
 #define IS_PHY_IF_MODE_GBIT(iface)	(IS_PHY_IF_MODE_RGMII(iface) || \
 					 iface == PHY_INTERFACE_MODE_GMII)
 
-/* STiH4xx register definitions (STiH415/STiH416/STiH407/STiH410 families)
+/* STiH4xx register definitions (STiH407/STiH410 families)
  *
  * Below table summarizes the clock requirement and clock sources for
  * supported phy interface modes with link speeds.
@@ -75,27 +75,6 @@
 #define STIH4XX_ETH_SEL_INTERNAL_NOTEXT_PHYCLK	BIT(7)
 #define STIH4XX_ETH_SEL_TXCLK_NOT_CLK125	BIT(6)
 
-/* STiD127 register definitions
- *-----------------------
- * src	 |BIT(6)| BIT(7)|
- *-----------------------
- * MII   |  1	|   n/a	|
- *-----------------------
- * RMII  |  n/a	|   1	|
- * clkgen|	|	|
- *-----------------------
- * RMII  |  n/a	|   0	|
- * phyclk|	|	|
- *-----------------------
- * RGMII |  1	|  n/a	|
- * clkgen|	|	|
- *-----------------------
- */
-
-#define STID127_RETIME_SRC_MASK			GENMASK(7, 6)
-#define STID127_ETH_SEL_INTERNAL_NOTEXT_PHYCLK	BIT(7)
-#define STID127_ETH_SEL_INTERNAL_NOTEXT_TXCLK	BIT(6)
-
 #define ENMII_MASK	GENMASK(5, 5)
 #define ENMII		BIT(5)
 #define EN_MASK		GENMASK(1, 1)
@@ -194,36 +173,6 @@ static void stih4xx_fix_retime_src(void *priv, u32 spd)
 			   stih4xx_tx_retime_val[src]);
 }
 
-static void stid127_fix_retime_src(void *priv, u32 spd)
-{
-	struct sti_dwmac *dwmac = priv;
-	u32 reg = dwmac->ctrl_reg;
-	u32 freq = 0;
-	u32 val = 0;
-
-	if (dwmac->interface == PHY_INTERFACE_MODE_MII) {
-		val = STID127_ETH_SEL_INTERNAL_NOTEXT_TXCLK;
-	} else if (dwmac->interface == PHY_INTERFACE_MODE_RMII) {
-		if (!dwmac->ext_phyclk) {
-			val = STID127_ETH_SEL_INTERNAL_NOTEXT_PHYCLK;
-			freq = DWMAC_50MHZ;
-		}
-	} else if (IS_PHY_IF_MODE_RGMII(dwmac->interface)) {
-		val = STID127_ETH_SEL_INTERNAL_NOTEXT_TXCLK;
-		if (spd == SPEED_1000)
-			freq = DWMAC_125MHZ;
-		else if (spd == SPEED_100)
-			freq = DWMAC_25MHZ;
-		else if (spd == SPEED_10)
-			freq = DWMAC_2_5MHZ;
-	}
-
-	if (freq)
-		clk_set_rate(dwmac->clk, freq);
-
-	regmap_update_bits(dwmac->regmap, reg, STID127_RETIME_SRC_MASK, val);
-}
-
 static int sti_dwmac_set_mode(struct sti_dwmac *dwmac)
 {
 	struct regmap *regmap = dwmac->regmap;
@@ -408,14 +357,7 @@ static const struct sti_dwmac_of_data stih4xx_dwmac_data = {
 	.fix_retime_src = stih4xx_fix_retime_src,
 };
 
-static const struct sti_dwmac_of_data stid127_dwmac_data = {
-	.fix_retime_src = stid127_fix_retime_src,
-};
-
 static const struct of_device_id sti_dwmac_match[] = {
-	{ .compatible = "st,stih415-dwmac", .data = &stih4xx_dwmac_data},
-	{ .compatible = "st,stih416-dwmac", .data = &stih4xx_dwmac_data},
-	{ .compatible = "st,stid127-dwmac", .data = &stid127_dwmac_data},
 	{ .compatible = "st,stih407-dwmac", .data = &stih4xx_dwmac_data},
 	{ }
 };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: ethernet: stmmac: dwmac-sti: remove stih415/stih416/stid127
  2023-04-16 19:55 [PATCH] net: ethernet: stmmac: dwmac-sti: remove stih415/stih416/stid127 Alain Volmat
@ 2023-04-17 11:12 ` Horatiu Vultur
  2023-04-19  4:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Horatiu Vultur @ 2023-04-17 11:12 UTC (permalink / raw)
  To: Alain Volmat
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Maxime Coquelin, patrice.chotard, netdev, linux-stm32,
	linux-arm-kernel, linux-kernel

The 04/16/2023 21:55, Alain Volmat wrote:
> 
> Remove no more supported platforms (stih415/stih416 and stid127)

Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>

> 
> Signed-off-by: Alain Volmat <avolmat@me.com>
> Acked-by: Jakub Kicinski <kuba@kernel.org>
> ---
> Patch sent previously as part of serie: https://lore.kernel.org/all/20230209091659.1409-8-avolmat@me.com/
> 
>  .../net/ethernet/stmicro/stmmac/dwmac-sti.c   | 60 +------------------
>  1 file changed, 1 insertion(+), 59 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
> index be3b1ebc06ab..465ce66ef9c1 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c
> @@ -35,7 +35,7 @@
>  #define IS_PHY_IF_MODE_GBIT(iface)     (IS_PHY_IF_MODE_RGMII(iface) || \
>                                          iface == PHY_INTERFACE_MODE_GMII)
> 
> -/* STiH4xx register definitions (STiH415/STiH416/STiH407/STiH410 families)
> +/* STiH4xx register definitions (STiH407/STiH410 families)
>   *
>   * Below table summarizes the clock requirement and clock sources for
>   * supported phy interface modes with link speeds.
> @@ -75,27 +75,6 @@
>  #define STIH4XX_ETH_SEL_INTERNAL_NOTEXT_PHYCLK BIT(7)
>  #define STIH4XX_ETH_SEL_TXCLK_NOT_CLK125       BIT(6)
> 
> -/* STiD127 register definitions
> - *-----------------------
> - * src  |BIT(6)| BIT(7)|
> - *-----------------------
> - * MII   |  1  |   n/a |
> - *-----------------------
> - * RMII  |  n/a        |   1   |
> - * clkgen|     |       |
> - *-----------------------
> - * RMII  |  n/a        |   0   |
> - * phyclk|     |       |
> - *-----------------------
> - * RGMII |  1  |  n/a  |
> - * clkgen|     |       |
> - *-----------------------
> - */
> -
> -#define STID127_RETIME_SRC_MASK                        GENMASK(7, 6)
> -#define STID127_ETH_SEL_INTERNAL_NOTEXT_PHYCLK BIT(7)
> -#define STID127_ETH_SEL_INTERNAL_NOTEXT_TXCLK  BIT(6)
> -
>  #define ENMII_MASK     GENMASK(5, 5)
>  #define ENMII          BIT(5)
>  #define EN_MASK                GENMASK(1, 1)
> @@ -194,36 +173,6 @@ static void stih4xx_fix_retime_src(void *priv, u32 spd)
>                            stih4xx_tx_retime_val[src]);
>  }
> 
> -static void stid127_fix_retime_src(void *priv, u32 spd)
> -{
> -       struct sti_dwmac *dwmac = priv;
> -       u32 reg = dwmac->ctrl_reg;
> -       u32 freq = 0;
> -       u32 val = 0;
> -
> -       if (dwmac->interface == PHY_INTERFACE_MODE_MII) {
> -               val = STID127_ETH_SEL_INTERNAL_NOTEXT_TXCLK;
> -       } else if (dwmac->interface == PHY_INTERFACE_MODE_RMII) {
> -               if (!dwmac->ext_phyclk) {
> -                       val = STID127_ETH_SEL_INTERNAL_NOTEXT_PHYCLK;
> -                       freq = DWMAC_50MHZ;
> -               }
> -       } else if (IS_PHY_IF_MODE_RGMII(dwmac->interface)) {
> -               val = STID127_ETH_SEL_INTERNAL_NOTEXT_TXCLK;
> -               if (spd == SPEED_1000)
> -                       freq = DWMAC_125MHZ;
> -               else if (spd == SPEED_100)
> -                       freq = DWMAC_25MHZ;
> -               else if (spd == SPEED_10)
> -                       freq = DWMAC_2_5MHZ;
> -       }
> -
> -       if (freq)
> -               clk_set_rate(dwmac->clk, freq);
> -
> -       regmap_update_bits(dwmac->regmap, reg, STID127_RETIME_SRC_MASK, val);
> -}
> -
>  static int sti_dwmac_set_mode(struct sti_dwmac *dwmac)
>  {
>         struct regmap *regmap = dwmac->regmap;
> @@ -408,14 +357,7 @@ static const struct sti_dwmac_of_data stih4xx_dwmac_data = {
>         .fix_retime_src = stih4xx_fix_retime_src,
>  };
> 
> -static const struct sti_dwmac_of_data stid127_dwmac_data = {
> -       .fix_retime_src = stid127_fix_retime_src,
> -};
> -
>  static const struct of_device_id sti_dwmac_match[] = {
> -       { .compatible = "st,stih415-dwmac", .data = &stih4xx_dwmac_data},
> -       { .compatible = "st,stih416-dwmac", .data = &stih4xx_dwmac_data},
> -       { .compatible = "st,stid127-dwmac", .data = &stid127_dwmac_data},
>         { .compatible = "st,stih407-dwmac", .data = &stih4xx_dwmac_data},
>         { }
>  };
> --
> 2.34.1
> 

-- 
/Horatiu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: ethernet: stmmac: dwmac-sti: remove stih415/stih416/stid127
  2023-04-16 19:55 [PATCH] net: ethernet: stmmac: dwmac-sti: remove stih415/stih416/stid127 Alain Volmat
  2023-04-17 11:12 ` Horatiu Vultur
@ 2023-04-19  4:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-04-19  4:50 UTC (permalink / raw)
  To: Alain Volmat
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, edumazet,
	kuba, pabeni, mcoquelin.stm32, patrice.chotard, netdev,
	linux-stm32, linux-arm-kernel, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Sun, 16 Apr 2023 21:55:23 +0200 you wrote:
> Remove no more supported platforms (stih415/stih416 and stid127)
> 
> Signed-off-by: Alain Volmat <avolmat@me.com>
> Acked-by: Jakub Kicinski <kuba@kernel.org>
> ---
> Patch sent previously as part of serie: https://lore.kernel.org/all/20230209091659.1409-8-avolmat@me.com/
> 
> [...]

Here is the summary with links:
  - net: ethernet: stmmac: dwmac-sti: remove stih415/stih416/stid127
    https://git.kernel.org/netdev/net-next/c/14cac662235e

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-19  4:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-16 19:55 [PATCH] net: ethernet: stmmac: dwmac-sti: remove stih415/stih416/stid127 Alain Volmat
2023-04-17 11:12 ` Horatiu Vultur
2023-04-19  4:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).