]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mmc: sd: Add Extension memory addressing
authorAvri Altman <avri.altman@wdc.com>
Sun, 6 Oct 2024 05:11:40 +0000 (08:11 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 14 Oct 2024 10:29:01 +0000 (12:29 +0200)
commit375b535941bea65b37451f0fd398e28bf4f3bdc3
tree52aa2d9458ba351d1822c3f30dbf11e8c5003a0c
parentfce2ce78af1e14dc1316aaddb5b3308be05cf452
mmc: sd: Add Extension memory addressing

SDUC memory addressing spans beyond 2TB and up to 128TB.  Therefore, 38
bits are required to access the entire memory space of all sectors.
Those extra 6 bits are to be carried by CMD22 prior of sending
read/write/erase commands: CMD17, CMD18, CMD24, CMD25, CMD32, and CMD33.

CMD22 will carry the higher order 6 bits, and must precedes any of the
above commands even if it targets sector < 2TB.

No error related to address or length is indicated in CMD22 but rather
in the read/write command itself.

Tested-by: Ricky WU <ricky_wu@realtek.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20241006051148.160278-3-avri.altman@wdc.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/sd_ops.c
drivers/mmc/core/sd_ops.h
include/linux/mmc/sd.h