Hi Matthijs,
Am 13.02.2017 um 02:38 schrieb Matthijs van Duin matthijsvanduin@gmail.com:
On 12 February 2017 at 21:49, H. Nikolaus Schaller hns@goldelico.com wrote: And write a proper (or at least simple) txs02612 driver that better controls the µSD/eMMC switch (including reset of the mmc stack, i.e. simulate card removal and reinsertion).
It should do no such thing. It should just multiplex requests,
Indeed. I just suggested that above because it seems to be easier to hack just a driver that provides a /sys control and writing "emmc" or "usd" to that would throw the switch to the other side and simulate swapping of cards.
but I'm pretty sure it could even switch to perform a request on the other card while it's waiting on BUSY. Basically like the old multi-card MMC bus worked, but using the switch instead of using the select-card command.
Yes, that is how it IMHO should be done (to provide both memory devices to user space in parallel), but I have no idea how the mmc core works and if it can be done at all...
That is the reason why I have just collected ideas for the architecture and not written any LOC.
Some tricky part could become that µSD is 4 bit wide and eMMC 8 bit. And eMMC is non-removable while µSD is removable. Well, since it is hidden under the battery we can treat it as non-removable for the beginning.
So it seems you have an idea how it could be done. Would you work a little on such a driver?
BR and thanks, Nikolaus