Changeset 42551
- Timestamp:
- 2014-09-15T12:19:27+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/target/linux/lantiq/patches-3.10/0205-lantiq-xrx200-switch.patch
r40313 r42551 1 --- a/drivers/net/ethernet/lantiq_xrx200.c 2 +++ b/drivers/net/ethernet/lantiq_xrx200.c 1 Index: linux-3.10.49/drivers/net/ethernet/lantiq_xrx200.c 2 =================================================================== 3 --- linux-3.10.49.orig/drivers/net/ethernet/lantiq_xrx200.c 2014-09-13 05:05:35.449070854 +0200 4 +++ linux-3.10.49/drivers/net/ethernet/lantiq_xrx200.c 2014-09-13 05:17:26.065088335 +0200 3 5 @@ -16,6 +16,7 @@ 4 6 * Copyright (C) 2012 John Crispin <blogic@openwrt.org> … … 36 38 #define XRX200_DMA_IRQ INT_NUM_IM2_IRL0 37 39 #define XRX200_DMA_RX 0 38 @@ -225,6 +230,8 @@ struct xrx200_hw {40 @@ -225,6 +230,8 @@ 39 41 unsigned short wan_map; 40 42 … … 45 47 46 48 struct xrx200_priv { 47 @@ -233,7 +240,8 @@ struct xrx200_priv {49 @@ -233,7 +240,8 @@ 48 50 49 51 struct xrx200_port port[XRX200_MAX_PORT]; … … 55 57 unsigned char mac[6]; 56 58 57 @@ -265,6 +273,585 @@ static __iomem void *xrx200_pmac_membase59 @@ -265,6 +273,585 @@ 58 60 #define ltq_pmac_w32_mask(x, y, z) \ 59 61 ltq_w32_mask(x, y, xrx200_pmac_membase + (z)) … … 641 643 { 642 644 struct xrx200_priv *priv = netdev_priv(dev); 643 @@ -346,7 +933,7 @@ static void xrx200_hw_receive(struct xrx645 @@ -346,7 +933,7 @@ 644 646 struct xrx200_priv *priv = netdev_priv(dev); 645 647 struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc]; … … 650 652 651 653 spin_lock_irqsave(&priv->hw->lock, flags); 652 @@ -924,9 +1511,9 @@ static void xrx200_hw_init(struct xrx200654 @@ -924,9 +1511,9 @@ 653 655 PMAC_HD_CTL); 654 656 #endif … … 662 664 ltq_switch_w32_mask(0, PCE_INGRESS, PCE_PCTRL_REG(i, 0)); 663 665 } 664 @@ -1042,6 +1629,7 @@ static void xrx200_of_iface(struct xrx20 665 struct xrx200_priv *priv; 666 struct device_node *port; 667 const __be32 *wan; 668 + const __be32 *sw; 669 670 /* alloc the network device */ 671 hw->devs[hw->num_devs] = alloc_etherdev(sizeof(struct xrx200_priv)); 672 @@ -1065,6 +1653,11 @@ static void xrx200_of_iface(struct xrx20 666 @@ -1065,6 +1652,10 @@ 673 667 if (wan && (*wan == 1)) 674 668 priv->wan = 1; 675 669 676 670 + /* should the switch be enabled on this interface ? */ 677 + sw = of_get_property(iface, "lantiq,switch", NULL); 678 + if (sw && (*sw == 1)) 671 + if (of_find_property(iface, "lantiq,switch", NULL)) 679 672 + priv->sw = 1; 680 673 + … … 682 675 for_each_child_of_node(iface, port) 683 676 if (of_device_is_compatible(port, "lantiq,xrx200-pdi-port")) 684 @@ -1138,6 +17 31,8 @@ static int xrx200_probe(struct platform_677 @@ -1138,6 +1729,8 @@ 685 678 return -ENOENT; 686 679 } … … 691 684 ltq_pmac_w32(xrx200_hw.wan_map, PMAC_EWAN); 692 685 693 --- /dev/null 694 +++ b/drivers/net/ethernet/lantiq_xrx200_sw.h 686 Index: linux-3.10.49/drivers/net/ethernet/lantiq_xrx200_sw.h 687 =================================================================== 688 --- /dev/null 1970-01-01 00:00:00.000000000 +0000 689 +++ linux-3.10.49/drivers/net/ethernet/lantiq_xrx200_sw.h 2014-09-13 05:05:35.469070854 +0200 695 690 @@ -0,0 +1,1328 @@ 696 691 +/*
Note: See TracChangeset
for help on using the changeset viewer.