Commit 2bb02e4fe22da5d982867c26e369730ea901f999
1 parent
8939df092e
Exists in
v2017.01-smarct4x
and in
34 other branches
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>
Showing 2 changed files with 12 additions and 0 deletions Side-by-side Diff
drivers/pci/pci-uclass.c
test/dm/pci.c
... | ... | @@ -21,6 +21,17 @@ |
21 | 21 | } |
22 | 22 | DM_TEST(dm_test_pci_base, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); |
23 | 23 | |
24 | +/* Test that sandbox PCI bus numbering works correctly */ | |
25 | +static int dm_test_pci_busnum(struct unit_test_state *uts) | |
26 | +{ | |
27 | + struct udevice *bus; | |
28 | + | |
29 | + ut_assertok(uclass_get_device_by_seq(UCLASS_PCI, 0, &bus)); | |
30 | + | |
31 | + return 0; | |
32 | +} | |
33 | +DM_TEST(dm_test_pci_busnum, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); | |
34 | + | |
24 | 35 | /* Test that we can use the swapcase device correctly */ |
25 | 36 | static int dm_test_pci_swapcase(struct unit_test_state *uts) |
26 | 37 | { |