Loading drivers/staging/tidspbridge/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ libcore = core/chnl_sm.o core/msg_sm.o core/io_sm.o core/tiomap3430.o \ core/tiomap3430_pwr.o core/tiomap_io.o core/dsp-mmu.o \ core/ue_deh.o core/wdt.o core/dsp-clock.o core/sync.o libpmgr = pmgr/chnl.o pmgr/io.o pmgr/msg.o pmgr/cod.o pmgr/dev.o pmgr/dspapi.o \ pmgr/cmm.o pmgr/dbll.o pmgr/dmm.o pmgr/cmm.o pmgr/dbll.o librmgr = rmgr/dbdcd.o rmgr/disp.o rmgr/drv.o rmgr/mgr.o rmgr/node.o \ rmgr/proc.o rmgr/pwr.o rmgr/rmm.o rmgr/strm.o rmgr/dspdrv.o \ rmgr/nldr.o rmgr/drv_interface.o Loading drivers/staging/tidspbridge/core/tiomap3430.c +1 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ /* ----------------------------------- Platform Manager */ #include <dspbridge/dev.h> #include <dspbridge/dspapi.h> #include <dspbridge/dmm.h> #include <dspbridge/wdt.h> /* ----------------------------------- Local */ Loading drivers/staging/tidspbridge/include/dspbridge/dev.h +24 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <dspbridge/nodedefs.h> #include <dspbridge/dispdefs.h> #include <dspbridge/dspdefs.h> #include <dspbridge/dmm.h> #include <dspbridge/host_os.h> /* ----------------------------------- This */ Loading Loading @@ -232,6 +233,29 @@ extern int dev_get_chnl_mgr(struct dev_object *hdev_obj, extern int dev_get_cmm_mgr(struct dev_object *hdev_obj, struct cmm_object **mgr); /* * ======== dev_get_dmm_mgr ======== * Purpose: * Retrieve the handle to the dynamic memory manager created for this * device. * Parameters: * hdev_obj: Handle to device object created with * dev_create_device(). * *mgr: Ptr to location to store handle. * Returns: * 0: Success. * -EFAULT: Invalid hdev_obj. * Requires: * mgr != NULL. * DEV Initialized. * Ensures: * 0: *mgr contains a handle to a channel manager object, * or NULL. * else: *mgr is NULL. */ extern int dev_get_dmm_mgr(struct dev_object *hdev_obj, struct dmm_object **mgr); /* * ======== dev_get_cod_mgr ======== * Purpose: Loading drivers/staging/tidspbridge/include/dspbridge/dmm.h 0 → 100644 +75 −0 Original line number Diff line number Diff line /* * dmm.h * * DSP-BIOS Bridge driver support functions for TI OMAP processors. * * The Dynamic Memory Mapping(DMM) module manages the DSP Virtual address * space that can be directly mapped to any MPU buffer or memory region. * * Copyright (C) 2005-2006 Texas Instruments, Inc. * * This package is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef DMM_ #define DMM_ #include <dspbridge/dbdefs.h> struct dmm_object; /* DMM attributes used in dmm_create() */ struct dmm_mgrattrs { u32 reserved; }; #define DMMPOOLSIZE 0x4000000 /* * ======== dmm_get_handle ======== * Purpose: * Return the dynamic memory manager object for this device. * This is typically called from the client process. */ extern int dmm_get_handle(void *hprocessor, struct dmm_object **dmm_manager); extern int dmm_reserve_memory(struct dmm_object *dmm_mgr, u32 size, u32 *prsv_addr); extern int dmm_un_reserve_memory(struct dmm_object *dmm_mgr, u32 rsv_addr); extern int dmm_map_memory(struct dmm_object *dmm_mgr, u32 addr, u32 size); extern int dmm_un_map_memory(struct dmm_object *dmm_mgr, u32 addr, u32 *psize); extern int dmm_destroy(struct dmm_object *dmm_mgr); extern int dmm_delete_tables(struct dmm_object *dmm_mgr); extern int dmm_create(struct dmm_object **dmm_manager, struct dev_object *hdev_obj, const struct dmm_mgrattrs *mgr_attrts); extern bool dmm_init(void); extern void dmm_exit(void); extern int dmm_create_tables(struct dmm_object *dmm_mgr, u32 addr, u32 size); #ifdef DSP_DMM_DEBUG u32 dmm_mem_map_dump(struct dmm_object *dmm_mgr); #endif #endif /* DMM_ */ drivers/staging/tidspbridge/include/dspbridge/drv.h +6 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,12 @@ struct dmm_map_object { struct bridge_dma_map_info dma_info; }; /* Used for DMM reserved memory accounting */ struct dmm_rsv_object { struct list_head link; u32 dsp_reserved_addr; }; /* New structure (member of process context) abstracts DMM resource info */ struct dspheap_res_object { s32 heap_allocated; /* DMM status */ Loading Loading
drivers/staging/tidspbridge/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ libcore = core/chnl_sm.o core/msg_sm.o core/io_sm.o core/tiomap3430.o \ core/tiomap3430_pwr.o core/tiomap_io.o core/dsp-mmu.o \ core/ue_deh.o core/wdt.o core/dsp-clock.o core/sync.o libpmgr = pmgr/chnl.o pmgr/io.o pmgr/msg.o pmgr/cod.o pmgr/dev.o pmgr/dspapi.o \ pmgr/cmm.o pmgr/dbll.o pmgr/dmm.o pmgr/cmm.o pmgr/dbll.o librmgr = rmgr/dbdcd.o rmgr/disp.o rmgr/drv.o rmgr/mgr.o rmgr/node.o \ rmgr/proc.o rmgr/pwr.o rmgr/rmm.o rmgr/strm.o rmgr/dspdrv.o \ rmgr/nldr.o rmgr/drv_interface.o Loading
drivers/staging/tidspbridge/core/tiomap3430.c +1 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ /* ----------------------------------- Platform Manager */ #include <dspbridge/dev.h> #include <dspbridge/dspapi.h> #include <dspbridge/dmm.h> #include <dspbridge/wdt.h> /* ----------------------------------- Local */ Loading
drivers/staging/tidspbridge/include/dspbridge/dev.h +24 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <dspbridge/nodedefs.h> #include <dspbridge/dispdefs.h> #include <dspbridge/dspdefs.h> #include <dspbridge/dmm.h> #include <dspbridge/host_os.h> /* ----------------------------------- This */ Loading Loading @@ -232,6 +233,29 @@ extern int dev_get_chnl_mgr(struct dev_object *hdev_obj, extern int dev_get_cmm_mgr(struct dev_object *hdev_obj, struct cmm_object **mgr); /* * ======== dev_get_dmm_mgr ======== * Purpose: * Retrieve the handle to the dynamic memory manager created for this * device. * Parameters: * hdev_obj: Handle to device object created with * dev_create_device(). * *mgr: Ptr to location to store handle. * Returns: * 0: Success. * -EFAULT: Invalid hdev_obj. * Requires: * mgr != NULL. * DEV Initialized. * Ensures: * 0: *mgr contains a handle to a channel manager object, * or NULL. * else: *mgr is NULL. */ extern int dev_get_dmm_mgr(struct dev_object *hdev_obj, struct dmm_object **mgr); /* * ======== dev_get_cod_mgr ======== * Purpose: Loading
drivers/staging/tidspbridge/include/dspbridge/dmm.h 0 → 100644 +75 −0 Original line number Diff line number Diff line /* * dmm.h * * DSP-BIOS Bridge driver support functions for TI OMAP processors. * * The Dynamic Memory Mapping(DMM) module manages the DSP Virtual address * space that can be directly mapped to any MPU buffer or memory region. * * Copyright (C) 2005-2006 Texas Instruments, Inc. * * This package is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef DMM_ #define DMM_ #include <dspbridge/dbdefs.h> struct dmm_object; /* DMM attributes used in dmm_create() */ struct dmm_mgrattrs { u32 reserved; }; #define DMMPOOLSIZE 0x4000000 /* * ======== dmm_get_handle ======== * Purpose: * Return the dynamic memory manager object for this device. * This is typically called from the client process. */ extern int dmm_get_handle(void *hprocessor, struct dmm_object **dmm_manager); extern int dmm_reserve_memory(struct dmm_object *dmm_mgr, u32 size, u32 *prsv_addr); extern int dmm_un_reserve_memory(struct dmm_object *dmm_mgr, u32 rsv_addr); extern int dmm_map_memory(struct dmm_object *dmm_mgr, u32 addr, u32 size); extern int dmm_un_map_memory(struct dmm_object *dmm_mgr, u32 addr, u32 *psize); extern int dmm_destroy(struct dmm_object *dmm_mgr); extern int dmm_delete_tables(struct dmm_object *dmm_mgr); extern int dmm_create(struct dmm_object **dmm_manager, struct dev_object *hdev_obj, const struct dmm_mgrattrs *mgr_attrts); extern bool dmm_init(void); extern void dmm_exit(void); extern int dmm_create_tables(struct dmm_object *dmm_mgr, u32 addr, u32 size); #ifdef DSP_DMM_DEBUG u32 dmm_mem_map_dump(struct dmm_object *dmm_mgr); #endif #endif /* DMM_ */
drivers/staging/tidspbridge/include/dspbridge/drv.h +6 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,12 @@ struct dmm_map_object { struct bridge_dma_map_info dma_info; }; /* Used for DMM reserved memory accounting */ struct dmm_rsv_object { struct list_head link; u32 dsp_reserved_addr; }; /* New structure (member of process context) abstracts DMM resource info */ struct dspheap_res_object { s32 heap_allocated; /* DMM status */ Loading