xtensa: disable unused memory power down
The current unused memory calculation is broken because it doesn't take into account the stack area, allocated at the top of HP SRAM. Until this is fixed disable powering down unused RAM. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
80f9daab9f
commit
bf361c0667
1 changed files with 9 additions and 0 deletions
|
@ -27,6 +27,7 @@ extern void __start(void);
|
|||
|
||||
#if !defined(CONFIG_SOC_INTEL_S1000)
|
||||
#define MANIFEST_SEGMENT_COUNT 3
|
||||
#undef UNUSED_MEMORY_CALCULATION_HAS_BEEN_FIXED
|
||||
|
||||
static inline void idelay(int n)
|
||||
{
|
||||
|
@ -125,6 +126,7 @@ static void parse_module(struct sof_man_fw_header *hdr,
|
|||
#define MAN_SKIP_ENTRIES 1
|
||||
#endif
|
||||
|
||||
#ifdef UNUSED_MEMORY_CALCULATION_HAS_BEEN_FIXED
|
||||
static uint32_t get_fw_size_in_use(void)
|
||||
{
|
||||
struct sof_man_fw_desc *desc =
|
||||
|
@ -153,6 +155,7 @@ static uint32_t get_fw_size_in_use(void)
|
|||
|
||||
return fw_size_in_use;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* parse FW manifest and copy modules */
|
||||
static void parse_manifest(void)
|
||||
|
@ -256,11 +259,13 @@ static uint32_t hp_sram_power_on_memory(uint32_t memory_size)
|
|||
return hp_sram_pm_banks(ebb_in_use);
|
||||
}
|
||||
|
||||
#ifdef UNUSED_MEMORY_CALCULATION_HAS_BEEN_FIXED
|
||||
static int32_t hp_sram_power_off_unused_banks(uint32_t memory_size)
|
||||
{
|
||||
/* keep enabled only memory banks used by FW */
|
||||
return hp_sram_power_on_memory(memory_size);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int32_t hp_sram_init(void)
|
||||
{
|
||||
|
@ -269,10 +274,12 @@ static int32_t hp_sram_init(void)
|
|||
|
||||
#else
|
||||
|
||||
#ifdef UNUSED_MEMORY_CALCULATION_HAS_BEEN_FIXED
|
||||
static int32_t hp_sram_power_off_unused_banks(uint32_t memory_size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static uint32_t hp_sram_init(void)
|
||||
{
|
||||
|
@ -340,7 +347,9 @@ void boot_master_core(void)
|
|||
/* parse manifest and copy modules */
|
||||
parse_manifest();
|
||||
|
||||
#ifdef UNUSED_MEMORY_CALCULATION_HAS_BEEN_FIXED
|
||||
hp_sram_power_off_unused_banks(get_fw_size_in_use());
|
||||
#endif
|
||||
#endif
|
||||
/* now call SOF entry */
|
||||
__start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue