Skip to content

Commit 5ad8154

Browse files
Stephen.Zhangkelvincheung
authored andcommitted
modify cache_invalid from before flash_read to after flash_write.
Signed-off-by: Stephen.Zhang <Stephen.Zhang@unisoc.com>
1 parent a7b377e commit 5ad8154

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

drivers/src/sfc/hal_sfc.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,9 +1306,6 @@ static int spiflash_read(struct spi_flash *flash, u32_t offset,
13061306
/* modify for xip-sfc */
13071307
key = irq_lock_primask();
13081308

1309-
cache_invalid_range_hal((u8_t *)(offset), len);
1310-
dcache_clean_range_hal((u8_t *)(offset), len);
1311-
13121309
ret = spiflash_read_data_xip(flash, offset, (u32_t *) &read_char,
13131310
dump_byte, type);
13141311
irq_unlock_primask(key);

soc/cache.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ static CACHE_BLOCK_OP_T C_ICACHE_DEFAULT_BLOCK_CFG[] = {
1212
{ BLOCK_1, 0x00100000, TRUE, FALSE },
1313
{ BLOCK_2, 0x001EE000, FALSE, FALSE },
1414
{ BLOCK_3, 0x02000000, TRUE, FALSE },
15-
{ BLOCK_4, 0x02400000, FALSE, FALSE },
16-
{ BLOCK_5, 0x02480000, FALSE, FALSE },
17-
{ BLOCK_6, 0x028B0000, FALSE, FALSE },
18-
{ BLOCK_7, 0x02900000, FALSE, FALSE },
15+
{ BLOCK_4, 0x04000000, FALSE, FALSE },
16+
{ BLOCK_5, 0x04480000, FALSE, FALSE },
17+
{ BLOCK_6, 0x048B0000, FALSE, FALSE },
18+
{ BLOCK_7, 0x04900000, FALSE, FALSE },
1919
};
2020

2121
static CACHE_BLOCK_OP_T C_DCACHE_DEFAULT_BLOCK_CFG[] = {
2222
{ BLOCK_0, 0x00000000, FALSE, FALSE },
2323
{ BLOCK_1, 0x00100000, FALSE, FALSE },
2424
{ BLOCK_2, 0x001EE000, FALSE, FALSE },
2525
{ BLOCK_3, 0x02000000, TRUE, FALSE },
26-
{ BLOCK_4, 0x02400000, FALSE, FALSE },
27-
{ BLOCK_5, 0x02480000, FALSE, FALSE },
28-
{ BLOCK_6, 0x028B0000, FALSE, FALSE },
29-
{ BLOCK_7, 0x02900000, FALSE, FALSE },
26+
{ BLOCK_4, 0x04000000, FALSE, FALSE },
27+
{ BLOCK_5, 0x04480000, FALSE, FALSE },
28+
{ BLOCK_6, 0x048B0000, FALSE, FALSE },
29+
{ BLOCK_7, 0x04900000, FALSE, FALSE },
3030
};
3131

3232
static u32_t icache_bus_cfg_addr[] = {

0 commit comments

Comments
 (0)