From 24f927c527b01a5bce4c23428a008adf6ec052b4 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 27 Mar 2017 11:02:43 +0200 Subject: dm: test: Add test for device removal Add a test for the correct device removal. Currently two different ways for device removal are supported: - Normal device removal via the device_remove() API - Removal via selective device driver flags (DM_FLAG_ACTIVE_DMA) This new test "remove_active_dma" adds tests cases for those both ways of removal. This is done by adding a new test driver, which has this flag set. Signed-off-by: Stefan Roese Cc: Simon Glass --- test/dm/test-driver.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/dm/test-driver.c') diff --git a/test/dm/test-driver.c b/test/dm/test-driver.c index d10af51147..2b432a71fd 100644 --- a/test/dm/test-driver.c +++ b/test/dm/test-driver.c @@ -157,3 +157,14 @@ U_BOOT_DRIVER(test_pre_reloc_drv) = { .unbind = test_manual_unbind, .flags = DM_FLAG_PRE_RELOC, }; + +U_BOOT_DRIVER(test_act_dma_drv) = { + .name = "test_act_dma_drv", + .id = UCLASS_TEST, + .ops = &test_manual_ops, + .bind = test_manual_bind, + .probe = test_manual_probe, + .remove = test_manual_remove, + .unbind = test_manual_unbind, + .flags = DM_FLAG_ACTIVE_DMA, +}; -- cgit v1.2.3