From 7f84fc670b17fca3d8d1b7c9472a19bb8085c890 Mon Sep 17 00:00:00 2001 From: Benjamin Gaignard Date: Tue, 27 Nov 2018 13:49:50 +0100 Subject: 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 Reviewed-by: Simon Glass Reviewed-by: Patrice Chotard --- arch/sandbox/dts/test.dts | 4 ++++ arch/sandbox/include/asm/state.h | 1 + 2 files changed, 5 insertions(+) (limited to 'arch/sandbox') 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*/ -- cgit From b3309918740f00735d414c44ed2a3f26c418715b Mon Sep 17 00:00:00 2001 From: Grygorii Strashko Date: Wed, 28 Nov 2018 19:17:51 +0100 Subject: test: dma: add dma-uclass test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a sandbox DMA driver implementation (provider) and corresponding DM test. Reviewed-by: Tom Rini Signed-off-by: Grygorii Strashko Reviewed-by: Simon Glass Acked-by: Álvaro Fernández Rojas --- arch/sandbox/dts/test.dts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/sandbox') diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 12d39d8d5c..082fcec3f9 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -746,6 +746,14 @@ hwspinlock@0 { compatible = "sandbox,hwspinlock"; }; + + dma: dma { + compatible = "sandbox,dma"; + #dma-cells = <1>; + + dmas = <&dma 0>, <&dma 1>, <&dma 2>; + dma-names = "m2m", "tx0", "rx0"; + }; }; #include "sandbox_pmic.dtsi" -- cgit