1. 07 Dec, 2020 1 commit
  2. 19 Nov, 2019 1 commit
    • Justin Chadwell's avatar
      Enable -Wlogical-op always · d7b4cd41
      Justin Chadwell authored
      
      
      -Wlogical-op prevents common errors with using numerical constants where
      a boolean one is expected as well as when the operands of a logical
      operator are the same. While these are perfectly valid behavior, they
      can be a sign that something is slightly off.
      
      This patch adds this warning to gcc and it's closest equivalent to
      clang, while also fixing any warnings that enabling them causes.
      
      Change-Id: Iabadfc1e6ee0c44eef6685a23b0aed8abef8ce89
      Signed-off-by: default avatarJustin Chadwell <justin.chadwell@arm.com>
      d7b4cd41
  3. 09 Jan, 2019 1 commit
  4. 04 Jan, 2019 5 commits
    • Jolly Shah's avatar
      zynqmp: pm: Return the buffered PLL mode through IOCTL PLL get mode API · a5ae5a72
      Jolly Shah authored
      
      
      When linux calls pm_ioctl_get_pll_frac_mode() it doesn't expect the actual
      mode to be read from hardware, but the value that it is intending to
      program. Therefore, we return the buffered value to linux.
      Signed-off-by: default avatarMirela Simonovic <mirela.simonovic@aggios.com>
      Acked-by: default avatarWill Wong <WILLW@xilinx.com>
      Signed-off-by: default avatarJolly Shah <jollys@xilinx.com>
      a5ae5a72
    • Jolly Shah's avatar
      zynqmp: pm: Buffer the PLL mode that is set using IOCTL API · 8975f317
      Jolly Shah authored
      
      
      When linux calls pm_ioctl_set_pll_frac_mode() it doesn't expect the
      fractional mode to be changed in hardware. Furthermore, even before this
      patch setting the mode which is done by writing into register takes
      no effect until the PLL reset is deasserted, i.e. until linux "enables"
      the PLL. To adjust the code to system-level PLL EEMI API and avoid
      unnecessary IPIs that would otherwise be issued, we buffer the mode
      value set via IOCTL until the PLL mode really needs to be set.
      Signed-off-by: default avatarMirela Simonovic <mirela.simonovic@aggios.com>
      Acked-by: default avatarWill Wong <WILLW@xilinx.com>
      Signed-off-by: default avatarJolly Shah <jollys@xilinx.com>
      8975f317
    • Jolly Shah's avatar
      zynqmp: pm: Set PLL fractional data using PLL set parameter EEMI API · cf1769b5
      Jolly Shah authored
      
      
      Fractional data should be set using PLL set parameter EEMI API. This
      stands for system-level communication (APU to PMU). Since linux
      already uses a specific IOCTL function to do this and we need to
      keep it that way, the pll clock ID given by linux has to be mapped
      to the pll node ID that is communicated at the system-level (argument
      of PLL set parameter API).
      With this modification the function pm_api_clk_set_pll_frac_data is
      removed from pm_api_clock.c/h because it became unused.
      Signed-off-by: default avatarMirela Simonovic <mirela.simonovic@aggios.com>
      Acked-by: default avatarWill Wong <WILLW@xilinx.com>
      Signed-off-by: default avatarJolly Shah <jollys@xilinx.com>
      cf1769b5
    • Jolly Shah's avatar
      zynqmp: pm: Get PLL fractional data using PLL get parameter EEMI API · 1e3fb352
      Jolly Shah authored
      
      
      Fractional data should be get using PLL get parameter EEMI API. This
      stands for system-level communication (APU to PMU). Since linux
      already uses a specific IOCTL function to do this and we need to
      keep it that way, the pll clock ID given by linux has to be mapped
      to the pll node ID that is communicated at the system-level (argument
      of PLL get parameter API).
      With this modification the function pm_api_clk_get_pll_frac_data is
      removed from pm_api_clock.c/h because it became unused.
      The clock enum is defined as 'enum clock_id'.
      Signed-off-by: default avatarMirela Simonovic <mirela.simonovic@aggios.com>
      Acked-by: default avatarWill Wong <WILLW@xilinx.com>
      Signed-off-by: default avatarJolly Shah <jollys@xilinx.com>
      1e3fb352
    • 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
  5. 21 Sep, 2018 1 commit
    • Daniel Boulby's avatar
      Ensure the flow through switch statements is clear · a08a2014
      Daniel Boulby authored
      
      
      Ensure case clauses:
      *   Terminate with an unconditional break, return or goto statement.
      *   Use conditional break, return or goto statements as long as the end
          of the case clause is unreachable; such case clauses must terminate
          with assert(0) /* Unreachable */ or an unconditional  __dead2 function
          call
      *   Only fallthough when doing otherwise would result in less
          readable/maintainable code; such case clauses must terminate with a
          /* Fallthrough */ comment to make it clear this is the case and
          indicate that a fallthrough is intended.
      
      This reduces the chance of bugs appearing due to unintended flow through a
      switch statement
      
      Change-Id: I70fc2d1f4fd679042397dec12fd1982976646168
      Signed-off-by: default avatarDaniel Boulby <daniel.boulby@arm.com>
      a08a2014
  6. 04 Sep, 2018 3 commits
  7. 15 Mar, 2018 5 commits