mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-06 17:30:35 +01:00
qca: cache: Enabled dcache on board initialization
dcache is enabled only during boot from flash. During JTAG recovery, dcache_enable is skipped to avoid cache issues in recovery environment. Change-Id: Ie3003f67c787cbc6b88dc42017aeb2a9508d2ff9 Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
This commit is contained in:
parent
4a788032d8
commit
19a90604e9
4 changed files with 16 additions and 1 deletions
|
|
@ -294,12 +294,24 @@ void report_l2err(u32 l2esr)
|
|||
|
||||
void enable_caches(void)
|
||||
{
|
||||
qca_smem_flash_info_t *sfi = &qca_smem_flash_info;
|
||||
|
||||
smem_get_boot_flash(&sfi->flash_type,
|
||||
&sfi->flash_index,
|
||||
&sfi->flash_chip_select,
|
||||
&sfi->flash_block_size,
|
||||
&sfi->flash_density);
|
||||
|
||||
icache_enable();
|
||||
/*Skips dcache_enable during JTAG recovery */
|
||||
if (sfi->flash_type)
|
||||
dcache_enable();
|
||||
}
|
||||
|
||||
void disable_caches(void)
|
||||
{
|
||||
icache_disable();
|
||||
dcache_disable();
|
||||
}
|
||||
|
||||
__weak void clear_l2cache_err(void)
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ typedef struct {
|
|||
* size is configured to 64 */
|
||||
#define CONFIG_SYS_CACHELINE_SIZE 64
|
||||
#define CONFIG_SYS_DCACHE_OFF
|
||||
#define CONFIG_CMD_CACHE
|
||||
|
||||
#define CONFIG_QCA_BAM 1
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -332,6 +332,7 @@ typedef struct {
|
|||
* size is configured to 64 */
|
||||
#define CONFIG_SYS_CACHELINE_SIZE 64
|
||||
#define CONFIG_SYS_DCACHE_OFF
|
||||
#define CONFIG_CMD_CACHE
|
||||
|
||||
/* Enabling this flag will report any L2 errors.
|
||||
* By default we are disabling it */
|
||||
|
|
|
|||
|
|
@ -325,7 +325,8 @@ extern loff_t board_env_size;
|
|||
* Cache flush and invalidation based on L1 cache, so the cache line
|
||||
* size is configured to 64 */
|
||||
#define CONFIG_SYS_CACHELINE_SIZE 64
|
||||
/*#define CONFIG_SYS_DCACHE_OFF*/
|
||||
#define CONFIG_SYS_DCACHE_OFF
|
||||
#define CONFIG_CMD_CACHE
|
||||
|
||||
/* Enabling this flag will report any L2 errors.
|
||||
* By default we are disabling it */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue