1. 14 Jan, 2020 27 commits
  2. 13 Jan, 2020 3 commits
  3. 12 Jan, 2020 10 commits
    • Jakub Kicinski's avatar
      Merge branch 'IXP4xx-networking-cleanups' · cbd19d09
      Jakub Kicinski authored
      Linus Walleij says:
      
      ====================
      IXP4xx networking cleanups
      
      This is a patch series which jams together Arnds and mine
      cleanups for the IXP4xx networking.
      
      I also have patches for device tree support but that
      requires more elaborate work, this series is some of
      mine and some of Arnds patches that is a good foundation
      for his multiplatform work and my device tree work.
      
      These are for application to the networking tree so
      that can be taken in one separate sweep.
      
      I have tested the patches for a bit using zeroday builds
      and some boots on misc IXP4xx devices and haven't run
      into any major problems. We might find some new stuff
      as a result from the new compiler coverage.
      
      I had to depromote enabling compiler coverage at one
      point in the v2 set because it depended on other patches
      making the code more generic.
      
      The change in v3 was simply dropping one offending
      patch hardcoding base addresses into the driver.
      
      The change in v4 drops a stable@ tag that was
      unnecessary.
      
      This v5 is a rebase of the v4 patch set on top of
      net-next.
      ====================
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      cbd19d09
    • Linus Walleij's avatar
      net: ethernet: ixp4xx: Use parent dev for DMA pool · e45d0fad
      Linus Walleij authored
      Use the netdevice struct device .parent field when calling
      dma_pool_create(): the .dma_coherent_mask and .dma_mask
      pertains to the bus device on the hardware (platform)
      bus in this case, not the struct device inside the network
      device. This makes the pool allocation work.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e45d0fad
    • Linus Walleij's avatar
      ARM/net: ixp4xx: Pass ethernet physical base as resource · f458ac47
      Linus Walleij authored
      In order to probe this ethernet interface from the device tree
      all physical MMIO regions must be passed as resources. Begin
      this rewrite by first passing the port base address as a
      resource for all platforms using this driver, remap it in
      the driver and avoid using any reference of the statically
      mapped virtual address in the driver.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f458ac47
    • Linus Walleij's avatar
      net: ehernet: ixp4xx: Use netdev_* messages · 3cb5b0ee
      Linus Walleij authored
      Simplify and correct a bunch of messages using printk
      directly to use the netdev_* macros. I have not changed
      all of them, just the low-hanging fruit.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      3cb5b0ee
    • Linus Walleij's avatar
      net: ethernet: ixp4xx: Use distinct local variable · d813d7e5
      Linus Walleij authored
      Use "ndev" for the struct net_device and "dev" for the
      struct device in probe() and remove(). Add the local
      "dev" pointer for later use in refactoring.
      
      Take this opportunity to fix inverse christmas tree
      coding style.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d813d7e5
    • Linus Walleij's avatar
      net: ethernet: ixp4xx: Standard module init · c83db9ef
      Linus Walleij authored
      The IXP4xx driver was initializing the MDIO bus before even
      probing, in the callbacks supposed to be used for setting up
      the module itself, and with the side effect of trying to
      register the MDIO bus as soon as this module was loaded or
      compiled into the kernel whether the device was discovered
      or not.
      
      This does not work with multiplatform environments.
      
      To get rid of this: set up the MDIO bus from the probe()
      callback and remove it in the remove() callback. Rename
      the probe() and remove() calls to reflect the most common
      conventions.
      
      Since there is a bit of checking for the ethernet feature
      to be present in the MDIO registering function, making the
      whole module not even be registered if we can't find an
      MDIO bus, we need something similar: register the MDIO
      bus when the corresponding ethernet is probed, and
      return -EPROBE_DEFER on the other interfaces until this
      happens. If no MDIO bus is present on any of the
      registered interfaces we will eventually bail out.
      
      None of the platforms I've seen has e.g. MDIO on EthB
      and only uses EthC, there is always a Ethernet hardware
      on the NPE (B, C) that has the MDIO bus, we just might
      have to wait for it.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c83db9ef
    • Arnd Bergmann's avatar
      ixp4xx_eth: move platform_data definition · a41a5b26
      Arnd Bergmann authored
      The platform data is needed to compile the driver as standalone,
      so move it to a global location along with similar files.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a41a5b26
    • Arnd Bergmann's avatar
      ptp: ixp46x: move adjacent to ethernet driver · 2785543f
      Arnd Bergmann authored
      The ixp46x ptp driver has a somewhat unusual setup, where the ptp
      driver and the ethernet driver are in different directories but
      access the same registers that are defined a platform specific
      header file.
      
      Moving everything into drivers/net/ makes it look more like most
      other ptp drivers and allows compile-testing this driver on
      other targets.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2785543f
    • Arnd Bergmann's avatar
      wan: ixp4xx_hss: prepare compile testing · c74f16b6
      Arnd Bergmann authored
      The ixp4xx_hss driver needs the platform data definition and the
      system clock rate to be compiled. Move both into a new platform_data
      header file.
      
      This is a prerequisite for compile testing, but turning on compile
      testing requires further patches to isolate the SoC headers.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c74f16b6
    • Arnd Bergmann's avatar
      wan: ixp4xx_hss: fix compile-testing on 64-bit · 504c28c8
      Arnd Bergmann authored
      Change the driver to use portable integer types to avoid
      warnings during compile testing:
      
      drivers/net/wan/ixp4xx_hss.c:863:21: error: cast to 'u32 *' (aka 'unsigned int *') from smaller integer type 'int' [-Werror,-Wint-to-pointer-cast]
              memcpy_swab32(mem, (u32 *)((int)skb->data & ~3), bytes / 4);
                                 ^
      drivers/net/wan/ixp4xx_hss.c:979:12: error: incompatible pointer types passing 'u32 *' (aka 'unsigned int *') to parameter of type 'dma_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types]
                                                    &port->desc_tab_phys)))
                                                    ^~~~~~~~~~~~~~~~~~~~
      include/linux/dmapool.h:27:20: note: passing argument to parameter 'handle' here
                           dma_addr_t *handle);
                                       ^
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      504c28c8