3131
3232#include <sof/alloc.h>
3333
34- #if defined(CONFIG_APOLLOLAKE )
35- #define TOTAL_HEAP_SIZE (HEAP_SYSTEM_SIZE + HEAP_RUNTIME_SIZE + \
36- HEAP_HP_BUFFER_SIZE + HEAP_LP_BUFFER_SIZE)
37- #elif defined(CONFIG_CANNONLAKE )
38- #define TOTAL_HEAP_SIZE (HEAP_SYSTEM_SIZE + HEAP_RUNTIME_SIZE + \
39- HEAP_BUFFER_SIZE)
40- #endif
41-
4234/* Heap blocks for modules */
4335static struct block_hdr mod_block16 [HEAP_RT_COUNT16 ];
4436static struct block_hdr mod_block32 [HEAP_RT_COUNT32 ];
4537static struct block_hdr mod_block64 [HEAP_RT_COUNT64 ];
4638static struct block_hdr mod_block128 [HEAP_RT_COUNT128 ];
4739static struct block_hdr mod_block256 [HEAP_RT_COUNT256 ];
4840static struct block_hdr mod_block512 [HEAP_RT_COUNT512 ];
49- static struct block_hdr mod_block1024 [HEAP_RT_COUNT1024 ];
5041
5142/* Heap memory map for modules */
5243static struct block_map rt_heap_map [] = {
@@ -56,7 +47,6 @@ static struct block_map rt_heap_map[] = {
5647 BLOCK_DEF (128 , HEAP_RT_COUNT128 , mod_block128 ),
5748 BLOCK_DEF (256 , HEAP_RT_COUNT256 , mod_block256 ),
5849 BLOCK_DEF (512 , HEAP_RT_COUNT512 , mod_block512 ),
59- BLOCK_DEF (1024 , HEAP_RT_COUNT1024 , mod_block1024 ),
6050};
6151
6252/* Heap blocks for buffers */
@@ -123,5 +113,7 @@ struct mm memmap = {
123113 .caps = SOF_MEM_CAPS_RAM | SOF_MEM_CAPS_LP |
124114 SOF_MEM_CAPS_CACHE | SOF_MEM_CAPS_DMA ,
125115 },
126- .total = {.free = TOTAL_HEAP_SIZE ,},
116+ .total = {.free = HEAP_SYSTEM_SIZE + HEAP_RUNTIME_SIZE +
117+ HEAP_BUFFER_SIZE + HEAP_HP_BUFFER_SIZE +
118+ HEAP_LP_BUFFER_SIZE ,},
127119};
0 commit comments