1. 25 Jul, 2014 2 commits
  2. 24 Jul, 2014 17 commits
  3. 23 Jul, 2014 1 commit
  4. 22 Jul, 2014 1 commit
  5. 16 Jul, 2014 3 commits
    • Thomas Petazzoni's avatar
      clk: mvebu: extend clk-cpu for dynamic frequency scaling · ee2d8ea1
      Thomas Petazzoni authored
      This commit extends the existing clk-cpu driver used on Marvell Armada
      XP platforms to support the dynamic frequency scaling of the CPU
      clock. Non-dynamic frequency change was already supported (and used
      before secondary CPUs are started), but the dynamic frequency change
      requires a completely different procedure.
      
      In order to achieve this, the clk_cpu_set_rate() function is reworked
      to handle two separate cases:
      
       - The case where the clock is enabled, which is the new dynamic
         frequency change code, implemented in clk_cpu_on_set_rate(). This
         part will be used for cpufreq activities.
      
       - The case where the clock is disabled, which is the existing
         frequency change code, moved in clk_cpu_off_set_rate(). This part
         is already used to set the clock frequency of the secondary CPUs
         before starting them.
      
      In order to implement the dynamic frequency change function, we need
      to access the PMU DFS registers, which are outside the currently
      mapped "Clock Complex" registers, so a new area of registers is now
      mapped. This affects the Device Tree binding, but we are careful to do
      it in a backward-compatible way (by allowing the second pair of
      registers to be non-existent, and in this case, ensuring
      clk_cpu_on_set_rate() returns an error).
      
      Note that technically speaking, the clk_cpu_on_set_rate() does not do
      the entire procedure needed to change the frequency dynamically, as it
      involves touching a number of PMSU registers. This is done through a
      clock notifier registered by the PMSU driver in followup commits.
      
      Cc: <devicetree@vger.kernel.org>
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Link: https://lkml.kernel.org/r/1404920715-19834-4-git-send-email-thomas.petazzoni@free-electrons.comSigned-off-by: default avatarJason Cooper <jason@lakedaemon.net>
      ee2d8ea1
    • Thomas Petazzoni's avatar
      ARM: mvebu: extend PMSU code to support dynamic frequency scaling · a509ea84
      Thomas Petazzoni authored
      This commit adds the necessary code in the Marvell EBU PMSU driver to
      support dynamic frequency scaling. In essence, what this new code does
      is that it:
      
       * registers the frequency operating points supported by the CPU;
      
       * registers a clock notifier of the CPU clocks. The notifier function
         listens to the newly introduced APPLY_RATE_CHANGE event, and uses
         that to finalize the frequency transition by doing the part of the
         procedure that involves the PMSU;
      
       * registers a platform device for the cpufreq-generic driver, which
         will take care of the CPU frequency transitions.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Link: https://lkml.kernel.org/r/1404920715-19834-3-git-send-email-thomas.petazzoni@free-electrons.comSigned-off-by: default avatarJason Cooper <jason@lakedaemon.net>
      a509ea84
    • Thomas Petazzoni's avatar
      ARM: mvebu: ensure CPU clocks are enabled · 831e2518
      Thomas Petazzoni authored
      In the Armada XP SMP support code, we are reading the clock frequency
      of the booting CPU, and use that to assign the same frequency to the
      other CPUs, and we do this while the clocks are disabled.
      
      However, the CPU clocks are in fact never prepared/enabled, and to
      support cpufreq, we now have two code paths to change the frequency of
      the CPU clocks in the CPU clock driver: one when the clock is enabled
      (dynamic frequency scaling), one when the clock is disabled (adjusting
      the CPU frequency before starting the CPU). In order for this to work,
      the CPU clocks now have to be prepared and enabled after the initial
      synchronization of the clock frequencies is done, so that all future
      rate changes of the CPU clocks will trigger a dynamic frequency
      scaling transition.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Link: https://lkml.kernel.org/r/1404920715-19834-2-git-send-email-thomas.petazzoni@free-electrons.comSigned-off-by: default avatarJason Cooper <jason@lakedaemon.net>
      831e2518
  6. 13 Jul, 2014 1 commit
  7. 08 Jul, 2014 2 commits
  8. 01 Jul, 2014 1 commit
    • Thomas Petazzoni's avatar
      ARM: mvebu: fix SMP boot for Armada 38x and Armada 375 Z1 in big endian · 0e2be4c1
      Thomas Petazzoni authored
      The SMP boot on Armada 38x and Armada 375 Z1 is currently broken in
      big-endian configurations, and this commit fixes it for both
      platforms.
      
      For Armada 375 Z1, the problem was in the
      armada_375_smp_cpu1_enable_code part of the code that gets copied to
      the Crypto SRAM as a work-around for an issue of the Z1 stepping. This
      piece of code was not switching the CPU core to big-endian, and not
      endian-swapping the value read from the Resume Address register (the
      value is stored little-endian). Due to the introduction of the
      conditional 'rev r1, r1' instruction, the offset between the 'ldr r0,
      [pc, #4]' instruction and the value it was looking is different
      between LE and BE configurations. To solve this, we instead use one
      'adr' instruction followed by one 'ldr'.
      
      For Armada 38x, the problem was simply that the CPU core was not
      switched to big endian in the secondary CPU startup function.
      
      This change was tested in LE and BE configurations on Armada 385,
      Armada 375 Z1 and Armada 375 A0.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Link: https://lkml.kernel.org/r/1404228186-21203-1-git-send-email-thomas.petazzoni@free-electrons.comSigned-off-by: default avatarJason Cooper <jason@lakedaemon.net>
      0e2be4c1
  9. 30 Jun, 2014 8 commits
  10. 24 Jun, 2014 1 commit
  11. 23 Jun, 2014 1 commit
  12. 21 Jun, 2014 2 commits