1. 03 May, 2019 1 commit
    • Alexei Fedorov's avatar
      SMMUv3: refactor the driver code · ccd4d475
      Alexei Fedorov authored
      
      
      This patch is a preparation for the subsequent changes in
      SMMUv3 driver. It introduces a new "smmuv3_poll" function
      and replaces inline functions for accessing SMMU registers
      with mmio read/write operations. Also the infinite loop
      for the poll has been replaced with a counter based timeout.
      
      Change-Id: I7a0547beb1509601f253e126b1a7a6ab3b0307e7
      Signed-off-by: default avatarAlexei Fedorov <Alexei.Fedorov@arm.com>
      ccd4d475
  2. 02 May, 2019 4 commits
    • Soby Mathew's avatar
      Merge changes from topic "rk3399q7" into integration · 8917380a
      Soby Mathew authored
      * changes:
        rockchip: Disable binary generation for all SoCs.
        build_macros: Add mechanism to prevent bin generation.
      8917380a
    • Christoph Müllner's avatar
      rockchip: Disable binary generation for all SoCs. · 33218d2a
      Christoph Müllner authored
      
      
      All supported Rockchip SoCs (RK3288, RK3328, RK3368 and RK3399)
      have non-continuous memory areas in the linker script with a huge
      gap between them. This results in extremely padded binary images
      with a size of about 4 GiB.
      
      E.g. on the RK3399 we have the following memory areas (and base addresses):
      RAM (0x1000), SRAM (0xFF8C0000), and PMUSRAM (0xFF3B0000).
      
      Consumers of the TF-A project (e.g. coreboot or U-Boot) therefore
      use the ELF image instead, which has a size of a few hundred kBs.
      
      In order to prevent the generation of a huge and useless file,
      this patch disables the binary generation for all affected Rockchip
      SoCs.
      Signed-off-by: default avatarChristoph Müllner <christophm30@gmail.com>
      Change-Id: I4ac65bdf1e598c3e1a59507897d183aee9a36916
      33218d2a
    • Christoph Müllner's avatar
      build_macros: Add mechanism to prevent bin generation. · 9e4609f1
      Christoph Müllner authored
      
      
      On certain platforms it does not make sense to generate
      TF-A binary images. For example a platform could make use of serveral
      memory areas, which are non-continuous and the resulting binary
      therefore would suffer from the padding-bytes.
      Typically these platforms use the ELF image.
      
      This patch introduces a variable DISABLE_BIN_GENERATION, which
      can be set to '1' in the platform makefile to prevent the binary
      generation.
      Signed-off-by: default avatarChristoph Müllner <christophm30@gmail.com>
      Change-Id: I62948e88bab685bb055fe6167d9660d14e604462
      9e4609f1
    • Antonio Niño Díaz's avatar
      Merge changes from topic "rk3399q7" into integration · b3c8ac13
      Antonio Niño Díaz authored
      * changes:
        rockchip: Allow console device to be set by DTB.
        rockchip: Add params_setup to RK3328.
        rockchip: Streamline and complete UARTn_BASE macros.
      b3c8ac13
  3. 01 May, 2019 3 commits
    • Christoph Müllner's avatar
      rockchip: Allow console device to be set by DTB. · 220c33a2
      Christoph Müllner authored
      
      
      Currently the compile-time constant PLAT_RK_UART_BASE defines
      which UART is used as console device. E.g. on RK3399 it is set
      to UART2. That means, that a single bl31 image can not be used
      for two boards, which just differ on the UART console.
      
      This patch addresses this limitation by parsing the "stdout-path"
      property from the "chosen" node in the DTB. The expected property
      string is expected to have the form "serialN:XXX", with
      N being either 0, 1, 2, 3 or 4. When the property is found, it will
      be used to override PLAT_RK_UART_BASE.
      
      Tested on RK3399-Q7, with a stdout-path of "serial0:115200n8".
      Signed-off-by: default avatarChristoph Müllner <christophm30@gmail.com>
      Change-Id: Iafe1320e77ab006c121f8d52745d54cef68a48c7
      220c33a2
    • Christoph Müllner's avatar
      rockchip: Add params_setup to RK3328. · f476e63f
      Christoph Müllner authored
      
      
      params_setup.c provides the function params_early_setup, which
      takes care of parsing ATF parameters (bl31_plat_param array,
      fdt or coreboot table). As params_early_setup is defined as weak
      symbol in bl31_plat_setup.c, providing a platform-specific
      bl31_plat_setup implementation is optional.
      
      This patch adds the rockchip-common params_setup.c to the sources
      for RK3328. This streamlines the parameter handling for all supported
      rockchip SoCs.
      Signed-off-by: default avatarChristoph Müllner <christophm30@gmail.com>
      Change-Id: I071c03106114364ad2fc408e49cc791fe5b35925
      f476e63f
    • Christoph Müllner's avatar
      rockchip: Streamline and complete UARTn_BASE macros. · 0957b9b2
      Christoph Müllner authored
      
      
      In order to set the UART base during bootup in common code of
      plat/rockchip, we need to streamline the way the UART base addresses
      are defined and add the missing definitions and mappings.
      
      This patch does so by following the pattern UARTn_BASE, which is
      already in use on RK3399 and RK3328. The numbering itself is derived
      from the upstream Linux DTS files of the individual SoCs.
      Signed-off-by: default avatarChristoph Müllner <christophm30@gmail.com>
      Change-Id: I341a1996f4ceed5f82a2f6687d4dead9d7cc5c1f
      0957b9b2
  4. 30 Apr, 2019 5 commits
  5. 29 Apr, 2019 6 commits
  6. 26 Apr, 2019 13 commits
  7. 25 Apr, 2019 8 commits
    • Andrew F. Davis's avatar
      Cortex-A53: Fix reporting of missing errata when not needed · cd884aa6
      Andrew F. Davis authored
      Errata 819472, 824069, and 827319 are currently reported in a warning as
      missing during boot for platforms that do not need them. Only warn when
      the errata is needed for a given revision but not compiled in like other
      errata workarounds.
      
      Fixes: bd393704
      
       ("Cortex-A53: Workarounds for 819472, 824069 and 827319")
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      Change-Id: Ifd757b3d0e73a9bd465b98dc20648b6c13397d8d
      cd884aa6
    • Heiko Stuebner's avatar
      rockchip: document platform · 55617251
      Heiko Stuebner authored
      
      
      This adds a rockchip.rst to docs/plat documenting the general
      approach to using the Rockchip ATF platforms together with the
      supported bootloaders and also adds myself as maintainer after
      making sure Tony Xie is ok with that.
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Change-Id: Idce53d15eff4ac6de05bbb35d86e57ed50d0cbb9
      55617251
    • Heiko Stuebner's avatar
      rockchip: add support for rk3288 · 780e3f24
      Heiko Stuebner authored
      
      
      The rk3288 is a 4-core Cortex-A12 SoC and shares a lot of features
      with later SoCs.
      
      Working features are general non-secure mode (the gic needs special
      love for that), psci-based smp bringing cpu cores online and also
      taking them offline again, psci-based suspend (the simpler variant
      also included in the linux kernel, deeper suspend following later)
      and I was also already able to test HYP-mode and was able to boot
      a virtual kernel using kvm.
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Change-Id: Ibaaa583b2e78197591a91d254339706fe732476a
      780e3f24
    • Heiko Stuebner's avatar
      rockchip: add common aarch32 support · 82e18f89
      Heiko Stuebner authored
      
      
      There are a number or ARMv7 Rockchip SoCs that are very similar in their
      bringup routines to the existing arm64 SoCs, so there is quite a high
      commonality possible here.
      
      Things like virtualization also need psci and hyp-mode and instead of
      trying to cram this into bootloaders like u-boot, barebox or coreboot
      (all used in the field), re-use the existing infrastructure in TF-A
      for this (both Rockchip plat support and armv7 support in general).
      
      So add core support for aarch32 Rockchip SoCs, with actual soc support
      following in a separate patch.
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Change-Id: I298453985b5d8434934fc0c742fda719e994ba0b
      82e18f89
    • Heiko Stuebner's avatar
      rockchip: rk3328: drop double declaration of entry_point storage · 48bea0f3
      Heiko Stuebner authored
      
      
      The cpuson_entry_point and cpuson_flags are already declared in
      plat_private.h so there is no need to have it again declared in
      the local pmu.h, especially as it may cause conflicts when the
      other type changes.
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Change-Id: I80ae0e23d22f67109ed96f8ac059973b6de2ce87
      48bea0f3
    • Heiko Stuebner's avatar
      rockchip: Allow socs with undefined wfe check bits · 3b5b888d
      Heiko Stuebner authored
      
      
      Some older socs like the rk3288 do not have the necessary registers
      to check the wfi/wfe state of the cpu cores. Allow this case an "just"
      do an additional delay similar to how the Linux kernel handles smp
      right now.
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Change-Id: I0f67af388b06b8bfb4a9bac411b4900ac266a77a
      3b5b888d
    • Heiko Stuebner's avatar
      rockchip: move pmusram assembler code to a aarch64 subdir · c3aaabaf
      Heiko Stuebner authored
      
      
      The current code doing power-management from sram is highly
      arm64-specific so should live in a corresponding subdirectory
      and not in the common area.
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Change-Id: I3b79ac26f70fd189d4d930faa6251439a644c5d9
      c3aaabaf
    • Heiko Stuebner's avatar
      sp_min: allow inclusion of a platform-specific linker script · 14e09cc4
      Heiko Stuebner authored
      
      
      Similar to bl31 allow sp_min to also include a platform-specific
      linker script. This allows for example to place specific code in
      other memories of the system, like resume code in sram, while the
      main tf-a lives in ddr.
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Change-Id: I67642f7bfca036b5d51eb0fa092b479a647a9cc1
      14e09cc4