Commit 723b43daec7ee2ddb600cfcb9b0253d4a71c3915
Committed by
Tom Rini
1 parent
6305db9604
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
blk: Remove various places that do flush cache after read
All these places seem to inherit the codes from the MMC driver where a FIXME was put in the comment. However the correct operation after read should be cache invalidate, not flush. The underlying drivers should be responsible for the cache operation. Remove these codes completely. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: York Sun <york.sun@nxp.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: York Sun <york.sun@nxp.com>
Showing 8 changed files with 0 additions and 31 deletions Side-by-side Diff
arch/arm/cpu/armv8/fsl-layerscape/ppa.c
... | ... | @@ -107,9 +107,6 @@ |
107 | 107 | return -EIO; |
108 | 108 | } |
109 | 109 | |
110 | - /* flush cache after read */ | |
111 | - flush_cache((ulong)fitp, cnt * 512); | |
112 | - | |
113 | 110 | ret = fdt_check_header(fitp); |
114 | 111 | if (ret) { |
115 | 112 | free(fitp); |
... | ... | @@ -134,9 +131,6 @@ |
134 | 131 | } |
135 | 132 | debug("Read PPA header to 0x%p\n", ppa_hdr_ddr); |
136 | 133 | |
137 | - /* flush cache after read */ | |
138 | - flush_cache((ulong)ppa_hdr_ddr, cnt * 512); | |
139 | - | |
140 | 134 | ppa_esbc_hdr = (uintptr_t)ppa_hdr_ddr; |
141 | 135 | #endif |
142 | 136 | |
... | ... | @@ -164,9 +158,6 @@ |
164 | 158 | return -EIO; |
165 | 159 | } |
166 | 160 | |
167 | - /* flush cache after read */ | |
168 | - flush_cache((ulong)ppa_fit_addr, cnt * 512); | |
169 | - | |
170 | 161 | #elif defined(CONFIG_SYS_LS_PPA_FW_IN_NAND) |
171 | 162 | struct fdt_header fit; |
172 | 163 | |
... | ... | @@ -208,9 +199,6 @@ |
208 | 199 | } |
209 | 200 | debug("Read PPA header to 0x%p\n", ppa_hdr_ddr); |
210 | 201 | |
211 | - /* flush cache after read */ | |
212 | - flush_cache((ulong)ppa_hdr_ddr, fw_length); | |
213 | - | |
214 | 202 | ppa_esbc_hdr = (uintptr_t)ppa_hdr_ddr; |
215 | 203 | #endif |
216 | 204 | |
... | ... | @@ -232,9 +220,6 @@ |
232 | 220 | CONFIG_SYS_LS_PPA_FW_ADDR); |
233 | 221 | return -EIO; |
234 | 222 | } |
235 | - | |
236 | - /* flush cache after read */ | |
237 | - flush_cache((ulong)ppa_fit_addr, fw_length); | |
238 | 223 | #else |
239 | 224 | #error "No CONFIG_SYS_LS_PPA_FW_IN_xxx defined" |
240 | 225 | #endif |
board/toradex/common/tdx-cfg-block.c
cmd/mmc.c
... | ... | @@ -293,8 +293,6 @@ |
293 | 293 | curr_device, blk, cnt); |
294 | 294 | |
295 | 295 | n = blk_dread(mmc_get_blk_desc(mmc), blk, cnt, addr); |
296 | - /* flush cache after read */ | |
297 | - flush_cache((ulong)addr, cnt * 512); /* FIXME */ | |
298 | 296 | printf("%d blocks read: %s\n", n, (n == cnt) ? "OK" : "ERROR"); |
299 | 297 | |
300 | 298 | return (n == cnt) ? CMD_RET_SUCCESS : CMD_RET_FAILURE; |
drivers/block/blk-uclass.c
drivers/block/blk_legacy.c
drivers/net/fm/fm.c
... | ... | @@ -405,8 +405,6 @@ |
405 | 405 | mmc_init(mmc); |
406 | 406 | (void)mmc->block_dev.block_read(&mmc->block_dev, blk, cnt, |
407 | 407 | addr); |
408 | - /* flush cache after read */ | |
409 | - flush_cache((ulong)addr, cnt * 512); | |
410 | 408 | } |
411 | 409 | #elif defined(CONFIG_SYS_QE_FMAN_FW_IN_REMOTE) |
412 | 410 | void *addr = (void *)CONFIG_SYS_FMAN_FW_ADDR; |
drivers/net/phy/cortina.c
drivers/qe/qe.c