mmcsd: replace cmd12(stop transimission) with cmd23(set block count)
Summary
Impact
Testing
Please fill the Summary/Impact/Testing fields. Please include explanation why to replace CMD12 with CMD23, what is the needs or advantage of doing it.
OK, I will add it in the next few days after I have time, thanks
Please fill the Summary/Impact/Testing fields. Please include explanation why to replace CMD12 with CMD23, what is the needs or advantage of doing it.
CMD12 support should not be replaced or removed. Some cards do not support CMD23. If the cards are removable, this support should be determined at runtime. The driver should check BIT 33 in the SCR register to see if the card supports the command.
Please fill the Summary/Impact/Testing fields. Please include explanation why to replace CMD12 with CMD23, what is the needs or advantage of doing it.
CMD12 support should not be replaced or removed. Some cards do not support CMD23. If the cards are removable, this support should be determined at runtime. The driver should check BIT 33 in the SCR register to see if the card supports the command.
@ldube
hello ldube, do you mean I should add code like this, and then check if priv->cmd_support is zero or not in mmcsd_writemultiple function ?
@gneworld Yes, but I would separate CMD20 and CMD23 bits. CMD23 is bit 33 so you should be testing only one bit.
#ifdef CONFIG_CMD23_SUPPORT
priv->cmd23_support = ...
#endif
CMD23 support should be off by default.
If a user inserts a card without CMD23 support the behavior of the driver should be identical to what we have today whether CONFIG_CMD23_SUPPORT is defined or not.
The value of cmd23_support should be zero for cards without CMD23 support. The value of cmd23_support should be zero for all cards if CONFIG_CMD23_SUPPORT is not enabled. If cmd23_support is zero the sd driver should act like it did before your change.
@ldube Are you sure that bit 33 being 1 definitely indicates support for cmd23? Is it possible that some manufacturers use this bit as a flag for supporting other commands?
I got that from a 2010 document :( I can't guarantee anything, I have not used this feature. Please double check in a new spec if you can find it.
Please fill the Summary/Impact/Testing fields. Please include explanation why to replace CMD12 with CMD23, what is the needs or advantage of doing it.
@acassis
I have fill the Summary/Impact/Testing fields, maybe I should make cmd12 and cmd23 compatible instead of getting rid of it, thanks
@acassis @ldube please make a review again, thanks