On 6 February 2018 at 13:53, Philippe Mathieu-Daudé <f4...@amsat.org> wrote: > On 02/06/2018 10:06 AM, Peter Maydell wrote: >> How do you manage to get rid of sdbus_reparent_card()? Raspi >> needs it for its weirdo multiplexed SD controller setup, and >> AFAIK we don't have a way to say "this thing is hotpluggable >> but not by the user" yet... > > The card is hotpluggable, the bus isn't. > > An unique SDBus is created in the bcm2835_peripherals object (model > closer than hardware), sdhci/sdhost/gpio controllers use it via property > links. > What I don't do is checking the gpio selector (sd_fsel), hoping the > guest isn't nasty enough to use both SD controllers at once...
We do need to honour the sd_fsel -- otherwise newer Linux rpi kernels don't boot, because they want to use the non-default SD controller and they select it accordingly. At the moment this works using sdbus_reparent_card(). (I do vaguely recall looking at whether this could be done using hotplug but I forget why I decided it was a bad idea.) thanks -- PMM