diff mbox series

[v2,4/4] net: macb: enable mii on rgmii for sama7g5

Message ID 20210917132615.16183-5-claudiu.beznea@microchip.com (mailing list archive)
State Accepted
Commit 0f4f6d7332bbc3567ae01466812c089f133cfc83
Delegated to: Netdev Maintainers
Headers show
Series net: macb: add support for MII on RGMII interface | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 25 this patch: 25
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 18 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 25 this patch: 25
netdev/header_inline success Link

Commit Message

Claudiu Beznea Sept. 17, 2021, 1:26 p.m. UTC
Both MAC IPs available on SAMA7G5 support MII on RGMII feature.
Enable these by adding proper capability to proper macb_config
objects.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 drivers/net/ethernet/cadence/macb_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Nicolas Ferre Sept. 17, 2021, 1:33 p.m. UTC | #1
On 17/09/2021 at 15:26, Claudiu Beznea wrote:
> Both MAC IPs available on SAMA7G5 support MII on RGMII feature.
> Enable these by adding proper capability to proper macb_config
> objects.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>

Yes:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Thanks Claudiu, best regards,
   Nicolas

> ---
>   drivers/net/ethernet/cadence/macb_main.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index cdf3e35b5b33..e2730b3e1a57 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -4597,7 +4597,8 @@ static const struct macb_config zynq_config = {
>   };
>   
>   static const struct macb_config sama7g5_gem_config = {
> -	.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_CLK_HW_CHG,
> +	.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_CLK_HW_CHG |
> +		MACB_CAPS_MIIONRGMII,
>   	.dma_burst_length = 16,
>   	.clk_init = macb_clk_init,
>   	.init = macb_init,
> @@ -4605,7 +4606,8 @@ static const struct macb_config sama7g5_gem_config = {
>   };
>   
>   static const struct macb_config sama7g5_emac_config = {
> -	.caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII | MACB_CAPS_USRIO_HAS_CLKEN,
> +	.caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII |
> +		MACB_CAPS_USRIO_HAS_CLKEN | MACB_CAPS_MIIONRGMII,
>   	.dma_burst_length = 16,
>   	.clk_init = macb_clk_init,
>   	.init = macb_init,
>
Andrew Lunn Sept. 17, 2021, 2:40 p.m. UTC | #2
On Fri, Sep 17, 2021 at 04:26:15PM +0300, Claudiu Beznea wrote:
> Both MAC IPs available on SAMA7G5 support MII on RGMII feature.
> Enable these by adding proper capability to proper macb_config
> objects.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>

Thanks for adding this.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
diff mbox series

Patch

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index cdf3e35b5b33..e2730b3e1a57 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -4597,7 +4597,8 @@  static const struct macb_config zynq_config = {
 };
 
 static const struct macb_config sama7g5_gem_config = {
-	.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_CLK_HW_CHG,
+	.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_CLK_HW_CHG |
+		MACB_CAPS_MIIONRGMII,
 	.dma_burst_length = 16,
 	.clk_init = macb_clk_init,
 	.init = macb_init,
@@ -4605,7 +4606,8 @@  static const struct macb_config sama7g5_gem_config = {
 };
 
 static const struct macb_config sama7g5_emac_config = {
-	.caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII | MACB_CAPS_USRIO_HAS_CLKEN,
+	.caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII |
+		MACB_CAPS_USRIO_HAS_CLKEN | MACB_CAPS_MIIONRGMII,
 	.dma_burst_length = 16,
 	.clk_init = macb_clk_init,
 	.init = macb_init,