1. 13 Aug, 2021 1 commit
    • Pali Rohár's avatar
      refactor(plat/ea_handler): Use default ea handler implementation for panic · 30e8fa7e
      Pali Rohár authored
      
      
      Put default ea handler implementation into function plat_default_ea_handler()
      which just print verbose information and panic, so it can be called also
      from overwritten / weak function plat_ea_handler() implementation.
      
      Replace every custom implementation of printing verbose error message of
      external aborts in custom plat_ea_handler() functions by a common
      implementation from plat_default_ea_handler() function.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I15897f61b62b4c3c29351e693f51d4df381f3b98
      30e8fa7e
  2. 16 Jul, 2021 1 commit
    • Pali Rohár's avatar
      fix(plat/marvell/a3k): fix printing info messages on output · 9f6d1540
      Pali Rohár authored
      
      
      INFO() macro for every call prepends "INFO:   " string. Therefore
      current code prints unreadable debug messages:
      
          "INFO:    set_io_addr_dec 0 result: ctrl(0x3fff3d01) base(0x0)INFO:    "
          "INFO:    Set IO decode window successfully, base(0xc000)INFO:     win_attr(3d) max_dram_win(2) max_remap(0)INFO:     win_offset(8)"
      
      Fix it by calling exactly one INFO() call for one line. After this
      change output is:
      
          "INFO:    set_io_addr_dec 0 result: ctrl(0x3fff3d01) base(0x0) remap(0x0)"
          "INFO:    Set IO decode window successfully, base(0xc000) win_attr(3d) max_dram_win(2) max_remap(0) win_offset(8)"
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I6084e64c6f4da6c1929e5300588e4ba2608ca745
      9f6d1540
  3. 11 Jul, 2021 2 commits
    • Pali Rohár's avatar
      fix(plat/marvell/a3k): Fix building uart-images.tgz.bin archive · d3f8db07
      Pali Rohár authored
      
      
      For UART secure boot it is required also TIMN image, so pack it into
      uart-images.tgz.bin archive which is created by mrvl_uart target.
      
      $(TIMN_IMAGE) and $(TIM_IMAGE) variables are used only for UART images
      so their content needs to be initialized from $(TIMN_UART_CFG) and
      $(TIM_UART_CFG) config files. And not from $(TIMN_CFG) and $(TIM_CFG) as
      it is now because they are not generated during mrvl_uart target. Fix it
      to allow building mrvl_uart target before mrvl_flash target.
      
      To match usage of these variables, rename them to $(TIMN_UART_IMAGE) and
      $(TIM_UART_IMAGE).
      
      To not complicate rule for building uart-images.tgz.bin archive, set
      list of image files into a new $(UART_IMAGES) variable.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I83b980abb4047a3afb3ce3026842e1d873c490bf
      d3f8db07
    • Pali Rohár's avatar
      refactor(plat/marvell/a3k): Rename *_CFG and *_SIG variables · 618287da
      Pali Rohár authored
      
      
      For TIM config file use TIM name instead of DOIMAGE and use underscores
      to make variable names more readable.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I1282ce11f1431c15458a143ae7bfcee85eed2432
      618287da
  4. 10 Jul, 2021 6 commits
    • Pali Rohár's avatar
      refactor(plat/marvell/a3k): Rename DOIMAGETOOL to TBB · 7937b3c7
      Pali Rohár authored
      
      
      Armada 3700 uses external TBB tool for creating images and does not use
      internal TF-A doimage tool from tools/marvell/doimage/
      
      Therefore set correct name of variable.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I38a94dca78d483de4c79da597c032e1e5d06d92d
      7937b3c7
    • Pali Rohár's avatar
      refactor(plat/marvell/a3k): Remove useless DOIMAGEPATH variable · 7b209717
      Pali Rohár authored
      
      
      Armada 3700 uses WTP so use WTP variable directly.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I216b40ffee1f3f8abba4677f050ab376c2224ede
      7b209717
    • Pali Rohár's avatar
      fix(plat/marvell/a3k): Fix check for external dependences · 2baf5038
      Pali Rohár authored
      
      
      Old Marvell a3700_utils and mv-ddr tarballs do not have to work with
      latest TF-A code base. Marvell do not provide these old tarballs on
      Extranet anymore. Public version on github repository contains all
      patches and is working fine, so for public TF-A builds use only public
      external dependencies from git.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: Iee5ac6daa9a1826a5b80a8d54968bdbb8fe72f61
      2baf5038
    • Pali Rohár's avatar
      fix(plat/marvell/a8k): Add missing build dependency for BLE target · 04738e69
      Pali Rohár authored
      
      
      BLE source files depend on external Marvell mv-ddr-marvell tree
      (specified in $(MV_DDR_PATH) variable) and its header files. Add
      dependency on $(MV_DDR_LIB) target which checks that variable
      $(MV_DDR_PATH) is correctly set and ensures that make completes
      compilation of mv-ddr-marvell tree.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I73968b24c45d9af1e3500b8db7a24bb4eb2bfa47
      04738e69
    • Pali Rohár's avatar
      fix(plat/marvell/a8k): Correctly set include directories for individual targets · 559ab2df
      Pali Rohár authored
      
      
      Do not set all include directories, including those for external targets
      in one PLAT_INCLUDES variable.
      
      Instead split them into variables:
      * $(PLAT_INCLUDES) for all TF-A BL images
      * BLE target specific $(PLAT_INCLUDES) only for Marvell BLE image
      * $(MV_DDR_INCLUDES) for targets in external Marvell mv-ddr-marvell tree
      
      Include directory $(CURDIR)/drivers/marvell is required by TF-A BL
      images, so move it from ble.mk to a8k_common.mk.
      
      Include directory $(MV_DDR_PATH) is needed only by Marvell BLE image, so
      move it into BLE target specific $(PLAT_INCLUDES) variable.
      
      And remaining include directories specified in ble.mk are needed only
      for building external dependences from Marvell mv-ddr tree, so move them
      into $(MV_DDR_INCLUDES) variable and correctly use it in $(MV_DDR_LIB)
      target.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I331f7de675dca2bc70733d56b768f00d56ae4a67
      559ab2df
    • Pali Rohár's avatar
      fix(plat/marvell/a8k): Require that MV_DDR_PATH is correctly set · 528dafc3
      Pali Rohár authored
      
      
      Target mrvl_flash depends on external mv_ddr source code which is not
      part of TF-A project. Do not expect that it is pre-downloaded at some
      specific location and require user to specify correct path to mv_ddr
      source code via MV_DDR_PATH build option.
      
      TF-A code for Armada 37x0 platform also depends on mv_ddr source code
      and already requires passing correct MV_DDR_PATH build option.
      
      So for A8K implement same checks for validity of MV_DDR_PATH option as
      are already used by TF-A code for Armada 37x0 platform.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I792f2bfeab0cec89b1b64e88d7b2c456e22de43a
      528dafc3
  5. 02 Jun, 2021 1 commit
    • Pali Rohár's avatar
      fix(plat/marvell/a3720/uart): fix UART parent clock rate determination · 5a91c439
      Pali Rohár authored
      
      
      The UART code for the A3K platform assumes that UART parent clock rate
      is always 25 MHz. This is incorrect, because the xtal clock can also run
      at 40 MHz (this is board specific).
      
      The frequency of the xtal clock is determined by a value on a strapping
      pin during SOC reset. The code to determine this frequency is already in
      A3K's comphy driver.
      
      Move the get_ref_clk() function from the comphy driver to a separate
      file and use it for UART parent clock rate determination.
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I8bb18a2d020ef18fe65aa06ffa4ab205c71be92e
      5a91c439
  6. 01 Jun, 2021 2 commits
  7. 28 May, 2021 1 commit
    • Pali Rohár's avatar
      fix(plat/marvell/a3720/uart): fix UART clock rate value and divisor calculation · 66a77528
      Pali Rohár authored
      
      
      UART parent clock is by default the platform's xtal clock, which is
      25 MHz.
      
      The value defined in the driver, though, is 25.8048 MHz. This is a hack
      for the suboptimal divisor calculation
        Divisor = UART clock / (16 * baudrate)
      which does not use rounding division, resulting in a suboptimal value
      for divisor if the correct parent clock rate was used.
      
      Change the code for divisor calculation to
        Divisor = Round(UART clock / (16 * baudrate))
      and change the parent clock rate value to 25 MHz.
      
      The final UART divisor for default baudrate 115200 is not affected by
      this change.
      
      (Note that the parent clock rate should not be defined via a macro,
      since the xtal clock can also be 40 MHz. This is outside of the scope of
      this fix, though.)
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: Iaa401173df87aec94f2dd1b38a90fb6ed0bf0ec6
      66a77528
  8. 27 Apr, 2021 1 commit
    • Pali Rohár's avatar
      plat: marvell: armada: a3k: Add new compile option A3720_DB_PM_WAKEUP_SRC · f2800a47
      Pali Rohár authored
      
      
      This new compile option is only for Armada 3720 Development Board. When
      it is set to 1 then TF-A will setup PM wake up src configuration.
      
      By default this new option is disabled as it is board specific and no
      other A37xx board has PM wake up src configuration.
      
      Currently neither upstream U-Boot nor upstream Linux kernel has wakeup
      support for A37xx platforms, so having it disabled does not cause any
      issue.
      
      Prior this commit PM wake up src configuration specific for Armada 3720
      Development Board was enabled for every A37xx board. After this change it
      is enabled only when compiling with build flag A3720_DB_PM_WAKEUP_SRC=1
      Signed-off-by: default avatarPali Rohár <pali@kernel.org>
      Change-Id: I09fea1172c532df639acb3bb009cfde32d3c5766
      f2800a47
  9. 20 Apr, 2021 12 commits
  10. 25 Feb, 2021 2 commits
  11. 24 Feb, 2021 1 commit
  12. 11 Feb, 2021 2 commits
  13. 29 Jan, 2021 8 commits