]> git.baikalelectronics.ru Git - uboot.git/commit
mmc: fix error message for unaligned erase request
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Tue, 15 Feb 2022 15:23:22 +0000 (16:23 +0100)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 15 Jun 2022 06:34:18 +0000 (15:34 +0900)
commit75b1210c452fe83db44328d3e12e115af86a3636
tree71e19b5c5fd5fa7a65bd4f678ec9f49ee2797275
parentd9d03aeb9d0967eb9d52f6acbbf1650c3231b437
mmc: fix error message for unaligned erase request

Fix the end address in the message for unaligned erase request in
mmc_berase() when start + blkcnt is aligned to erase_grp_size.

for example:
  - start = 0x2000 - 26
  - count = 26
  - erase_grp_size = 0x400

  Caution! Your devices Erase group is 0x400
  The erase range would be change to 0x2000~0x27ff

But no issue when the end address is not aligned, for example
  - start = 0x2000 - 2 * 26
  - count = 26
  - erase_grp_size = 0x400

  Caution! Your devices Erase group is 0x400
  The erase range would be change to 0x2000~0x23ff

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
drivers/mmc/mmc_write.c