Skip to contentSkip to conversation

staging:tidspbridge - Audit headers file

PATCH In review Armando Uribe 2 participants 7 messages Dec 17, 2010 – Dec 24, 2010 Staging

lore
Share & tools
lore
#0 lore raw

cover staging:tidspbridge - Audit headers file

The following set of patches performs a code clean up derived from a header files audit. Removes unused macros, constants, functions, structs, struct members, typedefs and its dependencies.

Armando Uribe (5):
staging:tidspbridge - Remove unused defined constants staging:tidspbridge - Remove unused functions staging:tidspbridge - Remove unused structs. staging:tidspbridge - Remove unused typedefs staging:tidspbridge - Remove trivial header files

 drivers/staging/tidspbridge/core/io_sm.c           |    4 -
 drivers/staging/tidspbridge/core/tiomap3430.c      |    2 -
 drivers/staging/tidspbridge/core/tiomap3430_pwr.c  |    4 +-
 .../tidspbridge/include/dspbridge/brddefs.h        |    2 -
 .../tidspbridge/include/dspbridge/cfgdefs.h        |   19 ---
 .../staging/tidspbridge/include/dspbridge/chnl.h   |   21 ---
 .../tidspbridge/include/dspbridge/chnldefs.h       |    3 -
 .../tidspbridge/include/dspbridge/chnlpriv.h       |   13 --
 .../staging/tidspbridge/include/dspbridge/cod.h    |   13 +--
 .../staging/tidspbridge/include/dspbridge/dbdefs.h |   26 ----
 .../tidspbridge/include/dspbridge/dbldefs.h        |  141 -------------------
 .../staging/tidspbridge/include/dspbridge/dbll.h   |    6 -
 .../tidspbridge/include/dspbridge/dblldefs.h       |   65 ---------
 .../tidspbridge/include/dspbridge/dehdefs.h        |   32 -----
 .../staging/tidspbridge/include/dspbridge/dev.h    |   59 +--------
 .../staging/tidspbridge/include/dspbridge/disp.h   |   15 ++-
 .../tidspbridge/include/dspbridge/dispdefs.h       |   35 -----
 .../staging/tidspbridge/include/dspbridge/drv.h    |   31 +----
 .../tidspbridge/include/dspbridge/drvdefs.h        |   25 ----
 .../tidspbridge/include/dspbridge/dspapi-ioctl.h   |    8 -
 .../tidspbridge/include/dspbridge/dspdefs.h        |   10 +-
 .../staging/tidspbridge/include/dspbridge/dspdrv.h |    2 -
 .../staging/tidspbridge/include/dspbridge/dspio.h  |    4 +-
 .../tidspbridge/include/dspbridge/dspioctl.h       |    5 -
 .../tidspbridge/include/dspbridge/dynamic_loader.h |    2 -
 .../tidspbridge/include/dspbridge/host_os.h        |    9 --
 drivers/staging/tidspbridge/include/dspbridge/io.h |   29 ++---
 .../staging/tidspbridge/include/dspbridge/io_sm.h  |  143 +-------------------
 .../staging/tidspbridge/include/dspbridge/iodefs.h |   36 -----
 .../staging/tidspbridge/include/dspbridge/ldr.h    |   29 ----
 .../staging/tidspbridge/include/dspbridge/mbx_sh.h |   40 ------
 .../staging/tidspbridge/include/dspbridge/node.h   |   20 +---
 .../staging/tidspbridge/include/dspbridge/pwr.h    |    8 +-
 .../staging/tidspbridge/include/dspbridge/pwr_sh.h |   33 -----
 .../include/dspbridge/resourcecleanup.h            |   11 --
 .../staging/tidspbridge/include/dspbridge/rms_sh.h |    9 --
 .../staging/tidspbridge/include/dspbridge/strm.h   |   62 ---------
 .../tidspbridge/include/dspbridge/strmdefs.h       |    2 -
 drivers/staging/tidspbridge/pmgr/cod.c             |   14 +--
 drivers/staging/tidspbridge/pmgr/dbll.c            |   41 ------
 drivers/staging/tidspbridge/pmgr/dev.c             |   10 +-
 drivers/staging/tidspbridge/pmgr/io.c              |    1 -
 drivers/staging/tidspbridge/rmgr/dbdcd.c           |    2 +-
 drivers/staging/tidspbridge/rmgr/drv_interface.c   |    1 -
 drivers/staging/tidspbridge/rmgr/nldr.c            |    3 -
 drivers/staging/tidspbridge/rmgr/node.c            |    1 -
 46 files changed, 55 insertions(+), 996 deletions(-)
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/dbldefs.h
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/dehdefs.h
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/dispdefs.h
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/drvdefs.h
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/iodefs.h
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/ldr.h
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/pwr_sh.h
#1 lore raw

PATCH 1/5 staging:tidspbridge - Remove unused defined constants

Remove defined constants not being used.

---
 .../tidspbridge/include/dspbridge/brddefs.h        |    2 -
 .../tidspbridge/include/dspbridge/cfgdefs.h        |   13 ------
 .../tidspbridge/include/dspbridge/chnldefs.h       |    3 -
 .../tidspbridge/include/dspbridge/chnlpriv.h       |   13 ------
 .../staging/tidspbridge/include/dspbridge/cod.h    |    3 -
 .../staging/tidspbridge/include/dspbridge/dbdefs.h |   26 -------------
 .../tidspbridge/include/dspbridge/dbldefs.h        |   11 -----
 .../tidspbridge/include/dspbridge/dehdefs.h        |    1 -
 .../staging/tidspbridge/include/dspbridge/drv.h    |   15 -------
 .../tidspbridge/include/dspbridge/dspdefs.h        |    6 ---
 .../staging/tidspbridge/include/dspbridge/dspdrv.h |    2 -
 .../tidspbridge/include/dspbridge/dspioctl.h       |    5 --
 .../tidspbridge/include/dspbridge/dynamic_loader.h |    2 -
 .../staging/tidspbridge/include/dspbridge/io_sm.h  |    1 -
 .../staging/tidspbridge/include/dspbridge/iodefs.h |    2 -
 .../staging/tidspbridge/include/dspbridge/mbx_sh.h |   40 --------------------
 .../staging/tidspbridge/include/dspbridge/pwr_sh.h |    4 --
 .../staging/tidspbridge/include/dspbridge/rms_sh.h |    9 ----
 .../tidspbridge/include/dspbridge/strmdefs.h       |    2 -
 drivers/staging/tidspbridge/pmgr/dev.c             |    2 +-
 20 files changed, 1 insertions(+), 161 deletions(-)
drivers/staging/tidspbridge/include/dspbridge/brddefs.h +0 -2
index f80d9a5..725d7b3 100644
@@ -24,9 +24,7 @@
 #define BRD_IDLE        0x1	/* Monitor Loaded, but suspended. */
 #define BRD_RUNNING     0x2	/* Monitor loaded, and executing. */
 #define BRD_UNKNOWN     0x3	/* Board state is indeterminate. */
-#define BRD_SYNCINIT    0x4
 #define BRD_LOADED      0x5
-#define BRD_LASTSTATE   BRD_LOADED	/* Set to highest legal board state. */
 #define BRD_SLEEP_TRANSITION 0x6	/* Sleep transition in progress */
 #define BRD_HIBERNATION 0x7	/* MPU initiated hibernation */
 #define BRD_RETENTION     0x8	/* Retention mode */
drivers/staging/tidspbridge/include/dspbridge/cfgdefs.h +0 -13
index f403c01..c3f04f8 100644
@@ -19,25 +19,12 @@
 #ifndef CFGDEFS_
 #define CFGDEFS_
 
-/* Maximum length of module search path. */
-#define CFG_MAXSEARCHPATHLEN    255
-
-/* Maximum length of general paths. */
-#define CFG_MAXPATH             255
-
 /* Host Resources: */
 #define CFG_MAXMEMREGISTERS     9
-#define CFG_MAXIOPORTS          20
-#define CFG_MAXIRQS             7
-#define CFG_MAXDMACHANNELS      7
 
 /* IRQ flag */
 #define CFG_IRQSHARED           0x01	/* IRQ can be shared */
 
-/* DSP Resources: */
-#define CFG_DSPMAXMEMTYPES      10
-#define CFG_DEFAULT_NUM_WINDOWS 1	/* We support only one window. */
-
 /* A platform-related device handle: */
 struct cfg_devnode;
 
drivers/staging/tidspbridge/include/dspbridge/chnldefs.h +0 -3
index 5bf5f6b..8f8f9ec 100644
@@ -22,9 +22,6 @@
 /* Channel id option. */
 #define CHNL_PICKFREE       (~0UL)	/* Let manager pick a free channel. */
 
-/* Channel manager limits: */
-#define CHNL_INITIOREQS      4	/* Default # of I/O requests. */
-
 /* Channel modes */
 #define CHNL_MODETODSP		0	/* Data streaming to the DSP. */
 #define CHNL_MODEFROMDSP	1	/* Data streaming from the DSP. */
drivers/staging/tidspbridge/include/dspbridge/chnlpriv.h +0 -13
index 9292100..1785c3e 100644
@@ -39,12 +39,6 @@
  */
 #define CHNL_PCPY       0	/* Proc-copy transport 0 */
 
-#define CHNL_MAXIRQ     0xff	/* Arbitrarily large number. */
-
-/* The following modes are private: */
-#define CHNL_MODEUSEREVENT  0x1000	/* User provided the channel event. */
-#define CHNL_MODEMASK       0x1001
-
 /* Higher level channel states: */
 #define CHNL_STATEREADY		0	/* Channel ready for I/O. */
 #define CHNL_STATECANCEL	1	/* I/O was cancelled. */
@@ -56,13 +50,6 @@
 
 /* Types of channel class libraries: */
 #define CHNL_TYPESM         1	/* Shared memory driver. */
-#define CHNL_TYPEBM         2	/* Bus Mastering driver. */
-
-/* Max string length of channel I/O completion event name - change if needed */
-#define CHNL_MAXEVTNAMELEN  32
-
-/* Max memory pages lockable in CHNL_PrepareBuffer() - change if needed */
-#define CHNL_MAXLOCKPAGES   64
 
 /* Channel info. */
 struct chnl_info {
drivers/staging/tidspbridge/include/dspbridge/cod.h +0 -3
index 42bce2e..5efea91 100644
@@ -27,9 +27,6 @@
 #define COD_TRACEBEG            "SYS_PUTCBEG"
 #define COD_TRACEEND            "SYS_PUTCEND"
 #define COD_TRACECURPOS	"BRIDGE_SYS_PUTC_current"
-#define COD_TRACESECT           "trace"
-#define COD_TRACEBEGOLD         "PUTCBEG"
-#define COD_TRACEENDOLD         "PUTCEND"
 
 #define COD_NOLOAD              DBLL_NOLOAD
 #define COD_SYMB                DBLL_SYMB
drivers/staging/tidspbridge/include/dspbridge/dbdefs.h +0 -26
index 5af075d..38fffeb 100644
@@ -31,9 +31,6 @@
 /* API return value and calling convention */
 #define DBAPI                       int
 
-/* Infinite time value for the utimeout parameter to DSPStream_Select() */
-#define DSP_FOREVER                 (-1)
-
 /* Maximum length of node name, used in dsp_ndbprops */
 #define DSP_MAXNAMELEN              32
 
@@ -74,16 +71,9 @@
 #define DSP_NODE_MIN_PRIORITY       1
 #define DSP_NODE_MAX_PRIORITY       15
 
-/* Pre-Defined Message Command Codes available to user: */
-#define DSP_RMSUSERCODESTART RMS_USER	/* Start of RMS user cmd codes */
-/* end of user codes */
-#define DSP_RMSUSERCODEEND (RMS_USER + RMS_MAXUSERCODES);
 /* msg_ctrl contains SM buffer description */
 #define DSP_RMSBUFDESC RMS_BUFDESC
 
-/* Shared memory identifier for MEM segment named "SHMSEG0" */
-#define DSP_SHMSEG0     (u32)(-1)
-
 /* Processor ID numbers */
 #define DSP_UNIT    0
 #define IVA_UNIT    1
@@ -91,15 +81,6 @@
 #define DSPWORD       unsigned char
 #define DSPWORDSIZE     sizeof(DSPWORD)
 
-/* Power control enumerations */
-#define PROC_PWRCONTROL             0x8070
-
-#define PROC_PWRMGT_ENABLE          (PROC_PWRCONTROL + 0x3)
-#define PROC_PWRMGT_DISABLE         (PROC_PWRCONTROL + 0x4)
-
-/* Bridge Code Version */
-#define BRIDGE_VERSION_CODE         333
-
 #define    MAX_PROFILES     16
 
 /* DSP chip type */
@@ -501,13 +482,6 @@ bit 15 - Output (writeable) buffer
 #define DSPPROCTYPE_C64		6410
 #define IVAPROCTYPE_ARM7	470
 
-#define REG_MGR_OBJECT	1
-#define REG_DRV_OBJECT	2
-
-/* registry */
-#define DRVOBJECT	"DrvObject"
-#define MGROBJECT	"MgrObject"
-
 /* Max registry path length. Also the max registry value length. */
 #define MAXREGPATHLENGTH	255
 
drivers/staging/tidspbridge/include/dspbridge/dbldefs.h +0 -11
index bf4fb99..9973098 100644
@@ -17,17 +17,6 @@
 #ifndef DBLDEFS_
 #define DBLDEFS_
 
-/*
- *  Bit masks for dbl_flags.
- */
-#define DBL_NOLOAD   0x0	/* Don't load symbols, code, or data */
-#define DBL_SYMB     0x1	/* load symbols */
-#define DBL_CODE     0x2	/* load code */
-#define DBL_DATA     0x4	/* load data */
-#define DBL_DYNAMIC  0x8	/* dynamic load */
-#define DBL_BSS      0x20	/* Unitialized section */
-
-#define DBL_MAXPATHLENGTH       255
 
 /*
  *  ======== dbl_flags ========
drivers/staging/tidspbridge/include/dspbridge/dehdefs.h +0 -1
index 09f8bf8..5341471 100644
@@ -26,7 +26,6 @@ struct deh_mgr;
 
 /* Magic code used to determine if DSP signaled exception. */
 #define DEH_BASE        MBX_DEH_BASE
-#define DEH_USERS_BASE  MBX_DEH_USERS_BASE
 #define DEH_LIMIT       MBX_DEH_LIMIT
 
 #endif /* _DEHDEFS_H */
drivers/staging/tidspbridge/include/dspbridge/drv.h +0 -15
index 37f5a45..adb28ec 100644
@@ -26,9 +26,6 @@
 #include <dspbridge/drvdefs.h>
 #include <linux/idr.h>
 
-#define DRV_ASSIGN     1
-#define DRV_RELEASE    0
-
 /* Provide the DSP Internal memory windows that can be accessed from L3 address
  * space */
 
@@ -38,23 +35,14 @@
 /* MEM1 is L2 RAM + L2 Cache space */
 #define OMAP_DSP_MEM1_BASE 0x5C7F8000
 #define OMAP_DSP_MEM1_SIZE 0x18000
-#define OMAP_DSP_GEM1_BASE 0x107F8000
 
 /* MEM2 is L1P RAM/CACHE space */
 #define OMAP_DSP_MEM2_BASE 0x5CE00000
 #define OMAP_DSP_MEM2_SIZE 0x8000
-#define OMAP_DSP_GEM2_BASE 0x10E00000
 
 /* MEM3 is L1D RAM/CACHE space */
 #define OMAP_DSP_MEM3_BASE 0x5CF04000
 #define OMAP_DSP_MEM3_SIZE 0x14000
-#define OMAP_DSP_GEM3_BASE 0x10F04000
-
-#define OMAP_IVA2_PRM_BASE 0x48306000
-#define OMAP_IVA2_PRM_SIZE 0x1000
-
-#define OMAP_IVA2_CM_BASE 0x48004000
-#define OMAP_IVA2_CM_SIZE 0x1000
 
 #define OMAP_PER_CM_BASE 0x48005000
 #define OMAP_PER_CM_SIZE 0x1000
@@ -68,9 +56,6 @@
 #define OMAP_DMMU_BASE 0x5D000000
 #define OMAP_DMMU_SIZE 0x1000
 
-#define OMAP_PRCM_VDD1_DOMAIN 1
-#define OMAP_PRCM_VDD2_DOMAIN 2
-
 /* GPP PROCESS CLEANUP Data structures */
 
 /* New structure (member of process context) abstracts NODE resource info */
drivers/staging/tidspbridge/include/dspbridge/dspdefs.h +0 -6
index 0ae7d16..2acbbb3 100644
@@ -37,12 +37,6 @@
 #include <dspbridge/iodefs.h>
 #include <dspbridge/msgdefs.h>
 
-/*
- *  Any IOCTLS at or above this value are reserved for standard Bridge driver
- *  interfaces.
- */
-#define BRD_RESERVEDIOCTLBASE   0x8000
-
 /* Handle to Bridge driver's private device context. */
 struct bridge_dev_context;
 
drivers/staging/tidspbridge/include/dspbridge/dspdrv.h +0 -2
index 0bb250f..7adf1e7 100644
@@ -20,8 +20,6 @@
 #if !defined _DSPDRV_H_
 #define _DSPDRV_H_
 
-#define MAX_DEV     10		/* Max support of 10 devices */
-
 /*
  *  ======== dsp_deinit ========
  *  Purpose:
drivers/staging/tidspbridge/include/dspbridge/dspioctl.h +0 -5
index 41e0594..54552a7 100644
@@ -31,9 +31,6 @@
 
 #define BRDIOCTL_CHNLREAD           (BRDIOCTL_RESERVEDBASE + 0x10)
 #define BRDIOCTL_CHNLWRITE          (BRDIOCTL_RESERVEDBASE + 0x20)
-#define BRDIOCTL_GETINTRCOUNT       (BRDIOCTL_RESERVEDBASE + 0x30)
-#define BRDIOCTL_RESETINTRCOUNT     (BRDIOCTL_RESERVEDBASE + 0x40)
-#define BRDIOCTL_INTERRUPTDSP       (BRDIOCTL_RESERVEDBASE + 0x50)
 /* DMMU */
 #define BRDIOCTL_SETMMUCONFIG       (BRDIOCTL_RESERVEDBASE + 0x60)
 /* PWR */
@@ -47,8 +44,6 @@
 #define BRDIOCTL_DEEPSLEEP          (BRDIOCTL_PWRCONTROL + 0x0)
 #define BRDIOCTL_EMERGENCYSLEEP     (BRDIOCTL_PWRCONTROL + 0x1)
 #define BRDIOCTL_WAKEUP             (BRDIOCTL_PWRCONTROL + 0x2)
-#define BRDIOCTL_PWRENABLE          (BRDIOCTL_PWRCONTROL + 0x3)
-#define BRDIOCTL_PWRDISABLE         (BRDIOCTL_PWRCONTROL + 0x4)
 #define BRDIOCTL_CLK_CTRL		    (BRDIOCTL_PWRCONTROL + 0x7)
 /* DSP Initiated Hibernate */
 #define BRDIOCTL_PWR_HIBERNATE	(BRDIOCTL_PWRCONTROL + 0x8)
drivers/staging/tidspbridge/include/dspbridge/dynamic_loader.h +0 -2
index 4b109d1..052d27e 100644
@@ -46,8 +46,6 @@ struct dynamic_loader_initialize;
  * Option flags to modify the behavior of module loading
  */
 #define DLOAD_INITBSS 0x1	/* initialize BSS sections to zero */
-#define DLOAD_BIGEND 0x2	/* require big-endian load module */
-#define DLOAD_LITTLE 0x4	/* require little-endian load module */
 
 /*****************************************************************************
  * Procedure dynamic_load_module
drivers/staging/tidspbridge/include/dspbridge/io_sm.h +0 -1
index 18aec55..bcde1d9 100644
@@ -28,7 +28,6 @@
 #define IO_INPUT            0
 #define IO_OUTPUT           1
 #define IO_SERVICE          2
-#define IO_MAXSERVICE       IO_SERVICE
 
 #ifdef CONFIG_TIDSPBRIDGE_DVFS
 /* The maximum number of OPPs that are supported */
drivers/staging/tidspbridge/include/dspbridge/iodefs.h +0 -2
index 8bd10a0..31cbc9a 100644
@@ -19,8 +19,6 @@
 #ifndef IODEFS_
 #define IODEFS_
 
-#define IO_MAXIRQ   0xff	/* Arbitrarily large number. */
-
 /* IO Objects: */
 struct io_mgr;
 
drivers/staging/tidspbridge/include/dspbridge/mbx_sh.h +0 -40
index 5d165cd..7424c88 100644
@@ -110,13 +110,7 @@
 #ifndef _MBX_SH_H
 #define _MBX_SH_H
 
-#define MBX_CLASS_MSK      0xFC00	/* Class bits are 10 thru 15 */
-#define MBX_VALUE_MSK      0x03FF	/* Value is 0 thru 9 */
-
-#define MBX_DEH_CLASS      0x0000	/* DEH owns Mbx INTR */
-#define MBX_DDMA_CLASS     0x0400	/* DSP-DMA link drvr chnls owns INTR */
 #define MBX_PCPY_CLASS     0x0800	/* PROC-COPY  " */
-#define MBX_ZCPY_CLASS     0x1000	/* ZERO-COPY  " */
 #define MBX_PM_CLASS       0x2000	/* Power Management */
 #define MBX_DBG_CLASS      0x4000	/* For debugging purpose */
 
@@ -128,55 +122,21 @@
 #define MBX_DEH_USERS_BASE  0x100	/* 256 */
 #define MBX_DEH_LIMIT       0x3FF	/* 1023 */
 #define MBX_DEH_RESET       0x101	/* DSP RESET (DEH) */
-#define MBX_DEH_EMMU        0X103	/*DSP MMU FAULT RECOVERY */
 
 /*
  *  Link driver command/status codes.
  */
-/* DSP-DMA */
-#define MBX_DDMA_NUMCHNLBITS 5	/* # chnl Id: # bits available */
-#define MBX_DDMA_CHNLSHIFT   0	/* # of bits to shift */
-#define MBX_DDMA_CHNLMSK     0x01F	/* bits 0 thru 4 */
-
-#define MBX_DDMA_NUMBUFBITS  5	/* buffer index: # of bits avail */
-#define MBX_DDMA_BUFSHIFT    (MBX_DDMA_NUMCHNLBITS + MBX_DDMA_CHNLSHIFT)
-#define MBX_DDMA_BUFMSK      0x3E0	/* bits 5 thru 9 */
-
-/* Zero-Copy */
-#define MBX_ZCPY_NUMCHNLBITS 5	/* # chnl Id: # bits available */
-#define MBX_ZCPY_CHNLSHIFT   0	/* # of bits to shift */
-#define MBX_ZCPY_CHNLMSK     0x01F	/* bits 0 thru 4 */
 
 /*  Power Management Commands */
 #define MBX_PM_DSPIDLE                  (MBX_PM_CLASS + 0x0)
 #define MBX_PM_DSPWAKEUP                (MBX_PM_CLASS + 0x1)
 #define MBX_PM_EMERGENCYSLEEP           (MBX_PM_CLASS + 0x2)
-#define MBX_PM_SLEEPUNTILRESTART        (MBX_PM_CLASS + 0x3)
-#define MBX_PM_DSPGLOBALIDLE_OFF        (MBX_PM_CLASS + 0x4)
-#define MBX_PM_DSPGLOBALIDLE_ON         (MBX_PM_CLASS + 0x5)
 #define MBX_PM_SETPOINT_PRENOTIFY       (MBX_PM_CLASS + 0x6)
 #define MBX_PM_SETPOINT_POSTNOTIFY      (MBX_PM_CLASS + 0x7)
-#define MBX_PM_DSPRETN                  (MBX_PM_CLASS + 0x8)
 #define MBX_PM_DSPRETENTION        (MBX_PM_CLASS + 0x8)
 #define MBX_PM_DSPHIBERNATE        (MBX_PM_CLASS + 0x9)
 #define MBX_PM_HIBERNATE_EN        (MBX_PM_CLASS + 0xA)
 #define MBX_PM_OPP_REQ                  (MBX_PM_CLASS + 0xB)
-#define MBX_PM_OPP_CHG                  (MBX_PM_CLASS + 0xC)
-
-#define MBX_PM_TYPE_MASK 0x0300
-#define MBX_PM_TYPE_PWR_CHNG 0x0100
-#define MBX_PM_TYPE_OPP_PRECHNG 0x0200
-#define MBX_PM_TYPE_OPP_POSTCHNG 0x0300
-#define MBX_PM_TYPE_OPP_MASK 0x0300
-#define MBX_PM_OPP_PRECHNG (MBX_PM_CLASS | MBX_PM_TYPE_OPP_PRECHNG)
-/* DSP to MPU */
-#define MBX_PM_OPP_CHNG(OPP) (MBX_PM_CLASS | MBX_PM_TYPE_OPP_PRECHNG | (OPP))
-#define MBX_PM_RET (MBX_PM_CLASS | MBX_PM_TYPE_PWR_CHNG | 0x0006)
-#define MBX_PM_HIB (MBX_PM_CLASS | MBX_PM_TYPE_PWR_CHNG | 0x0002)
-#define MBX_PM_OPP1 0
-#define MBX_PM_OPP2 1
-#define MBX_PM_OPP3 2
-#define MBX_PM_OPP4 3
 
 /* Bridge Debug Commands */
 #define MBX_DBG_SYSPRINTF       (MBX_DBG_CLASS + 0x0)
drivers/staging/tidspbridge/include/dspbridge/pwr_sh.h +0 -4
index 1b4a090..c78a1b1 100644
@@ -24,10 +24,6 @@
 /* valid sleep command codes that can be sent by GPP via mailbox: */
 #define PWR_DEEPSLEEP           MBX_PM_DSPIDLE
 #define PWR_EMERGENCYDEEPSLEEP  MBX_PM_EMERGENCYSLEEP
-#define PWR_SLEEPUNTILRESTART   MBX_PM_SLEEPUNTILRESTART
 #define PWR_WAKEUP              MBX_PM_DSPWAKEUP
-#define PWR_AUTOENABLE          MBX_PM_PWRENABLE
-#define PWR_AUTODISABLE         MBX_PM_PWRDISABLE
-#define PWR_RETENTION             MBX_PM_DSPRETN
 
 #endif /* PWR_SH_ */
drivers/staging/tidspbridge/include/dspbridge/rms_sh.h +0 -9
index 7bc5574..ba7f478 100644
@@ -22,27 +22,18 @@
 
 #include <dspbridge/rmstypes.h>
 
-/* Node Types: */
-#define RMS_TASK                1	/* Task node */
-#define RMS_DAIS                2	/* xDAIS socket node */
-#define RMS_MSG                 3	/* Message node */
-
 /* Memory Types: */
 #define RMS_CODE                0	/* Program space */
 #define RMS_DATA                1	/* Data space */
-#define RMS_IO                	2	/* I/O space */
 
 /* RM Server Command and Response Buffer Sizes: */
 #define RMS_COMMANDBUFSIZE     256	/* Size of command buffer */
-#define RMS_RESPONSEBUFSIZE    16	/* Size of response buffer */
 
 /* Pre-Defined Command/Response Codes: */
 #define RMS_EXIT                0x80000000	/* GPP->Node: shutdown */
 #define RMS_EXITACK             0x40000000	/* Node->GPP: ack shutdown */
 #define RMS_BUFDESC             0x20000000	/* Arg1 SM buf, Arg2 SM size */
 #define RMS_KILLTASK            0x10000000	/* GPP->Node: Kill Task */
-#define RMS_USER                0x0	/* Start of user-defined msg codes */
-#define RMS_MAXUSERCODES        0xfff	/* Maximum user defined C/R Codes */
 
 /* RM Server RPC Command Structure: */
 struct rms_command {
drivers/staging/tidspbridge/include/dspbridge/strmdefs.h +0 -2
index b363f79..c6abbf3 100644
@@ -19,8 +19,6 @@
 #ifndef STRMDEFS_
 #define STRMDEFS_
 
-#define STRM_MAXEVTNAMELEN      32
-
 struct strm_mgr;
 
 struct strm_object;
drivers/staging/tidspbridge/pmgr/dev.c +1 -1
index b160b00..b95cd20 100644
@@ -880,7 +880,7 @@ int dev_start_device(struct cfg_devnode *dev_node_obj)
 {
 	struct dev_object *hdev_obj = NULL;	/* handle to 'Bridge Device */
 	/* Bridge driver filename */
-	char bridge_file_name[CFG_MAXSEARCHPATHLEN] = "UMA";
+	char *bridge_file_name = "UMA";
 	int status;
 	struct mgr_object *hmgr_obj = NULL;
 	struct drv_data *drv_datap = dev_get_drvdata(bridge);
Signature · 1 line
1.6.3.3
#2 lore raw

PATCH 2/5 staging:tidspbridge - Remove unused functions

Remove functions that are not used at all, also remove the dependencies of this functions like struct members, comments and calls.

---
 drivers/staging/tidspbridge/core/io_sm.c           |    4 -
 drivers/staging/tidspbridge/core/tiomap3430.c      |    2 -
 .../staging/tidspbridge/include/dspbridge/chnl.h   |   21 ---
 .../staging/tidspbridge/include/dspbridge/dbll.h   |    6 -
 .../tidspbridge/include/dspbridge/dblldefs.h       |    3 -
 .../staging/tidspbridge/include/dspbridge/dev.h    |   55 --------
 .../staging/tidspbridge/include/dspbridge/dspio.h  |    1 -
 .../tidspbridge/include/dspbridge/host_os.h        |    9 --
 drivers/staging/tidspbridge/include/dspbridge/io.h |   16 ---
 .../staging/tidspbridge/include/dspbridge/io_sm.h  |  135 --------------------
 .../staging/tidspbridge/include/dspbridge/node.h   |   18 ---
 .../include/dspbridge/resourcecleanup.h            |   11 --
 .../staging/tidspbridge/include/dspbridge/strm.h   |   62 ---------
 drivers/staging/tidspbridge/pmgr/cod.c             |    3 -
 drivers/staging/tidspbridge/pmgr/dbll.c            |   41 ------
 drivers/staging/tidspbridge/rmgr/nldr.c            |    3 -
 16 files changed, 0 insertions(+), 390 deletions(-)
drivers/staging/tidspbridge/core/io_sm.c +0 -4
index 9289522..90e89ee 100644
@@ -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)
drivers/staging/tidspbridge/core/tiomap3430.c +0 -2
index cb45e93..cacd30e 100644
@@ -255,8 +255,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
drivers/staging/tidspbridge/include/dspbridge/chnl.h +0 -21
index 8733b3b..92f6a13 100644
@@ -25,27 +25,6 @@
 #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:
  *      Create a channel manager object, responsible for opening new channels
drivers/staging/tidspbridge/include/dspbridge/dbll.h +0 -6
index b018676..46a9e00 100644
@@ -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);
drivers/staging/tidspbridge/include/dspbridge/dblldefs.h +0 -3
index d2b4fda..81821e5 100644
@@ -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_ */
drivers/staging/tidspbridge/include/dspbridge/dev.h +0 -55

67 lines not on this page · raw message

drivers/staging/tidspbridge/include/dspbridge/dspio.h +0 -1
index 88f5f90..5c666b8 100644
@@ -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);
 
drivers/staging/tidspbridge/include/dspbridge/host_os.h +0 -9
index 6549898..b1b8acb 100644
@@ -57,13 +57,4 @@
 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
drivers/staging/tidspbridge/include/dspbridge/io.h +0 -16
index bc346f9..da4683c 100644
@@ -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_ */
drivers/staging/tidspbridge/include/dspbridge/io_sm.h +0 -135

147 lines not on this page · raw message

drivers/staging/tidspbridge/include/dspbridge/node.h +0 -18
index 49ed5c1..4c5558c 100644
@@ -113,24 +113,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:
  *      Connect two nodes on the DSP, or a node on the DSP to the GPP. In the
drivers/staging/tidspbridge/include/dspbridge/resourcecleanup.h +0 -11
index dfaf0c6..8c9c902 100644
@@ -17,23 +17,12 @@
 #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);
 
drivers/staging/tidspbridge/include/dspbridge/strm.h +0 -62

78 lines not on this page · raw message

drivers/staging/tidspbridge/pmgr/cod.c +0 -3
index 52989ab..db29a19 100644
@@ -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);
drivers/staging/tidspbridge/pmgr/dbll.c +0 -41

59 lines not on this page · raw message

drivers/staging/tidspbridge/rmgr/nldr.c +0 -3
index a6ae007..26cfb32 100644
@@ -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 */
Signature · 1 line
1.6.3.3
#3 lore raw

PATCH 3/5 staging:tidspbridge - Remove unused structs

Remove unused structs and its dependencies, like references in other structs or as arguments of certain functions.

---
 .../tidspbridge/include/dspbridge/cfgdefs.h        |    6 --
 .../staging/tidspbridge/include/dspbridge/cod.h    |   10 +----
 .../tidspbridge/include/dspbridge/dbldefs.h        |   49 --------------------
 .../staging/tidspbridge/include/dspbridge/drv.h    |   14 ------
 .../tidspbridge/include/dspbridge/dspapi-ioctl.h   |    8 ---
 .../staging/tidspbridge/include/dspbridge/ldr.h    |   29 ------------
 drivers/staging/tidspbridge/pmgr/cod.c             |   11 +----
 drivers/staging/tidspbridge/pmgr/dev.c             |    8 +---
 drivers/staging/tidspbridge/rmgr/dbdcd.c           |    2 +-
 9 files changed, 4 insertions(+), 133 deletions(-)
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/ldr.h
drivers/staging/tidspbridge/include/dspbridge/cfgdefs.h +0 -6
index c3f04f8..0589a0a 100644
@@ -58,10 +58,4 @@ struct cfg_hostres {
 	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_ */
drivers/staging/tidspbridge/include/dspbridge/cod.h +1 -9
index 5efea91..53bd4bb 100644
@@ -37,11 +37,6 @@ struct cod_manager;
 /* COD library handle */
 struct cod_libraryobj;
 
-/* COD attributes */
-struct cod_attrs {
-	u32 ul_reserved;
-};
-
 /*
  *  Function prototypes for writing memory to a DSP system, allocating
  *  and freeing DSP memory.
@@ -76,8 +71,6 @@ extern void cod_close(struct cod_libraryobj *lib);
  *  Parameters:
  *      manager:        created manager object
  *      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:
  *      0:                Success.
  *      -ESPIPE:   ZL_Create failed.
@@ -89,8 +82,7 @@ extern void cod_close(struct cod_libraryobj *lib);
  *  Ensures:
  */
 extern int cod_create(struct cod_manager **mgr,
-			     char *str_zl_file,
-			     const struct cod_attrs *attrs);
+			     char *str_zl_file);
 
 /*
  *  ======== cod_delete ========
drivers/staging/tidspbridge/include/dspbridge/dbldefs.h +0 -49

59 lines not on this page · raw message

drivers/staging/tidspbridge/include/dspbridge/drv.h +0 -14
index adb28ec..26972ad 100644
@@ -96,17 +96,6 @@ struct dmm_rsv_object {
 	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 */
 struct strm_res_object {
 	s32 stream_allocated;	/* Stream status */
@@ -151,9 +140,6 @@ struct process_context {
 	struct list_head dmm_rsv_list;
 	spinlock_t dmm_rsv_lock;
 
-	/* DSP Heap resources */
-	struct dspheap_res_object *pdspheap_list;
-
 	/* Stream resources */
 	struct idr *stream_id;
 };
drivers/staging/tidspbridge/include/dspbridge/dspapi-ioctl.h +0 -8
index 8da5bd8..8ad9ace 100644
@@ -120,10 +120,6 @@ union trapped_args {
 
 	struct {
 		void *hprocessor;
-	} args_proc_start;
-
-	struct {
-		void *hprocessor;
 		u32 ul_size;
 		void *__user *pp_rsv_addr;
 	} args_proc_rsvmem;
@@ -165,10 +161,6 @@ union trapped_args {
 
 	struct {
 		void *hprocessor;
-	} args_proc_stop;
-
-	struct {
-		void *hprocessor;
 		void *pmpu_addr;
 		u32 ul_size;
 	} args_proc_invalidatememory;
drivers/staging/tidspbridge/include/dspbridge/ldr.h deleted +0 -29
deleted file mode 100644
index 6a0269c..0000000
@@ -1,29 +0,0 @@
-/*
- * 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_ */
drivers/staging/tidspbridge/pmgr/cod.c +1 -10
index db29a19..17ea57d 100644
@@ -33,9 +33,6 @@
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
 
-/*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/ldr.h>
-
 /*  ----------------------------------- Platform Manager */
 /* Include appropriate loader header file */
 #include <dspbridge/dbll.h>
@@ -51,7 +48,6 @@ struct cod_manager {
 	struct dbll_library_obj *base_lib;
 	bool loaded;		/* Base library loaded? */
 	u32 ul_entry;
-	struct ldr_module *dll_obj;
 	struct dbll_fxns fxns;
 	struct dbll_attrs attrs;
 	char sz_zl_file[COD_MAXPATHLENGTH];
@@ -206,8 +202,7 @@ void cod_close(struct cod_libraryobj *lib)
  *      dynamically loaded object files.
  *
  */
-int cod_create(struct cod_manager **mgr, char *str_zl_file,
-		      const struct cod_attrs *attrs)
+int cod_create(struct cod_manager **mgr, char *str_zl_file)
 {
 	struct cod_manager *mgr_new;
 	struct dbll_attrs zl_attrs;
@@ -219,10 +214,6 @@ int cod_create(struct cod_manager **mgr, char *str_zl_file,
 	/* assume failure */
 	*mgr = NULL;
 
-	/* we don't support non-default attrs yet */
-	if (attrs != NULL)
-		return -ENOSYS;
-
 	mgr_new = kzalloc(sizeof(struct cod_manager), GFP_KERNEL);
 	if (mgr_new == NULL)
 		return -ENOMEM;
drivers/staging/tidspbridge/pmgr/dev.c +1 -7
index b95cd20..0f10a50 100644
@@ -27,9 +27,6 @@
 /*  ----------------------------------- Trace & Debug */
 #include <dspbridge/dbc.h>
 
-/*  ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/ldr.h>
-
 /*  ----------------------------------- Platform Manager */
 #include <dspbridge/cod.h>
 #include <dspbridge/drv.h>
@@ -75,7 +72,6 @@ struct dev_object {
 	struct io_mgr *hio_mgr;	/* IO manager (CHNL, msg_ctrl) */
 	struct cmm_object *hcmm_mgr;	/* SM 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. */
 	struct drv_object *hdrv_obj;	/* Driver Object */
 	/* List of Processors attached to this device */
@@ -139,7 +135,6 @@ int dev_create_device(struct dev_object **device_obj,
 			     struct cfg_devnode *dev_node_obj)
 {
 	struct cfg_hostres *host_res;
-	struct ldr_module *module_obj = NULL;
 	struct bridge_drv_interface *drv_fxns = NULL;
 	struct dev_object *dev_obj = NULL;
 	struct chnl_mgrattrs mgr_attrs;
@@ -179,7 +174,6 @@ int dev_create_device(struct dev_object **device_obj,
 		if (dev_obj) {
 			/* Fill out the rest of the Dev Object structure: */
 			dev_obj->dev_node_obj = dev_node_obj;
-			dev_obj->module_obj = module_obj;
 			dev_obj->cod_mgr = NULL;
 			dev_obj->hchnl_mgr = NULL;
 			dev_obj->hdeh_mgr = NULL;
@@ -953,7 +947,7 @@ static int init_cod_mgr(struct dev_object *dev_obj)
 	DBC_REQUIRE(refs > 0);
 	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;
 }
drivers/staging/tidspbridge/rmgr/dbdcd.c +1 -1
index 3581a55..f01cf07 100644
@@ -134,7 +134,7 @@ int dcd_create_manager(char *sz_zl_dll_name,
 	DBC_REQUIRE(refs >= 0);
 	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)
 		goto func_end;
 
Signature · 1 line
1.6.3.3
#4 lore raw

PATCH 4/5 staging:tidspbridge - Remove unused typedefs

Unsed typedefs are removed, because of there are not used or because previous clean ups.

---
 .../tidspbridge/include/dspbridge/dbldefs.h        |   81 --------------------
 .../tidspbridge/include/dspbridge/dblldefs.h       |   62 ---------------
 2 files changed, 0 insertions(+), 143 deletions(-)
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/dbldefs.h
drivers/staging/tidspbridge/include/dspbridge/dbldefs.h deleted +0 -81
deleted file mode 100644
index 5cf9dad..0000000
@@ -1,81 +0,0 @@
-/*
- * dbldefs.h
- *
- * DSP-BIOS Bridge driver support functions for TI OMAP processors.
- *
- * 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 DBLDEFS_
-#define DBLDEFS_
-
-
-/*
- *  ======== dbl_flags ========
- *  Specifies whether to load code, data, or symbols
- */
-typedef s32 dbl_flags;
-
-/*
- *  ======== dbl_alloc_fxn ========
- *  Allocate memory function.  Allocate or reserve (if reserved == TRUE)
- *  "size" bytes of memory from segment "space" and return the address in
- *  *dsp_address (or starting at *dsp_address if reserve == TRUE). Returns 0 on
- *  success, or an error code on failure.
- */
-typedef s32(*dbl_alloc_fxn) (void *hdl, s32 space, u32 size, u32 align,
-			     u32 *dsp_address, s32 seg_id, s32 req,
-			     bool reserved);
-
-/*
- *  ======== dbl_free_fxn ========
- *  Free memory function.  Free, or unreserve (if reserved == TRUE) "size"
- *  bytes of memory from segment "space"
- */
-typedef bool(*dbl_free_fxn) (void *hdl, u32 addr, s32 space, u32 size,
-			     bool reserved);
-
-/*
- *  ======== dbl_log_write_fxn ========
- *  Function to call when writing data from a section, to log the info.
- *  Can be NULL if no logging is required.
- */
-typedef int(*dbl_log_write_fxn) (void *handle,
-					struct dbl_sect_info *sect, u32 addr,
-					u32 bytes);
-
-/*
- *  ======== dbl_sym_lookup ========
- *  Symbol lookup function - Find the symbol name and return its value.
- *
- *  Parameters:
- *      handle          - Opaque handle
- *      parg            - Opaque argument.
- *      name            - Name of symbol to lookup.
- *      sym             - Location to store address of symbol structure.
- *
- *  Returns:
- *      TRUE:           Success (symbol was found).
- *      FALSE:          Failed to find symbol.
- */
-typedef bool(*dbl_sym_lookup) (void *handle, void *parg, void *rmm_handle,
-			       const char *name, struct dbl_symbol ** sym);
-
-/*
- *  ======== dbl_write_fxn ========
- *  Write memory function.  Write "n" HOST bytes of memory to segment "mtype"
- *  starting at address "dsp_address" from the buffer "buf".  The buffer is
- *  formatted as an array of words appropriate for the DSP.
- */
-typedef s32(*dbl_write_fxn) (void *hdl, u32 dsp_address, void *buf,
-			     u32 n, s32 mtype);
-
-#endif /* DBLDEFS_ */
drivers/staging/tidspbridge/include/dspbridge/dblldefs.h +0 -62

80 lines not on this page · raw message

Signature · 1 line
1.6.3.3
#5 lore raw

PATCH 5/5 staging:tidspbridge - Remove trivial header files

Remove the header files that contains few declarations and can be merged onto more generic headers.

---
 drivers/staging/tidspbridge/core/tiomap3430_pwr.c  |    4 +-
 .../tidspbridge/include/dspbridge/dehdefs.h        |   31 -----------------
 .../staging/tidspbridge/include/dspbridge/dev.h    |    4 +-
 .../staging/tidspbridge/include/dspbridge/disp.h   |   15 ++++++++-
 .../tidspbridge/include/dspbridge/dispdefs.h       |   35 --------------------
 .../staging/tidspbridge/include/dspbridge/drv.h    |    4 ++-
 .../tidspbridge/include/dspbridge/drvdefs.h        |   25 --------------
 .../tidspbridge/include/dspbridge/dspdefs.h        |    4 +-
 .../staging/tidspbridge/include/dspbridge/dspio.h  |    3 +-
 drivers/staging/tidspbridge/include/dspbridge/io.h |   13 +++++++-
 .../staging/tidspbridge/include/dspbridge/io_sm.h  |    7 +++-
 .../staging/tidspbridge/include/dspbridge/iodefs.h |   34 -------------------
 .../staging/tidspbridge/include/dspbridge/node.h   |    2 +-
 .../staging/tidspbridge/include/dspbridge/pwr.h    |    8 ++++-
 .../staging/tidspbridge/include/dspbridge/pwr_sh.h |   29 ----------------
 drivers/staging/tidspbridge/pmgr/io.c              |    1 -
 drivers/staging/tidspbridge/rmgr/drv_interface.c   |    1 -
 drivers/staging/tidspbridge/rmgr/node.c            |    1 -
 18 files changed, 51 insertions(+), 170 deletions(-)
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/dehdefs.h
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/dispdefs.h
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/drvdefs.h
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/iodefs.h
 delete mode 100644 drivers/staging/tidspbridge/include/dspbridge/pwr_sh.h
drivers/staging/tidspbridge/core/tiomap3430_pwr.c +2 -2
index fb9026e..8e2b50f 100644
@@ -29,13 +29,13 @@
 /*  ----------------------------------- Platform Manager */
 #include <dspbridge/brddefs.h>
 #include <dspbridge/dev.h>
-#include <dspbridge/iodefs.h>
+#include <dspbridge/io.h>
 
 /* ------------------------------------ Hardware Abstraction Layer */
 #include <hw_defs.h>
 #include <hw_mmu.h>
 
-#include <dspbridge/pwr_sh.h>
+#include <dspbridge/pwr.h>
 
 /*  ----------------------------------- Bridge Driver */
 #include <dspbridge/dspdeh.h>
drivers/staging/tidspbridge/include/dspbridge/dehdefs.h deleted +0 -31
deleted file mode 100644
index 5341471..0000000
@@ -1,31 +0,0 @@
-/*
- * dehdefs.h
- *
- * DSP-BIOS Bridge driver support functions for TI OMAP processors.
- *
- * Definition for Bridge driver module DEH.
- *
- * 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 DEHDEFS_
-#define DEHDEFS_
-
-#include <dspbridge/mbx_sh.h>	/* shared mailbox codes */
-
-/* DEH object manager */
-struct deh_mgr;
-
-/* Magic code used to determine if DSP signaled exception. */
-#define DEH_BASE        MBX_DEH_BASE
-#define DEH_LIMIT       MBX_DEH_LIMIT
-
-#endif /* _DEHDEFS_H */
drivers/staging/tidspbridge/include/dspbridge/dev.h +2 -2
index 4d4196b..37d1fff 100644
@@ -23,9 +23,9 @@
 #include <dspbridge/chnldefs.h>
 #include <dspbridge/cmm.h>
 #include <dspbridge/cod.h>
-#include <dspbridge/dehdefs.h>
+#include <dspbridge/dspdeh.h>
 #include <dspbridge/nodedefs.h>
-#include <dspbridge/dispdefs.h>
+#include <dspbridge/disp.h>
 #include <dspbridge/dspdefs.h>
 #include <dspbridge/dmm.h>
 #include <dspbridge/host_os.h>
drivers/staging/tidspbridge/include/dspbridge/disp.h +14 -1
index 82bf721..41738c5 100644
@@ -22,7 +22,20 @@
 #include <dspbridge/dbdefs.h>
 #include <dspbridge/nodedefs.h>
 #include <dspbridge/nodepriv.h>
-#include <dspbridge/dispdefs.h>
+
+struct disp_object;
+
+/* Node Dispatcher attributes */
+struct disp_attr {
+	u32 ul_chnl_offset;	/* Offset of channel ids reserved for RMS */
+	/* Size of buffer for sending data to RMS */
+	u32 ul_chnl_buf_size;
+	int proc_family;	/* eg, 5000 */
+	int proc_type;		/* eg, 5510 */
+	void *reserved1;	/* Reserved for future use. */
+	u32 reserved2;		/* Reserved for future use. */
+};
+
 
 /*
  *  ======== disp_create ========
drivers/staging/tidspbridge/include/dspbridge/dispdefs.h deleted +0 -35
deleted file mode 100644
index 946551a..0000000
@@ -1,35 +0,0 @@
-/*
- * dispdefs.h
- *
- * DSP-BIOS Bridge driver support functions for TI OMAP processors.
- *
- * Global DISP constants and types, shared by PROCESSOR, NODE, and DISP.
- *
- * 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 DISPDEFS_
-#define DISPDEFS_
-
-struct disp_object;
-
-/* Node Dispatcher attributes */
-struct disp_attr {
-	u32 ul_chnl_offset;	/* Offset of channel ids reserved for RMS */
-	/* Size of buffer for sending data to RMS */
-	u32 ul_chnl_buf_size;
-	int proc_family;	/* eg, 5000 */
-	int proc_type;		/* eg, 5510 */
-	void *reserved1;	/* Reserved for future use. */
-	u32 reserved2;		/* Reserved for future use. */
-};
-
-#endif /* DISPDEFS_ */
drivers/staging/tidspbridge/include/dspbridge/drv.h +3 -1
index 26972ad..bcb2817 100644
@@ -23,9 +23,11 @@
 
 #include <dspbridge/devdefs.h>
 
-#include <dspbridge/drvdefs.h>
 #include <linux/idr.h>
 
+/* Bridge Driver Object */
+struct drv_object;
+
 /* Provide the DSP Internal memory windows that can be accessed from L3 address
  * space */
 
drivers/staging/tidspbridge/include/dspbridge/drvdefs.h deleted +0 -25
deleted file mode 100644
index 2920917..0000000
@@ -1,25 +0,0 @@
-/*
- * drvdefs.h
- *
- * DSP-BIOS Bridge driver support functions for TI OMAP processors.
- *
- * Definition of common struct between dspdefs.h and drv.h.
- *
- * 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 DRVDEFS_
-#define DRVDEFS_
-
-/* Bridge Driver Object */
-struct drv_object;
-
-#endif /* DRVDEFS_ */
drivers/staging/tidspbridge/include/dspbridge/dspdefs.h +2 -2
index 2acbbb3..4eaeb21 100644
@@ -32,9 +32,9 @@
 #include <dspbridge/brddefs.h>
 #include <dspbridge/cfgdefs.h>
 #include <dspbridge/chnlpriv.h>
-#include <dspbridge/dehdefs.h>
+#include <dspbridge/dspdeh.h>
 #include <dspbridge/devdefs.h>
-#include <dspbridge/iodefs.h>
+#include <dspbridge/io.h>
 #include <dspbridge/msgdefs.h>
 
 /* Handle to Bridge driver's private device context. */
drivers/staging/tidspbridge/include/dspbridge/dspio.h +2 -1
index 5c666b8..66b64fa 100644
@@ -24,7 +24,8 @@
 #define DSPIO_
 
 #include <dspbridge/devdefs.h>
-#include <dspbridge/iodefs.h>
+#include <dspbridge/io.h>
+
 
 extern int bridge_io_create(struct io_mgr **io_man,
 				   struct dev_object *hdev_obj,
drivers/staging/tidspbridge/include/dspbridge/io.h +12 -1
index da4683c..9615980 100644
@@ -22,7 +22,18 @@
 #include <dspbridge/cfgdefs.h>
 #include <dspbridge/devdefs.h>
 
-#include <dspbridge/iodefs.h>
+/* IO Objects: */
+struct io_mgr;
+
+/* IO manager attributes: */
+struct io_attrs {
+	u8 birq;		/* Channel's I/O IRQ number. */
+	bool irq_shared;	/* TRUE if the IRQ is shareable. */
+	u32 word_size;		/* DSP Word size. */
+	u32 shm_base;		/* Physical base address of shared memory. */
+	u32 usm_length;		/* Size (in bytes) of shared memory. */
+};
+
 
 /*
  *  ======== io_create ========
drivers/staging/tidspbridge/include/dspbridge/io_sm.h +6 -1
index 8778ab4..6d26472 100644
@@ -23,7 +23,12 @@
 #include <dspbridge/_chnl_sm.h>
 #include <dspbridge/host_os.h>
 
-#include <dspbridge/iodefs.h>
+#include <dspbridge/io.h>
+#include <dspbridge/mbx_sh.h>	/* shared mailbox codes */
+
+/* Magic code used to determine if DSP signaled exception. */
+#define DEH_BASE        MBX_DEH_BASE
+#define DEH_LIMIT       MBX_DEH_LIMIT
 
 #define IO_INPUT            0
 #define IO_OUTPUT           1
drivers/staging/tidspbridge/include/dspbridge/iodefs.h deleted +0 -34
deleted file mode 100644
index 31cbc9a..0000000
@@ -1,34 +0,0 @@
-/*
- * iodefs.h
- *
- * DSP-BIOS Bridge driver support functions for TI OMAP processors.
- *
- * System-wide channel objects and constants.
- *
- * 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 IODEFS_
-#define IODEFS_
-
-/* IO Objects: */
-struct io_mgr;
-
-/* IO manager attributes: */
-struct io_attrs {
-	u8 birq;		/* Channel's I/O IRQ number. */
-	bool irq_shared;	/* TRUE if the IRQ is shareable. */
-	u32 word_size;		/* DSP Word size. */
-	u32 shm_base;		/* Physical base address of shared memory. */
-	u32 usm_length;		/* Size (in bytes) of shared memory. */
-};
-
-#endif /* IODEFS_ */
drivers/staging/tidspbridge/include/dspbridge/node.h +1 -1
index 4c5558c..63739c8 100644
@@ -22,7 +22,7 @@
 #include <dspbridge/procpriv.h>
 
 #include <dspbridge/nodedefs.h>
-#include <dspbridge/dispdefs.h>
+#include <dspbridge/disp.h>
 #include <dspbridge/nldrdefs.h>
 #include <dspbridge/drv.h>
 
drivers/staging/tidspbridge/include/dspbridge/pwr.h +7 -1
index a6dc783..5e3ab21 100644
@@ -18,7 +18,13 @@
 #define PWR_
 
 #include <dspbridge/dbdefs.h>
-#include <dspbridge/pwr_sh.h>
+#include <dspbridge/mbx_sh.h>
+
+/* valid sleep command codes that can be sent by GPP via mailbox: */
+#define PWR_DEEPSLEEP           MBX_PM_DSPIDLE
+#define PWR_EMERGENCYDEEPSLEEP  MBX_PM_EMERGENCYSLEEP
+#define PWR_WAKEUP              MBX_PM_DSPWAKEUP
+
 
 /*
  *  ======== pwr_sleep_dsp ========
drivers/staging/tidspbridge/include/dspbridge/pwr_sh.h deleted +0 -29
deleted file mode 100644
index c78a1b1..0000000
@@ -1,29 +0,0 @@
-/*
- * pwr_sh.h
- *
- * DSP-BIOS Bridge driver support functions for TI OMAP processors.
- *
- * Power Manager shared definitions (used on both GPP and DSP sides).
- *
- * Copyright (C) 2008 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 PWR_SH_
-#define PWR_SH_
-
-#include <dspbridge/mbx_sh.h>
-
-/* valid sleep command codes that can be sent by GPP via mailbox: */
-#define PWR_DEEPSLEEP           MBX_PM_DSPIDLE
-#define PWR_EMERGENCYDEEPSLEEP  MBX_PM_EMERGENCYSLEEP
-#define PWR_WAKEUP              MBX_PM_DSPWAKEUP
-
-#endif /* PWR_SH_ */
drivers/staging/tidspbridge/pmgr/io.c +0 -1
index 20cbb9f..0e8843f 100644
@@ -31,7 +31,6 @@
 
 /*  ----------------------------------- This */
 #include <ioobj.h>
-#include <dspbridge/iodefs.h>
 #include <dspbridge/io.h>
 
 /*  ----------------------------------- Globals */
drivers/staging/tidspbridge/rmgr/drv_interface.c +0 -1
index 324fcdf..c43c7e3 100644
@@ -59,7 +59,6 @@
 #include <dspbridge/chnl.h>
 #include <dspbridge/proc.h>
 #include <dspbridge/dev.h>
-#include <dspbridge/drvdefs.h>
 #include <dspbridge/drv.h>
 
 #ifdef CONFIG_TIDSPBRIDGE_DVFS
drivers/staging/tidspbridge/rmgr/node.c +0 -1
index 62d5c31..9472729 100644
@@ -64,7 +64,6 @@
 #include <dspbridge/nldr.h>
 
 #include <dspbridge/drv.h>
-#include <dspbridge/drvdefs.h>
 #include <dspbridge/resourcecleanup.h>
 #include <_tiomap.h>
 
Signature · 1 line
1.6.3.3