diff options
| author | Kory Maincent (TI.com) <[email protected]> | 2025-10-30 17:45:09 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-11-03 10:02:39 -0600 |
| commit | 2d12958ee71b5f400ff2045aebc9730e8e219340 (patch) | |
| tree | 2447f62064f3b70ede31887acc8b42c95fc6195a /test/boot | |
| parent | 6f5b839d5ee1ace365c3c1ba571db7f57bb48433 (diff) | |
boot: Remove legacy extension board support
Remove the legacy extension board implementation now that all boards
have been converted to use the new UCLASS-based framework. This
eliminates lines of legacy code while preserving functionality
through the modern driver model approach.
Update the bootstd tests, due to the removal of extension hunter.
Signed-off-by: Kory Maincent (TI.com) <[email protected]>
Diffstat (limited to 'test/boot')
| -rw-r--r-- | test/boot/bootdev.c | 32 | ||||
| -rw-r--r-- | test/boot/bootflow.c | 6 | ||||
| -rw-r--r-- | test/boot/bootstd_common.h | 4 |
3 files changed, 17 insertions, 25 deletions
diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c index a5f3d4462a9..0820bf10ee0 100644 --- a/test/boot/bootdev.c +++ b/test/boot/bootdev.c @@ -380,7 +380,6 @@ static int bootdev_test_hunter(struct unit_test_state *uts) ut_assert_nextline("Prio Used Uclass Hunter"); ut_assert_nextlinen("----"); ut_assert_nextline(" 6 ethernet eth_bootdev"); - ut_assert_nextline(" 1 simple_bus (none)"); ut_assert_nextline(" 5 ide ide_bootdev"); ut_assert_nextline(" 2 mmc mmc_bootdev"); ut_assert_nextline(" 4 nvme nvme_bootdev"); @@ -389,15 +388,15 @@ static int bootdev_test_hunter(struct unit_test_state *uts) ut_assert_nextline(" 4 spi_flash sf_bootdev"); ut_assert_nextline(" 5 usb usb_bootdev"); ut_assert_nextline(" 4 virtio virtio_bootdev"); - ut_assert_nextline("(total hunters: 10)"); + ut_assert_nextline("(total hunters: 9)"); ut_assert_console_end(); ut_assertok(bootdev_hunt("usb1", false)); ut_assert_skip_to_line("Bus usb@1: 5 USB Device(s) found"); ut_assert_console_end(); - /* USB is 7th in the list, so bit 8 */ - ut_asserteq(BIT(8), std->hunters_used); + /* USB is 8th in the list, so bit 7 */ + ut_asserteq(BIT(7), std->hunters_used); return 0; } @@ -418,7 +417,7 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assert_nextline("Prio Used Uclass Hunter"); ut_assert_nextlinen("----"); ut_assert_nextline(" 6 ethernet eth_bootdev"); - ut_assert_skip_to_line("(total hunters: 10)"); + ut_assert_skip_to_line("(total hunters: 9)"); ut_assert_console_end(); /* Use the MMC hunter and see that it updates */ @@ -426,7 +425,7 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assertok(run_command("bootdev hunt -l", 0)); ut_assert_skip_to_line(" 5 ide ide_bootdev"); ut_assert_nextline(" 2 * mmc mmc_bootdev"); - ut_assert_skip_to_line("(total hunters: 10)"); + ut_assert_skip_to_line("(total hunters: 9)"); ut_assert_console_end(); /* Scan all hunters */ @@ -436,8 +435,6 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assert_nextline("Hunting with: ethernet"); /* This is the extension feature which has no uclass at present */ - ut_assert_nextline("Hunting with: simple_bus"); - ut_assert_nextline("Found 2 extension board(s)."); ut_assert_nextline("Hunting with: ide"); /* mmc hunter has already been used so should not run again */ @@ -457,7 +454,6 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assert_nextlinen("Prio"); ut_assert_nextlinen("----"); ut_assert_nextline(" 6 * ethernet eth_bootdev"); - ut_assert_nextline(" 1 * simple_bus (none)"); ut_assert_nextline(" 5 * ide ide_bootdev"); ut_assert_nextline(" 2 * mmc mmc_bootdev"); ut_assert_nextline(" 4 * nvme nvme_bootdev"); @@ -466,7 +462,7 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assert_nextline(" 4 * spi_flash sf_bootdev"); ut_assert_nextline(" 5 * usb usb_bootdev"); ut_assert_nextline(" 4 * virtio virtio_bootdev"); - ut_assert_nextline("(total hunters: 10)"); + ut_assert_nextline("(total hunters: 9)"); ut_assert_console_end(); ut_asserteq(GENMASK(MAX_HUNTER, 0), std->hunters_used); @@ -490,7 +486,7 @@ static int bootdev_test_hunt_scan(struct unit_test_state *uts) ut_assertok(bootflow_scan_first(NULL, NULL, &iter, BOOTFLOWIF_SHOW | BOOTFLOWIF_HUNT | BOOTFLOWIF_SKIP_GLOBAL, &bflow)); - ut_asserteq(BIT(MMC_HUNTER) | BIT(1), std->hunters_used); + ut_asserteq(BIT(MMC_HUNTER), std->hunters_used); return 0; } @@ -650,8 +646,8 @@ static int bootdev_test_next_label(struct unit_test_state *uts) ut_asserteq_str("scsi.id0lun0.bootdev", dev->name); ut_asserteq(BOOTFLOW_METHF_SINGLE_UCLASS, mflags); - /* SCSI is 7th in the list, so bit 6 */ - ut_asserteq(BIT(MMC_HUNTER) | BIT(6), std->hunters_used); + /* SCSI is 6th in the list, so bit 5 */ + ut_asserteq(BIT(MMC_HUNTER) | BIT(5), std->hunters_used); ut_assertok(bootdev_next_label(&iter, &dev, &mflags)); ut_assert_console_end(); @@ -661,7 +657,7 @@ static int bootdev_test_next_label(struct unit_test_state *uts) mflags); /* dhcp: Ethernet is first so bit 0 */ - ut_asserteq(BIT(MMC_HUNTER) | BIT(6) | BIT(0), std->hunters_used); + ut_asserteq(BIT(MMC_HUNTER) | BIT(5) | BIT(0), std->hunters_used); ut_assertok(bootdev_next_label(&iter, &dev, &mflags)); ut_assert_console_end(); @@ -671,7 +667,7 @@ static int bootdev_test_next_label(struct unit_test_state *uts) mflags); /* pxe: Ethernet is first so bit 0 */ - ut_asserteq(BIT(MMC_HUNTER) | BIT(6) | BIT(0), std->hunters_used); + ut_asserteq(BIT(MMC_HUNTER) | BIT(5) | BIT(0), std->hunters_used); mflags = 123; ut_asserteq(-ENODEV, bootdev_next_label(&iter, &dev, &mflags)); @@ -679,7 +675,7 @@ static int bootdev_test_next_label(struct unit_test_state *uts) ut_assert_console_end(); /* no change */ - ut_asserteq(BIT(MMC_HUNTER) | BIT(6) | BIT(0), std->hunters_used); + ut_asserteq(BIT(MMC_HUNTER) | BIT(5) | BIT(0), std->hunters_used); return 0; } @@ -724,12 +720,10 @@ static int bootdev_test_next_prio(struct unit_test_state *uts) ut_assertok(bootdev_next_prio(&iter, &dev)); ut_asserteq_str("mmc2.bootdev", dev->name); - ut_assert_nextline("Hunting with: simple_bus"); - ut_assert_nextline("Found 2 extension board(s)."); ut_assert_nextline("Hunting with: mmc"); ut_assert_console_end(); - ut_asserteq(BIT(MMC_HUNTER) | BIT(1), std->hunters_used); + ut_asserteq(BIT(MMC_HUNTER), std->hunters_used); ut_assertok(bootdev_next_prio(&iter, &dev)); ut_asserteq_str("mmc1.bootdev", dev->name); diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c index 8de5a310add..e6a2537c15d 100644 --- a/test/boot/bootflow.c +++ b/test/boot/bootflow.c @@ -799,7 +799,7 @@ static int bootflow_cmd_hunt_single(struct unit_test_state *uts) ut_assert_console_end(); /* check that the hunter was used */ - ut_asserteq(BIT(MMC_HUNTER) | BIT(1), std->hunters_used); + ut_asserteq(BIT(MMC_HUNTER), std->hunters_used); return 0; } @@ -821,14 +821,12 @@ static int bootflow_cmd_hunt_label(struct unit_test_state *uts) ut_assertok(run_command("bootflow scan -l mmc", 0)); /* check that the hunter was used */ - ut_asserteq(BIT(MMC_HUNTER) | BIT(1), std->hunters_used); + ut_asserteq(BIT(MMC_HUNTER), std->hunters_used); /* check that we got the mmc1 bootflow */ ut_assert_nextline("Scanning for bootflows with label 'mmc'"); ut_assert_nextlinen("Seq"); ut_assert_nextlinen("---"); - ut_assert_nextline("Hunting with: simple_bus"); - ut_assert_nextline("Found 2 extension board(s)."); ut_assert_nextline("Hunting with: mmc"); ut_assert_nextline("Scanning bootdev 'mmc2.bootdev':"); ut_assert_nextline("Scanning bootdev 'mmc1.bootdev':"); diff --git a/test/boot/bootstd_common.h b/test/boot/bootstd_common.h index c61698adc02..dd769313a84 100644 --- a/test/boot/bootstd_common.h +++ b/test/boot/bootstd_common.h @@ -21,8 +21,8 @@ #define TEST_VERNUM 0x00010002 enum { - MAX_HUNTER = 9, - MMC_HUNTER = 3, /* ID of MMC hunter */ + MAX_HUNTER = 8, + MMC_HUNTER = 2, /* ID of MMC hunter */ }; struct unit_test_state; |
