extern void rmm_delete(struct rmm_target_obj *target);
/*
- * ======== rmm_exit ========
- * Exit the RMM module
- *
- * Parameters:
- * Returns:
- * Requires:
- * rmm_init successfully called.
- * Ensures:
- */
-extern void rmm_exit(void);
-
-/*
* ======== rmm_free ========
* Free or unreserve memory allocated through rmm_alloc().
*
u32 size, bool reserved);
/*
- * ======== rmm_init ========
- * Initialize the RMM module
- *
- * Parameters:
- * Returns:
- * TRUE: Success.
- * FALSE: Failure.
- * Requires:
- * Ensures:
- */
-extern bool rmm_init(void);
-
-/*
* ======== rmm_stat ========
* Obtain memory segment status
*
msg_exit();
io_exit();
mgr_exit();
- rmm_exit();
}
}
{
bool ret = true;
bool fdev, fchnl, fmsg, fio;
- bool fmgr, frmm;
+ bool fmgr;
if (api_c_refs == 0) {
/* initialize driver and other modules */
fmgr = mgr_init();
- frmm = rmm_init();
fchnl = chnl_init();
fmsg = msg_mod_init();
fio = io_init();
fdev = dev_init();
ret = fdev && fchnl && fmsg && fio;
- ret = ret && fmgr && frmm;
+ ret = ret && fmgr;
if (!ret) {
if (fmgr)
if (fdev)
dev_exit();
-
- if (frmm)
- rmm_exit();
-
}
}
if (ret)
struct list_head ovly_list; /* List of overlay memory in use */
};
-static u32 refs; /* module reference count */
-
static bool alloc_block(struct rmm_target_obj *target, u32 segid, u32 size,
u32 align, u32 *dsp_address);
static bool free_block(struct rmm_target_obj *target, u32 segid, u32 addr,
}
/*
- * ======== rmm_exit ========
- */
-void rmm_exit(void)
-{
- refs--;
-}
-
-/*
* ======== rmm_free ========
*/
bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_addr, u32 size,
}
/*
- * ======== rmm_init ========
- */
-bool rmm_init(void)
-{
- refs++;
-
- return true;
-}
-
-/*
* ======== rmm_stat ========
*/
bool rmm_stat(struct rmm_target_obj *target, enum dsp_memtype segid,