mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
mmc: core: Calculate the discard arg only once
In MMC, the discard arg is a read-only ext_csd parameter - set it once on card init. To be consistent, do that for SD as well even though its discard arg is always 0x0. Signed-off-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
a2b760a601
commit
01904ff776
6 changed files with 21 additions and 11 deletions
|
@ -277,6 +277,7 @@ struct mmc_card {
|
|||
unsigned int erase_shift; /* if erase unit is power 2 */
|
||||
unsigned int pref_erase; /* in sectors */
|
||||
unsigned int eg_boundary; /* don't cross erase-group boundaries */
|
||||
unsigned int erase_arg; /* erase / trim / discard */
|
||||
u8 erased_byte; /* value of erased bytes */
|
||||
|
||||
u32 raw_cid[4]; /* raw card CID */
|
||||
|
|
|
@ -91,4 +91,9 @@
|
|||
#define SD_SWITCH_ACCESS_DEF 0
|
||||
#define SD_SWITCH_ACCESS_HS 1
|
||||
|
||||
/*
|
||||
* Erase/discard
|
||||
*/
|
||||
#define SD_ERASE_ARG 0x00000000
|
||||
|
||||
#endif /* LINUX_MMC_SD_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue