diff options
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/dts/test.dts | 48 | ||||
-rw-r--r-- | arch/sandbox/include/asm/clk.h | 32 | ||||
-rw-r--r-- | arch/sandbox/include/asm/reset.h | 4 |
3 files changed, 84 insertions, 0 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index b0f0ca8f19..06d0e8ce85 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -27,6 +27,10 @@ testfdt3 = "/b-test"; testfdt5 = "/some-bus/c-test@5"; testfdt8 = "/a-test"; + fdt_dummy0 = "/translation-test@8000/dev@0,0"; + fdt_dummy1 = "/translation-test@8000/dev@1,100"; + fdt_dummy2 = "/translation-test@8000/dev@2,200"; + fdt_dummy3 = "/translation-test@8000/noxlatebus@3,300/dev@42"; usb0 = &usb_0; usb1 = &usb_1; usb2 = &usb_2; @@ -487,6 +491,50 @@ reg = <9 1>; }; }; + + translation-test@8000 { + compatible = "simple-bus"; + reg = <0x8000 0x4000>; + + #address-cells = <0x2>; + #size-cells = <0x1>; + + ranges = <0 0x0 0x8000 0x1000 + 1 0x100 0x9000 0x1000 + 2 0x200 0xA000 0x1000 + 3 0x300 0xB000 0x1000 + >; + + dev@0,0 { + compatible = "denx,u-boot-fdt-dummy"; + reg = <0 0x0 0x1000>; + }; + + dev@1,100 { + compatible = "denx,u-boot-fdt-dummy"; + reg = <1 0x100 0x1000>; + + }; + + dev@2,200 { + compatible = "denx,u-boot-fdt-dummy"; + reg = <2 0x200 0x1000>; + }; + + + noxlatebus@3,300 { + compatible = "simple-bus"; + reg = <3 0x300 0x1000>; + + #address-cells = <0x1>; + #size-cells = <0x0>; + + dev@42 { + compatible = "denx,u-boot-fdt-dummy"; + reg = <0x42>; + }; + }; + }; }; #include "sandbox_pmic.dtsi" diff --git a/arch/sandbox/include/asm/clk.h b/arch/sandbox/include/asm/clk.h index 9dc6c8184b..01b5ba4e07 100644 --- a/arch/sandbox/include/asm/clk.h +++ b/arch/sandbox/include/asm/clk.h @@ -64,6 +64,14 @@ int sandbox_clk_query_enable(struct udevice *dev, int id); */ int sandbox_clk_test_get(struct udevice *dev); /** + * sandbox_clk_test_get_bulk - Ask the sandbox clock test device to request its + * clocks with the bulk clk API. + * + * @dev: The sandbox clock test (client) devivce. + * @return: 0 if OK, or a negative error code. + */ +int sandbox_clk_test_get_bulk(struct udevice *dev); +/** * sandbox_clk_test_get_rate - Ask the sandbox clock test device to query a * clock's rate. * @@ -91,6 +99,14 @@ ulong sandbox_clk_test_set_rate(struct udevice *dev, int id, ulong rate); */ int sandbox_clk_test_enable(struct udevice *dev, int id); /** + * sandbox_clk_test_enable_bulk - Ask the sandbox clock test device to enable + * all clocks in it's clock bulk struct. + * + * @dev: The sandbox clock test (client) devivce. + * @return: 0 if OK, or a negative error code. + */ +int sandbox_clk_test_enable_bulk(struct udevice *dev); +/** * sandbox_clk_test_disable - Ask the sandbox clock test device to disable a * clock. * @@ -100,6 +116,14 @@ int sandbox_clk_test_enable(struct udevice *dev, int id); */ int sandbox_clk_test_disable(struct udevice *dev, int id); /** + * sandbox_clk_test_disable_bulk - Ask the sandbox clock test device to disable + * all clocks in it's clock bulk struct. + * + * @dev: The sandbox clock test (client) devivce. + * @return: 0 if OK, or a negative error code. + */ +int sandbox_clk_test_disable_bulk(struct udevice *dev); +/** * sandbox_clk_test_free - Ask the sandbox clock test device to free its * clocks. * @@ -107,5 +131,13 @@ int sandbox_clk_test_disable(struct udevice *dev, int id); * @return: 0 if OK, or a negative error code. */ int sandbox_clk_test_free(struct udevice *dev); +/** + * sandbox_clk_test_release_bulk - Ask the sandbox clock test device to release + * all clocks in it's clock bulk struct. + * + * @dev: The sandbox clock test (client) devivce. + * @return: 0 if OK, or a negative error code. + */ +int sandbox_clk_test_release_bulk(struct udevice *dev); #endif diff --git a/arch/sandbox/include/asm/reset.h b/arch/sandbox/include/asm/reset.h index 7146aa5ab2..0cd7702b88 100644 --- a/arch/sandbox/include/asm/reset.h +++ b/arch/sandbox/include/asm/reset.h @@ -14,8 +14,12 @@ struct udevice; int sandbox_reset_query(struct udevice *dev, unsigned long id); int sandbox_reset_test_get(struct udevice *dev); +int sandbox_reset_test_get_bulk(struct udevice *dev); int sandbox_reset_test_assert(struct udevice *dev); +int sandbox_reset_test_assert_bulk(struct udevice *dev); int sandbox_reset_test_deassert(struct udevice *dev); +int sandbox_reset_test_deassert_bulk(struct udevice *dev); int sandbox_reset_test_free(struct udevice *dev); +int sandbox_reset_test_release_bulk(struct udevice *dev); #endif |