diff options
| author | Nathan Sullivan <nathan.sullivan@ni.com> | 2015-05-22 10:22:10 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-05-22 14:58:09 -0400 |
| commit | 222ca8e0c183309081bdb0fd5827fc2a922be3ad (patch) | |
| tree | a30debc900238de4539cb48157adce7e53c18ead /drivers/net/ethernet | |
| parent | 6db99596d11a99f59e8f8f9353b22ef76e31ad6a (diff) | |
net: macb: Disable half duplex gigabit on Zynq
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
| -rw-r--r-- | drivers/net/ethernet/cadence/macb.c | 12 | ||||
| -rw-r--r-- | drivers/net/ethernet/cadence/macb.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index 5f10dfc631d7..fc646a41d548 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) | |||
| 350 | else | 350 | else |
| 351 | phydev->supported &= PHY_BASIC_FEATURES; | 351 | phydev->supported &= PHY_BASIC_FEATURES; |
| 352 | 352 | ||
| 353 | if (bp->caps & MACB_CAPS_NO_GIGABIT_HALF) | ||
| 354 | phydev->supported &= ~SUPPORTED_1000baseT_Half; | ||
| 355 | |||
| 353 | phydev->advertising = phydev->supported; | 356 | phydev->advertising = phydev->supported; |
| 354 | 357 | ||
| 355 | bp->link = 0; | 358 | bp->link = 0; |
| @@ -2699,6 +2702,14 @@ static const struct macb_config emac_config = { | |||
| 2699 | .init = at91ether_init, | 2702 | .init = at91ether_init, |
| 2700 | }; | 2703 | }; |
| 2701 | 2704 | ||
| 2705 | static const struct macb_config zynq_config = { | ||
| 2706 | .caps = MACB_CAPS_SG_DISABLED | MACB_CAPS_GIGABIT_MODE_AVAILABLE | | ||
| 2707 | MACB_CAPS_NO_GIGABIT_HALF, | ||
| 2708 | .dma_burst_length = 16, | ||
| 2709 | .clk_init = macb_clk_init, | ||
| 2710 | .init = macb_init, | ||
| 2711 | }; | ||
| 2712 | |||
| 2702 | static const struct of_device_id macb_dt_ids[] = { | 2713 | static const struct of_device_id macb_dt_ids[] = { |
| 2703 | { .compatible = "cdns,at32ap7000-macb" }, | 2714 | { .compatible = "cdns,at32ap7000-macb" }, |
| 2704 | { .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config }, | 2715 | { .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config }, |
| @@ -2709,6 +2720,7 @@ static const struct of_device_id macb_dt_ids[] = { | |||
| 2709 | { .compatible = "atmel,sama5d4-gem", .data = &sama5d4_config }, | 2720 | { .compatible = "atmel,sama5d4-gem", .data = &sama5d4_config }, |
| 2710 | { .compatible = "cdns,at91rm9200-emac", .data = &emac_config }, | 2721 | { .compatible = "cdns,at91rm9200-emac", .data = &emac_config }, |
| 2711 | { .compatible = "cdns,emac", .data = &emac_config }, | 2722 | { .compatible = "cdns,emac", .data = &emac_config }, |
| 2723 | { .compatible = "cdns,zynq-gem", .data = &zynq_config }, | ||
| 2712 | { /* sentinel */ } | 2724 | { /* sentinel */ } |
| 2713 | }; | 2725 | }; |
| 2714 | MODULE_DEVICE_TABLE(of, macb_dt_ids); | 2726 | MODULE_DEVICE_TABLE(of, macb_dt_ids); |
diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h index eb7d76f7bf6a..24b1d9bcd865 100644 --- a/drivers/net/ethernet/cadence/macb.h +++ b/drivers/net/ethernet/cadence/macb.h | |||
| @@ -393,6 +393,7 @@ | |||
| 393 | #define MACB_CAPS_ISR_CLEAR_ON_WRITE 0x00000001 | 393 | #define MACB_CAPS_ISR_CLEAR_ON_WRITE 0x00000001 |
| 394 | #define MACB_CAPS_USRIO_HAS_CLKEN 0x00000002 | 394 | #define MACB_CAPS_USRIO_HAS_CLKEN 0x00000002 |
| 395 | #define MACB_CAPS_USRIO_DEFAULT_IS_MII 0x00000004 | 395 | #define MACB_CAPS_USRIO_DEFAULT_IS_MII 0x00000004 |
| 396 | #define MACB_CAPS_NO_GIGABIT_HALF 0x00000008 | ||
| 396 | #define MACB_CAPS_FIFO_MODE 0x10000000 | 397 | #define MACB_CAPS_FIFO_MODE 0x10000000 |
| 397 | #define MACB_CAPS_GIGABIT_MODE_AVAILABLE 0x20000000 | 398 | #define MACB_CAPS_GIGABIT_MODE_AVAILABLE 0x20000000 |
| 398 | #define MACB_CAPS_SG_DISABLED 0x40000000 | 399 | #define MACB_CAPS_SG_DISABLED 0x40000000 |
