| 1 |
|
| 2 |
|
| 3 |
#include <arch/cache.h> |
| 4 |
#include <soc/thermal.h> |
| 5 |
|
| 6 |
void thermal_cls_sram(void) |
| 7 |
{ |
| 8 |
int i = 0; |
| 9 |
const uint32_t pattern = 0x27BC86AA; |
| 10 |
uint32_t *buff = (uint32_t *)THERMAL_SRAM_BASE; |
| 11 |
for (i = 0; i < THERMAL_SRAM_LEN / sizeof(*buff); i++) { |
| 12 |
*buff = pattern; |
| 13 |
buff++; |
| 14 |
} |
| 15 |
dcache_clean_invalidate_by_mva((void *)THERMAL_SRAM_BASE, THERMAL_SRAM_LEN); |
| 16 |
} |
| 17 |
|
| 18 |
void thermal_stat_cls_sram(void) |
| 19 |
{ |
| 20 |
int i = 0; |
| 21 |
const uint32_t pattern = 0xFFFFFFFF; |
| 22 |
uint32_t *buff = (uint32_t *)THERMAL_STAT_SRAM_BASE; |
| 23 |
for (i = 0; i < THERMAL_STAT_SRAM_LEN / sizeof(*buff); i++) { |
| 24 |
*buff = pattern; |
| 25 |
buff++; |
| 26 |
} |
| 27 |
dcache_clean_invalidate_by_mva((void *)THERMAL_STAT_SRAM_BASE, THERMAL_STAT_SRAM_LEN); |
| 28 |
} |
| 29 |
|
| 30 |
__weak void thermal_write_reboot_temp_sram(uint32_t value) |
| 31 |
{ |
| 32 |
} |
| 33 |
|
| 34 |
__weak void thermal_write_reboot_msr_sram(unsigned int idx, uint32_t value) |
| 35 |
{ |
| 36 |
} |