diff options
author | Simon Glass <sjg@chromium.org> | 2015-05-11 06:08:06 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-06-04 12:34:47 +0300 |
commit | 2bb02e4fe22da5d982867c26e369730ea901f999 (patch) | |
tree | 7ce0e1b0e588d1bc0ce31be2b863baede678d89f /test/dm/pci.c | |
parent | 8939df092e24abdf39edb6fbca90fe9c2b44c3b1 (diff) | |
download | u-boot-2bb02e4fe22da5d982867c26e369730ea901f999.tar.xz |
dm: pci: Allow PCI bus numbering aliases
Commit 9cc36a2 'dm: core: Add a flag to control sequence numbering' changed
the default uclass behaviour to not support bus numbering. This is incorrect
for PCI and that commit should have enabled the flag for PCI.
Enable it so that PCI buses can be found and the 'pci' command works again.
Also add a test for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm/pci.c')
-rw-r--r-- | test/dm/pci.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/dm/pci.c b/test/dm/pci.c index 2f3ae7941b..3ab4ba811c 100644 --- a/test/dm/pci.c +++ b/test/dm/pci.c @@ -21,6 +21,17 @@ static int dm_test_pci_base(struct unit_test_state *uts) } DM_TEST(dm_test_pci_base, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); +/* Test that sandbox PCI bus numbering works correctly */ +static int dm_test_pci_busnum(struct unit_test_state *uts) +{ + struct udevice *bus; + + ut_assertok(uclass_get_device_by_seq(UCLASS_PCI, 0, &bus)); + + return 0; +} +DM_TEST(dm_test_pci_busnum, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); + /* Test that we can use the swapcase device correctly */ static int dm_test_pci_swapcase(struct unit_test_state *uts) { |