diff options
author | Tom Rini <trini@konsulko.com> | 2023-10-06 17:23:47 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-10-06 17:23:47 -0400 |
commit | 83aa0ed1e93e1ffac24888d98d37a5b04ed3fb07 (patch) | |
tree | fcabaf4a86164f385ede03b654bc69cbffb2a3ee /test/dm/pci.c | |
parent | be2abe73df58a35da9e8d5afb13fccdf1b0faa8e (diff) | |
parent | f69d3d6d10b15872a279aeb10b7c522627aff6c2 (diff) |
Merge branch '2023-10-06-spl-prepare-for-universal-payload'
To quote the author:
This series tidies up SPL a little and adds some core ofnode functions
needed to support Universal Payload. It also includes a few minor
fix-ups for sandbox.
For SPL the changes include CONFIG naming, removing various #ifdefs and
tidying up the FIT code.
One notable piece of the ofnode improvements is support for flattening a
livetree. This should be useful in future as we move FDT fixups to use
the ofnode API.
Diffstat (limited to 'test/dm/pci.c')
-rw-r--r-- | test/dm/pci.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/test/dm/pci.c b/test/dm/pci.c index 70a736cfdb8..8c5e7da9e62 100644 --- a/test/dm/pci.c +++ b/test/dm/pci.c @@ -301,10 +301,12 @@ static int dm_test_pci_addr_flat(struct unit_test_state *uts) { struct udevice *swap1f, *swap1; ulong io_addr, mem_addr; + fdt_addr_t size; ut_assertok(dm_pci_bus_find_bdf(PCI_BDF(0, 0x1f, 0), &swap1f)); io_addr = dm_pci_read_bar32(swap1f, 0); - ut_asserteq(io_addr, dev_read_addr_pci(swap1f)); + ut_asserteq(io_addr, dev_read_addr_pci(swap1f, &size)); + ut_asserteq(0, size); /* * This device has both I/O and MEM spaces but the MEM space appears @@ -312,7 +314,8 @@ static int dm_test_pci_addr_flat(struct unit_test_state *uts) */ ut_assertok(dm_pci_bus_find_bdf(PCI_BDF(0, 0x1, 0), &swap1)); mem_addr = dm_pci_read_bar32(swap1, 1); - ut_asserteq(mem_addr, dev_read_addr_pci(swap1)); + ut_asserteq(mem_addr, dev_read_addr_pci(swap1, &size)); + ut_asserteq(0, size); return 0; } @@ -329,12 +332,15 @@ DM_TEST(dm_test_pci_addr_flat, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT | static int dm_test_pci_addr_live(struct unit_test_state *uts) { struct udevice *swap1f, *swap1; + fdt_size_t size; ut_assertok(dm_pci_bus_find_bdf(PCI_BDF(0, 0x1f, 0), &swap1f)); - ut_asserteq_64(FDT_ADDR_T_NONE, dev_read_addr_pci(swap1f)); + ut_asserteq_64(FDT_ADDR_T_NONE, dev_read_addr_pci(swap1f, &size)); + ut_asserteq(0, size); ut_assertok(dm_pci_bus_find_bdf(PCI_BDF(0, 0x1, 0), &swap1)); - ut_asserteq_64(FDT_ADDR_T_NONE, dev_read_addr_pci(swap1)); + ut_asserteq_64(FDT_ADDR_T_NONE, dev_read_addr_pci(swap1, &size)); + ut_asserteq(0, size); return 0; } |