1. 29 Aug, 2016 18 commits
  2. 27 Aug, 2016 19 commits
  3. 26 Aug, 2016 3 commits
    • David S. Miller's avatar
      Merge branch 'bcm_sf2-utilize-b53_common' · a29ca894
      David S. Miller authored
      Florian Fainelli says:
      
      ====================
      net: dsa: Make bcm_sf2 utilize b53_common
      
      This patch series makes the bcm_sf2 driver utilize a large number of the core
      functions offered by the b53_common driver since the SWITCH_CORE registers are
      mostly register compatible with the switches driven by b53_common.
      
      In order to accomplish that, we just override the dsa_driver_ops callbacks that
      we need to. There are still integration specific logic from the bcm_sf2 that we
      cannot absorb into b53_common because it is just not there, mostly in the area
      of link management and power management, but most of the features are within
      b53_common now: VLAN, FDB, bridge
      
      Along the process, we also improve support for the BCM58xx SoCs, since those
      also have the same version of the switching IP that 7445 has (for which bcm_sf2
      was developed).
      
      Changes in v3:
      
      - rebase against 145dd5f9 ("net: flush the
        softnet backlog in process context")
      
      Changes in v2:
      
      - rebased against "net: dsa: rename switch operations structure"
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a29ca894
    • Florian Fainelli's avatar
      net: dsa: bcm_sf2: Remove duplicate code · de0b9d3b
      Florian Fainelli authored
      Now that we are using b53_common for most VLAN, FDB and bridge
      operations, delete all the redundant code that we had in bcm_sf2.c to
      keep only the integration specific logic that we have to deal with:
      power management, link management and the external interfaces (RGMII,
      MDIO).
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de0b9d3b
    • Florian Fainelli's avatar
      net: dsa: bcm_sf2: Utilize core B53 driver when possible · f458995b
      Florian Fainelli authored
      The Broadcom Starfighter2 is almost entirely register compatible with
      B53, yet for historical reasons came up first in the tree and is now
      being updated to utilize b53_common.c to the fullest extent possible. A
      few things need to be adjusted to allow that:
      
      - the switch "core" registers currently operate on a 32-bit address,
        whereas b53 passes a page + reg pair to offset from, so we need to
        convert that, thankfully there is a generic formula to do that
      
      - the link managemenent is not self contained with the B53/CORE register
        set, but instead is in the SWITCH_REG block which is part of the
        integration glue logic, so we keep that entirely custom here because
        this really is part of the existing bcm_sf2 implementation
      
      - there are additional power management constraints on the port's
        memories that make us keep the port_enable/disable callbacks custom
        for now, also, we support tagging whereas b53_common does not support
        that yet
      
      All the VLAN and bridge code is entirely identical though so, avoid
      duplicating it. Other things will be migrated in the future like EEE and
      possibly Wake-on-LAN.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f458995b