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) <kory.maincent@bootlin.com>
This commit is contained in:
Kory Maincent (TI.com)
2025-11-03 10:02:39 -06:00
committed by Tom Rini
parent 6f5b839d5e
commit 2d12958ee7
19 changed files with 59 additions and 256 deletions
+13 -19
View File
@@ -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);