summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-08-12 18:47:53 -0400
committerTom Rini <trini@konsulko.com>2019-08-12 18:47:53 -0400
commit9c6115822e894ead72fa4c094bf718eaabb9e103 (patch)
tree4f8843a5cfbe2895a168d96dee111dd31e443b2a /test
parent5939afc9611e8ba4a86b96e67670b765ee27668e (diff)
parent0805fe151d8c47cfbcfddf71c0891ed4f3c10b56 (diff)
downloadu-boot-9c6115822e894ead72fa4c094bf718eaabb9e103.tar.gz
Merge branch '2019-08-11-ti-imports'
- More DaVinci updates and fixes - PCIe support on am65x - Watchdog converted to DM - Assorted other bugfixes
Diffstat (limited to 'test')
-rw-r--r--test/dm/clk.c1
-rw-r--r--test/dm/test-fdt.c16
2 files changed, 13 insertions, 4 deletions
diff --git a/test/dm/clk.c b/test/dm/clk.c
index f301ecbb45..676ef217f0 100644
--- a/test/dm/clk.c
+++ b/test/dm/clk.c
@@ -24,6 +24,7 @@ static int dm_test_clk_base(struct unit_test_state *uts)
/* Get the same clk port in 2 different ways and compare */
ut_assertok(clk_get_by_index(dev, 1, &clk_method1));
ut_assertok(clk_get_by_index_nodev(dev_ofnode(dev), 1, &clk_method2));
+ ut_asserteq(clk_is_match(&clk_method1, &clk_method2), true);
ut_asserteq(clk_method1.id, clk_method2.id);
return 0;
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index ad8591639d..1fb8b5c248 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -549,12 +549,14 @@ static int dm_test_fdt_remap_addr_index_flat(struct unit_test_state *uts)
{
struct udevice *dev;
fdt_addr_t addr;
+ fdt_size_t size;
void *paddr;
ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
- addr = devfdt_get_addr_index(dev, 0);
+ addr = devfdt_get_addr_size_index(dev, 0, &size);
ut_asserteq(0x8000, addr);
+ ut_asserteq(0x1000, size);
paddr = map_physmem(addr, 0, MAP_NOCACHE);
ut_assertnonnull(paddr);
@@ -569,12 +571,14 @@ static int dm_test_fdt_remap_addr_name_flat(struct unit_test_state *uts)
{
struct udevice *dev;
fdt_addr_t addr;
+ fdt_size_t size;
void *paddr;
ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
- addr = devfdt_get_addr_name(dev, "sandbox-dummy-0");
+ addr = devfdt_get_addr_size_name(dev, "sandbox-dummy-0", &size);
ut_asserteq(0x8000, addr);
+ ut_asserteq(0x1000, size);
paddr = map_physmem(addr, 0, MAP_NOCACHE);
ut_assertnonnull(paddr);
@@ -609,12 +613,14 @@ static int dm_test_fdt_remap_addr_index_live(struct unit_test_state *uts)
{
struct udevice *dev;
fdt_addr_t addr;
+ fdt_size_t size;
void *paddr;
ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
- addr = dev_read_addr_index(dev, 0);
+ addr = dev_read_addr_size_index(dev, 0, &size);
ut_asserteq(0x8000, addr);
+ ut_asserteq(0x1000, size);
paddr = map_physmem(addr, 0, MAP_NOCACHE);
ut_assertnonnull(paddr);
@@ -629,12 +635,14 @@ static int dm_test_fdt_remap_addr_name_live(struct unit_test_state *uts)
{
struct udevice *dev;
fdt_addr_t addr;
+ fdt_size_t size;
void *paddr;
ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev));
- addr = dev_read_addr_name(dev, "sandbox-dummy-0");
+ addr = dev_read_addr_size_name(dev, "sandbox-dummy-0", &size);
ut_asserteq(0x8000, addr);
+ ut_asserteq(0x1000, size);
paddr = map_physmem(addr, 0, MAP_NOCACHE);
ut_assertnonnull(paddr);