1. 07 Feb, 2018 4 commits
  2. 01 Feb, 2018 2 commits
  3. 29 Jan, 2018 1 commit
  4. 27 Jan, 2018 1 commit
  5. 24 Jan, 2018 2 commits
  6. 22 Jan, 2018 3 commits
  7. 16 Jan, 2018 2 commits
    • Leo Yan's avatar
      Hikey960: Change CPU standby state for WFI · 4c8a5787
      Leo Yan authored
      
      
      At early time, the CPU CA73 retention state has been supported on
      Hikey960.  Later we found the system has the hang issue and for
      resolving this issue Hisilicon released new MCU firmware, but
      unfortunately the new MCU firmware has side effect and results in the
      CA73 CPU cannot really enter retention state and roll back to WFI state.
      
      After discussion we cannot see the possibility to enable CA73 retention
      state anymore on Hikey960, based on this conclusion we should remove
      this state supporting from ARM-TF and roll back to WFI state only.  We
      will commit one patch to remove CA73 CPU retention state in kernel DT
      binding as well.
      
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
      Cc: Kevin Wang <jean.wangtao@linaro.org>
      Cc: Vincent Guittot <vincent.guittot@linaro.org>
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      4c8a5787
    • Leo Yan's avatar
      Revert "Hikey960: Change to use recommended power state id format" · e1b27425
      Leo Yan authored
      This reverts commit fdae60b6.
      
      The commit fdae60b6
      
       changed the
      parameter encoding for the hikey960.  However that implies a DT change
      in the kernel side.  After submitting the DT change for upstreaming,
      the backward compatibility issue and the interface change raise some
      concerns from the Linux community about the issues related to kernel <->
      ATF alignment.  There is no way to detect a mis-alignment of those
      without a deep knowledge of the ATF and the kernel.  Furthermore, the
      failing calls to PSCI in the idle path (because of bad parameters), will
      lead to busy looping, implying: thermal issues and extra energy
      consumption.
      
      In regard of the Linux community concerns, the potential issues when the
      ATF and the kernel are not aligned, it is preferable to revert the
      commit.
      
      Cc: Vincent Guittot <vincent.guittot@linaro.org>
      Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
      Cc: Kevin Wang <jean.wangtao@linaro.org>
      Co-authored-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      e1b27425
  8. 09 Jan, 2018 1 commit
  9. 18 Dec, 2017 1 commit
  10. 12 Dec, 2017 5 commits
  11. 06 Dec, 2017 1 commit
    • Leo Yan's avatar
      Hikey960: Change to use recommended power state id format · fdae60b6
      Leo Yan authored
      
      
      ARM Power State Coordination Interface (ARM DEN 0022D) chapter
      6.5 "Recommended StateID Encoding" defines the state ID which can be
      used by platforms. The recommended power states can be presented by
      below values; and it divides into three fields, every field has 4 bits
      to present power states corresponding to core level, cluster level and
      system level.
      
        0: Run
        1: Standby
        2: Retention
        3: Powerdown
      
      This commit changes to use upper recommended power states definition on
      Hikey960; and changes the power state validate function to check the
      power state passed from kernel side.
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      fdae60b6
  12. 30 Nov, 2017 1 commit
    • David Cunado's avatar
      Do not enable SVE on pre-v8.2 platforms · 3872fc2d
      David Cunado authored
      
      
      Pre-v8.2 platforms such as the Juno platform does not have
      the Scalable Vector Extensions implemented and so the build
      option ENABLE_SVE is set to zero.
      
      This has a minor performance improvement with no functional
      impact.
      
      Change-Id: Ib072735db7a0247406f8b60e325b7e28b1e04ad1
      Signed-off-by: default avatarDavid Cunado <david.cunado@arm.com>
      3872fc2d
  13. 22 Nov, 2017 2 commits
  14. 01 Nov, 2017 1 commit
  15. 18 Oct, 2017 2 commits
  16. 17 Oct, 2017 1 commit
  17. 13 Sep, 2017 2 commits
  18. 07 Sep, 2017 1 commit
    • Leo Yan's avatar
      Hikey: enable CPU debug module · e246617b
      Leo Yan authored
      
      
      Every CPU has its own debug module and this module is used by JTAG
      debugging and coresight tracing. If without enabling it, it's easily to
      introduce lockup issue when we enable debugging features.
      
      This patch is to enable CPU debug module when power on CPU; this allows
      connecting to all cores through JTAG and used by kernel coresight
      driver.
      Signed-off-by: default avatarMatthias Welwarsky <maw@sysgo.com>
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      e246617b
  19. 01 Sep, 2017 2 commits
  20. 29 Aug, 2017 2 commits
    • Eleanor Bonnici's avatar
      HiKey: Rename CPUACTRL reg constants · f9a856ba
      Eleanor Bonnici authored
      
      
      Constants named as *ACTLR* refer in fact to the CPUACTRL_EL1 register.
      Since ACTLR and ACTRL_EL1 are different registers this patch renames
      these constants for clarity.
      
      Change-Id: I2a9e402dab7b0fcb6e481ee0d8a11eda943ed299
      Signed-off-by: default avatarEleanor Bonnici <Eleanor.bonnici@arm.com>
      f9a856ba
    • Leo Yan's avatar
      Hikey: enable watchdog reset · 3506ff11
      Leo Yan authored
      
      
      At the system boot time we need enable watchdog reset, otherwise after
      the watchdog is timeout it cannot reset the SoC. We need set the bit 0
      and bit 16 together, the bit 16 is mask bit so after set bit 16 we have
      permission to operate bit 0 and bit 0 is watchdog reset enabling bit.
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      3506ff11
  21. 17 Aug, 2017 1 commit
    • Tao Wang's avatar
      Hikey960: fix PSCI suspend stuck issue · 4af7fcb8
      Tao Wang authored
      
      
      Clear the cpuidle flag when resuming from idle. This flag is set
      when entering idle, and if it remains set when resuming, it can
      prevent the cluster from powering off during the next system
      suspend operation. During system suspend, all CPUs are plugged
      out except the last CPU, which is suspended. If any of the
      cpuidle flags are set at this point, the last CPU will be stuck
      in a WFI loop and will not be powered off.
      This problem only occurs during system suspend.
      Signed-off-by: default avatarTao Wang <kevin.wangtao@linaro.org>
      4af7fcb8
  22. 15 Aug, 2017 1 commit
    • Julius Werner's avatar
      Add new alignment parameter to func assembler macro · 64726e6d
      Julius Werner authored
      
      
      Assembler programmers are used to being able to define functions with a
      specific aligment with a pattern like this:
      
          .align X
        myfunction:
      
      However, this pattern is subtly broken when instead of a direct label
      like 'myfunction:', you use the 'func myfunction' macro that's standard
      in Trusted Firmware. Since the func macro declares a new section for the
      function, the .align directive written above it actually applies to the
      *previous* section in the assembly file, and the function it was
      supposed to apply to is linked with default alignment.
      
      An extreme case can be seen in Rockchip's plat_helpers.S which contains
      this code:
      
        [...]
        endfunc plat_crash_console_putc
      
        .align 16
        func platform_cpu_warmboot
        [...]
      
      This assembles into the following plat_helpers.o:
      
        Sections:
        Idx Name                             Size  [...]  Algn
         9 .text.plat_crash_console_putc 00010000  [...]  2**16
        10 .text.platform_cpu_warmboot   00000080  [...]  2**3
      
      As can be seen, the *previous* function actually got the alignment
      constraint, and it is also 64KB big even though it contains only two
      instructions, because the .align directive at the end of its section
      forces the assembler to insert a giant sled of NOPs. The function we
      actually wanted to align has the default constraint. This code only
      works at all because the linker just happens to put the two functions
      right behind each other when linking the final image, and since the end
      of plat_crash_console_putc is aligned the start of platform_cpu_warmboot
      will also be. But it still wastes almost 64KB of image space
      unnecessarily, and it will break under certain circumstances (e.g. if
      the plat_crash_console_putc function becomes unused and its section gets
      garbage-collected out).
      
      There's no real way to fix this with the existing func macro. Code like
      
       func myfunc
       .align X
      
      happens to do the right thing, but is still not really correct code
      (because the function label is inserted before the .align directive, so
      the assembler is technically allowed to insert padding at the beginning
      of the function which would then get executed as instructions if the
      function was called). Therefore, this patch adds a new parameter with a
      default value to the func macro that allows overriding its alignment.
      
      Also fix up all existing instances of this dangerous antipattern.
      
      Change-Id: I5696a07e2fde896f21e0e83644c95b7b6ac79a10
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      64726e6d
  23. 26 Jul, 2017 1 commit
    • Leo Yan's avatar
      hikey: Disable VBUS_DET interrupt for PMIC · c9e8774c
      Leo Yan authored
      
      
      After disconnect Jumper pin 1-2 in J15 header, the signal VBUS_DET is to
      be pulled down to low level. This will assert the interrupt signal in
      PMIC and trigger IRQ in GIC; the asserted signal from VBUS_DET is level
      triggered and kernel reports the warning for unhooked interrupt handling;
      and VBUS_DET stays with low level, this triggers IRQ storm in kernel.
      
      This patch is to disable interrupt for VBUS_DET in PMIC, this can
      dismiss the verbose log and IRQ storm after kernel booting.
      
      [   40.835279] irq 57: nobody cared (try booting with the "irqpoll" option)
      [   40.842075] CPU: 0 PID: 980 Comm: irq/57-hi655x-p Not tainted 4.4.77-568944-g576a0114dec8-dirty #667
      [   40.851303] Hardware name: HiKey Development Board (DT)
      [   40.856580] Call trace:
      [   40.859060] [<ffffff800808c4cc>] dump_backtrace+0x0/0x1e0
      [   40.864516] [<ffffff800808c8ac>] show_stack+0x20/0x28
      [   40.869622] [<ffffff80084b9688>] dump_stack+0xa8/0xe0
      [   40.874729] [<ffffff800812dd5c>] __report_bad_irq+0x40/0xec
      [   40.880360] [<ffffff800812e0bc>] note_interrupt+0x1e4/0x2d8
      [   40.885992] [<ffffff800812b11c>] handle_irq_event_percpu+0xd8/0x268
      [   40.892324] [<ffffff800812b2f8>] handle_irq_event+0x4c/0x7c
      [   40.897955] [<ffffff800812ecbc>] handle_level_irq+0xcc/0x178
      [   40.903672] [<ffffff800812a778>] generic_handle_irq+0x34/0x4c
      [   40.909481] [<ffffff80085074c8>] pl061_irq_handler+0xa8/0x124
      [   40.915286] [<ffffff800812a778>] generic_handle_irq+0x34/0x4c
      [   40.921092] [<ffffff800812a820>] __handle_domain_irq+0x90/0xf8
      [   40.926985] [<ffffff8008082620>] gic_handle_irq+0x58/0xa8
      Signed-off-by: default avatarDmitry Shmidt <dimitrysh@google.com>
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      c9e8774c