staging: tidspbridge: Remove unused functions
authorArmando Uribe <x0095078@ti.com>
Fri, 17 Dec 2010 07:18:30 +0000 (01:18 -0600)
committerOmar Ramirez Luna <omar.ramirez@ti.com>
Sat, 5 Feb 2011 02:11:56 +0000 (20:11 -0600)
Remove functions that are not used at all, also remove the dependencies
of this functions like struct members, comments and calls.

Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
16 files changed:
drivers/staging/tidspbridge/core/io_sm.c
drivers/staging/tidspbridge/core/tiomap3430.c
drivers/staging/tidspbridge/include/dspbridge/chnl.h
drivers/staging/tidspbridge/include/dspbridge/dbll.h
drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
drivers/staging/tidspbridge/include/dspbridge/dev.h
drivers/staging/tidspbridge/include/dspbridge/dspio.h
drivers/staging/tidspbridge/include/dspbridge/host_os.h
drivers/staging/tidspbridge/include/dspbridge/io.h
drivers/staging/tidspbridge/include/dspbridge/io_sm.h
drivers/staging/tidspbridge/include/dspbridge/node.h
drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h
drivers/staging/tidspbridge/include/dspbridge/strm.h
drivers/staging/tidspbridge/pmgr/cod.c
drivers/staging/tidspbridge/pmgr/dbll.c
drivers/staging/tidspbridge/rmgr/nldr.c

index 042a465075444b4a65e28760a1bb5678581fe193..d4b9e141f3d571db8a152a917a027588fa0b9bda 100644 (file)
@@ -1682,10 +1682,6 @@ int bridge_io_get_proc_load(struct io_mgr *hio_mgr,
        return 0;
 }
 
-void io_sm_init(void)
-{
-       /* Do nothing */
-}
 
 #if defined(CONFIG_TIDSPBRIDGE_BACKTRACE) || defined(CONFIG_TIDSPBRIDGE_DEBUG)
 void print_dsp_debug_trace(struct io_mgr *hio_mgr)
index 2ae7e44819e820dc4b898d5bf8139f0e94c2e0c9..ec713ed74413403aadeea4dc792526f80bc24156 100644 (file)
@@ -259,8 +259,6 @@ void bridge_drv_entry(struct bridge_drv_interface **drv_intf,
 
        DBC_REQUIRE(driver_file_name != NULL);
 
-       io_sm_init();           /* Initialization of io_sm module */
-
        if (strcmp(driver_file_name, "UMA") == 0)
                *drv_intf = &drv_interface_fxns;
        else
index 8733b3b819311a075409ef2dc429d794dc45d2e8..92f6a13424f2728a7e63f5610107f6a04e5f5b1a 100644 (file)
 
 #include <dspbridge/chnlpriv.h>
 
-/*
- *  ======== chnl_close ========
- *  Purpose:
- *      Ensures all pending I/O on this channel is cancelled, discards all
- *      queued I/O completion notifications, then frees the resources allocated
- *      for this channel, and makes the corresponding logical channel id
- *      available for subsequent use.
- *  Parameters:
- *      chnl_obj:          Channel object handle.
- *  Returns:
- *      0:        Success;
- *      -EFAULT:    Invalid chnl_obj.
- *  Requires:
- *      chnl_init(void) called.
- *      No thread must be blocked on this channel's I/O completion event.
- *  Ensures:
- *      0:        The I/O completion event for this channel is freed.
- *                      chnl_obj is no longer valid.
- */
-extern int chnl_close(struct chnl_object *chnl_obj);
-
 /*
  *  ======== chnl_create ========
  *  Purpose:
index b0186761466cb3d03040551c10bd7f39b00d921f..46a9e0027ea5a4e7c1c53f8e5b39c5ea58a51c16 100644 (file)
@@ -42,18 +42,12 @@ extern bool dbll_init(void);
 extern int dbll_load(struct dbll_library_obj *lib,
                            dbll_flags flags,
                            struct dbll_attrs *attrs, u32 * entry);
-extern int dbll_load_sect(struct dbll_library_obj *zl_lib,
-                                char *sec_name, struct dbll_attrs *attrs);
 extern int dbll_open(struct dbll_tar_obj *target, char *file,
                            dbll_flags flags,
                       struct dbll_library_obj **lib_obj);
 extern int dbll_read_sect(struct dbll_library_obj *lib,
                                 char *name, char *buf, u32 size);
-extern void dbll_set_attrs(struct dbll_tar_obj *target,
-                          struct dbll_attrs *pattrs);
 extern void dbll_unload(struct dbll_library_obj *lib, struct dbll_attrs *attrs);
-extern int dbll_unload_sect(struct dbll_library_obj *lib,
-                                  char *sect_name, struct dbll_attrs *attrs);
 #ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
 bool dbll_find_dsp_symbol(struct dbll_library_obj *zl_lib, u32 address,
                u32 offset_range, u32 *sym_addr_output, char *name_output);
index d2b4fda3429167c3107435aee6fc53a288eecaf4..81821e554cc809fe39df78ed0b407ddf88fd2dde 100644 (file)
@@ -485,12 +485,9 @@ struct dbll_fxns {
        dbll_get_sect_fxn get_sect_fxn;
        dbll_init_fxn init_fxn;
        dbll_load_fxn load_fxn;
-       dbll_load_sect_fxn load_sect_fxn;
        dbll_open_fxn open_fxn;
        dbll_read_sect_fxn read_sect_fxn;
-       dbll_set_attrs_fxn set_attrs_fxn;
        dbll_unload_fxn unload_fxn;
-       dbll_unload_sect_fxn unload_sect_fxn;
 };
 
 #endif /* DBLDEFS_ */
index 357458fadd2a3a50935efd751a20649512b86596..4d4196b0221cff9d78496ddf3b8b7256395988a7 100644 (file)
@@ -94,43 +94,6 @@ extern int dev_create_device(struct dev_object
                                    const char *driver_file_name,
                                    struct cfg_devnode *dev_node_obj);
 
-/*
- *  ======== dev_create_iva_device ========
- *  Purpose:
- *      Called by the operating system to load the Bridge Driver for IVA.
- *  Parameters:
- *      device_obj:     Ptr to location to receive the device object handle.
- *      driver_file_name: Name of Bridge driver PE DLL file to load.  If the
- *                      absolute path is not provided, the file is loaded
- *                      through 'Bridge's module search path.
- *      host_config:    Host configuration information, to be passed down
- *                      to the Bridge driver when bridge_dev_create() is called.
- *      pDspConfig:     DSP resources, to be passed down to the Bridge driver
- *                      when bridge_dev_create() is called.
- *      dev_node_obj:       Platform specific device node.
- *  Returns:
- *      0:            Module is loaded, device object has been created
- *      -ENOMEM:        Insufficient memory to create needed resources.
- *      -EPERM:              Unable to find Bridge driver entry point function.
- *      -ESPIPE:   Unable to load ZL DLL.
- *  Requires:
- *      DEV Initialized.
- *      device_obj != NULL.
- *      driver_file_name != NULL.
- *      host_config != NULL.
- *      pDspConfig != NULL.
- *  Ensures:
- *      0:  *device_obj will contain handle to the new device object.
- *      Otherwise, does not create the device object, ensures the Bridge driver
- *      module is unloaded, and sets *device_obj to NULL.
- */
-extern int dev_create_iva_device(struct dev_object
-                                       **device_obj,
-                                       const char *driver_file_name,
-                                       const struct cfg_hostres
-                                       *host_config,
-                                       struct cfg_devnode *dev_node_obj);
-
 /*
  *  ======== dev_create2 ========
  *  Purpose:
@@ -541,24 +504,6 @@ extern void dev_exit(void);
  */
 extern bool dev_init(void);
 
-/*
- *  ======== dev_is_locked ========
- *  Purpose:
- *      Predicate function to determine if the device has been
- *      locked by a client for exclusive access.
- *  Parameters:
- *      hdev_obj:     Handle to device object created with
- *                      dev_create_device().
- *  Returns:
- *      0:        TRUE: device has been locked.
- *      0:     FALSE: device not locked.
- *      -EFAULT:    hdev_obj was invalid.
- *  Requires:
- *      DEV Initialized.
- *  Ensures:
- */
-extern int dev_is_locked(struct dev_object *hdev_obj);
-
 /*
  *  ======== dev_insert_proc_object ========
  *  Purpose:
index 88f5f90fe92266815ea896bd80a06b38094318ec..5c666b80463e751e306fab7761980fb58e50ac73 100644 (file)
@@ -34,7 +34,6 @@ extern int bridge_io_destroy(struct io_mgr *hio_mgr);
 
 extern int bridge_io_on_loaded(struct io_mgr *hio_mgr);
 
-extern int iva_io_on_loaded(struct io_mgr *hio_mgr);
 extern int bridge_io_get_proc_load(struct io_mgr *hio_mgr,
                                       struct dsp_procloadstat *proc_lstat);
 
index 6549898ac6360f586c772b0c693281dda972d5e6..b1b8acb5d3c355b305293802fca4770600f04c90 100644 (file)
 extern struct platform_device *omap_dspbridge_dev;
 extern struct device *bridge;
 
-#if defined(CONFIG_TIDSPBRIDGE) || defined(CONFIG_TIDSPBRIDGE_MODULE)
-extern void dspbridge_reserve_sdram(void);
-#else
-static inline void dspbridge_reserve_sdram(void)
-{
-}
-#endif
-
-extern unsigned long dspbridge_get_mempool_base(void);
 #endif
index bc346f9a01c1d81130f81e3b2bed46928db496fc..da4683c87b381759cc7969f96831fd35f8781853 100644 (file)
@@ -95,20 +95,4 @@ extern void io_exit(void);
  */
 extern bool io_init(void);
 
-/*
- *  ======== io_on_loaded ========
- *  Purpose:
- *      Called when a program is loaded so IO manager can update its
- *      internal state.
- *  Parameters:
- *      hio_mgr:         IOmanager object.
- *  Returns:
- *      0:        Success.
- *      -EFAULT:    hio_mgr was invalid.
- *  Requires:
- *      io_init(void) called.
- *  Ensures:
- */
-extern int io_on_loaded(struct io_mgr *hio_mgr);
-
 #endif /* CHNL_ */
index 056606a10a473c7b51c7592357c8b83be2bf7039..6a4c441269d759c6bde35565aa9357c3b4dd6fbc 100644 (file)
@@ -114,122 +114,6 @@ extern void io_request_chnl(struct io_mgr *io_manager,
  */
 extern void iosm_schedule(struct io_mgr *io_manager);
 
-/*
- * DSP-DMA IO functions
- */
-
-/*
- *  ======== io_ddma_init_chnl_desc ========
- *  Purpose:
- *      Initialize DSP DMA channel descriptor.
- *  Parameters:
- *      hio_mgr:         Handle to a I/O manager.
- *      ddma_chnl_id:    DDMA channel identifier.
- *      num_desc:       Number of buffer descriptors(equals # of IOReqs &
- *                      Chirps)
- *      dsp:           Dsp address;
- *  Returns:
- *  Requires:
- *     ddma_chnl_id < DDMA_MAXDDMACHNLS
- *     num_desc > 0
- *     pVa != NULL
- *     pDspPa != NULL
- *
- *  Ensures:
- */
-extern void io_ddma_init_chnl_desc(struct io_mgr *hio_mgr, u32 ddma_chnl_id,
-                                  u32 num_desc, void *dsp);
-
-/*
- *  ======== io_ddma_clear_chnl_desc ========
- *  Purpose:
- *      Clear DSP DMA channel descriptor.
- *  Parameters:
- *      hio_mgr:         Handle to a I/O manager.
- *      ddma_chnl_id:    DDMA channel identifier.
- *  Returns:
- *  Requires:
- *     ddma_chnl_id < DDMA_MAXDDMACHNLS
- *  Ensures:
- */
-extern void io_ddma_clear_chnl_desc(struct io_mgr *hio_mgr, u32 ddma_chnl_id);
-
-/*
- *  ======== io_ddma_request_chnl ========
- *  Purpose:
- *      Request channel DSP-DMA from the DSP. Sets up SM descriptors and
- *      control fields in shared memory.
- *  Parameters:
- *      hio_mgr:     Handle to a I/O manager.
- *      pchnl:      Ptr to channel object
- *      chnl_packet_obj:     Ptr to channel i/o request packet.
- *  Returns:
- *  Requires:
- *      pchnl != NULL
- *      pchnl->cio_reqs > 0
- *      chnl_packet_obj != NULL
- *  Ensures:
- */
-extern void io_ddma_request_chnl(struct io_mgr *hio_mgr,
-                                struct chnl_object *pchnl,
-                                struct chnl_irp *chnl_packet_obj,
-                                u16 *mbx_val);
-
-/*
- * Zero-copy IO functions
- */
-
-/*
- *  ======== io_ddzc_init_chnl_desc ========
- *  Purpose:
- *      Initialize ZCPY channel descriptor.
- *  Parameters:
- *      hio_mgr:     Handle to a I/O manager.
- *      zid:        zero-copy channel identifier.
- *  Returns:
- *  Requires:
- *     ddma_chnl_id < DDMA_MAXZCPYCHNLS
- *     hio_mgr != Null
- *  Ensures:
- */
-extern void io_ddzc_init_chnl_desc(struct io_mgr *hio_mgr, u32 zid);
-
-/*
- *  ======== io_ddzc_clear_chnl_desc ========
- *  Purpose:
- *      Clear DSP ZC channel descriptor.
- *  Parameters:
- *      hio_mgr:         Handle to a I/O manager.
- *      ch_id:        ZC channel identifier.
- *  Returns:
- *  Requires:
- *      hio_mgr is valid
- *      ch_id < DDMA_MAXZCPYCHNLS
- *  Ensures:
- */
-extern void io_ddzc_clear_chnl_desc(struct io_mgr *hio_mgr, u32 ch_id);
-
-/*
- *  ======== io_ddzc_request_chnl ========
- *  Purpose:
- *      Request zero-copy channel transfer. Sets up SM descriptors and
- *      control fields in shared memory.
- *  Parameters:
- *      hio_mgr:         Handle to a I/O manager.
- *      pchnl:          Ptr to channel object
- *      chnl_packet_obj:         Ptr to channel i/o request packet.
- *  Returns:
- *  Requires:
- *      pchnl != NULL
- *      pchnl->cio_reqs > 0
- *      chnl_packet_obj != NULL
- *  Ensures:
- */
-extern void io_ddzc_request_chnl(struct io_mgr *hio_mgr,
-                                struct chnl_object *pchnl,
-                                struct chnl_irp *chnl_packet_obj,
-                                u16 *mbx_val);
-
 /*
  *  ======== io_sh_msetting ========
  *  Purpose:
@@ -253,25 +137,6 @@ extern int io_sh_msetting(struct io_mgr *hio_mgr, u8 desc, void *pargs);
 /* Maximum channel bufsize that can be used. */
 extern u32 io_buf_size(struct io_mgr *hio_mgr);
 
-extern u32 io_read_value(struct bridge_dev_context *dev_ctxt, u32 dsp_addr);
-
-extern void io_write_value(struct bridge_dev_context *dev_ctxt,
-                          u32 dsp_addr, u32 value);
-
-extern u32 io_read_value_long(struct bridge_dev_context *dev_ctxt,
-                             u32 dsp_addr);
-
-extern void io_write_value_long(struct bridge_dev_context *dev_ctxt,
-                               u32 dsp_addr, u32 value);
-
-extern void io_or_set_value(struct bridge_dev_context *dev_ctxt,
-                           u32 dsp_addr, u32 value);
-
-extern void io_and_set_value(struct bridge_dev_context *dev_ctxt,
-                            u32 dsp_addr, u32 value);
-
-extern void io_sm_init(void);
-
 #ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
 /*
  *  ========print_dsp_trace_buffer ========
index 49ed5c1128e5b4018bdf361587039ad4a1199cfe..4c5558c6ecb4a304c236cd6618267994468cc6dd 100644 (file)
@@ -112,24 +112,6 @@ extern int node_alloc_msg_buf(struct node_object *hnode,
  */
 extern int node_change_priority(struct node_object *hnode, s32 prio);
 
-/*
- *  ======== node_close_orphans ========
- *  Purpose:
- *      Delete all nodes whose owning processor is being destroyed.
- *  Parameters:
- *      hnode_mgr:       Node manager object.
- *      proc:          Handle to processor object being destroyed.
- *  Returns:
- *      0:        Success.
- *      -EPERM:      Unable to delete all nodes belonging to proc.
- *  Requires:
- *      Valid hnode_mgr.
- *      proc != NULL.
- *  Ensures:
- */
-extern int node_close_orphans(struct node_mgr *hnode_mgr,
-                                    struct proc_object *proc);
-
 /*
  *  ======== node_connect ========
  *  Purpose:
index dfaf0c6c06f139c06693843ced86c906d968150f..8c9c902a0432cf5a2cc636348fcf8170ebf6d4b0 100644 (file)
 #include <dspbridge/nodepriv.h>
 #include <dspbridge/drv.h>
 
-extern int drv_get_proc_ctxt_list(struct process_context **pctxt,
-                                        struct drv_object *hdrv_obj);
-
-extern int drv_insert_proc_context(struct drv_object *driver_obj,
-                                         void *process_ctxt);
-
 extern int drv_remove_all_dmm_res_elements(void *process_ctxt);
 
 extern int drv_remove_all_node_res_elements(void *process_ctxt);
 
-extern int drv_proc_set_pid(void *ctxt, s32 process);
-
 extern int drv_remove_all_resources(void *process_ctxt);
 
-extern int drv_remove_proc_context(struct drv_object *driver_obj,
-                                         void *pr_ctxt);
-
 extern int drv_insert_node_res_element(void *hnode, void *node_resource,
                                              void *process_ctxt);
 
index 3e4671e7f91bb5305a9d0828e220cef5714f9e36..613fe53dd2399281dd60de3647f9654a777de716 100644 (file)
@@ -141,25 +141,6 @@ extern int strm_free_buffer(struct strm_res_object *strmres,
                                   u8 **ap_buffer, u32 num_bufs,
                                   struct process_context *pr_ctxt);
 
-/*
- *  ======== strm_get_event_handle ========
- *  Purpose:
- *      Get stream's user event handle. This function is used when closing
- *      a stream, so the event can be closed.
- *  Parameter:
- *      stream_obj:      Stream handle returned from strm_open().
- *      ph_event:        Location to store event handle on output.
- *  Returns:
- *      0:        Success.
- *      -EFAULT:    Invalid stream_obj.
- *  Requires:
- *      strm_init(void) called.
- *      ph_event != NULL.
- *  Ensures:
- */
-extern int strm_get_event_handle(struct strm_object *stream_obj,
-                                       void **ph_event);
-
 /*
  *  ======== strm_get_info ========
  *  Purpose:
@@ -275,27 +256,6 @@ extern int strm_open(struct node_object *hnode, u32 dir,
                            struct strm_res_object **strmres,
                            struct process_context *pr_ctxt);
 
-/*
- *  ======== strm_prepare_buffer ========
- *  Purpose:
- *      Prepare a data buffer not allocated by DSPStream_AllocateBuffers()
- *      for use with a stream.
- *  Parameter:
- *      stream_obj:     Stream handle returned from strm_open().
- *      usize:          Size (GPP bytes) of the buffer.
- *      pbuffer:        Buffer address.
- *  Returns:
- *      0:        Success.
- *      -EFAULT:    Invalid stream_obj.
- *      -EPERM:      Failure occurred, unable to prepare buffer.
- *  Requires:
- *      strm_init(void) called.
- *      pbuffer != NULL.
- *  Ensures:
- */
-extern int strm_prepare_buffer(struct strm_object *stream_obj,
-                                     u32 usize, u8 *pbuffer);
-
 /*
  *  ======== strm_reclaim ========
  *  Purpose:
@@ -379,26 +339,4 @@ extern int strm_register_notify(struct strm_object *stream_obj,
 extern int strm_select(struct strm_object **strm_tab,
                              u32 strms, u32 *pmask, u32 utimeout);
 
-/*
- *  ======== strm_unprepare_buffer ========
- *  Purpose:
- *      Unprepare a data buffer that was previously prepared for a stream
- *      with DSPStream_PrepareBuffer(), and that will no longer be used with
- *      the stream.
- *  Parameter:
- *      stream_obj:     Stream handle returned from strm_open().
- *      usize:          Size (GPP bytes) of the buffer.
- *      pbuffer:        Buffer address.
- *  Returns:
- *      0:        Success.
- *      -EFAULT:    Invalid stream_obj.
- *      -EPERM:      Failure occurred, unable to unprepare buffer.
- *  Requires:
- *      strm_init(void) called.
- *      pbuffer != NULL.
- *  Ensures:
- */
-extern int strm_unprepare_buffer(struct strm_object *stream_obj,
-                                       u32 usize, u8 *pbuffer);
-
 #endif /* STRM_ */
index 52989ab67cfb6a62608e247ef606b9ff803adf1f..db29a1955cbbb2e5a8bc0e51364b8657a78b92fe 100644 (file)
@@ -78,12 +78,9 @@ static struct dbll_fxns ldr_fxns = {
        (dbll_get_sect_fxn) dbll_get_sect,
        (dbll_init_fxn) dbll_init,
        (dbll_load_fxn) dbll_load,
-       (dbll_load_sect_fxn) dbll_load_sect,
        (dbll_open_fxn) dbll_open,
        (dbll_read_sect_fxn) dbll_read_sect,
-       (dbll_set_attrs_fxn) dbll_set_attrs,
        (dbll_unload_fxn) dbll_unload,
-       (dbll_unload_sect_fxn) dbll_unload_sect,
 };
 
 static bool no_op(void);
index 878aa50718eedc306694fa615646d0dd0f14d0d3..2f46b0603d217589c29292a3c9fb51c72017201a 100644 (file)
@@ -567,18 +567,6 @@ int dbll_load(struct dbll_library_obj *lib, dbll_flags flags,
        return status;
 }
 
-/*
- *  ======== dbll_load_sect ========
- *  Not supported for COFF.
- */
-int dbll_load_sect(struct dbll_library_obj *zl_lib, char *sec_name,
-                         struct dbll_attrs *attrs)
-{
-       DBC_REQUIRE(zl_lib);
-
-       return -ENOSYS;
-}
-
 /*
  *  ======== dbll_open ========
  */
@@ -793,22 +781,6 @@ func_cont:
        return status;
 }
 
-/*
- *  ======== dbll_set_attrs ========
- *  Set the attributes of the target.
- */
-void dbll_set_attrs(struct dbll_tar_obj *target, struct dbll_attrs *pattrs)
-{
-       struct dbll_tar_obj *zl_target = (struct dbll_tar_obj *)target;
-       DBC_REQUIRE(refs > 0);
-       DBC_REQUIRE(zl_target);
-       DBC_REQUIRE(pattrs != NULL);
-
-       if ((pattrs != NULL) && (zl_target != NULL))
-               zl_target->attrs = *pattrs;
-
-}
-
 /*
  *  ======== dbll_unload ========
  */
@@ -847,19 +819,6 @@ func_end:
        DBC_ENSURE(zl_lib->load_ref >= 0);
 }
 
-/*
- *  ======== dbll_unload_sect ========
- *  Not supported for COFF.
- */
-int dbll_unload_sect(struct dbll_library_obj *lib, char *sec_name,
-                           struct dbll_attrs *attrs)
-{
-       DBC_REQUIRE(refs > 0);
-       DBC_REQUIRE(sec_name != NULL);
-
-       return -ENOSYS;
-}
-
 /*
  *  ======== dof_close ========
  */
index 28354bbf1aeb04f0807696179ff617b88c6abdec..d19cdb0f08602582d95d02639c29045f0feef270 100644 (file)
@@ -260,12 +260,9 @@ static struct dbll_fxns ldr_fxns = {
        (dbll_get_sect_fxn) dbll_get_sect,
        (dbll_init_fxn) dbll_init,
        (dbll_load_fxn) dbll_load,
-       (dbll_load_sect_fxn) dbll_load_sect,
        (dbll_open_fxn) dbll_open,
        (dbll_read_sect_fxn) dbll_read_sect,
-       (dbll_set_attrs_fxn) dbll_set_attrs,
        (dbll_unload_fxn) dbll_unload,
-       (dbll_unload_sect_fxn) dbll_unload_sect,
 };
 
 static u32 refs;               /* module reference count */