diff options
| author | Neil Armstrong <[email protected]> | 2025-11-20 09:12:53 +0100 |
|---|---|---|
| committer | Neil Armstrong <[email protected]> | 2025-11-20 09:17:58 +0100 |
| commit | 9ab7163710d390672a7325cd0980ce32e2a8191a (patch) | |
| tree | 422be0ecb86bc7ee18f6850e00b663a62209b822 /arch | |
| parent | 60a99d5ca374c83c0118f2634a7fcf4cc707b965 (diff) | |
interconnect: add DM test suite
Add a test suite exercising the whole lifetime and callbacks
of interconnect with a fake 5 providers with a split node graph.
The test suite checks the calculus are right and goes to the correct
nodes, and the lifetime of the node is correct.
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Neil Armstrong <[email protected]>
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/sandbox/dts/test.dts | 36 | ||||
| -rw-r--r-- | arch/sandbox/include/asm/interconnect.h | 19 |
2 files changed, 55 insertions, 0 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 13d8e498b03..0b3fc505e53 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -864,6 +864,42 @@ }; }; + icc0: interconnect-0 { + compatible = "sandbox,interconnect0"; + #interconnect-cells = <1>; + }; + + icc1: interconnect-1 { + compatible = "sandbox,interconnect1"; + #interconnect-cells = <1>; + }; + + icc2: interconnect-2 { + compatible = "sandbox,interconnect2"; + #interconnect-cells = <1>; + }; + + icc3: interconnect-3 { + compatible = "sandbox,interconnect3"; + #interconnect-cells = <1>; + }; + + icc4: interconnect-4 { + compatible = "sandbox,interconnect4"; + #interconnect-cells = <1>; + }; + + interconnect-test-0 { + compatible = "sandbox,interconnect-test"; + interconnects = <&icc0 0 &icc3 0>; + }; + + interconnect-test-1 { + compatible = "sandbox,interconnect-test"; + interconnects = <&icc1 0 &icc4 0>; + interconnect-names = "icc-path"; + }; + i2c@0 { #address-cells = <1>; #size-cells = <0>; diff --git a/arch/sandbox/include/asm/interconnect.h b/arch/sandbox/include/asm/interconnect.h new file mode 100644 index 00000000000..17065bf6a11 --- /dev/null +++ b/arch/sandbox/include/asm/interconnect.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2025 Linaro Limited + */ + +#ifndef __SANDBOX_INTERCONNECT_H +#define __SANDBOX_INTERCONNECT_H + +struct udevice; + +int sandbox_interconnect_get_bw(struct udevice *dev, u64 *avg, u64 *peak); +int sandbox_interconnect_test_get(struct udevice *dev, char *name); +int sandbox_interconnect_test_get_index(struct udevice *dev, int index); +int sandbox_interconnect_test_enable(struct udevice *dev); +int sandbox_interconnect_test_disable(struct udevice *dev); +int sandbox_interconnect_test_set_bw(struct udevice *dev, u32 avg_bw, u32 peak_bw); +int sandbox_interconnect_test_put(struct udevice *dev); + +#endif |
