diff options
author | Simon Glass <sjg@chromium.org> | 2015-07-06 12:54:24 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-07-21 17:39:30 -0600 |
commit | 6a1c7cef14a41ade84bccdded1fd87b908b6958c (patch) | |
tree | f411334af8078f63b3767ba6bccc1e1167e4b463 /arch | |
parent | c02790ce12f3bf01a49fbef71da64322fde863e6 (diff) | |
download | u-boot-imx-6a1c7cef14a41ade84bccdded1fd87b908b6958c.zip u-boot-imx-6a1c7cef14a41ade84bccdded1fd87b908b6958c.tar.gz u-boot-imx-6a1c7cef14a41ade84bccdded1fd87b908b6958c.tar.bz2 |
dm: test: Add tests for the clk uclass
Add tests of each API call using a sandbox clock device.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sandbox/dts/test.dts | 4 | ||||
-rw-r--r-- | arch/sandbox/include/asm/test.h | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index c25614a..3c9abb3 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -105,6 +105,10 @@ compatible = "denx,u-boot-fdt-test"; }; + clk@0 { + compatible = "sandbox,clk"; + }; + eth@10002000 { compatible = "sandbox,eth"; reg = <0x10002000 0x1000>; diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h index 91a5c79..28e9c09 100644 --- a/arch/sandbox/include/asm/test.h +++ b/arch/sandbox/include/asm/test.h @@ -17,6 +17,17 @@ #define SANDBOX_PCI_CLASS_CODE PCI_CLASS_CODE_COMM #define SANDBOX_PCI_CLASS_SUB_CODE PCI_CLASS_SUB_CODE_COMM_SERIAL +#define SANDBOX_CLK_RATE 32768 + +enum { + PERIPH_ID_FIRST = 0, + PERIPH_ID_SPI = PERIPH_ID_FIRST, + PERIPH_ID_I2C, + PERIPH_ID_PCI, + + PERIPH_ID_COUNT, +}; + /** * sandbox_i2c_set_test_mode() - set test mode for running unit tests * |