diff options
author | Simon Glass <sjg@chromium.org> | 2019-02-16 20:24:50 -0700 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2019-02-20 15:26:36 +0800 |
commit | b45c833c71f1ce26e0db6c30f96dc3228051cd15 (patch) | |
tree | 2e4e0a7357882a7b40ed03607c64ef5975b10882 /arch/sandbox | |
parent | c882163b09b8a2c52e3dd8acd7d296d6d06d1f2e (diff) | |
download | u-boot-b45c833c71f1ce26e0db6c30f96dc3228051cd15.tar.gz u-boot-b45c833c71f1ce26e0db6c30f96dc3228051cd15.tar.xz u-boot-b45c833c71f1ce26e0db6c30f96dc3228051cd15.zip |
sandbox: pch: Add a test for the PCH uclass
This uclass currently has no tests. Add a sandbox driver and some simple
tests to provide basic coverage.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: Use "sandbox,pch" for the compatible string, for consistency]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/dts/test.dts | 4 | ||||
-rw-r--r-- | arch/sandbox/include/asm/test.h | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 1d011ded7c..f014c561bc 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -407,6 +407,10 @@ compatible = "sandbox,mmc"; }; + pch { + compatible = "sandbox,pch"; + }; + pci0: pci-controller0 { compatible = "sandbox,pci"; device_type = "pci"; diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h index 74f9618822..ce00ba51e4 100644 --- a/arch/sandbox/include/asm/test.h +++ b/arch/sandbox/include/asm/test.h @@ -161,4 +161,12 @@ int sandbox_get_setup_called(struct udevice *dev); */ int sandbox_get_sound_sum(struct udevice *dev); +/** + * sandbox_get_pch_spi_protect() - Get the PCI SPI protection status + * + * @dev: Device to check + * @return 0 if not protected, 1 if protected + */ +int sandbox_get_pch_spi_protect(struct udevice *dev); + #endif |