All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v5 0/4] Add Hardware Spinlock class
@ 2018-11-27 12:49 Benjamin Gaignard
  2018-11-27 12:49 ` [U-Boot] [PATCH v5 1/4] dm: " Benjamin Gaignard
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Benjamin Gaignard @ 2018-11-27 12:49 UTC (permalink / raw
  To: u-boot

version 5:
- rebased on top of master branch (patches 1 and 4)
  
version 4:
- make timeout loop more robust

version 3:
- use dev_get_parent
- add Review-by
  
version 2:
- use -ETIMEDOUT and -ENOSYS for errors cases
- do not test if ops is valid
- remove useless include
- add a private structure to store base address
- be more verbose in configuration flag description and commit message
- log the error after hwspinlock_get_by_index()

This series add a news class to support hardware spinlock.
Hardware spinlock could be used to protect critical sections of code
between multi-processors.

The proposed API remain simple with only 3 functions to be called client:
- hwspinlock_get_by_index: get a hardware spinlock by integer index from
  device-tree node
- hwspinlock_lock_timeout: lock the hardware spinlock
- hwspinlock_unlock: unlock the hardware spinlock

Driver API offert 4 operations:
- of_xlate: translate a client's device-tree (OF) hardware specifier
- lock: lock the hardware spinlock
- unlock: unlock the hardware spinlock
- relax: wait time between two calls to lock operations


Benjamin Gaignard (4):
  dm: Add Hardware Spinlock class
  clk: stm32: add hardware spinlock clock
  hwspinlock: add stm32 hardware spinlock support
  pinctrl: stm32: make pinctrl use hwspinlock

 arch/arm/dts/stm32mp157c-ed1.dts        |   8 ++
 arch/arm/dts/stm32mp157c.dtsi           |   9 ++
 arch/sandbox/dts/test.dts               |   4 +
 arch/sandbox/include/asm/state.h        |   1 +
 configs/sandbox_defconfig               |   2 +
 configs/stm32mp15_basic_defconfig       |   2 +
 drivers/Kconfig                         |   2 +
 drivers/Makefile                        |   1 +
 drivers/clk/clk_stm32mp1.c              |   3 +
 drivers/hwspinlock/Kconfig              |  24 ++++++
 drivers/hwspinlock/Makefile             |   7 ++
 drivers/hwspinlock/hwspinlock-uclass.c  | 144 ++++++++++++++++++++++++++++++++
 drivers/hwspinlock/sandbox_hwspinlock.c |  56 +++++++++++++
 drivers/hwspinlock/stm32_hwspinlock.c   |  92 ++++++++++++++++++++
 drivers/pinctrl/pinctrl_stm32.c         |  27 +++++-
 include/dm/uclass-id.h                  |   1 +
 include/hwspinlock.h                    | 140 +++++++++++++++++++++++++++++++
 test/dm/Makefile                        |   1 +
 test/dm/hwspinlock.c                    |  40 +++++++++
 19 files changed, 560 insertions(+), 4 deletions(-)
 create mode 100644 drivers/hwspinlock/Kconfig
 create mode 100644 drivers/hwspinlock/Makefile
 create mode 100644 drivers/hwspinlock/hwspinlock-uclass.c
 create mode 100644 drivers/hwspinlock/sandbox_hwspinlock.c
 create mode 100644 drivers/hwspinlock/stm32_hwspinlock.c
 create mode 100644 include/hwspinlock.h
 create mode 100644 test/dm/hwspinlock.c

-- 
2.15.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-12-07 20:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-27 12:49 [U-Boot] [PATCH v5 0/4] Add Hardware Spinlock class Benjamin Gaignard
2018-11-27 12:49 ` [U-Boot] [PATCH v5 1/4] dm: " Benjamin Gaignard
2018-12-07 20:33   ` [U-Boot] [U-Boot,v5,1/4] " Tom Rini
2018-11-27 12:49 ` [U-Boot] [PATCH v5 2/4] clk: stm32: add hardware spinlock clock Benjamin Gaignard
2018-12-07 20:33   ` [U-Boot] [U-Boot, v5, " Tom Rini
2018-11-27 12:49 ` [U-Boot] [PATCH v5 3/4] hwspinlock: add stm32 hardware spinlock support Benjamin Gaignard
2018-12-07 20:33   ` [U-Boot] [U-Boot, v5, " Tom Rini
2018-11-27 12:49 ` [U-Boot] [PATCH v5 4/4] pinctrl: stm32: make pinctrl use hwspinlock Benjamin Gaignard
2018-12-07 20:33   ` [U-Boot] [U-Boot, v5, " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.