Commit 5db9e2bf authored by Armando Uribe's avatar Armando Uribe Committed by Omar Ramirez Luna

staging: tidspbridge: Remove unused structs

Remove unused structs and its dependencies, like references
in other structs or as arguments of certain functions.
Signed-off-by: default avatarArmando Uribe <x0095078@ti.com>
Signed-off-by: default avatarOmar Ramirez Luna <omar.ramirez@ti.com>
parent 57e6a9f2
...@@ -58,10 +58,4 @@ struct cfg_hostres { ...@@ -58,10 +58,4 @@ struct cfg_hostres {
void __iomem *dw_dmmu_base; void __iomem *dw_dmmu_base;
}; };
struct cfg_dspmemdesc {
u32 mem_type; /* Type of memory. */
u32 ul_min; /* Minimum amount of memory of this type. */
u32 ul_max; /* Maximum amount of memory of this type. */
};
#endif /* CFGDEFS_ */ #endif /* CFGDEFS_ */
...@@ -37,11 +37,6 @@ struct cod_manager; ...@@ -37,11 +37,6 @@ struct cod_manager;
/* COD library handle */ /* COD library handle */
struct cod_libraryobj; struct cod_libraryobj;
/* COD attributes */
struct cod_attrs {
u32 ul_reserved;
};
/* /*
* Function prototypes for writing memory to a DSP system, allocating * Function prototypes for writing memory to a DSP system, allocating
* and freeing DSP memory. * and freeing DSP memory.
...@@ -76,8 +71,6 @@ extern void cod_close(struct cod_libraryobj *lib); ...@@ -76,8 +71,6 @@ extern void cod_close(struct cod_libraryobj *lib);
* Parameters: * Parameters:
* manager: created manager object * manager: created manager object
* str_zl_file: ZL DLL filename, of length < COD_MAXPATHLENGTH. * str_zl_file: ZL DLL filename, of length < COD_MAXPATHLENGTH.
* attrs: attributes to be used by this object. A NULL value
* will cause default attrs to be used.
* Returns: * Returns:
* 0: Success. * 0: Success.
* -ESPIPE: ZL_Create failed. * -ESPIPE: ZL_Create failed.
...@@ -89,8 +82,7 @@ extern void cod_close(struct cod_libraryobj *lib); ...@@ -89,8 +82,7 @@ extern void cod_close(struct cod_libraryobj *lib);
* Ensures: * Ensures:
*/ */
extern int cod_create(struct cod_manager **mgr, extern int cod_create(struct cod_manager **mgr,
char *str_zl_file, char *str_zl_file);
const struct cod_attrs *attrs);
/* /*
* ======== cod_delete ======== * ======== cod_delete ========
......
...@@ -24,26 +24,6 @@ ...@@ -24,26 +24,6 @@
*/ */
typedef s32 dbl_flags; typedef s32 dbl_flags;
/*
* ======== dbl_sect_info ========
* For collecting info on overlay sections
*/
struct dbl_sect_info {
const char *name; /* name of section */
u32 sect_run_addr; /* run address of section */
u32 sect_load_addr; /* load address of section */
u32 size; /* size of section (target MAUs) */
dbl_flags type; /* Code, data, or BSS */
};
/*
* ======== dbl_symbol ========
* (Needed for dynamic load library)
*/
struct dbl_symbol {
u32 value;
};
/* /*
* ======== dbl_alloc_fxn ======== * ======== dbl_alloc_fxn ========
* Allocate memory function. Allocate or reserve (if reserved == TRUE) * Allocate memory function. Allocate or reserve (if reserved == TRUE)
...@@ -98,33 +78,4 @@ typedef bool(*dbl_sym_lookup) (void *handle, void *parg, void *rmm_handle, ...@@ -98,33 +78,4 @@ typedef bool(*dbl_sym_lookup) (void *handle, void *parg, void *rmm_handle,
typedef s32(*dbl_write_fxn) (void *hdl, u32 dsp_address, void *buf, typedef s32(*dbl_write_fxn) (void *hdl, u32 dsp_address, void *buf,
u32 n, s32 mtype); u32 n, s32 mtype);
/*
* ======== dbl_attrs ========
*/
struct dbl_attrs {
dbl_alloc_fxn alloc;
dbl_free_fxn free;
void *rmm_handle; /* Handle to pass to alloc, free functions */
dbl_write_fxn write;
void *input_params; /* Handle to pass to write, cinit function */
dbl_log_write_fxn log_write;
void *log_write_handle;
/* Symbol matching function and handle to pass to it */
dbl_sym_lookup sym_lookup;
void *sym_handle;
void *sym_arg;
/*
* These file manipulation functions should be compatible with the
* "C" run time library functions of the same name.
*/
s32(*fread) (void *, size_t, size_t, void *);
s32(*fseek) (void *, long, int);
s32(*ftell) (void *);
s32(*fclose) (void *);
void *(*fopen) (const char *, const char *);
};
#endif /* DBLDEFS_ */ #endif /* DBLDEFS_ */
...@@ -96,17 +96,6 @@ struct dmm_rsv_object { ...@@ -96,17 +96,6 @@ struct dmm_rsv_object {
u32 dsp_reserved_addr; u32 dsp_reserved_addr;
}; };
/* New structure (member of process context) abstracts DMM resource info */
struct dspheap_res_object {
s32 heap_allocated; /* DMM status */
u32 ul_mpu_addr;
u32 ul_dsp_addr;
u32 ul_dsp_res_addr;
u32 heap_size;
void *hprocessor;
struct dspheap_res_object *next;
};
/* New structure (member of process context) abstracts stream resource info */ /* New structure (member of process context) abstracts stream resource info */
struct strm_res_object { struct strm_res_object {
s32 stream_allocated; /* Stream status */ s32 stream_allocated; /* Stream status */
...@@ -151,9 +140,6 @@ struct process_context { ...@@ -151,9 +140,6 @@ struct process_context {
struct list_head dmm_rsv_list; struct list_head dmm_rsv_list;
spinlock_t dmm_rsv_lock; spinlock_t dmm_rsv_lock;
/* DSP Heap resources */
struct dspheap_res_object *pdspheap_list;
/* Stream resources */ /* Stream resources */
struct idr *stream_id; struct idr *stream_id;
}; };
......
...@@ -118,10 +118,6 @@ union trapped_args { ...@@ -118,10 +118,6 @@ union trapped_args {
struct dsp_notification __user *hnotification; struct dsp_notification __user *hnotification;
} args_proc_register_notify; } args_proc_register_notify;
struct {
void *hprocessor;
} args_proc_start;
struct { struct {
void *hprocessor; void *hprocessor;
u32 ul_size; u32 ul_size;
...@@ -163,10 +159,6 @@ union trapped_args { ...@@ -163,10 +159,6 @@ union trapped_args {
u32 ul_flags; u32 ul_flags;
} args_proc_flushmemory; } args_proc_flushmemory;
struct {
void *hprocessor;
} args_proc_stop;
struct { struct {
void *hprocessor; void *hprocessor;
void *pmpu_addr; void *pmpu_addr;
......
/*
* ldr.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Provide module loading services and symbol export services.
*
* Notes:
* This service is meant to be used by modules of the DSP/BIOS Bridge
* driver.
*
* 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 LDR_
#define LDR_
/* Loader objects: */
struct ldr_module;
#endif /* LDR_ */
...@@ -33,9 +33,6 @@ ...@@ -33,9 +33,6 @@
/* ----------------------------------- Trace & Debug */ /* ----------------------------------- Trace & Debug */
#include <dspbridge/dbc.h> #include <dspbridge/dbc.h>
/* ----------------------------------- OS Adaptation Layer */
#include <dspbridge/ldr.h>
/* ----------------------------------- Platform Manager */ /* ----------------------------------- Platform Manager */
/* Include appropriate loader header file */ /* Include appropriate loader header file */
#include <dspbridge/dbll.h> #include <dspbridge/dbll.h>
...@@ -51,7 +48,6 @@ struct cod_manager { ...@@ -51,7 +48,6 @@ struct cod_manager {
struct dbll_library_obj *base_lib; struct dbll_library_obj *base_lib;
bool loaded; /* Base library loaded? */ bool loaded; /* Base library loaded? */
u32 ul_entry; u32 ul_entry;
struct ldr_module *dll_obj;
struct dbll_fxns fxns; struct dbll_fxns fxns;
struct dbll_attrs attrs; struct dbll_attrs attrs;
char sz_zl_file[COD_MAXPATHLENGTH]; char sz_zl_file[COD_MAXPATHLENGTH];
...@@ -206,8 +202,7 @@ void cod_close(struct cod_libraryobj *lib) ...@@ -206,8 +202,7 @@ void cod_close(struct cod_libraryobj *lib)
* dynamically loaded object files. * dynamically loaded object files.
* *
*/ */
int cod_create(struct cod_manager **mgr, char *str_zl_file, int cod_create(struct cod_manager **mgr, char *str_zl_file)
const struct cod_attrs *attrs)
{ {
struct cod_manager *mgr_new; struct cod_manager *mgr_new;
struct dbll_attrs zl_attrs; struct dbll_attrs zl_attrs;
...@@ -219,10 +214,6 @@ int cod_create(struct cod_manager **mgr, char *str_zl_file, ...@@ -219,10 +214,6 @@ int cod_create(struct cod_manager **mgr, char *str_zl_file,
/* assume failure */ /* assume failure */
*mgr = NULL; *mgr = NULL;
/* we don't support non-default attrs yet */
if (attrs != NULL)
return -ENOSYS;
mgr_new = kzalloc(sizeof(struct cod_manager), GFP_KERNEL); mgr_new = kzalloc(sizeof(struct cod_manager), GFP_KERNEL);
if (mgr_new == NULL) if (mgr_new == NULL)
return -ENOMEM; return -ENOMEM;
......
...@@ -27,9 +27,6 @@ ...@@ -27,9 +27,6 @@
/* ----------------------------------- Trace & Debug */ /* ----------------------------------- Trace & Debug */
#include <dspbridge/dbc.h> #include <dspbridge/dbc.h>
/* ----------------------------------- OS Adaptation Layer */
#include <dspbridge/ldr.h>
/* ----------------------------------- Platform Manager */ /* ----------------------------------- Platform Manager */
#include <dspbridge/cod.h> #include <dspbridge/cod.h>
#include <dspbridge/drv.h> #include <dspbridge/drv.h>
...@@ -75,7 +72,6 @@ struct dev_object { ...@@ -75,7 +72,6 @@ struct dev_object {
struct io_mgr *hio_mgr; /* IO manager (CHNL, msg_ctrl) */ struct io_mgr *hio_mgr; /* IO manager (CHNL, msg_ctrl) */
struct cmm_object *hcmm_mgr; /* SM memory manager. */ struct cmm_object *hcmm_mgr; /* SM memory manager. */
struct dmm_object *dmm_mgr; /* Dynamic memory manager. */ struct dmm_object *dmm_mgr; /* Dynamic memory manager. */
struct ldr_module *module_obj; /* Bridge Module handle. */
u32 word_size; /* DSP word size: quick access. */ u32 word_size; /* DSP word size: quick access. */
struct drv_object *hdrv_obj; /* Driver Object */ struct drv_object *hdrv_obj; /* Driver Object */
/* List of Processors attached to this device */ /* List of Processors attached to this device */
...@@ -139,7 +135,6 @@ int dev_create_device(struct dev_object **device_obj, ...@@ -139,7 +135,6 @@ int dev_create_device(struct dev_object **device_obj,
struct cfg_devnode *dev_node_obj) struct cfg_devnode *dev_node_obj)
{ {
struct cfg_hostres *host_res; struct cfg_hostres *host_res;
struct ldr_module *module_obj = NULL;
struct bridge_drv_interface *drv_fxns = NULL; struct bridge_drv_interface *drv_fxns = NULL;
struct dev_object *dev_obj = NULL; struct dev_object *dev_obj = NULL;
struct chnl_mgrattrs mgr_attrs; struct chnl_mgrattrs mgr_attrs;
...@@ -179,7 +174,6 @@ int dev_create_device(struct dev_object **device_obj, ...@@ -179,7 +174,6 @@ int dev_create_device(struct dev_object **device_obj,
if (dev_obj) { if (dev_obj) {
/* Fill out the rest of the Dev Object structure: */ /* Fill out the rest of the Dev Object structure: */
dev_obj->dev_node_obj = dev_node_obj; dev_obj->dev_node_obj = dev_node_obj;
dev_obj->module_obj = module_obj;
dev_obj->cod_mgr = NULL; dev_obj->cod_mgr = NULL;
dev_obj->hchnl_mgr = NULL; dev_obj->hchnl_mgr = NULL;
dev_obj->hdeh_mgr = NULL; dev_obj->hdeh_mgr = NULL;
...@@ -953,7 +947,7 @@ static int init_cod_mgr(struct dev_object *dev_obj) ...@@ -953,7 +947,7 @@ static int init_cod_mgr(struct dev_object *dev_obj)
DBC_REQUIRE(refs > 0); DBC_REQUIRE(refs > 0);
DBC_REQUIRE(!dev_obj || (dev_obj->cod_mgr == NULL)); DBC_REQUIRE(!dev_obj || (dev_obj->cod_mgr == NULL));
status = cod_create(&dev_obj->cod_mgr, sz_dummy_file, NULL); status = cod_create(&dev_obj->cod_mgr, sz_dummy_file);
return status; return status;
} }
......
...@@ -134,7 +134,7 @@ int dcd_create_manager(char *sz_zl_dll_name, ...@@ -134,7 +134,7 @@ int dcd_create_manager(char *sz_zl_dll_name,
DBC_REQUIRE(refs >= 0); DBC_REQUIRE(refs >= 0);
DBC_REQUIRE(dcd_mgr); DBC_REQUIRE(dcd_mgr);
status = cod_create(&cod_mgr, sz_zl_dll_name, NULL); status = cod_create(&cod_mgr, sz_zl_dll_name);
if (status) if (status)
goto func_end; goto func_end;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment