Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
cmm.c File Reference
#include <linux/types.h>
#include <linux/list.h>
#include <dspbridge/dbdefs.h>
#include <dspbridge/sync.h>
#include <dspbridge/dev.h>
#include <dspbridge/proc.h>
#include <dspbridge/cmm.h>

Go to the source code of this file.

Data Structures

struct  cmm_allocator
 
struct  cmm_xlator
 
struct  cmm_object
 
struct  cmm_mnode
 

Macros

#define NEXT_PA(pnode)   (pnode->pa + pnode->size)
 
#define DSPPA2GPPPA(base, x, y)   ((x)+(y))
 
#define GPPPA2DSPPA(base, x, y)   ((x)-(y))
 

Functions

voidcmm_calloc_buf (struct cmm_object *hcmm_mgr, u32 usize, struct cmm_attrs *pattrs, void **pp_buf_va)
 
int cmm_create (struct cmm_object **ph_cmm_mgr, struct dev_object *hdev_obj, const struct cmm_mgrattrs *mgr_attrts)
 
int cmm_destroy (struct cmm_object *hcmm_mgr, bool force)
 
int cmm_free_buf (struct cmm_object *hcmm_mgr, void *buf_pa, u32 ul_seg_id)
 
int cmm_get_handle (void *hprocessor, struct cmm_object **ph_cmm_mgr)
 
int cmm_get_info (struct cmm_object *hcmm_mgr, struct cmm_info *cmm_info_obj)
 
int cmm_register_gppsm_seg (struct cmm_object *hcmm_mgr, u32 dw_gpp_base_pa, u32 ul_size, u32 dsp_addr_offset, s8 c_factor, u32 dw_dsp_base, u32 ul_dsp_size, u32 *sgmt_id, u32 gpp_base_va)
 
int cmm_un_register_gppsm_seg (struct cmm_object *hcmm_mgr, u32 ul_seg_id)
 
int cmm_xlator_create (struct cmm_xlatorobject **xlator, struct cmm_object *hcmm_mgr, struct cmm_xlatorattrs *xlator_attrs)
 
voidcmm_xlator_alloc_buf (struct cmm_xlatorobject *xlator, void *va_buf, u32 pa_size)
 
int cmm_xlator_free_buf (struct cmm_xlatorobject *xlator, void *buf_va)
 
int cmm_xlator_info (struct cmm_xlatorobject *xlator, u8 **paddr, u32 ul_size, u32 segm_id, bool set_info)
 
voidcmm_xlator_translate (struct cmm_xlatorobject *xlator, void *paddr, enum cmm_xlatetype xtype)
 

Macro Definition Documentation

#define DSPPA2GPPPA (   base,
  x,
  y 
)    ((x)+(y))

Definition at line 52 of file cmm.c.

#define GPPPA2DSPPA (   base,
  x,
  y 
)    ((x)-(y))

Definition at line 53 of file cmm.c.

#define NEXT_PA (   pnode)    (pnode->pa + pnode->size)

Definition at line 49 of file cmm.c.

Function Documentation

void* cmm_calloc_buf ( struct cmm_object hcmm_mgr,
u32  usize,
struct cmm_attrs pattrs,
void **  pp_buf_va 
)

Definition at line 158 of file cmm.c.

int cmm_create ( struct cmm_object **  ph_cmm_mgr,
struct dev_object hdev_obj,
const struct cmm_mgrattrs mgr_attrts 
)

Definition at line 234 of file cmm.c.

int cmm_destroy ( struct cmm_object hcmm_mgr,
bool  force 
)

Definition at line 267 of file cmm.c.

int cmm_free_buf ( struct cmm_object hcmm_mgr,
void buf_pa,
u32  ul_seg_id 
)

Definition at line 321 of file cmm.c.

int cmm_get_handle ( void hprocessor,
struct cmm_object **  ph_cmm_mgr 
)

Definition at line 362 of file cmm.c.

int cmm_get_info ( struct cmm_object hcmm_mgr,
struct cmm_info cmm_info_obj 
)

Definition at line 383 of file cmm.c.

int cmm_register_gppsm_seg ( struct cmm_object hcmm_mgr,
u32  dw_gpp_base_pa,
u32  ul_size,
u32  dsp_addr_offset,
s8  c_factor,
u32  dw_dsp_base,
u32  ul_dsp_size,
u32 sgmt_id,
u32  gpp_base_va 
)

Definition at line 440 of file cmm.c.

int cmm_un_register_gppsm_seg ( struct cmm_object hcmm_mgr,
u32  ul_seg_id 
)

Definition at line 527 of file cmm.c.

void* cmm_xlator_alloc_buf ( struct cmm_xlatorobject *  xlator,
void va_buf,
u32  pa_size 
)

Definition at line 772 of file cmm.c.

int cmm_xlator_create ( struct cmm_xlatorobject **  xlator,
struct cmm_object hcmm_mgr,
struct cmm_xlatorattrs xlator_attrs 
)

Definition at line 744 of file cmm.c.

int cmm_xlator_free_buf ( struct cmm_xlatorobject *  xlator,
void buf_va 
)

Definition at line 803 of file cmm.c.

int cmm_xlator_info ( struct cmm_xlatorobject *  xlator,
u8 **  paddr,
u32  ul_size,
u32  segm_id,
bool  set_info 
)

Definition at line 831 of file cmm.c.

void* cmm_xlator_translate ( struct cmm_xlatorobject *  xlator,
void paddr,
enum cmm_xlatetype  xtype 
)

Definition at line 854 of file cmm.c.