On Thu, 15 Oct 2020 at 12:44, Alex Bennée alex.bennee@linaro.org wrote:
Alex Bennée via Stratos-dev stratos-dev@op-lists.linaro.org writes:
Hi Ulf,
Ilias told me you were the eMMC guru so your might be best placed to advise on this problem.
Ping?
This slipped through in my email filtering, my apologies.
Anyway, let me try to help.
<snip>
However I'm wary of adding an open ended pass-through definition, especially anything that might tempt an implementer to start trying to read and write data using eMMC commands instead of the proper virtio commands.
- What eMMC commands are needed for a probe?
I suggest you have a look at the mmc core in the kernel. More precisely:
drivers/mmc/core/core.c, drivers/mmc/core/mmc.c and drivers/mmc/core/mmc_ops.c. These files implement the eMMC specification, in principle.
Start following the path from the mmc_rescan() function, where you would end up in mmc_attach_mmc() after a while, which is the piece of code dealing with the eMMC card initializations.
Note that, depending on the greater speed mode you want to support, the more complicated becomes the initialization.
- What are the bounds of frame sizes for those commands?
Not sure what you mean by frame size here. Most of the initialization commands don't transmit any data from an I/O point of view, but are sent on a single command line.
In some cases, there are 512 bytes being transmitted on the 8 data lines, along with control commands on a separate line.
- I'm currently overloading the wasted stuff[196] bytes to the encapsulation and it would get complicated if we extended into the used fields.
No clue what you are talking about, sorry.
- Should we mandate certain responses?
The eMMC spec mandates the responses, so not sure what you propose.
- e.g. 0 "normal" size, eMMC version 4.1 etc
I clearly don't have the full context here, but I understand that you are looking at an abstraction layer above eMMC, but perhaps even block devices in general?
Seems I need to get a better picture, if I should be able to guide you in some direction.
We can run a HO or if you can point me to some other documentations!?
Kind regards Uffe