1. 16 Jan, 2019 2 commits
  2. 04 Jan, 2019 1 commit
    • Antonio Nino Diaz's avatar
      Sanitise includes across codebase · 09d40e0e
      Antonio Nino Diaz authored
      Enforce full include path for includes. Deprecate old paths.
      
      The following folders inside include/lib have been left unchanged:
      
      - include/lib/cpus/${ARCH}
      - include/lib/el3_runtime/${ARCH}
      
      The reason for this change is that having a global namespace for
      includes isn't a good idea. It defeats one of the advantages of having
      folders and it introduces problems that are sometimes subtle (because
      you may not know the header you are actually including if there are two
      of them).
      
      For example, this patch had to be created because two headers were
      called the same way: e0ea0928 ("Fix gpio includes of mt8173 platform
      to avoid collision."). More recently, this patch has had similar
      problems: 46f9b2c3 ("drivers: add tzc380 support").
      
      This problem was introduced in commit 4ecca339
      
       ("Move include and
      source files to logical locations"). At that time, there weren't too
      many headers so it wasn't a real issue. However, time has shown that
      this creates problems.
      
      Platforms that want to preserve the way they include headers may add the
      removed paths to PLAT_INCLUDES, but this is discouraged.
      
      Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      09d40e0e
  3. 22 Aug, 2018 1 commit
  4. 21 Sep, 2017 1 commit
    • Antonio Nino Diaz's avatar
      Fix type of `unsigned long` constants · e47ac1fd
      Antonio Nino Diaz authored
      
      
      The type `unsigned long` is 32 bit wide in AArch32, but 64 bit wide in
      AArch64. This is inconsistent and that's why we avoid using it as per
      the Coding Guidelines. This patch changes all `UL` occurrences to `U`
      or `ULL` depending on the context so that the size of the constant is
      clear.
      
      This problem affected the macro `BIT(nr)`. As long as this macro is used
      to fill fields of registers, that's not a problem, since all registers
      are 32 bit wide in AArch32 and 64 bit wide in AArch64. However, if the
      macro is used to fill the fields of a 64-bit integer, it won't be able
      to set the upper 32 bits in AArch32.
      
      By changing the type of this macro to `unsigned long long` the behaviour
      is always the same regardless of the architecture, as this type is
      64-bit wide in both cases.
      
      Some Tegra platform files have been modified by this patch.
      
      Change-Id: I918264c03e7d691a931f0d1018df25a2796cc221
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      e47ac1fd
  5. 14 Jul, 2017 1 commit
  6. 15 Jun, 2017 1 commit
    • Anthony Zhou's avatar
      Tegra186: mce: fix MISRA defects · ab712fd8
      Anthony Zhou authored
      
      
      Main fixes:
      
      * Added explicit casts (e.g. 0U) to integers in order for them to be
        compatible with whatever operation they're used in [Rule 10.1]
      * Force operands of an operator to the same type category [Rule 10.4]
      * Added curly braces ({}) around if/while statements in order to
        make them compound [Rule 15.6]
      * Added parentheses [Rule 12.1]
      * Voided non C-library functions whose return types are not used [Rule 17.7]
      
      Change-Id: I91404edec2e2194b1ce2672d2a3fc6a1f5bf41f1
      Signed-off-by: default avatarAnthony Zhou <anzhou@nvidia.com>
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      ab712fd8
  7. 14 Jun, 2017 1 commit
  8. 03 May, 2017 1 commit
  9. 01 May, 2017 1 commit
  10. 07 Apr, 2017 2 commits
  11. 05 Apr, 2017 3 commits
  12. 30 Mar, 2017 1 commit
    • Varun Wadekar's avatar
      Tegra186: mce: Uncore Perfmon ARI Programming · c11e0ddf
      Varun Wadekar authored
      
      
      Uncore perfmon appears to the CPU as a set of uncore perfmon registers
      which can be read and written using the ARI interface. The MCE code
      sequence handles reads and writes to these registers by manipulating
      the underlying T186 uncore hardware.
      
      To access an uncore perfmon register, CPU software writes the ARI
      request registers to specify
      
      * whether the operation is a read or a write,
      * which uncore perfmon register to access,
      * the uncore perfmon unit, group, and counter number (if necessary),
      * the data to write (if the operation is a write).
      
      It then initiates an ARI request to run the uncore perfmon sequence in
      the MCE and reads the resulting value of the uncore perfmon register
      and any status information from the ARI response registers.
      
      The NS world's MCE driver issues MCE_CMD_UNCORE_PERFMON_REQ command
      for the EL3 layer to start the entire sequence. Once the request
      completes, the NS world would receive the command status in the X0
      register and the command data in the X1 register.
      
      Change-Id: I20bf2eca2385f7c8baa81e9445617ae711ecceea
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      c11e0ddf
  13. 20 Mar, 2017 1 commit
    • Varun Wadekar's avatar
      Tegra186: mce: driver for the CPU complex power manager block · 7808b06b
      Varun Wadekar authored
      
      
      The CPU Complex (CCPLEX) Power Manager (Denver MCE, or DMCE) is an
      offload engine for BPMP to do voltage related sequencing and for
      hardware requests to be handled in a better latency than BPMP-firmware.
      
      There are two interfaces to the MCEs - Abstract Request Interface (ARI)
      and the traditional NVGINDEX/NVGDATA interface.
      
      MCE supports various commands which can be used by CPUs - ARM as well
      as Denver, for power management and reset functionality. Since the
      linux kernel is the master for all these scenarios, each MCE command
      can be issued by a corresponding SMC. These SMCs have been moved to
      SiP SMC space as they are specific to the Tegra186 SoC.
      
      Change-Id: I67bee83d2289a8ab63bc5556e5744e5043803e51
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      7808b06b