sculpt: add support for more than one mmc card

Instead of using one default policy when creating an mmc driver's
configuration, produce some more static policy items to support
boards with more than one card per driver (mnt_reform2).
This commit is contained in:
Stefan Kalkowski 2024-04-29 18:31:54 +02:00 committed by Christian Helmuth
parent 6710092bb4
commit 18511770bc

View File

@ -47,9 +47,14 @@ struct Sculpt::Mmc_driver : private Noncopyable
gen_provides<Block::Session>(xml);
xml.node("config", [&] {
xml.attribute("report", "yes");
xml.node("default-policy", [&] {
xml.attribute("device", "mmcblk0");
xml.attribute("writeable", "yes"); });
for (unsigned i = 0; i < 4; i++) {
String<64> name("mmcblk", i);
xml.node("policy", [&] {
xml.attribute("label", name);
xml.attribute("device", name);
xml.attribute("writeable", "yes");
});
}
});
xml.node("route", [&] {
gen_parent_route<Platform::Session>(xml);