Commit 483fdb05 authored by Hari Kanigeri's avatar Hari Kanigeri

SYSLINK:proc-fix in ducati enabler hw mmu module

This fixes the bug in hw mmu module where the
table entries that has memory segment information
was getting corrupted after first run. This bug
causes the consecutive runs to fail.
This patch also fixes the memory leak associated with
not calling iounmap and fixes a compile warning as one
of the function is unused.
Signed-off-by: default avatarHari Kanigeri <h-kanigeri2@ti.com>
parent 25456792
...@@ -976,6 +976,7 @@ static int add_dsp_mmu_entry(u32 *phys_addr, u32 *dsp_addr, ...@@ -976,6 +976,7 @@ static int add_dsp_mmu_entry(u32 *phys_addr, u32 *dsp_addr,
* and DSP-virtual address * and DSP-virtual address
* *
*/ */
#if 0
static int add_entry_ext(u32 *phys_addr, u32 *dsp_addr, static int add_entry_ext(u32 *phys_addr, u32 *dsp_addr,
u32 size) u32 size)
{ {
...@@ -1018,7 +1019,7 @@ static int add_entry_ext(u32 *phys_addr, u32 *dsp_addr, ...@@ -1018,7 +1019,7 @@ static int add_entry_ext(u32 *phys_addr, u32 *dsp_addr,
} }
return status; return status;
} }
#endif
/*================================ /*================================
* Initialize the Ducati MMU. * Initialize the Ducati MMU.
*/ */
...@@ -1032,6 +1033,7 @@ int ducati_mmu_init(u32 a_phy_addr) ...@@ -1032,6 +1033,7 @@ int ducati_mmu_init(u32 a_phy_addr)
u32 i = 0; u32 i = 0;
u32 map_attrs; u32 map_attrs;
u32 num_l3_mem_entries = 0; u32 num_l3_mem_entries = 0;
u32 virt_addr = 0;
#if 0 #if 0
u32 tiler_mapbeg = 0; u32 tiler_mapbeg = 0;
u32 tiler_totalsize = 0; u32 tiler_totalsize = 0;
...@@ -1071,9 +1073,8 @@ int ducati_mmu_init(u32 a_phy_addr) ...@@ -1071,9 +1073,8 @@ int ducati_mmu_init(u32 a_phy_addr)
DUCATI_MEM_IPC_HEAP0_ADDR) { DUCATI_MEM_IPC_HEAP0_ADDR) {
shm_phys_addr = phys_addr; shm_phys_addr = phys_addr;
} }
virt_addr = l3_memory_regions[i].ul_virt_addr;
ret_val = add_dsp_mmu_entry(&phys_addr, ret_val = add_dsp_mmu_entry(&phys_addr, &virt_addr,
(u32 *)(&(l3_memory_regions[i].ul_virt_addr)),
(l3_memory_regions[i].ul_size)); (l3_memory_regions[i].ul_size));
if (WARN_ON(ret_val < 0)) if (WARN_ON(ret_val < 0))
...@@ -1300,6 +1301,7 @@ void ducati_destroy(void) ...@@ -1300,6 +1301,7 @@ void ducati_destroy(void)
} }
if (p_pt_attrs) if (p_pt_attrs)
kfree((void *)p_pt_attrs); kfree((void *)p_pt_attrs);
iounmap((unsigned int *)base_ducati_l2_mmu);
return; return;
} }
EXPORT_SYMBOL(ducati_destroy); EXPORT_SYMBOL(ducati_destroy);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment