Skip to content
Snippets Groups Projects
  1. May 28, 2021
    • Wilken Gottwalt's avatar
      hwspinlock: add sun6i hardware spinlock support · 3c881e05
      Wilken Gottwalt authored
      
      Adds the sun6i_hwspinlock driver for the hardware spinlock unit found in
      most of the sun6i compatible SoCs.
      
      This unit provides at least 32 spinlocks in hardware. The implementation
      supports 32, 64, 128 or 256 32bit registers. A lock can be taken by
      reading a register and released by writing a 0 to it. This driver
      supports all 4 spinlock setups, but for now only the first setup (32
      locks) seem to exist in available devices. This spinlock unit is shared
      between all ARM cores and the embedded companion core. All of them can
      take/release a lock with a single cycle operation. It can be used to
      sync access to devices shared by the ARM cores and the companion core.
      
      There are two ways to check if a lock is taken. The first way is to read
      a lock. If a 0 is returned, the lock was free and is taken now. If an 1
      is returned, the caller has to try again. Which means the lock is taken.
      The second way is to read a 32bit wide status register where every bit
      represents one of the 32 first locks. According to the datasheets this
      status register supports only the 32 first locks. This is the reason the
      first way (lock read/write) approach is used to be able to cover all 256
      locks in future devices. The driver also reports the amount of supported
      locks via debugfs.
      
      Reviewed-by: default avatarSamuel Holland <samuel@sholland.org>
      Acked-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Signed-off-by: default avatarWilken Gottwalt <wilken.gottwalt@posteo.net>
      Link: https://lore.kernel.org/r/bfd2b97307c2321b15c09683f4bd5e1fcc792f13.1615713499.git.wilken.gottwalt@posteo.net
      
      
      Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      3c881e05
  2. Mar 18, 2021
  3. Feb 09, 2021
  4. Dec 10, 2020
  5. Nov 18, 2020
  6. Nov 03, 2020
  7. Oct 26, 2020
  8. Jul 14, 2020
  9. Jun 21, 2020
  10. Mar 26, 2020
  11. Jan 22, 2020
  12. Dec 29, 2019
  13. Nov 09, 2019
  14. Oct 05, 2019
  15. Jun 30, 2019
  16. Jun 29, 2019
  17. Jan 03, 2019
  18. Dec 05, 2018
  19. Jul 31, 2018
  20. Jun 26, 2018
Loading