[SeaBIOS] [patch] sdcard: skip detection of PCI sdhci controllers if etc/sdcard used
Matt DeVillier
matt.devillier at gmail.com
Thu Mar 10 07:38:14 CET 2016
Some BayTrail ChromeOS devices have the eMMC controller hidden (thus
requiring the use of etc/sdcard), while others do not, making it
problematic to have a single payload which serves all devices properly.
Therefore, if the CBFS contains etc/sdcard entries, skip detection of
any visible PCI sdhci controllers in order to avoid duplicate entries in
the boot menu.
patch implementation suggested by Kevin O'Connor :)
Signed-off-by: Matt DeVillier <matt.devillier at gmail.com>
---
src/hw/sdcard.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/hw/sdcard.c b/src/hw/sdcard.c
index 7e0875f..32cdb14 100644
--- a/src/hw/sdcard.c
+++ b/src/hw/sdcard.c
@@ -557,11 +557,14 @@ sdcard_setup(void)
run_thread(sdcard_romfile_setup, file);
}
- struct pci_device *pci;
- foreachpci(pci) {
- if (pci->class != PCI_CLASS_SYSTEM_SDHCI || pci->prog_if >= 2)
- // Not an SDHCI controller following SDHCI spec
- continue;
- run_thread(sdcard_pci_setup, pci);
+ //only scan for PCI controllers if etc/sdcard* not used
+ if (file == NULL) {
+ struct pci_device *pci;
+ foreachpci(pci) {
+ if (pci->class != PCI_CLASS_SYSTEM_SDHCI || pci->prog_if >= 2)
+ // Not an SDHCI controller following SDHCI spec
+ continue;
+ run_thread(sdcard_pci_setup, pci);
+ }
}
}
--
2.5.0
More information about the SeaBIOS
mailing list