diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2010-11-10 12:09:04 -0600 |
---|---|---|
committer | Omar Ramirez Luna <omar.ramirez@ti.com> | 2010-11-10 18:34:42 -0600 |
commit | 677f2ded8179c8d5d49cfea0d5217691182b48f2 (patch) | |
tree | cd86a5425c72e8bc8e9c930bea43488c1253223d /drivers/staging/tidspbridge/rmgr/proc.c | |
parent | 3fc59af631643c9ea2d600e5a07b3fcaf4e38cbd (diff) | |
download | op-kernel-dev-677f2ded8179c8d5d49cfea0d5217691182b48f2.zip op-kernel-dev-677f2ded8179c8d5d49cfea0d5217691182b48f2.tar.gz |
Revert "staging: tidspbridge - remove dmm custom module"
This reverts commit 2ab573487a98c06fdfb34308f641f09369d61fa2.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Diffstat (limited to 'drivers/staging/tidspbridge/rmgr/proc.c')
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/proc.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c index 7a15a02..429f354 100644 --- a/drivers/staging/tidspbridge/rmgr/proc.c +++ b/drivers/staging/tidspbridge/rmgr/proc.c @@ -39,6 +39,7 @@ #include <dspbridge/cod.h> #include <dspbridge/dev.h> #include <dspbridge/procpriv.h> +#include <dspbridge/dmm.h> /* ----------------------------------- Resource Manager */ #include <dspbridge/mgr.h> @@ -1077,6 +1078,7 @@ int proc_load(void *hprocessor, const s32 argc_index, s32 cnew_envp; /* " " in new_envp[] */ s32 nproc_id = 0; /* Anticipate MP version. */ struct dcd_manager *hdcd_handle; + struct dmm_object *dmm_mgr; u32 dw_ext_end; u32 proc_id; int brd_state; @@ -1267,6 +1269,25 @@ int proc_load(void *hprocessor, const s32 argc_index, if (!status) status = cod_get_sym_value(cod_mgr, EXTEND, &dw_ext_end); + + /* Reset DMM structs and add an initial free chunk */ + if (!status) { + status = + dev_get_dmm_mgr(p_proc_object->hdev_obj, + &dmm_mgr); + if (dmm_mgr) { + /* Set dw_ext_end to DMM START u8 + * address */ + dw_ext_end = + (dw_ext_end + 1) * DSPWORDSIZE; + /* DMM memory is from EXT_END */ + status = dmm_create_tables(dmm_mgr, + dw_ext_end, + DMMPOOLSIZE); + } else { + status = -EFAULT; + } + } } } /* Restore the original argv[0] */ @@ -1369,6 +1390,7 @@ int proc_map(void *hprocessor, void *pmpu_addr, u32 ul_size, map_obj->dsp_addr = (va_align | ((u32)pmpu_addr & (PG_SIZE4K - 1))); *pp_map_addr = (void *)map_obj->dsp_addr; + pr_err("%s: mapped address %x\n", __func__, *pp_map_addr); } else { remove_mapping_information(pr_ctxt, va_align); } @@ -1611,6 +1633,7 @@ int proc_un_map(void *hprocessor, void *map_addr, int status = 0; struct proc_object *p_proc_object = (struct proc_object *)hprocessor; u32 va_align; + u32 size_align; va_align = PG_ALIGN_LOW((u32) map_addr, PG_SIZE4K); if (!p_proc_object) { |