1. 18 Jan, 2019 7 commits
    • Anthony Zhou's avatar
      Tegra: common: drivers: fix MISRA defects · 61beb3e0
      Anthony Zhou authored
      
      
      Main fixes:
      
      Add suffix U for constant [Rule 10.1]
      
      Match the operands type [Rule 10.4]
      
      Use UL replace U for that constant define that need do "~"
      operation [Rule 12.4]
      
      Voided non c-library functions whose return types are not used
       [Rule 17.7]
      
      Change-Id: Ia1e814ca3890eab7904be9c79030502408f30936
      Signed-off-by: default avatarAnthony Zhou <anzhou@nvidia.com>
      61beb3e0
    • Anthony Zhou's avatar
      Tegra: pm: fix MISRA defects · b36aea5a
      Anthony Zhou authored
      
      
      Main fixes:
      
      * Use int32_t replace int, use uint32_t replace unsign int
        [Rule 4.6]
      * Add function define to header file [Rule 8.4]
      * Added curly braces ({}) around if statements in order to
        make them compound [Rule 15.6]
      * Voided non c-library functions whose return types are not used
        [Rule 17.7]
      
      Change-Id: Ifa3ba4e75046697cfede885096bee9a30efe6519
      Signed-off-by: default avatarAnthony Zhou <anzhou@nvidia.com>
      b36aea5a
    • Varun Wadekar's avatar
      Tegra186: reduce complexity for the 'get_target_pwr_state' handler · 4e1830a9
      Varun Wadekar authored
      
      
      This patch reduces the code complexity for the platform's 'get_target_pwr_state'
      handler, by reducing the number of 'if' conditions and adding helper functions
      to calculate power state for the cluster/system.
      
      Tested with 'pmccabe'
      
      Change-Id: I32fa4c814bd97f620f2003fa39f1bfceae563771
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      4e1830a9
    • Varun Wadekar's avatar
      Tegra: fix MISRA defects in tegra_bl31_setup.c · fcf23a14
      Varun Wadekar authored
      
      
      Main fixes:
      
      Add parentheses to avoid implicit operator precedence [Rule 12.1]
      
      Fixed if statement conditional to be essentially boolean [Rule 14.4]
      
      Added curly braces ({}) around if statements in order to
      make them compound [Rule 15.6]
      
      Voided non c-library functions whose return types are not used [Rule 17.7]
      
      Bug 200272157
      
      Change-Id: Ic3ab5a3de95aeb6d2265df940f7fb35ea0f19ab0
      Signed-off-by: default avatarAnthony Zhou <anzhou@nvidia.com>
      fcf23a14
    • Varun Wadekar's avatar
      Tegra: gpcdma: driver for general purpose DMA · 647d4a03
      Varun Wadekar authored
      
      
      This patch adds the driver for the general purpose DMA hardware
      block on newer Tegra SoCs. The GPCDMA is a special purpose DMA
      used to speed up memory copy operations to/from DRAM and TZSRAM.
      
      This patch introduces a macro 'USE_GPC_DMA' to allow platforms
      to override CPU based memory operations.
      
      Change-Id: I3170d409c83b77e785437b1002a8d70188fabbeb
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      647d4a03
    • Samuel Payne's avatar
      Tegra210: SE: remove logic to enable atomic save/restore · 76a7cd33
      Samuel Payne authored
      
      
      This patch removes the logic to set the bit that enables atomic context
      save/restore when we enter System suspend. The bootrom enables this bit
      during cold boot and exit from System Suspend, so we can remove this
      setting from the driver.
      
      Change-Id: Id4e08d5048155c970f5e31d9c9dd676c07182ade
      Signed-off-by: default avatarSamuel Payne <spayne@nvidia.com>
      76a7cd33
    • Anthony Zhou's avatar
      Tegra186: sip_calls: fix defects flagged by MISRA scan · 11c5b273
      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]
      
      Convert object type to match the type of function parameters
      [Rule 10.3]
      
      Force operands of an operator to the same type category [Rule 10.4]
      
      Expressions resulting from the expansion of macro parameters
      shall be enclosed in parentheses[Rule 20.7]
      
      Change-Id: Ibdae1d18d299562ca2b96b2318b914601c9926b1
      Signed-off-by: default avatarAnthony Zhou <anzhou@nvidia.com>
      11c5b273
  2. 16 Jan, 2019 26 commits
  3. 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
  4. 18 Dec, 2018 2 commits
  5. 08 Nov, 2018 1 commit
    • Antonio Nino Diaz's avatar
      Standardise header guards across codebase · c3cf06f1
      Antonio Nino Diaz authored
      
      
      All identifiers, regardless of use, that start with two underscores are
      reserved. This means they can't be used in header guards.
      
      The style that this project is now to use the full name of the file in
      capital letters followed by 'H'. For example, for a file called
      "uart_example.h", the header guard is UART_EXAMPLE_H.
      
      The exceptions are files that are imported from other projects:
      
      - CryptoCell driver
      - dt-bindings folders
      - zlib headers
      
      Change-Id: I50561bf6c88b491ec440d0c8385c74650f3c106e
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      c3cf06f1
  6. 25 Oct, 2018 1 commit
    • Antonio Nino Diaz's avatar
      Add plat_crash_console_flush to platforms without it · 9c675b37
      Antonio Nino Diaz authored
      
      
      Even though at this point plat_crash_console_flush is optional, it will
      stop being optional in a following patch.
      
      The console driver of warp7 doesn't support flush, so the implementation
      is a placeholder.
      
      TI had ``plat_crash_console_init`` and ``plat_crash_console_putc``, but
      they weren't global so they weren't actually used. Also, they were
      calling the wrong functions.
      
      imx8_helpers.S only has placeholders for all of the functions.
      
      Change-Id: I8d17bbf37c7dad74e134c61ceb92acb9af497718
      Signed-off-by: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
      9c675b37
  7. 28 Sep, 2018 1 commit
  8. 22 Aug, 2018 1 commit