1. 09 10月, 2021 24 次提交
  2. 08 10月, 2021 16 次提交
    • T
      Merge https://source.denx.de/u-boot/custodians/u-boot-marvell · 0caf37e9
      Tom Rini 提交于
      - a37xx: pci: Increase PCIe IO size from 64 KiB to 1 MiB (Pali)
      - phy: marvell: a3700: Misc improvements (Pali)
      - a38x serdes cleanup (Pali)
      - A3720 PCIe enhancements (Pali & Marek)
      - mvebu: mvebu_armada-8k: Puzzle M801 enhancements (Robert)
      - mvebu: x530: Remove custom kwbimage.cfg (Chris)
      - mvebu: Select SPL_SKIP_LOWLEVEL_INIT on ARMADA_32BIT (Stefan)
      0caf37e9
    • C
      ARM: mvebu: x530: Remove custom kwbimage.cfg · 1ead6c20
      Chris Packham 提交于
      Commit ca1a4c86 ("mvebu: select boot device at SoC level") made it
      unnecessary for the A385 boards to have their own kwbimage.cfg but as
      the x530 was in flight at the time it was added with it's own
      kwbimage.cfg. Remove the custom kwbimage.cfg as the SoC level file is
      suitable.
      Signed-off-by: NChris Packham <judge.packham@gmail.com>
      Reviewed-by: NStefan Roese <sr@denx.de>
      1ead6c20
    • R
      arm: mvebu: mvebu_armada-8k: drop Puzzle M801 early init code · bdce2124
      Robert Marko 提交于
      Since the CP1 pinctrl is not properly set in the DTS, there is no
      need for setting the pinctrl by writing hardcoded values to the MPP
      registers.
      
      So, drop the code relating to that.
      
      Fixes: 87c220d0 ("arm: mvebu: mvebu_armada-8k: Add support for initializing iEi Puzzle-M801 networking")
      Signed-off-by: NRobert Marko <robert.marko@sartura.hr>
      Reviewed-by: NStefan Roese <sr@denx.de>
      bdce2124
    • R
      arm: mvebu: dts: m801: correct CP1 pinctrl · cfb7102d
      Robert Marko 提交于
      Current CP1 pinctrl that is set on the Puzzle M801 is incorrect.
      CP1 pins are only used for the SMI bus and the MSS I2C, all other
      pins are just GPIO-s.
      
      Due to this being set completely wrong, the pinctrl was actually
      ended up being hardcoded in the board_early_init_f() step so that
      SMI would work.
      
      That is obviously not the right thing to do, so convert the register
      hex values that were being written to individual pin modes and set it
      in the DTS.
      Add the SMI pins to the CP1 MDIO node as otherwise CP1 pinctrl does
      not get probed without an consumer.
      
      Fixes: 2ae2b8a2 ("arm: mvebu: Initial iEi Puzzle-M801 support")
      Signed-off-by: NRobert Marko <robert.marko@sartura.hr>
      Reviewed-by: NStefan Roese <sr@denx.de>
      cfb7102d
    • S
      arm: mvebu: Select SPL_SKIP_LOWLEVEL_INIT on ARMADA_32BIT · cf47a8cf
      Stefan Roese 提交于
      Select SPL_SKIP_LOWLEVEL_INIT on 32bit Armada platforms via Kconfig,
      as this was removed from mach/config.h in a2ac2b96 ("Convert
      CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig").
      Signed-off-by: NStefan Roese <sr@denx.de>
      Fixes: a2ac2b96 ("Convert CONFIG_SKIP_LOWLEVEL_INIT et al to Kconfig")
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Marek Behún <kabel@kernel.org>
      Cc: Pali Rohár <pali@kernel.org>
      Tested-by: NPali Rohár <pali@kernel.org>
      cf47a8cf
    • M
      arm: a37xx: pci: Update private structure documentation · 8247c90e
      Marek Behún 提交于
      There were several changes for this structure but the documentation was
      not changed at the time. Fix this.
      Signed-off-by: NMarek Behún <marek.behun@nic.cz>
      Reviewed-by: NStefan Roese <sr@denx.de>
      8247c90e
    • M
      arm: a37xx: pci: Cosmetic change · 96a3c989
      Marek Behún 提交于
      Update indentation in driver's private structure.
      Signed-off-by: NMarek Behún <marek.behun@nic.cz>
      Reviewed-by: NStefan Roese <sr@denx.de>
      96a3c989
    • P
      arm: a37xx: pci: Handle propagation of CRSSVE bit from PCIe Root Port · 1d7ad685
      Pali Rohár 提交于
      Now that PCI Bridge (PCIe Root Port) for Aardvark is emulated in U-Boot,
      add support for handling and propagation of CRSSVE bit.
      
      When CRSSVE bit is unset (default), driver has to reissue config
      read/write request on CRS response.
      
      CRSSVE bit is supported only when CRSVIS bit is provided in read-only
      Root Capabilities register. So manually inject this CRSVIS bit into read
      response for that register.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NMarek Behún <marek.behun@nic.cz>
      Reviewed-by: NStefan Roese <sr@denx.de>
      1d7ad685
    • P
      arm: a37xx: pci: Do not automatically enable bus mastering on PCI Bridge · 95e101e8
      Pali Rohár 提交于
      Now that PCI Bridge is working for the PCIe Root Port, U-Boot's PCI_PNP
      code automatically enables memory access and bus mastering when needed.
      
      We do not need to enable it when setting the HW up.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NMarek Behún <marek.behun@nic.cz>
      Reviewed-by: NStefan Roese <sr@denx.de>
      95e101e8
    • P
      arm: a37xx: pci: Add support for accessing PCI Bridge on root bus · cb056005
      Pali Rohár 提交于
      Aardvark does not have a real PCIe Root Port device on the root bus.
      Instead it has PCIe registers of PCIe Root Port device mapped in
      internal Aardvark memory space starting at offset 0xc0.
      
      The PCIe Root Port itself is normally available as a PCI Bridge device
      on the root bus with bus number zero. Aardvark instead has the
      configuration registers of this PCI Bridge at offset 0x00 of Aardvark's
      memory space, but the class code of this device is Mass Storage
      Controller (0x010400), instead of PCI Bridge (0x600400), which causes
      U-Boot to fail to recognize it as a P2P Bridge
      
      Add a hook into the pcie_advk_read_config() / pcie_advk_write_config()
      functions to redirect access for root bus from PIO transfer to this
      internal Aardvark memory space. This will allow U-Boot to access
      configuration space of this PCI Bridge which represents PCIe Root Port.
      
      Redirect access to PCI Bridge registers in range 0x10 - 0x34 to driver's
      internal buffer (cfgcache[]). This is because at those addresses
      Aardvark has different registers, incompatible with config space of a
      PCI Bridge.
      
      Redirect access to PCI Bridge register PCI_ROM_ADDRESS1 (0x38) to
      Aardvark internal address for that register (0x30).
      
      When reading PCI Bridge register PCI_HEADER_TYPE, set it explicitly to
      value Type 1 (PCI_HEADER_TYPE_BRIDGE) as PCI Bridge must be of Type 1.
      
      When writing to PCI_PRIMARY_BUS or PCI_SECONDARY_BUS registers on this
      PCI Bridge, correctly update driver's first_busno and sec_busno
      variables, so that pcie_advk_addr_valid() function can check if address
      of any device behind the root bus is valid and that PIO transfers are
      started with correct config type (1 vs 0), which is required for
      accessing devices behind some PCI bridge after the root bus.
      
      U-Boot's PCI_PNP code sets primary and secondary bus numbers as relative
      to the configured bus number of the root bus. This is done so that
      U-Boot can support multiple PCIe host bridges or multiple root port
      buses, when internal bus numbers are different.
      
      Now that root bus is available, update code in pcie_advk_read_config()
      and pcie_advk_write_config() functions to correctly calculate real
      Aardvark bus number of the target device from U-Boot's bus number as:
        busno = PCI_BUS(bdf) - dev_seq(bus)
      
      Stefan: Small fix of header masking as suggested by Pali.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NMarek Behún <marek.behun@nic.cz>
      Reviewed-by: NStefan Roese <sr@denx.de>
      cb056005
    • P
      arm: a37xx: pci: Fix pcie_advk_link_up() · 6b2771cb
      Pali Rohár 提交于
      Aardvark reports Disabled and Hot Reset LTSSM states as values >= 0x20.
      Link is not up in these states, so fix pcie_advk_link_up() function.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NMarek Behún <marek.behun@nic.cz>
      Reviewed-by: NStefan Roese <sr@denx.de>
      6b2771cb
    • P
      arm: mvebu: a38x: serdes: Update comment about PCIE*_ENABLE_* defines · de729304
      Pali Rohár 提交于
      These are part of SOC_CONTROL_REG1 register, not PEX_CAPABILITIES_REG.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NMarek Behún <marek.behun@nic.cz>
      Reviewed-by: NStefan Roese <sr@denx.de>
      de729304
    • P
      arm: mvebu: a38x: serdes: Remove unused PCIe macros and functions · 28c935b5
      Pali Rohár 提交于
      Remove unused PCIe functions from SerDes code. They are unused and are
      duplicated either from generic PCIe code or from pci_mvebu.c.
      
      Remove also unused PCIe macros from SerDes code. They are just obfuscated
      variants of standards macros in include/pci.h or in pci_mvebu.c.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NMarek Behún <marek.behun@nic.cz>
      Reviewed-by: NStefan Roese <sr@denx.de>
      28c935b5
    • P
      arm: mvebu: a38x: serdes: Don't configure PCIe cards in SerDes init code · 177ee6c7
      Pali Rohár 提交于
      This code is trying to parse PCIe config space of PCIe card connected on
      the other end of link and then is trying to force 5.0 GT/s speed via Target
      Link Speed bits in PCIe Root Port Link Control 2 Register on the local part
      of link if it sees that card supports 5.0 GT/s via Max Link Speed bits in
      Link Capabilities Register.
      
      The code is incorrect for more reasons:
      - Accessing config space of an endpoint card cannot be done immediately.
        If the PCIe link is not up, reading vendor/device ID registers will
        return all ones.
      - Parsing is incomplete, so it can cause issues even for working cards.
      
      Moreover there is no need to force speed to 5.0 GT/s via Target Link Speed
      bits on PCIe Root Port Link Control 2 Register. Hardware changes speed from
      2.5 GT/s to 5.0 GT/s autonomously when it is supported.
      
      Most importantly, this code does not change link speed at all, since
      because after updating Target Link Speed bits on PCIe Root Port Link
      Control 2 Register, it is required to retrain the link, and the code for
      that is completely missing.
      
      The code was probably needed for making buggy endpoint cards work. Such a
      workaround, though, should be implemented via PCIe subsystem (via quirks,
      for example), as buggy cards could also affect other PCIe controllers.
      
      Note that this code is fully unrelated to a38x SerDes code and really
      should not have been included in SerDes initialization. Usage of magic
      constants without names and comments made this SerDes code hard to read and
      understand.
      
      Remove this PCIe application code from low level SerDes code. As this code
      is configuring only 5.0 GT/s part, in the worst case, it could leave buggy
      cards at the initial speed of 2.5 GT/s (if somehow before this change they
      could have been "upgraded" to 5.0 GT/s speed even with missing link
      retraining). Compliant cards which just need longer initialization should
      work better after this change.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NMarek Behún <marek.behun@nic.cz>
      Reviewed-by: NStefan Roese <sr@denx.de>
      177ee6c7
    • P
      arm: mvebu: a38x: serdes: Don't overwrite PCI device ID · db5ea818
      Pali Rohár 提交于
      PCI device ID is part of the PCIe controller SoC / revision. For Root
      Complex mode (which is the default and the only mode supported currently
      by U-Boot and Linux kernel), it is PCI device ID of PCIe Root Port device.
      
      If there is some issue with this device ID, it should be set / updated by
      PCIe controller driver (pci_mvebu.c), as this register resides in address
      space of the controller. It shouldn't be done in SerDes initialization
      code.
      
      In the worst case (a specific board for example) it could be done via
      U-Boot's weak function board_pex_config().
      
      But it should not be overwritten globally for all A38x devices.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NMarek Behún <marek.behun@nic.cz>
      Reviewed-by: NStefan Roese <sr@denx.de>
      db5ea818
    • P
      arm: mvebu: a38x: serdes: Don't set PCIe Common Clock Configuration · 3fc8b90d
      Pali Rohár 提交于
      Enabling Common Clock Configuration bit in PCIe Root Port Link Control
      Register should not be done unconditionally. It is enabled by operating
      system as part of ASPM. Also after enabling Common Clock Configuration it
      is required to do more work, like retraining link. Some cards may be broken
      due to this incomplete Common Clock Configuration and some cards are broken
      and do not support ASPM at all.
      
      Remove this incomplete code for Common Clock Configuration. It really
      should not be done in SerDes code as it is not related to SerDes, but to
      PCIe subsystem.
      Signed-off-by: NPali Rohár <pali@kernel.org>
      Reviewed-by: NMarek Behún <marek.behun@nic.cz>
      Reviewed-by: NStefan Roese <sr@denx.de>
      3fc8b90d