[RFC][PATCH v1 0/19] Cleanup- custom error codes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This RFC v1 patch series fixes Exxxx to -Exxxxx

Dsp_status replacement will be sent out as separate patch.


As of today there are around 113 DSPBRIDGE specific error codes.

Here are the details:

1. 41 error codes are not currently used in bridge. Hence they can be removed.

2. 19 error codes are mapped to Linux standard error codes. Patches 1 to 19 contains these changes.

3. 7 error codes are used as base address to access the rest of error codes which can be removed. Some base addresses are removed as part of 1 but some are still kept as point 4 has dependency on these addresses.
Ex: (Removed base address)
/* FAILURE Codes: LDR */
#define LDR_EBASE                   (DSP_COMP_EBASE + 0x100)

/* Insufficient memory to export class driver services. */
#define LDR_E_NOMEMORY              (LDR_EBASE + 0x00)

/* Unable to find WMD file in system directory. */
#define LDR_E_FILEUNABLETOOPEN      (LDR_EBASE + 0x01)

4. For 46 error codes, couldn't find an exact match in Linux error code. This still needs to be worked out. This is not addressed in this patch series. (See attached text file for details)

As for as OMX components concerned, they really don't care about the specific error codes. Hence no changes required for the OMX code.

Shivananda Hebbar (19)

DSPBRIDGE: Cleanup custom error code (DSP_EALREADYCONNECTED ->-EISCONN) DSPBRIDGE: Cleanup custom error code (DSP_ECORRUPTFILE ->-EBADF)
DSPBRIDGE: Cleanup custom error code (DSP_EFILE ->-ENOENT) 
DSPBRIDGE: Cleanup custom error code (DSP_EHANDLE -> -EFAULT) 
DSPBRIDGE: Cleanup custom error code (DSP_EINVALIDARG -> -EINVAL) 
DSPBRIDGE: Cleanup custom error code (DSP_ENOMEM -> -ENOMEM) 
DSPBRIDGE: Cleanup custom error code (DSP_ENODETYPE -> -EPERM)
DSPBRIDGE: Cleanup custom error code (DSP_ENOTIMPL -> -ENOSYS) 
DSPBRIDGE: Cleanup custom error code (DSP_EFOPEN -> -EBADF)
DSPBRIDGE: Cleanup custom error code (DSP_EPOINTER -> -EFAULT) 
DSPBRIDGE: Cleanup custom error code (DSP_ERANGE -> -EDOM)
DSPBRIDGE: Cleanup custom error code (DSP_ESIZE -> -EINVAL)
DSPBRIDGE: Cleanup custom error code (DSP_ETIMEOUT -> -ETIME)
DSPBRIDGE: Cleanup custom error code (DSP_EVALUE -> -EINVAL)
DSPBRIDGE: Cleanup custom error code (DSP_EUUID -> -ENOKEY)
DSPBRIDGE: Cleanup custom error code (DSP_ENOTCONNECTED -> -ENOTCONN)
DSPBRIDGE: Cleanup custom error code (CHNL_E_CHANBUSY -> -EALREADY)
DSPBRIDGE: Cleanup custom error code (CHNL_E_CANCELLED -> -ECANCELED)
DSPBRIDGE: Cleanup custom error code (WMD_E_TIMEOUT -> -ETIMEDOUT)

 arch/arm/plat-omap/include/dspbridge/_dcd.h     |    2 +-
 arch/arm/plat-omap/include/dspbridge/chnl.h     |   10 +-
 arch/arm/plat-omap/include/dspbridge/cmm.h      |   28 +++---
 arch/arm/plat-omap/include/dspbridge/cod.h      |    2 +-
 arch/arm/plat-omap/include/dspbridge/dbdcd.h    |   16 ++--
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |   10 +-
 arch/arm/plat-omap/include/dspbridge/dev.h      |   36 ++++----
 arch/arm/plat-omap/include/dspbridge/disp.h     |   10 +-
 arch/arm/plat-omap/include/dspbridge/drv.h      |    2 +-
 arch/arm/plat-omap/include/dspbridge/errbase.h  |   58 ------------
 arch/arm/plat-omap/include/dspbridge/io.h       |    6 +-
 arch/arm/plat-omap/include/dspbridge/mgr.h      |    8 +-
 arch/arm/plat-omap/include/dspbridge/nldrdefs.h |    8 +-
 arch/arm/plat-omap/include/dspbridge/node.h     |   86 +++++++++---------
 arch/arm/plat-omap/include/dspbridge/nodepriv.h |    8 +-
 arch/arm/plat-omap/include/dspbridge/ntfy.h     |    8 +-
 arch/arm/plat-omap/include/dspbridge/proc.h     |   54 ++++++------
 arch/arm/plat-omap/include/dspbridge/pwr.h      |   10 +-
 arch/arm/plat-omap/include/dspbridge/rmm.h      |    4 +-
 arch/arm/plat-omap/include/dspbridge/strm.h     |   52 +++++-----
 arch/arm/plat-omap/include/dspbridge/sync.h     |   26 +++---
 arch/arm/plat-omap/include/dspbridge/wmd.h      |   78 ++++++++--------
 drivers/dsp/bridge/pmgr/chnl.c                  |    4 +-
 drivers/dsp/bridge/pmgr/cmm.c                   |   34 ++++----
 drivers/dsp/bridge/pmgr/cod.c                   |   16 ++--
 drivers/dsp/bridge/pmgr/dbll.c                  |   24 +++---
 drivers/dsp/bridge/pmgr/dev.c                   |   36 ++++----
 drivers/dsp/bridge/pmgr/dmm.c                   |   10 +-
 drivers/dsp/bridge/pmgr/wcd.c                   |   86 +++++++++---------
 drivers/dsp/bridge/rmgr/dbdcd.c                 |   24 +++---
 drivers/dsp/bridge/rmgr/disp.c                  |    8 +-
 drivers/dsp/bridge/rmgr/drv.c                   |   14 ++--
 drivers/dsp/bridge/rmgr/drv_interface.c         |    2 +-
 drivers/dsp/bridge/rmgr/mgr.c                   |    4 +-
 drivers/dsp/bridge/rmgr/nldr.c                  |   30 +++---
 drivers/dsp/bridge/rmgr/node.c                  |  112 +++++++++++-----------
 drivers/dsp/bridge/rmgr/proc.c                  |   56 ++++++------
 drivers/dsp/bridge/rmgr/pwr.c                   |    4 +-
 drivers/dsp/bridge/rmgr/rmm.c                   |   14 ++--
 drivers/dsp/bridge/rmgr/strm.c                  |   62 ++++++------
 drivers/dsp/bridge/services/cfg.c               |    6 +-
 drivers/dsp/bridge/services/ntfy.c              |   14 ++--
 drivers/dsp/bridge/services/sync.c              |   26 +++---
 drivers/dsp/bridge/wmd/chnl_sm.c                |   56 ++++++------
 drivers/dsp/bridge/wmd/io_sm.c                  |   26 +++---
 drivers/dsp/bridge/wmd/msg_sm.c                 |   32 +++---
 drivers/dsp/bridge/wmd/tiomap3430.c             |   20 ++--
 drivers/dsp/bridge/wmd/tiomap3430_pwr.c         |    8 +-
 drivers/dsp/bridge/wmd/ue_deh.c                 |    4 +-
 49 files changed, 598 insertions(+), 656 deletions(-)








/* The specified direction is invalid */
#define DSP_EDIRECTION              (DSP_EBASE + 6)

/* A stream has been issued the maximum number of buffers allowed in the
 * stream at once ;  buffers must be reclaimed from the stream before any
 * more can be issued. */
#define DSP_ESTREAMFULL             (DSP_EBASE + 7)

/* A general failure occurred */
#define DSP_EFAIL                   (DSP_EBASE + 8)"

/* No more connections can be made for this node. */
#define DSP_ENOMORECONNECTIONS      (DSP_EBASE + 0xf)

/* A task creation failure occurred on the DSP. */
#define DSP_ETASK                   (DSP_EBASE + 0x16)

/* The state of the specified object is incorrect for the requested
 * operation. */
#define DSP_EWRONGSTATE             (DSP_EBASE + 0x1b)

/* Symbol not found in the COFF file.  
#define DSP_ESYMBOL                 (DSP_EBASE + 0x1c)

/* Unable to read content of DCD data section ; this is typically caused by
 * improperly configured nodes. */
#define DSP_EDCDREADSECT            (DSP_EBASE + 0x1e)

/* Unable to decode DCD data section content ; this is typically caused by
 * changes to DSP/BIOS Bridge data structures. */
#define DSP_EDCDPARSESECT           (DSP_EBASE + 0x1f)

/* Unable to get pointer to DCD data section ; this is typically caused by
 * improperly configured UUIDs. */
#define DSP_EDCDGETSECT             (DSP_EBASE + 0x20)

/* Unable to load file containing DCD data section ; this is typically
 * caused by a missing COFF file. */
#define DSP_EDCDLOADBASE            (DSP_EBASE + 0x21)

/* A specified entity was not found.  */
#define DSP_ENOTFOUND               (DSP_EBASE + 0x2d)

/* A shared memory buffer contained in a message or stream could not be
 * mapped to the GPP client process's virtual space. */
#define DSP_ETRANSLATE              (DSP_EBASE + 0x2f)

/* Unable to find a named section in DSP executable */
#define DSP_ENOSECT                 (DSP_EBASE + 0x32)

/* Unable to read file */
#define DSP_EFREAD                  (DSP_EBASE + 0x34)

/* A non-existent memory segment identifier was specified */
#define DSP_EOVERLAYMEMORY          (DSP_EBASE + 0x37)

/* Invalid segment ID */
#define DSP_EBADSEGID               (DSP_EBASE + 0x38)

/* Invalid alignment */
#define DSP_EALIGNMENT               (DSP_EBASE + 0x39)

/* Invalid stream mode */
#define DSP_ESTRMMODE               (DSP_EBASE + 0x3a)

/* Not shared memory */
#define DSP_ENOTSHAREDMEM           (DSP_EBASE + 0x3c)

/* Error occurred in a dynamic loader library function */
#define DSP_EDYNLOAD                (DSP_EBASE + 0x3d)

/* Device in 'sleep/suspend' mode due to DPM */
#define DSP_EDPMSUSPEND             (DSP_EBASE + 0x3e)

/* Invalid pointer passed into a configuration module function */
#define CFG_E_INVALIDPOINTER        (CFG_EBASE + 0x00)

/* Invalid device node handle passed into a configuration module function. */
#define CFG_E_INVALIDHDEVNODE       (CFG_EBASE + 0x01)

/* Unable to retrieve resource information from the registry. */
#define CFG_E_RESOURCENOTAVAIL      (CFG_EBASE + 0x02)

/* No symbol table is loaded for this board. */
#define COD_E_NOSYMBOLSLOADED       (COD_EBASE + 0x00)

/* Symbol not found in for this board. */
#define COD_E_SYMBOLNOTFOUND        (COD_EBASE + 0x01)

/* Unable to initialize the ZL COFF parsing module. */
#define COD_E_ZLCREATEFAILED        (COD_EBASE + 0x03)

/* Unable to open DSP executable COFF file. */
#define COD_E_OPENFAILED            (COD_EBASE + 0x04)

/* Attempt to created channel manager with too many channels. */
#define CHNL_E_MAXCHANNELS          (CHNL_EBASE + 0x00)

/* No free channels are available. */
#define CHNL_E_OUTOFSTREAMS         (CHNL_EBASE + 0x02)

/* Channel ID is out of range. */
#define CHNL_E_BADCHANID            (CHNL_EBASE + 0x03)

/* dwTimeOut parameter was CHNL_IOCNOWAIT, yet no I/O completions were
 * queued. */
#define CHNL_E_NOIOC                (CHNL_EBASE + 0x06)

/* End of stream was already requested on this output channel. */
#define CHNL_E_EOS                  (CHNL_EBASE + 0x09)

/* DSP word size of zero configured for this device. */
#define CHNL_E_INVALIDWORDSIZE      (CHNL_EBASE + 0x0D)

/* A zero length memory base was specified for a shared memory class driver. */
#define CHNL_E_INVALIDMEMBASE       (CHNL_EBASE + 0x0E)

/* Memory map is not configured, or unable to map physical to linear
 * address. */
#define CHNL_E_NOMEMMAP             (CHNL_EBASE + 0x0F)

/* Attempted to create a channel manager  when one already exists. */
#define CHNL_E_MGREXISTS            (CHNL_EBASE + 0x10)

/* Unable to plug channel ISR for configured IRQ. */
#define CHNL_E_ISR                  (CHNL_EBASE + 0x11)

/* No free I/O request packets are available. */
#define CHNL_E_NOIORPS              (CHNL_EBASE + 0x12)

/* Buffer size is larger than the size of physical channel. 
*/#define CHNL_E_BUFSIZE              (CHNL_EBASE + 0x13)

/* User cannot mark end of stream on an input channel. 
*/#define CHNL_E_NOEOS                (CHNL_EBASE + 0x14)

/* Wait for flush operation on an output channel timed out. 
*/#define CHNL_E_WAITTIMEOUT          (CHNL_EBASE + 0x15)

/* Invalid subkey parameter. 
*/#define REG_E_INVALIDSUBKEY         (REG_EBASE + 0x00)

/* No more registry values.
*/#define REG_E_NOMOREITEMS           (REG_EBASE + 0x02)

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux