]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
test: regmap: Increase size of syscon0 memory
authorMario Six <mario.six@gdsys.cc>
Thu, 4 Oct 2018 07:00:40 +0000 (09:00 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 14 Nov 2018 17:16:27 +0000 (09:16 -0800)
The upcoming changes to the regmap interface will contain a proper check
for plausibility when reading/writing from/to a register map. To still
have the current tests pass, increase the size of the memory region for
the syscon0 device, since one of the tests reads and writes beyond this
range.

Reviewed-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
arch/sandbox/dts/test.dts
test/dm/regmap.c

index ffc93d05ba127d3a212c40be92d81dc6e5e4d8fc..71d1b3902259afe1fd012d81c6e3ba48cf271f18 100644 (file)
 
        syscon@0 {
                compatible = "sandbox,syscon0";
-               reg = <0x10 4>;
+               reg = <0x10 16>;
        };
 
        syscon@1 {
index d4b86b3b03c2a61bd5b55100cf58f66fe0961f74..b28d6a6cd11ebf02d7a7c5abd20e6bfeade58ee0 100644 (file)
@@ -25,7 +25,7 @@ static int dm_test_regmap_base(struct unit_test_state *uts)
        ut_assertok_ptr(map);
        ut_asserteq(1, map->range_count);
        ut_asserteq(0x10, map->ranges[0].start);
-       ut_asserteq(4, map->ranges[0].size);
+       ut_asserteq(16, map->ranges[0].size);
        ut_asserteq(0x10, map_to_sysmem(regmap_get_range(map, 0)));
 
        ut_assertok(uclass_get_device(UCLASS_SYSCON, 1, &dev));