1. 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
  2. 26 Apr, 2019 6 commits
  3. 25 Apr, 2019 5 commits
    • 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
  4. 24 Apr, 2019 2 commits
  5. 23 Apr, 2019 8 commits
  6. 19 Apr, 2019 4 commits
  7. 17 Apr, 2019 1 commit
    • Aditya Angadi's avatar
      plat/arm: introduce wrapper functions to setup secure watchdog · b0c97daf
      Aditya Angadi authored
      
      
      The BL1 stage setup code for ARM platforms sets up the SP805 watchdog
      controller as the secure watchdog. But not all ARM platforms use SP805
      as the secure watchdog controller.
      
      So introduce two new ARM platform code specific wrapper functions to
      start and stop the secure watchdog. These functions then replace the
      calls to SP805 driver in common BL1 setup code. All the ARM platforms
      implement these wrapper functions by either calling into SP805 driver
      or the SBSA watchdog driver.
      
      Change-Id: I1a9a11b124cf3fac2a84f22ca40acd440a441257
      Signed-off-by: default avatarAditya Angadi <aditya.angadi@arm.com>
      b0c97daf
  8. 16 Apr, 2019 1 commit
  9. 12 Apr, 2019 1 commit
    • Ambroise Vincent's avatar
      Mbed TLS: Remove weak heap implementation · 2374ab17
      Ambroise Vincent authored
      
      
      The implementation of the heap function plat_get_mbedtls_heap() becomes
      mandatory for platforms supporting TRUSTED_BOARD_BOOT.
      
      The shared Mbed TLS heap default weak function implementation is
      converted to a helper function get_mbedtls_heap_helper() which can be
      used by the platforms for their own function implementation.
      
      Change-Id: Ic8f2994e25e3d9fcd371a21ac459fdcafe07433e
      Signed-off-by: default avatarAmbroise Vincent <ambroise.vincent@arm.com>
      2374ab17
  10. 11 Apr, 2019 6 commits
  11. 10 Apr, 2019 2 commits
    • Clément Péron's avatar
      plat: allwinner: common: use r_wdog instead of wdog · 523ab5be
      Clément Péron authored
      
      
      Some Allwinner H6 has a broken watchdog that doesn't
      make the soc reboot.
      
      Use the R_WATCHDOG instead.
      Signed-off-by: default avatarClément Péron <peron.clem@gmail.com>
      Change-Id: Ie95cc30a80ed517b60b30d6bc2e655a1b53f18ba
      523ab5be
    • Wei Yu's avatar
      hikey960: Fix race condition between hotplug and idles · 7d76df7d
      Wei Yu authored
      
      
      From the hotplug testing on Hikey960, in some case cores fail to become
      online in the system. When some cores are hotplugged off, if other
      cores in the same cluster enter into CPU idle states at the meantime,
      the cluster will be powered off. This introduces the state machine
      malfunction in the power controller, thus when hotplug on the core
      afterwards, it fails to boot up the core because the power controller
      thinks the cluster is powered on.
      
      This patch is to avoid race condition between hotplug and idles by
      preventing cluster power off when some of cores in the cluster are
      hotplugged off, if all cores in the same cluster are hotplugged off,
      the cluster can be powered off.
      
      Change-Id: Ib2feeb093357c70409a3536cb4f9da9b504fdcbe
      Signed-off-by: default avatarWei Yu <yuwei3@hisilicon.com>
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      7d76df7d
  12. 08 Apr, 2019 1 commit