netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Nathan Sullivan <nathan.sullivan@ni.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] net: macb: Disable half duplex gigabit on Zynq
Date: Fri, 22 May 2015 16:56:28 +0200	[thread overview]
Message-ID: <555F439C.1020703@atmel.com> (raw)
In-Reply-To: <1432304531-23682-2-git-send-email-nathan.sullivan@ni.com>

Le 22/05/2015 16:22, Nathan Sullivan a écrit :
> According to the Zynq TRM, gigabit half duplex is not supported.  Add a
> new cap and compatible string so Zynq can avoid advertising that mode.
> 
> Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>

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

> ---
>  drivers/net/ethernet/cadence/macb.c |   12 ++++++++++++
>  drivers/net/ethernet/cadence/macb.h |    1 +
>  2 files changed, 13 insertions(+)
> 
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index 61aa570..e7c0ef6 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -350,6 +350,9 @@ static int macb_mii_probe(struct net_device *dev)
>  	else
>  		phydev->supported &= PHY_BASIC_FEATURES;
>  
> +	if (bp->caps & MACB_CAPS_NO_GIGABIT_HALF)
> +		phydev->supported &= ~SUPPORTED_1000baseT_Half;
> +
>  	phydev->advertising = phydev->supported;
>  
>  	bp->link = 0;
> @@ -2693,6 +2696,14 @@ static const struct macb_config emac_config = {
>  	.init = at91ether_init,
>  };
>  
> +static const struct macb_config zynq_config = {
> +	.caps = MACB_CAPS_SG_DISABLED | MACB_CAPS_GIGABIT_MODE_AVAILABLE |
> +		MACB_CAPS_NO_GIGABIT_HALF,
> +	.dma_burst_length = 16,
> +	.clk_init = macb_clk_init,
> +	.init = macb_init,
> +};
> +
>  static const struct of_device_id macb_dt_ids[] = {
>  	{ .compatible = "cdns,at32ap7000-macb" },
>  	{ .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
> @@ -2703,6 +2714,7 @@ static const struct of_device_id macb_dt_ids[] = {
>  	{ .compatible = "atmel,sama5d4-gem", .data = &sama5d4_config },
>  	{ .compatible = "cdns,at91rm9200-emac", .data = &emac_config },
>  	{ .compatible = "cdns,emac", .data = &emac_config },
> +	{ .compatible = "cdns,zynq-gem", .data = &zynq_config },
>  	{ /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, macb_dt_ids);
> diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h
> index eb7d76f..24b1d9b 100644
> --- a/drivers/net/ethernet/cadence/macb.h
> +++ b/drivers/net/ethernet/cadence/macb.h
> @@ -393,6 +393,7 @@
>  #define MACB_CAPS_ISR_CLEAR_ON_WRITE		0x00000001
>  #define MACB_CAPS_USRIO_HAS_CLKEN		0x00000002
>  #define MACB_CAPS_USRIO_DEFAULT_IS_MII		0x00000004
> +#define MACB_CAPS_NO_GIGABIT_HALF		0x00000008
>  #define MACB_CAPS_FIFO_MODE			0x10000000
>  #define MACB_CAPS_GIGABIT_MODE_AVAILABLE	0x20000000
>  #define MACB_CAPS_SG_DISABLED			0x40000000
> 


-- 
Nicolas Ferre

  reply	other threads:[~2015-05-22 14:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 14:22 [PATCH v2 1/3] net: macb: Document zynq gem dt binding Nathan Sullivan
2015-05-22 14:22 ` [PATCH v2 2/3] net: macb: Disable half duplex gigabit on Zynq Nathan Sullivan
2015-05-22 14:56   ` Nicolas Ferre [this message]
2015-05-22 18:58   ` David Miller
2015-05-22 14:22 ` [PATCH v2 3/3] ARM: zynq: DT: Use the zynq binding with macb Nathan Sullivan
2015-05-25 19:14   ` Sören Brinkmann
2015-05-22 14:56 ` [PATCH v2 1/3] net: macb: Document zynq gem dt binding Nicolas Ferre
2015-05-22 18:58 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=555F439C.1020703@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan.sullivan@ni.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).