mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
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>
This commit is contained in:
parent
6305db9604
commit
723b43daec
8 changed files with 0 additions and 31 deletions
|
@ -107,9 +107,6 @@ int ppa_init(void)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* flush cache after read */
|
|
||||||
flush_cache((ulong)fitp, cnt * 512);
|
|
||||||
|
|
||||||
ret = fdt_check_header(fitp);
|
ret = fdt_check_header(fitp);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
free(fitp);
|
free(fitp);
|
||||||
|
@ -134,9 +131,6 @@ int ppa_init(void)
|
||||||
}
|
}
|
||||||
debug("Read PPA header to 0x%p\n", ppa_hdr_ddr);
|
debug("Read PPA header to 0x%p\n", ppa_hdr_ddr);
|
||||||
|
|
||||||
/* flush cache after read */
|
|
||||||
flush_cache((ulong)ppa_hdr_ddr, cnt * 512);
|
|
||||||
|
|
||||||
ppa_esbc_hdr = (uintptr_t)ppa_hdr_ddr;
|
ppa_esbc_hdr = (uintptr_t)ppa_hdr_ddr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -164,9 +158,6 @@ int ppa_init(void)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* flush cache after read */
|
|
||||||
flush_cache((ulong)ppa_fit_addr, cnt * 512);
|
|
||||||
|
|
||||||
#elif defined(CONFIG_SYS_LS_PPA_FW_IN_NAND)
|
#elif defined(CONFIG_SYS_LS_PPA_FW_IN_NAND)
|
||||||
struct fdt_header fit;
|
struct fdt_header fit;
|
||||||
|
|
||||||
|
@ -208,9 +199,6 @@ int ppa_init(void)
|
||||||
}
|
}
|
||||||
debug("Read PPA header to 0x%p\n", ppa_hdr_ddr);
|
debug("Read PPA header to 0x%p\n", ppa_hdr_ddr);
|
||||||
|
|
||||||
/* flush cache after read */
|
|
||||||
flush_cache((ulong)ppa_hdr_ddr, fw_length);
|
|
||||||
|
|
||||||
ppa_esbc_hdr = (uintptr_t)ppa_hdr_ddr;
|
ppa_esbc_hdr = (uintptr_t)ppa_hdr_ddr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -232,9 +220,6 @@ int ppa_init(void)
|
||||||
CONFIG_SYS_LS_PPA_FW_ADDR);
|
CONFIG_SYS_LS_PPA_FW_ADDR);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* flush cache after read */
|
|
||||||
flush_cache((ulong)ppa_fit_addr, fw_length);
|
|
||||||
#else
|
#else
|
||||||
#error "No CONFIG_SYS_LS_PPA_FW_IN_xxx defined"
|
#error "No CONFIG_SYS_LS_PPA_FW_IN_xxx defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -129,8 +129,6 @@ static int tdx_cfg_block_mmc_storage(u8 *config_block, int write)
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
/* Flush cache after read */
|
|
||||||
flush_cache((ulong)(unsigned char *)config_block, 512);
|
|
||||||
} else {
|
} else {
|
||||||
/* Just writing one 512 byte block */
|
/* Just writing one 512 byte block */
|
||||||
if (blk_dwrite(mmc_get_blk_desc(mmc), blk_start, 1,
|
if (blk_dwrite(mmc_get_blk_desc(mmc), blk_start, 1,
|
||||||
|
|
|
@ -293,8 +293,6 @@ static int do_mmc_read(cmd_tbl_t *cmdtp, int flag,
|
||||||
curr_device, blk, cnt);
|
curr_device, blk, cnt);
|
||||||
|
|
||||||
n = blk_dread(mmc_get_blk_desc(mmc), blk, cnt, addr);
|
n = blk_dread(mmc_get_blk_desc(mmc), blk, cnt, addr);
|
||||||
/* flush cache after read */
|
|
||||||
flush_cache((ulong)addr, cnt * 512); /* FIXME */
|
|
||||||
printf("%d blocks read: %s\n", n, (n == cnt) ? "OK" : "ERROR");
|
printf("%d blocks read: %s\n", n, (n == cnt) ? "OK" : "ERROR");
|
||||||
|
|
||||||
return (n == cnt) ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
|
return (n == cnt) ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
|
||||||
|
|
|
@ -294,9 +294,6 @@ ulong blk_read_devnum(enum if_type if_type, int devnum, lbaint_t start,
|
||||||
if (IS_ERR_VALUE(n))
|
if (IS_ERR_VALUE(n))
|
||||||
return n;
|
return n;
|
||||||
|
|
||||||
/* flush cache after read */
|
|
||||||
flush_cache((ulong)buffer, blkcnt * desc->blksz);
|
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -232,9 +232,6 @@ ulong blk_read_devnum(enum if_type if_type, int devnum, lbaint_t start,
|
||||||
if (IS_ERR_VALUE(n))
|
if (IS_ERR_VALUE(n))
|
||||||
return n;
|
return n;
|
||||||
|
|
||||||
/* flush cache after read */
|
|
||||||
flush_cache((ulong)buffer, blkcnt * desc->blksz);
|
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -405,8 +405,6 @@ int fm_init_common(int index, struct ccsr_fman *reg)
|
||||||
mmc_init(mmc);
|
mmc_init(mmc);
|
||||||
(void)mmc->block_dev.block_read(&mmc->block_dev, blk, cnt,
|
(void)mmc->block_dev.block_read(&mmc->block_dev, blk, cnt,
|
||||||
addr);
|
addr);
|
||||||
/* flush cache after read */
|
|
||||||
flush_cache((ulong)addr, cnt * 512);
|
|
||||||
}
|
}
|
||||||
#elif defined(CONFIG_SYS_QE_FMAN_FW_IN_REMOTE)
|
#elif defined(CONFIG_SYS_QE_FMAN_FW_IN_REMOTE)
|
||||||
void *addr = (void *)CONFIG_SYS_FMAN_FW_ADDR;
|
void *addr = (void *)CONFIG_SYS_FMAN_FW_ADDR;
|
||||||
|
|
|
@ -177,8 +177,6 @@ void cs4340_upload_firmware(struct phy_device *phydev)
|
||||||
mmc_init(mmc);
|
mmc_init(mmc);
|
||||||
(void)mmc->block_dev.block_read(&mmc->block_dev, blk, cnt,
|
(void)mmc->block_dev.block_read(&mmc->block_dev, blk, cnt,
|
||||||
addr);
|
addr);
|
||||||
/* flush cache after read */
|
|
||||||
flush_cache((ulong)addr, cnt * 512);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -221,8 +221,6 @@ void u_qe_init(void)
|
||||||
mmc_init(mmc);
|
mmc_init(mmc);
|
||||||
(void)mmc->block_dev.block_read(&mmc->block_dev, blk, cnt,
|
(void)mmc->block_dev.block_read(&mmc->block_dev, blk, cnt,
|
||||||
addr);
|
addr);
|
||||||
/* flush cache after read */
|
|
||||||
flush_cache((ulong)addr, cnt * 512);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!u_qe_upload_firmware(addr))
|
if (!u_qe_upload_firmware(addr))
|
||||||
|
|
Loading…
Reference in a new issue