summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorFrank Rowand <frank.rowand@sony.com>2021-12-12 16:18:52 -0600
committerRob Herring <robh@kernel.org>2021-12-15 16:37:02 -0600
commit9fd4cf5d3571b27d746b8ead494a3f051485b679 (patch)
treea2ae47c3de6f9b0a76bbb3098ba927022d22190c /drivers/of
parenta8d61a9112ad0c9216ab45d050991e07bc4f3408 (diff)
of: unittest: 64 bit dma address test requires arch support
If an architecture does not support 64 bit dma addresses then testing for an expected dma address >= 0x100000000 will fail. Fixes: e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset") Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20211212221852.233295-1-frowand.list@gmail.com
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/unittest.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 02c5cd06ad19..35af4fedc15d 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -942,8 +942,9 @@ static void __init of_unittest_parse_dma_ranges(void)
{
of_unittest_dma_ranges_one("/testcase-data/address-tests/device@70000000",
0x0, 0x20000000);
- of_unittest_dma_ranges_one("/testcase-data/address-tests/bus@80000000/device@1000",
- 0x100000000, 0x20000000);
+ if (IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT))
+ of_unittest_dma_ranges_one("/testcase-data/address-tests/bus@80000000/device@1000",
+ 0x100000000, 0x20000000);
of_unittest_dma_ranges_one("/testcase-data/address-tests/pci@90000000",
0x80000000, 0x20000000);
}