1. 24 1月, 2018 7 次提交
  2. 23 1月, 2018 29 次提交
  3. 22 1月, 2018 4 次提交
    • D
      Merge branch 'mvpp2-Armada-7k-8k-PP2-ACPI-support' · d1b1110f
      David S. Miller 提交于
      Marcin Wojtas says:
      
      ====================
      Armada 7k/8k PP2 ACPI support
      
      I quickly resend the series, thanks to Antoine Tenart's remark,
      who spotted !CONFIG_ACPI compilation issue after introducing
      the new fwnode_irq_get() routine. Please see the details in the changelog
      below and the 3/7 commit log.
      
      mvpp2 driver can work with the ACPI representation, as exposed
      on a public branch:
      https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/marvell-armada-wip
      It was compiled together with the most recent Tianocore EDK2 revision.
      Please refer to the firmware build instruction on MacchiatoBin board:
      http://wiki.macchiatobin.net/tiki-index.php?page=Build+from+source+-+UEFI+EDK+II
      
      ACPI representation of PP2 controllers (withouth PHY support) can
      be viewed in the github:
      * MacchiatoBin:
      https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/blob/71ae395da1661374b0f07d1602afb1eee56e9794/Platforms/Marvell/Armada/AcpiTables/Armada80x0McBin/Dsdt.asl#L201
      
      * Armada 7040 DB:
      https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/blob/71ae395da1661374b0f07d1602afb1eee56e9794/Platforms/Marvell/Armada/AcpiTables/Armada70x0/Dsdt.asl#L131
      
      I will appreciate any comments or remarks.
      
      Best regards,
      Marcin
      
      Changelog:
      v3 -> v4:
      * 3/7
          - add new macro (ACPI_HANDLE_FWNODE) and fix
            compilation with !CONFIG_ACPI
          - extend commit log and mention usability of fwnode_irq_get
            for the child nodes as well
      
      v2 -> v3:
      * 1/7, 2/7
          - Add Rafael's Acked-by's
      * 3/7, 4/7
          - New patches
      * 6/7, 7/7
          - Update driver with new helper routines usage
          - Improve commit log.
      
      v1 -> v2:
      * Remove MDIO patches
      * Use PP2 ports only with link interrupts
      * Release second region resources in mvpp2 driver (code moved from
        mvmdio), as explained in details in 5/5 commit message.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d1b1110f
    • M
      net: mvpp2: enable ACPI support in the driver · a75edc7c
      Marcin Wojtas 提交于
      This patch introduces an alternative way of obtaining resources - via
      ACPI tables provided by firmware. Enabling coexistence with the DT
      support, in addition to the OF_*->device_*/fwnode_* API replacement,
      required following steps to be taken:
      
      * Add mvpp2_acpi_match table
      * Omit clock configuration and obtain tclk from the property - in ACPI
        world, the firmware is responsible for clock maintenance.
      * Disable comphy and syscon handling as they are not available for ACPI.
      * Modify way of obtaining interrupts - use newly introduced
        fwnode_irq_get() routine
      * Until proper MDIO bus and PHY handling with ACPI is established in the
        kernel, use only link interrupts feature in the driver. For the RGMII
        port it results in depending on GMAC settings done during firmware
        stage.
      * When booting with ACPI MVPP2_QDIST_MULTI_MODE is picked by
        default, as there is no need to keep any kind of the backward
        compatibility.
      
      Moreover, a memory region used by mvmdio driver is usually placed in
      the middle of the address space of the PP2 network controller.
      The MDIO base address is obtained without requesting memory region
      (by devm_ioremap() call) in mvmdio.c, later overlapping resources are
      requested by the network driver, which is responsible for avoiding
      a concurrent access.
      
      In case the MDIO memory region is declared in the ACPI, it can
      already appear as 'in-use' in the OS. Because it is overlapped by second
      region of the network controller, make sure it is released, before
      requesting it again. The care is taken by mvpp2 driver to avoid
      concurrent access to this memory region.
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a75edc7c
    • M
      net: mvpp2: use device_*/fwnode_* APIs instead of of_* · 24812221
      Marcin Wojtas 提交于
      OF functions can be used only for the driver using DT.
      As a preparation for introducing ACPI support in mvpp2
      driver, use struct fwnode_handle in order to obtain
      properties from the hardware description.
      
      This patch replaces of_* function with device_*/fwnode_*
      where possible in the mvpp2.
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      24812221
    • M
      net: mvpp2: simplify maintaining enabled ports' list · bf147153
      Marcin Wojtas 提交于
      'port_count' field of the mvpp2 structure holds an overall amount
      of available ports, based on DT nodes status. In order to be prepared
      to support other HW description, obtain the value by incrementing it
      upon each successful port initialization. This allowed for simplifying
      port indexing in the controller's private array, whose size is now not
      dynamically allocated, but fixed to MVPP2_MAX_PORTS.
      
      This patch simplifies creating and filling list of enabled ports and
      is a part of the preparation for adding ACPI support in the mvpp2 driver.
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bf147153