Commit 5cd69f13 authored by Fabien Dessenne's avatar Fabien Dessenne Committed by Bjorn Andersson

hwspinlock: stm32: implement the relax() ops

Implement this optional ops, called by hwspinlock core while spinning on
a lock, between two successive invocations of trylock().
Reviewed-by: default avatarBenjamin Gaignard <>
Signed-off-by: default avatarFabien Dessenne <>
Signed-off-by: default avatarBjorn Andersson <>
parent fbd7330c
......@@ -5,6 +5,7 @@
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/hwspinlock.h>
#include <linux/io.h>
#include <linux/kernel.h>
......@@ -42,9 +43,15 @@ static void stm32_hwspinlock_unlock(struct hwspinlock *lock)
writel(STM32_MUTEX_COREID, lock_addr);
static void stm32_hwspinlock_relax(struct hwspinlock *lock)
static const struct hwspinlock_ops stm32_hwspinlock_ops = {
.trylock = stm32_hwspinlock_trylock,
.unlock = stm32_hwspinlock_unlock,
.relax = stm32_hwspinlock_relax,
static int stm32_hwspinlock_probe(struct platform_device *pdev)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment