mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
[MMC] Improve MMC card block size selection
Select a block size for IO based on the read and write block size combinations, and whether the card supports partial block reads and/or partial block writes. If we are able to satisfy block reads but not block writes, mark the device read only. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
88026842b0
commit
a6f6c96b65
3 changed files with 137 additions and 71 deletions
|
@ -30,7 +30,12 @@ struct mmc_csd {
|
|||
unsigned int tacc_ns;
|
||||
unsigned int max_dtr;
|
||||
unsigned int read_blkbits;
|
||||
unsigned int write_blkbits;
|
||||
unsigned int capacity;
|
||||
unsigned int read_partial:1,
|
||||
read_misalign:1,
|
||||
write_partial:1
|
||||
write_misalign:1;
|
||||
};
|
||||
|
||||
struct sd_scr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue