summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>2018-11-27 13:49:50 +0100
committerTom Rini <trini@konsulko.com>2018-12-06 23:26:32 -0500
commit7f84fc670b17fca3d8d1b7c9472a19bb8085c890 (patch)
tree5af913847507ee1d58408c5f053bcdb2731b0133 /arch/sandbox
parent3b074fb22b8f09178200b969395fa9f3d97a67e6 (diff)
dm: Add Hardware Spinlock class
This is uclass for Hardware Spinlocks. It implements two mandatory operations: lock and unlock and one optional relax operation. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/dts/test.dts4
-rw-r--r--arch/sandbox/include/asm/state.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 6722e18bc3..12d39d8d5c 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -742,6 +742,10 @@
pinctrl {
compatible = "sandbox,pinctrl";
};
+
+ hwspinlock@0 {
+ compatible = "sandbox,hwspinlock";
+ };
};
#include "sandbox_pmic.dtsi"
diff --git a/arch/sandbox/include/asm/state.h b/arch/sandbox/include/asm/state.h
index 5a14485102..c724827f6c 100644
--- a/arch/sandbox/include/asm/state.h
+++ b/arch/sandbox/include/asm/state.h
@@ -101,6 +101,7 @@ struct sandbox_state {
ulong next_tag; /* Next address tag to allocate */
struct list_head mapmem_head; /* struct sandbox_mapmem_entry */
+ bool hwspinlock; /* Hardware Spinlock status */
};
/* Minimum space we guarantee in the state FDT when calling read/write*/