dspbridge: trivial error code cleanup
Subsystems (3)
PATCH 3/40 DSPBRIDGE: err code replace CHNL_E_WAITTIMEOUT with ETIMEDOUT
In reply to Omar Ramirez LunaReplace CHNL_E_WAITTIMEOUT with ETIMEDOUT
--- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 2 +- drivers/dsp/bridge/core/chnl_sm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/include/dspbridge/dspdefs.h +1 -1
@@ -610,7 +610,7 @@ typedef dsp_status(*fxn_chnl_getmgrinfo) (struct chnl_mgr* Returns: * 0: Success; * -EFAULT: Invalid chnl_obj. -* CHNL_E_WAITTIMEOUT: Timeout occured before channel could be idled. +* -ETIMEDOUT: Timeout occured before channel could be idled. * Requires: * Ensures: */
drivers/dsp/bridge/core/chnl_sm.c +1 -1
@@ -517,7 +517,7 @@ dsp_status bridge_chnl_flush_io(struct chnl_object *chnl_obj, u32 dwTimeOut)continue ;if (chnl_ioc_obj.status &CHNL_IOCSTATTIMEOUT ) - status =CHNL_E_WAITTIMEOUT ; + status = -ETIMEDOUT ; } }else {
Signature · 1 line
1.7.1
PATCH 6/40 DSPBRIDGE: err code replace CHNL_E_NOIORPS with EIO
In reply to Omar Ramirez LunaReplace CHNL_E_NOIORPS with EIO
--- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 2 +- drivers/dsp/bridge/core/chnl_sm.c | 2 +- drivers/dsp/bridge/rmgr/strm.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/plat-omap/include/dspbridge/dspdefs.h +1 -1
@@ -395,7 +395,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,* CHNL_E_OUTOFSTREAMS: No free channels available. * CHNL_E_BADCHANID: Channel ID is out of range. * -EALREADY: Channel is in use. -* CHNL_E_NOIORPS: No free IO request packets available for +* -EIO: No free IO request packets available for * queuing. * Requires: * phChnl != NULL.
drivers/dsp/bridge/core/chnl_sm.c +1 -1
@@ -185,7 +185,7 @@ func_cont: chnl_packet_obj = (struct chnl_irp *)lst_get_head (pchnl->free_packets_list);if (chnl_packet_obj ==NULL ) - status =CHNL_E_NOIORPS ; + status = -EIO ; }if (DSP_SUCCEEDED (status)) {
drivers/dsp/bridge/rmgr/strm.c +2 -2
@@ -448,7 +448,7 @@ dsp_status strm_issue(struct strm_object *hStrm, IN u8 *pbuf, u32 ul_bytes, (hStrm->chnl_obj, pbuf, ul_bytes, ul_buf_size, (u32 ) tmp_buf, dw_arg); } -if (status ==CHNL_E_NOIORPS ) +if (status == -EIO ) status = -ENOSR ; }
@@ -587,7 +587,7 @@ func_cont:DBC_ASSERT (status ==CHNL_E_OUTOFSTREAMS || status ==CHNL_E_BADCHANID || status == -EALREADY || - status ==CHNL_E_NOIORPS ); + status == -EIO ); status = -EPERM ; } }
Signature · 1 line
1.7.1
cover dspbridge: trivial error code cleanup
These set of patches gets rid of the custom error codes still present.
Although there are a lot of patches most of them are just replacements which were broken into single patches to avoid big patch files.
One of the patches creates a help file with the matching linux error codes just in case the error is not descriptive enough, and it also lists a common scenario where the error might be seen.
Finally, the last patch replaces a custom typedef (dsp_status) with an int type as now those errors can have a negative value.
Omar Ramirez Luna (40):
DSPBRIDGE: Remove success codes
DSPBRIDGE: change DSP_SENUMCOMPLETE for ENODATA
DSPBRIDGE: err code replace CHNL_E_WAITTIMEOUT with ETIMEDOUT
DSPBRIDGE: err code replace CHNL_E_NOEOS with EPERM
DSPBRIDGE: err code replace CHNL_E_BUFSIZE with EINVAL
DSPBRIDGE: err code replace CHNL_E_NOIORPS with EIO
DSPBRIDGE: err code replace CHNL_E_ISR with EIO
DSPBRIDGE: err code replace CHNL_E_MGREXISTS with EEXIST
DSPBRIDGE: err code replace CHNL_E_NOMEMMAP with EFAULT
DSPBRIDGE: err code replace CHNL_E_INVALIDMEMBASE with EINVAL
DSPBRIDGE: err code replace CHNL_E_INVALIDWORDSIZE with EINVAL
DSPBRIDGE: err code replace CHNL_E_EOS with EPIPE
DSPBRIDGE: err code replace CHNL_E_NOIOC with EREMOTEIO
DSPBRIDGE: err code replace CHNL_E_BADCHANID with ECHRNG
DSPBRIDGE: err code replace CHNL_E_OUTOFSTREAMS with ENOSR
DSPBRIDGE: err code replace CHNL_E_MAXCHANNELS with ECHRNG
DSPBRIDGE: err code replace COD_E_ZLCREATEFAILED with ESPIPE
DSPBRIDGE: err code replace COD_E_SYMBOLNOTFOUND with ESPIPE
DSPBRIDGE: err code replace COD_E_NOSYMBOLSLOADED with ESPIPE
DSPBRIDGE: err code replace DSP_EDPMSUSPEND with EPERM
DSPBRIDGE: err code replace DSP_EDYNLOAD with EILSEQ
DSPBRIDGE: err code replace DSP_EBADSEGID with EBADR
DSPBRIDGE: err code replace DSP_EOVERLAYMEMORY with ENXIO
DSPBRIDGE: err code replace DSP_ENOSECT with ENXIO
DSPBRIDGE: err code replace DSP_ETRANSLATE with ESRCH
DSPBRIDGE: err code replace DSP_ENOTFOUND with ENOENT
DSPBRIDGE: err code replace DSP_EDCDNOAUTOREGISTER with EACCES
DSPBRIDGE: err code replace DSP_EDCDLOADBASE with EACCES
DSPBRIDGE: err code replace DSP_EDCDGETSECT with EACCES
DSPBRIDGE: err code replace DSP_EDCDPARSESECT with EACCES
DSPBRIDGE: err code replace DSP_EDCDREADSECT with EACCES
DSPBRIDGE: err code replace DSP_ESYMBOL with ESPIPE
DSPBRIDGE: err code replace DSP_EWRONGSTATE with EBADR
DSPBRIDGE: err code replace DSP_EPENDING with EPIPE
DSPBRIDGE: err code replace DSP_ECHANGEDURINGENUM with EIDRM
DSPBRIDGE: remove custom errbase definitions
DSPBRIDGE: cleanup for duplicated error codes
DSPBRIDGE: removed unused error codes from comments
DSPBRIDGE: error code guide
DSPBRIDGE: remove dsp_status typedef
Documentation/tidspbridge/error-codes | 157 ++++++++++++++ arch/arm/plat-omap/include/dspbridge/_chnl_sm.h | 2 +- arch/arm/plat-omap/include/dspbridge/cfg.h | 57 +++--- arch/arm/plat-omap/include/dspbridge/chnl.h | 31 ++-- arch/arm/plat-omap/include/dspbridge/clk.h | 8 +- arch/arm/plat-omap/include/dspbridge/cmm.h | 44 ++-- arch/arm/plat-omap/include/dspbridge/cod.h | 61 +++--- arch/arm/plat-omap/include/dspbridge/dbdcd.h | 73 +++---- arch/arm/plat-omap/include/dspbridge/dbdcddef.h | 2 +- arch/arm/plat-omap/include/dspbridge/dbdefs.h | 5 +- arch/arm/plat-omap/include/dspbridge/dbldefs.h | 2 +- arch/arm/plat-omap/include/dspbridge/dbll.h | 14 +- arch/arm/plat-omap/include/dspbridge/dblldefs.h | 47 ++--- arch/arm/plat-omap/include/dspbridge/dev.h | 156 ++++++-------- arch/arm/plat-omap/include/dspbridge/disp.h | 25 +-- arch/arm/plat-omap/include/dspbridge/dmm.h | 18 +- arch/arm/plat-omap/include/dspbridge/drv.h | 38 ++-- .../arm/plat-omap/include/dspbridge/dspapi-ioctl.h | 2 +- arch/arm/plat-omap/include/dspbridge/dspapi.h | 8 +- arch/arm/plat-omap/include/dspbridge/dspchnl.h | 24 +- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 226 ++++++++++---------- arch/arm/plat-omap/include/dspbridge/dspdeh.h | 8 +- arch/arm/plat-omap/include/dspbridge/dspio.h | 10 +- arch/arm/plat-omap/include/dspbridge/dspmsg.h | 10 +- arch/arm/plat-omap/include/dspbridge/errbase.h | 177 --------------- arch/arm/plat-omap/include/dspbridge/io.h | 19 +- arch/arm/plat-omap/include/dspbridge/io_sm.h | 6 +- arch/arm/plat-omap/include/dspbridge/mgr.h | 34 ++-- arch/arm/plat-omap/include/dspbridge/msg.h | 2 +- arch/arm/plat-omap/include/dspbridge/nldr.h | 14 +- arch/arm/plat-omap/include/dspbridge/nldrdefs.h | 31 ++-- arch/arm/plat-omap/include/dspbridge/node.h | 148 ++++++------- arch/arm/plat-omap/include/dspbridge/nodepriv.h | 8 +- arch/arm/plat-omap/include/dspbridge/ntfy.h | 13 +- arch/arm/plat-omap/include/dspbridge/proc.h | 117 +++++------ arch/arm/plat-omap/include/dspbridge/pwr.h | 25 +-- .../plat-omap/include/dspbridge/resourcecleanup.h | 30 ++-- arch/arm/plat-omap/include/dspbridge/rmm.h | 10 +- arch/arm/plat-omap/include/dspbridge/strm.h | 71 +++--- arch/arm/plat-omap/include/dspbridge/sync.h | 11 +- drivers/dsp/bridge/core/_tiomap.h | 4 +- drivers/dsp/bridge/core/_tiomap_pwr.h | 14 +- drivers/dsp/bridge/core/chnl_sm.c | 83 ++++---- drivers/dsp/bridge/core/dsp-clock.c | 9 +- drivers/dsp/bridge/core/io_sm.c | 75 ++++---- drivers/dsp/bridge/core/mmu_fault.c | 1 - drivers/dsp/bridge/core/msg_sm.c | 31 ++-- drivers/dsp/bridge/core/tiomap3430.c | 123 ++++++------ drivers/dsp/bridge/core/tiomap3430_pwr.c | 45 ++-- drivers/dsp/bridge/core/tiomap_io.c | 21 +- drivers/dsp/bridge/core/tiomap_io.h | 6 +- drivers/dsp/bridge/core/ue_deh.c | 21 +- drivers/dsp/bridge/core/wdt.c | 1 - drivers/dsp/bridge/pmgr/chnl.c | 17 +- drivers/dsp/bridge/pmgr/cmm.c | 47 ++-- drivers/dsp/bridge/pmgr/cod.c | 61 +++--- drivers/dsp/bridge/pmgr/dbll.c | 47 ++-- drivers/dsp/bridge/pmgr/dev.c | 113 +++++----- drivers/dsp/bridge/pmgr/dmm.c | 43 ++-- drivers/dsp/bridge/pmgr/dspapi.c | 101 +++++----- drivers/dsp/bridge/pmgr/io.c | 13 +- drivers/dsp/bridge/pmgr/msg.c | 5 +- drivers/dsp/bridge/rmgr/dbdcd.c | 97 +++++---- drivers/dsp/bridge/rmgr/disp.c | 35 ++-- drivers/dsp/bridge/rmgr/drv.c | 97 ++++----- drivers/dsp/bridge/rmgr/drv_interface.c | 13 +- drivers/dsp/bridge/rmgr/dspdrv.c | 3 +- drivers/dsp/bridge/rmgr/mgr.c | 43 ++-- drivers/dsp/bridge/rmgr/nldr.c | 91 ++++---- drivers/dsp/bridge/rmgr/node.c | 157 +++++++------- drivers/dsp/bridge/rmgr/proc.c | 131 ++++++------ drivers/dsp/bridge/rmgr/pwr.c | 16 +- drivers/dsp/bridge/rmgr/rmm.c | 11 +- drivers/dsp/bridge/rmgr/strm.c | 84 ++++---- drivers/dsp/bridge/services/cfg.c | 41 ++-- drivers/dsp/bridge/services/sync.c | 10 +- 76 files changed, 1666 insertions(+), 1788 deletions(-) create mode 100644 Documentation/tidspbridge/error-codes delete mode 100644 arch/arm/plat-omap/include/dspbridge/errbase.h
PATCH 2/40 DSPBRIDGE: change DSP_SENUMCOMPLETE for ENODATA
This is not an error code, however the way it is coded it doesn't expects a success (zero) either, return a positive number on this case given that this is not an error code.
--- arch/arm/plat-omap/include/dspbridge/dbdcd.h | 2 +- drivers/dsp/bridge/rmgr/dbdcd.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-)
arch/arm/plat-omap/include/dspbridge/dbdcd.h +1 -1
@@ -123,7 +123,7 @@ extern dsp_status dcd_destroy_manager(IN struct dcd_manager *hdcd_mgr);* Returns: * 0: Success. * -EPERM: Unable to enumerate through the DCD database. -* DSP_SENUMCOMPLETE: Enumeration completed. This is not an error code. +* ENODATA: Enumeration completed. This is not an error code. * Requires: * DCD initialized. * uuid_obj is a valid pointer.
drivers/dsp/bridge/rmgr/dbdcd.c +5 -1
@@ -286,7 +286,11 @@ dsp_status dcd_enumerate_object(IN s32 cIndex, IN enum dsp_dcdobjtype obj_type,/* At the end of enumeration. Reset enum_refs. */ enum_refs =0 ; - status =DSP_SENUMCOMPLETE ; +/* +* TODO: Revisit, this is not an errror case but code +* expects non-zero value. +*/ + status =ENODATA ; }else { status = -EPERM ; }
Signature · 1 line
1.7.1
PATCH 4/40 DSPBRIDGE: err code replace CHNL_E_NOEOS with EPERM
In reply to Omar Ramirez LunaReplace CHNL_E_NOEOS with EPERM
--- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 2 +- drivers/dsp/bridge/core/chnl_sm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/include/dspbridge/dspdefs.h +1 -1
@@ -452,7 +452,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object *chnl_obj);* 0: Success; * -EFAULT: Invalid chnl_obj. * -EFAULT: pHostBuf is invalid. -* CHNL_E_NOEOS: User cannot mark EOS on an input channel. +* -EPERM: User cannot mark EOS on an input channel. * -ECANCELED: I/O has been cancelled on this channel. No further * I/O is allowed. * CHNL_E_EOS: End of stream was already marked on a previous
drivers/dsp/bridge/core/chnl_sm.c +1 -1
@@ -113,7 +113,7 @@ dsp_status bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *pHostBuf, }else if (!pchnl) { status = -EFAULT ; }else if (is_eos &&CHNL_IS_INPUT (pchnl->chnl_mode)) { - status =CHNL_E_NOEOS ; + status = -EPERM ; }else {/* * Check the channel state: only queue chirp if channel state
Signature · 1 line
1.7.1
PATCH 5/40 DSPBRIDGE: err code replace CHNL_E_BUFSIZE with EINVAL
In reply to Omar Ramirez LunaReplace CHNL_E_BUFSIZE with EINVAL
--- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 2 +- drivers/dsp/bridge/core/chnl_sm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/include/dspbridge/dspdefs.h +1 -1
@@ -457,7 +457,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object *chnl_obj);* I/O is allowed. * CHNL_E_EOS: End of stream was already marked on a previous * IORequest on this channel. No further I/O is expected. -* CHNL_E_BUFSIZE: Buffer submitted to this output channel is larger than +* -EINVAL: Buffer submitted to this output channel is larger than * the size of the physical shared memory output window. * Requires: * Ensures:
drivers/dsp/bridge/core/chnl_sm.c +1 -1
@@ -176,7 +176,7 @@ func_cont:/* Check buffer size on output channels for fit. */ if (byte_size >io_buf_size (pchnl->chnl_mgr_obj->hio_mgr)) - status =CHNL_E_BUFSIZE ; + status = -EINVAL ; } }
Signature · 1 line
1.7.1
PATCH 7/40 DSPBRIDGE: err code replace CHNL_E_ISR with EIO
In reply to Omar Ramirez LunaReplace CHNL_E_ISR with EIO
--- arch/arm/plat-omap/include/dspbridge/chnl.h | 2 +- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 2 +- arch/arm/plat-omap/include/dspbridge/io.h | 2 +- drivers/dsp/bridge/core/io_sm.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/plat-omap/include/dspbridge/chnl.h +1 -1
@@ -63,7 +63,7 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);* -EFAULT: hdev_obj is invalid. * -EINVAL: max_channels is 0. * -ENOMEM: Insufficient memory for requested resources. -* CHNL_E_ISR: Unable to plug channel ISR for configured IRQ. +* -EIO: Unable to plug channel ISR for configured IRQ. * CHNL_E_MAXCHANNELS: This manager cannot handle this many channels. * CHNL_E_INVALIDIRQ: Invalid IRQ number. Must be 0 <= birq <= 15. * CHNL_E_INVALIDWORDSIZE: Invalid DSP word size. Must be > 0.
arch/arm/plat-omap/include/dspbridge/dspdefs.h +1 -1
@@ -309,7 +309,7 @@ typedef dsp_status(*fxn_brd_write) (struct bridge_dev_context *hDevContext,* Returns: * 0: Success; * -ENOMEM: Insufficient memory for requested resources. -* CHNL_E_ISR: Unable to plug ISR for given IRQ. +* -EIO: Unable to plug ISR for given IRQ. * CHNL_E_NOMEMMAP: Couldn't map physical address to a virtual one. * Requires: * phChnlMgr != NULL.
arch/arm/plat-omap/include/dspbridge/io.h +1 -1
@@ -40,7 +40,7 @@* Returns: * 0: Success; * -ENOMEM: Insufficient memory for requested resources. -* CHNL_E_ISR: Unable to plug channel ISR for configured IRQ. +* -EIO: Unable to plug channel ISR for configured IRQ. * CHNL_E_INVALIDIRQ: Invalid IRQ number. Must be 0 <= birq <= 15. * CHNL_E_INVALIDWORDSIZE: Invalid DSP word size. Must be > 0. * CHNL_E_INVALIDMEMBASE: Invalid base address for DSP communications.
drivers/dsp/bridge/core/io_sm.c +1 -1
@@ -236,7 +236,7 @@ dsp_status bridge_io_create(OUT struct io_mgr **phIOMgr,if (dsp_wdt_init ()) status = -EPERM ; }else { - status =CHNL_E_ISR ; + status = -EIO ; } func_end:if (DSP_FAILED (status)) {
Signature · 1 line
1.7.1
PATCH 10/40 DSPBRIDGE: err code replace CHNL_E_INVALIDMEMBASE with EINVAL
In reply to Omar Ramirez LunaReplace CHNL_E_INVALIDMEMBASE with EINVAL
--- arch/arm/plat-omap/include/dspbridge/chnl.h | 2 +- arch/arm/plat-omap/include/dspbridge/io.h | 2 +- drivers/dsp/bridge/core/io_sm.c | 4 ++-- drivers/dsp/bridge/pmgr/io.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/plat-omap/include/dspbridge/chnl.h +1 -1
@@ -67,7 +67,7 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);* CHNL_E_MAXCHANNELS: This manager cannot handle this many channels. * CHNL_E_INVALIDIRQ: Invalid IRQ number. Must be 0 <= birq <= 15. * CHNL_E_INVALIDWORDSIZE: Invalid DSP word size. Must be > 0. -* CHNL_E_INVALIDMEMBASE: Invalid base address for DSP communications. +* -EINVAL: Invalid base address for DSP communications. * -EEXIST: Channel manager already exists for this device. * Requires: * chnl_init(void) called.
arch/arm/plat-omap/include/dspbridge/io.h +1 -1
@@ -43,7 +43,7 @@* -EIO: Unable to plug channel ISR for configured IRQ. * CHNL_E_INVALIDIRQ: Invalid IRQ number. Must be 0 <= birq <= 15. * CHNL_E_INVALIDWORDSIZE: Invalid DSP word size. Must be > 0. -* CHNL_E_INVALIDMEMBASE: Invalid base address for DSP communications. +* -EINVAL: Invalid base address for DSP communications. * Requires: * io_init(void) called. * phIOMgr != NULL.
drivers/dsp/bridge/core/io_sm.c +2 -2
@@ -363,7 +363,7 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr) goto func_end; }if (ul_shm_limit <= ul_shm_base) { - status =CHNL_E_INVALIDMEMBASE ; + status = -EINVAL ; goto func_end; }/* Get total length in bytes */
@@ -382,7 +382,7 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr) &ul_msg_limit);if (DSP_SUCCEEDED (status)) {if (ul_msg_limit <= ul_msg_base) { - status =CHNL_E_INVALIDMEMBASE ; + status = -EINVAL ; }else {/* * Length (bytes) of messaging part of shared
drivers/dsp/bridge/pmgr/io.c +1 -1
@@ -63,7 +63,7 @@ dsp_status io_create(OUT struct io_mgr **phIOMgr, struct dev_object *hdev_obj,/* A memory base of 0 implies no memory base: */ if ((pMgrAttrs->shm_base !=0 ) && (pMgrAttrs->usm_length ==0 )) - status =CHNL_E_INVALIDMEMBASE ; + status = -EINVAL ;if (pMgrAttrs->word_size ==0 ) status =CHNL_E_INVALIDWORDSIZE ;
Signature · 1 line
1.7.1
PATCH 11/40 DSPBRIDGE: err code replace CHNL_E_INVALIDWORDSIZE with EINVAL
In reply to Omar Ramirez LunaReplace CHNL_E_INVALIDWORDSIZE with EINVAL
--- arch/arm/plat-omap/include/dspbridge/chnl.h | 2 +- arch/arm/plat-omap/include/dspbridge/io.h | 2 +- drivers/dsp/bridge/pmgr/chnl.c | 2 +- drivers/dsp/bridge/pmgr/io.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/plat-omap/include/dspbridge/chnl.h +1 -1
@@ -66,7 +66,7 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);* -EIO: Unable to plug channel ISR for configured IRQ. * CHNL_E_MAXCHANNELS: This manager cannot handle this many channels. * CHNL_E_INVALIDIRQ: Invalid IRQ number. Must be 0 <= birq <= 15. -* CHNL_E_INVALIDWORDSIZE: Invalid DSP word size. Must be > 0. +* -EINVAL: Invalid DSP word size. Must be > 0. * -EINVAL: Invalid base address for DSP communications. * -EEXIST: Channel manager already exists for this device. * Requires:
arch/arm/plat-omap/include/dspbridge/io.h +1 -1
@@ -42,7 +42,7 @@* -ENOMEM: Insufficient memory for requested resources. * -EIO: Unable to plug channel ISR for configured IRQ. * CHNL_E_INVALIDIRQ: Invalid IRQ number. Must be 0 <= birq <= 15. -* CHNL_E_INVALIDWORDSIZE: Invalid DSP word size. Must be > 0. +* -EINVAL: Invalid DSP word size. Must be > 0. * -EINVAL: Invalid base address for DSP communications. * Requires: * io_init(void) called.
drivers/dsp/bridge/pmgr/chnl.c +1 -1
@@ -76,7 +76,7 @@ dsp_status chnl_create(OUT struct chnl_mgr **phChnlMgr, status =CHNL_E_MAXCHANNELS ;if (pMgrAttrs->word_size ==0 ) - status =CHNL_E_INVALIDWORDSIZE ; + status = -EINVAL ;if (DSP_SUCCEEDED (status)) { status =dev_get_chnl_mgr (hdev_obj, &hchnl_mgr);
drivers/dsp/bridge/pmgr/io.c +1 -1
@@ -66,7 +66,7 @@ dsp_status io_create(OUT struct io_mgr **phIOMgr, struct dev_object *hdev_obj, status = -EINVAL ;if (pMgrAttrs->word_size ==0 ) - status =CHNL_E_INVALIDWORDSIZE ; + status = -EINVAL ;if (DSP_SUCCEEDED (status)) {dev_get_intf_fxns (hdev_obj, &intf_fxns);
Signature · 1 line
1.7.1
PATCH 13/40 DSPBRIDGE: err code replace CHNL_E_NOIOC with EREMOTEIO
In reply to Omar Ramirez LunaReplace CHNL_E_NOIOC with EREMOTEIO
--- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 2 +- drivers/dsp/bridge/core/chnl_sm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/include/dspbridge/dspdefs.h +1 -1
@@ -493,7 +493,7 @@ typedef dsp_status(*fxn_chnl_addioreq) (struct chnl_object* 0: Success. * -EFAULT: Invalid chnl_obj. * -EFAULT: pIOC is invalid. -* CHNL_E_NOIOC: CHNL_IOCNOWAIT was specified as the dwTimeOut parameter +* -EREMOTEIO: CHNL_IOCNOWAIT was specified as the dwTimeOut parameter * yet no I/O completions were queued. * Requires: * dwTimeOut == CHNL_IOCNOWAIT.
drivers/dsp/bridge/core/chnl_sm.c +1 -1
@@ -589,7 +589,7 @@ dsp_status bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 dwTimeOut, status = -EFAULT ; }else if (dwTimeOut ==CHNL_IOCNOWAIT ) {if (LST_IS_EMPTY (pchnl->pio_completions)) - status =CHNL_E_NOIOC ; + status = -EREMOTEIO ; }
Signature · 1 line
1.7.1
PATCH 8/40 DSPBRIDGE: err code replace CHNL_E_MGREXISTS with EEXIST
In reply to Omar Ramirez LunaReplace CHNL_E_MGREXISTS with EEXIST
--- arch/arm/plat-omap/include/dspbridge/chnl.h | 2 +- drivers/dsp/bridge/pmgr/chnl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/include/dspbridge/chnl.h +1 -1
@@ -68,7 +68,7 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);* CHNL_E_INVALIDIRQ: Invalid IRQ number. Must be 0 <= birq <= 15. * CHNL_E_INVALIDWORDSIZE: Invalid DSP word size. Must be > 0. * CHNL_E_INVALIDMEMBASE: Invalid base address for DSP communications. -* CHNL_E_MGREXISTS: Channel manager already exists for this device. +* -EEXIST: Channel manager already exists for this device. * Requires: * chnl_init(void) called. * phChnlMgr != NULL.
drivers/dsp/bridge/pmgr/chnl.c +1 -1
@@ -81,7 +81,7 @@ dsp_status chnl_create(OUT struct chnl_mgr **phChnlMgr,if (DSP_SUCCEEDED (status)) { status =dev_get_chnl_mgr (hdev_obj, &hchnl_mgr);if (DSP_SUCCEEDED (status) && hchnl_mgr !=NULL ) - status =CHNL_E_MGREXISTS ; + status = -EEXIST ; }
Signature · 1 line
1.7.1
PATCH 9/40 DSPBRIDGE: err code replace CHNL_E_NOMEMMAP with EFAULT
In reply to Omar Ramirez LunaReplace CHNL_E_NOMEMMAP with EFAULT
--- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 2 +- drivers/dsp/bridge/core/io_sm.c | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-)
arch/arm/plat-omap/include/dspbridge/dspdefs.h +1 -1
@@ -310,7 +310,7 @@ typedef dsp_status(*fxn_brd_write) (struct bridge_dev_context *hDevContext,* 0: Success; * -ENOMEM: Insufficient memory for requested resources. * -EIO: Unable to plug ISR for given IRQ. -* CHNL_E_NOMEMMAP: Couldn't map physical address to a virtual one. +* -EFAULT: Couldn't map physical address to a virtual one. * Requires: * phChnlMgr != NULL. * pMgrAttrs != NULL
drivers/dsp/bridge/core/io_sm.c +11 -11
@@ -353,13 +353,13 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr) status =cod_get_sym_value (cod_man,CHNL_SHARED_BUFFER_BASE_SYM , &ul_shm_base);if (DSP_FAILED (status)) { - status =CHNL_E_NOMEMMAP ; + status = -EFAULT ; goto func_end; } status =cod_get_sym_value (cod_man,CHNL_SHARED_BUFFER_LIMIT_SYM , &ul_shm_limit);if (DSP_FAILED (status)) { - status =CHNL_E_NOMEMMAP ; + status = -EFAULT ; goto func_end; }if (ul_shm_limit <= ul_shm_base) {
@@ -398,10 +398,10 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr) ul_mem_length = ul_shm_length + ul_msg_length; } }else { - status =CHNL_E_NOMEMMAP ; + status = -EFAULT ; } }else { - status =CHNL_E_NOMEMMAP ; + status = -EFAULT ; }if (DSP_SUCCEEDED (status)) {#ifndef DSP_TRACEBUF_DISABLED
@@ -412,18 +412,18 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr) &shm0_end);#endif if (DSP_FAILED (status)) - status =CHNL_E_NOMEMMAP ; + status = -EFAULT ; }if (DSP_SUCCEEDED (status)) { status =cod_get_sym_value (cod_man,DYNEXTBASE , &ul_dyn_ext_base);if (DSP_FAILED (status)) - status =CHNL_E_NOMEMMAP ; + status = -EFAULT ; }if (DSP_SUCCEEDED (status)) { status =cod_get_sym_value (cod_man,EXTEND , &ul_ext_end);if (DSP_FAILED (status)) - status =CHNL_E_NOMEMMAP ; + status = -EFAULT ; }if (DSP_SUCCEEDED (status)) {/* Get memory reserved in host resources */
@@ -680,7 +680,7 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr)* num_procs = 1. */ if (!hio_mgr->ext_proc_info.ty_tlb[0 ].ul_gpp_phys || num_procs !=1 ) { - status =CHNL_E_NOMEMMAP ; + status = -EFAULT ; goto func_end; }else {if (ae_proc[0 ].ul_dsp_va > ul_shm_base) {
@@ -751,7 +751,7 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr) status =cod_get_sym_value (cod_man,SYS_PUTCBEG , &hio_mgr->ul_trace_buffer_begin);if (DSP_FAILED (status)) { - status =CHNL_E_NOMEMMAP ; + status = -EFAULT ; goto func_end; }
@@ -762,7 +762,7 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr) status =cod_get_sym_value (cod_man,SYS_PUTCEND , &hio_mgr->ul_trace_buffer_end);if (DSP_FAILED (status)) { - status =CHNL_E_NOMEMMAP ; + status = -EFAULT ; goto func_end; } hio_mgr->ul_trace_buffer_end =
@@ -772,7 +772,7 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr) status =cod_get_sym_value (cod_man,BRIDGE_SYS_PUTC_CURRENT , &hio_mgr->ul_trace_buffer_current);if (DSP_FAILED (status)) { - status =CHNL_E_NOMEMMAP ; + status = -EFAULT ; goto func_end; } hio_mgr->ul_trace_buffer_current =
Signature · 1 line
1.7.1
PATCH 14/40 DSPBRIDGE: err code replace CHNL_E_BADCHANID with ECHRNG
In reply to Omar Ramirez LunaReplace CHNL_E_BADCHANID with ECHRNG
--- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 4 ++-- drivers/dsp/bridge/core/chnl_sm.c | 4 ++-- drivers/dsp/bridge/rmgr/strm.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/plat-omap/include/dspbridge/dspdefs.h +2 -2
@@ -393,7 +393,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,* -ENOMEM: Insufficient memory for requested resources. * -EINVAL: Invalid number of IOReqs. * CHNL_E_OUTOFSTREAMS: No free channels available. -* CHNL_E_BADCHANID: Channel ID is out of range. +* -ECHRNG: Channel ID is out of range. * -EALREADY: Channel is in use. * -EIO: No free IO request packets available for * queuing.
@@ -577,7 +577,7 @@ typedef dsp_status(*fxn_chnl_getinfo) (struct chnl_object *chnl_obj,* 0: Success; * -EFAULT: Invalid hchnl_mgr. * -EFAULT: pMgrInfo == NULL. -* CHNL_E_BADCHANID: Invalid channel ID. +* -ECHRNG: Invalid channel ID. * Requires: * Ensures: * 0: pMgrInfo points to a filled in chnl_mgrinfo
drivers/dsp/bridge/core/chnl_sm.c +2 -2
@@ -736,7 +736,7 @@ dsp_status bridge_chnl_get_mgr_info(struct chnl_mgr *hchnl_mgr, u32 uChnlID, status = -EFAULT ; } }else { - status =CHNL_E_BADCHANID ; + status = -ECHRNG ; } }else { status = -EFAULT ;
@@ -801,7 +801,7 @@ dsp_status bridge_chnl_open(OUT struct chnl_object **phChnl, }else {if (uChnlId !=CHNL_PICKFREE ) {if (uChnlId >= chnl_mgr_obj->max_channels) - status =CHNL_E_BADCHANID ; + status = -ECHRNG ;else if (chnl_mgr_obj->ap_channel[uChnlId] !=NULL ) status = -EALREADY ;
drivers/dsp/bridge/rmgr/strm.c +1 -1
@@ -585,7 +585,7 @@ func_cont:* assert here), and then return -EPERM. */ DBC_ASSERT (status ==CHNL_E_OUTOFSTREAMS || - status ==CHNL_E_BADCHANID || + status == -ECHRNG || status == -EALREADY || status == -EIO ); status = -EPERM ;
Signature · 1 line
1.7.1
PATCH 19/40 DSPBRIDGE: err code replace COD_E_NOSYMBOLSLOADED with ESPIPE
In reply to Omar Ramirez LunaReplace COD_E_NOSYMBOLSLOADED with ESPIPE
--- arch/arm/plat-omap/include/dspbridge/cod.h | 6 +++--- arch/arm/plat-omap/include/dspbridge/dev.h | 2 +- drivers/dsp/bridge/pmgr/cod.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/plat-omap/include/dspbridge/cod.h +3 -3
@@ -212,7 +212,7 @@ extern dsp_status cod_get_loader(struct cod_manager *cod_mgr_obj,* puLen: Location to store length. * Returns: * 0: Success -* COD_E_NOSYMBOLSLOADED: Symbols have not been loaded onto the board. +* -ESPIPE: Symbols have not been loaded onto the board. * -ESPIPE: The symbol could not be found. * Requires: * COD module initialized.
@@ -242,7 +242,7 @@ extern dsp_status cod_get_section(struct cod_libraryobj *lib,* value: value of the symbol * Returns: * 0: Success. -* COD_E_NOSYMBOLSLOADED: Symbols have not been loaded onto the board. +* -ESPIPE: Symbols have not been loaded onto the board. * -ESPIPE: The symbol could not be found. * Requires: * COD module initialized.
@@ -355,7 +355,7 @@ extern dsp_status cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,* pstrContent - buffer to store content of the section. * Returns: * 0: on success, error code on failure -* COD_E_NOSYMBOLSLOADED: Symbols have not been loaded onto the board. +* -ESPIPE: Symbols have not been loaded onto the board. * COD_E_READFAILED: Failed to read content of code section. * Requires: * COD module initialized.
arch/arm/plat-omap/include/dspbridge/dev.h +1 -1
@@ -492,7 +492,7 @@ extern dsp_status dev_get_node_manager(struct dev_object* Returns: * 0: Success. * -EFAULT: Invalid hdev_obj. -* COD_E_NOSYMBOLSLOADED: Symbols have not been loaded onto the board. +* -ESPIPE: Symbols have not been loaded onto the board. * -ESPIPE: The symbol could not be found. * Requires: * pstrSym != NULL.
drivers/dsp/bridge/pmgr/cod.c +3 -3
@@ -417,7 +417,7 @@ dsp_status cod_get_section(struct cod_libraryobj *lib, IN char *pstrSect, status = cod_mgr_obj->fxns.get_sect_fxn (lib->dbll_lib, pstrSect, puAddr, puLen); }else { - status =COD_E_NOSYMBOLSLOADED ; + status = -ESPIPE ; }DBC_ENSURE (DSP_SUCCEEDED (status) || ((*puAddr ==0 ) && (*puLen ==0 )));
@@ -453,7 +453,7 @@ dsp_status cod_get_sym_value(struct cod_manager *hmgr, char *pstrSym,return -ESPIPE ; } }else { -return COD_E_NOSYMBOLSLOADED ; +return -ESPIPE ; } *pul_value = dbll_sym->value;
@@ -642,7 +642,7 @@ dsp_status cod_read_section(struct cod_libraryobj *lib, IN char *pstrSect, lib->cod_mgr->fxns.read_sect_fxn (lib->dbll_lib, pstrSect, pstrContent, cContentSize); else - status =COD_E_NOSYMBOLSLOADED ; + status = -ESPIPE ;return status; }
Signature · 1 line
1.7.1
PATCH 21/40 DSPBRIDGE: err code replace DSP_EDYNLOAD with EILSEQ
In reply to Omar Ramirez LunaReplace DSP_EDYNLOAD with EILSEQ
--- arch/arm/plat-omap/include/dspbridge/dblldefs.h | 2 +- arch/arm/plat-omap/include/dspbridge/nldrdefs.h | 2 +- drivers/dsp/bridge/pmgr/dbll.c | 8 ++++---- drivers/dsp/bridge/rmgr/nldr.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
arch/arm/plat-omap/include/dspbridge/dblldefs.h +1 -1
@@ -339,7 +339,7 @@ typedef bool(*dbll_init_fxn) (void);* 0: Success. * -EBADF: File read failed. * DSP_EFWRITE: Write to target failed. -* DSP_EDYNLOAD: Failure in dynamic loader library. +* -EILSEQ: Failure in dynamic loader library. * Requires: * DBL initialized. * Valid lib.
arch/arm/plat-omap/include/dspbridge/nldrdefs.h +1 -1
@@ -249,7 +249,7 @@ typedef bool(*nldr_initfxn) (void);* -ENOMEM: Insufficient memory on GPP. * DSP_EOVERLAYMEMORY: Can't overlay phase because overlay memory * is already in use. -* DSP_EDYNLOAD: Failure in dynamic loader library. +* -EILSEQ: Failure in dynamic loader library. * DSP_EFWRITE: Failed to write phase's code or date to target. * Requires: * nldr_init(void) called.
drivers/dsp/bridge/pmgr/dbll.c +4 -4
@@ -544,12 +544,12 @@ dsp_status dbll_load(struct dbll_library_obj *lib, dbll_flags flags, &zl_lib->dload_mod_obj);if (err !=0 ) { - status =DSP_EDYNLOAD ; + status = -EILSEQ ; }else if (redefined_symbol) { zl_lib->load_ref++;dbll_unload (zl_lib, (struct dbll_attrs *)attrs); redefined_symbol = false; - status =DSP_EDYNLOAD ; + status = -EILSEQ ; }else { *pEntry = zl_lib->entry; }
@@ -684,7 +684,7 @@ dsp_status dbll_open(struct dbll_tar_obj *target, char *file, dbll_flags flags, &zl_lib->init.dl_init,0 , &zl_lib->dload_mod_obj);if (err !=0 ) { - status =DSP_EDYNLOAD ; + status = -EILSEQ ; }else {/* Now that we have the symbol table, we can unload */ err = dynamic_unload_module(zl_lib->dload_mod_obj,
@@ -692,7 +692,7 @@ dsp_status dbll_open(struct dbll_tar_obj *target, char *file, dbll_flags flags, &zl_lib->allocate.dl_alloc, &zl_lib->init.dl_init);if (err !=0 ) - status =DSP_EDYNLOAD ; + status = -EILSEQ ; zl_lib->dload_mod_obj =NULL ; }
drivers/dsp/bridge/rmgr/nldr.c +2 -2
@@ -1314,7 +1314,7 @@ static dsp_status load_lib(struct nldr_nodeobject *nldr_node_obj,if (root->lib == lib_path[i]) {/* This condition could be checked by a * tool at build time. */ - status =DSP_EDYNLOAD ; + status = -EILSEQ ; } } }
@@ -1376,7 +1376,7 @@ static dsp_status load_lib(struct nldr_nodeobject *nldr_node_obj,if (!rootPersistent && persistent_dep_libs[i] && *nldr_node_obj->pf_phase_split) {if ((nldr_node_obj->pers_libs) >MAXLIBS ) { - status =DSP_EDYNLOAD ; + status = -EILSEQ ;break ; }
Signature · 1 line
1.7.1
PATCH 12/40 DSPBRIDGE: err code replace CHNL_E_EOS with EPIPE
In reply to Omar Ramirez LunaReplace CHNL_E_EOS with EPIPE
--- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 4 ++-- drivers/dsp/bridge/core/chnl_sm.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-omap/include/dspbridge/dspdefs.h +2 -2
@@ -455,7 +455,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object *chnl_obj);* -EPERM: User cannot mark EOS on an input channel. * -ECANCELED: I/O has been cancelled on this channel. No further * I/O is allowed. -* CHNL_E_EOS: End of stream was already marked on a previous +* -EPIPE: End of stream was already marked on a previous * IORequest on this channel. No further I/O is expected. * -EINVAL: Buffer submitted to this output channel is larger than * the size of the physical shared memory output window.
@@ -466,7 +466,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object *chnl_obj);* ready. In any case, notifications of I/O completion are * asynchronous. * If byte_size is 0 for an output channel, subsequent CHNL_AddIOReq's -* on this channel will fail with error code CHNL_E_EOS. The +* on this channel will fail with error code -EPIPE. The * corresponding IOC for this I/O request will have its status flag * set to CHNL_IOCSTATEOS. */
drivers/dsp/bridge/core/chnl_sm.c +1 -1
@@ -125,7 +125,7 @@ dsp_status bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *pHostBuf, status = -ECANCELED ; else if ((dw_state & CHNL_STATEEOS) && CHNL_IS_OUTPUT(pchnl->chnl_mode)) - status = CHNL_E_EOS; + status = -EPIPE; else/* No other possible states left */ DBC_ASSERT(0);
Signature · 1 line
1.7.1
PATCH 15/40 DSPBRIDGE: err code replace CHNL_E_OUTOFSTREAMS with ENOSR
In reply to Omar Ramirez LunaReplace CHNL_E_OUTOFSTREAMS with ENOSR
--- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 2 +- drivers/dsp/bridge/core/chnl_sm.c | 2 +- drivers/dsp/bridge/rmgr/strm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-omap/include/dspbridge/dspdefs.h +1 -1
@@ -392,7 +392,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,* -EFAULT: hchnl_mgr is invalid. * -ENOMEM: Insufficient memory for requested resources. * -EINVAL: Invalid number of IOReqs. -* CHNL_E_OUTOFSTREAMS: No free channels available. +* -ENOSR: No free channels available. * -ECHRNG: Channel ID is out of range. * -EALREADY: Channel is in use. * -EIO: No free IO request packets available for
drivers/dsp/bridge/core/chnl_sm.c +1 -1
@@ -1003,7 +1003,7 @@ static struct chnl_irp *make_new_chirp(void)static dsp_status search_free_channel (struct chnl_mgr *chnl_mgr_obj, OUT u32 *pdwChnl) { -dsp_status status =CHNL_E_OUTOFSTREAMS ; +dsp_status status = -ENOSR ;u32 i;DBC_REQUIRE (chnl_mgr_obj);
drivers/dsp/bridge/rmgr/strm.c +1 -1
@@ -584,7 +584,7 @@ func_cont:* strm_mgr_obj->hchnl_mgr better be valid or we * assert here), and then return -EPERM. */ -DBC_ASSERT (status ==CHNL_E_OUTOFSTREAMS || +DBC_ASSERT (status == -ENOSR || status == -ECHRNG || status == -EALREADY || status == -EIO );
Signature · 1 line
1.7.1
PATCH 16/40 DSPBRIDGE: err code replace CHNL_E_MAXCHANNELS with ECHRNG
In reply to Omar Ramirez LunaReplace CHNL_E_MAXCHANNELS with ECHRNG
--- arch/arm/plat-omap/include/dspbridge/chnl.h | 2 +- drivers/dsp/bridge/pmgr/chnl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/include/dspbridge/chnl.h +1 -1
@@ -64,7 +64,7 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);* -EINVAL: max_channels is 0. * -ENOMEM: Insufficient memory for requested resources. * -EIO: Unable to plug channel ISR for configured IRQ. -* CHNL_E_MAXCHANNELS: This manager cannot handle this many channels. +* -ECHRNG: This manager cannot handle this many channels. * CHNL_E_INVALIDIRQ: Invalid IRQ number. Must be 0 <= birq <= 15. * -EINVAL: Invalid DSP word size. Must be > 0. * -EINVAL: Invalid base address for DSP communications.
drivers/dsp/bridge/pmgr/chnl.c +1 -1
@@ -73,7 +73,7 @@ dsp_status chnl_create(OUT struct chnl_mgr **phChnlMgr,else if (pMgrAttrs->max_channels ==0 ) status = -EINVAL ;else - status =CHNL_E_MAXCHANNELS ; + status = -ECHRNG ;if (pMgrAttrs->word_size ==0 ) status = -EINVAL ;
Signature · 1 line
1.7.1
PATCH 17/40 DSPBRIDGE: err code replace COD_E_ZLCREATEFAILED with ESPIPE
In reply to Omar Ramirez LunaReplace COD_E_ZLCREATEFAILED with ESPIPE
--- arch/arm/plat-omap/include/dspbridge/cod.h | 2 +- arch/arm/plat-omap/include/dspbridge/dev.h | 4 ++-- drivers/dsp/bridge/pmgr/cod.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/plat-omap/include/dspbridge/cod.h +1 -1
@@ -84,7 +84,7 @@ extern void cod_close(struct cod_libraryobj *lib);* Returns: * 0: Success. * COD_E_NOZLFUNCTIONS: Could not initialize ZL functions. -* COD_E_ZLCREATEFAILED: ZL_Create failed. +* -ESPIPE: ZL_Create failed. * -ENOSYS: attrs was not NULL. We don't yet support * non default values of attrs. * Requires:
arch/arm/plat-omap/include/dspbridge/dev.h +2 -2
@@ -84,7 +84,7 @@ extern u32 dev_brd_write_fxn(void *pArb,* LDR_E_NOMEMORY: PELDR is out of resources. * -EPERM: Unable to find WMD entry point function. * COD_E_NOZLFUNCTIONS: One or more ZL functions exports not found. -* COD_E_ZLCREATEFAILED: Unable to load ZL DLL. +* -ESPIPE: Unable to load ZL DLL. * Requires: * DEV Initialized. * phDevObject != NULL.
@@ -126,7 +126,7 @@ extern dsp_status dev_create_device(OUT struct dev_object* LDR_E_NOMEMORY: PELDR is out of resources. * -EPERM: Unable to find WMD entry point function. * COD_E_NOZLFUNCTIONS: One or more ZL functions exports not found. -* COD_E_ZLCREATEFAILED: Unable to load ZL DLL. +* -ESPIPE: Unable to load ZL DLL. * Requires: * DEV Initialized. * phDevObject != NULL.
drivers/dsp/bridge/pmgr/cod.c +1 -1
@@ -268,7 +268,7 @@ dsp_status cod_create(OUT struct cod_manager **phMgr, char *pstrDummyFile,if (DSP_FAILED (status)) {cod_delete (mgr_new); -return COD_E_ZLCREATEFAILED ; +return -ESPIPE ; }/* return the new manager */
Signature · 1 line
1.7.1
PATCH 18/40 DSPBRIDGE: err code replace COD_E_SYMBOLNOTFOUND with ESPIPE
In reply to Omar Ramirez LunaReplace COD_E_SYMBOLNOTFOUND with ESPIPE
--- arch/arm/plat-omap/include/dspbridge/cod.h | 4 ++-- arch/arm/plat-omap/include/dspbridge/dev.h | 2 +- drivers/dsp/bridge/pmgr/cod.c | 2 +- drivers/dsp/bridge/rmgr/node.c | 2 +- drivers/dsp/bridge/rmgr/proc.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/plat-omap/include/dspbridge/cod.h +2 -2
@@ -213,7 +213,7 @@ extern dsp_status cod_get_loader(struct cod_manager *cod_mgr_obj,* Returns: * 0: Success * COD_E_NOSYMBOLSLOADED: Symbols have not been loaded onto the board. -* COD_E_SYMBOLNOTFOUND: The symbol could not be found. +* -ESPIPE: The symbol could not be found. * Requires: * COD module initialized. * valid cod_mgr_obj.
@@ -243,7 +243,7 @@ extern dsp_status cod_get_section(struct cod_libraryobj *lib,* Returns: * 0: Success. * COD_E_NOSYMBOLSLOADED: Symbols have not been loaded onto the board. -* COD_E_SYMBOLNOTFOUND: The symbol could not be found. +* -ESPIPE: The symbol could not be found. * Requires: * COD module initialized. * Valid cod_mgr_obj.
arch/arm/plat-omap/include/dspbridge/dev.h +1 -1
@@ -493,7 +493,7 @@ extern dsp_status dev_get_node_manager(struct dev_object* 0: Success. * -EFAULT: Invalid hdev_obj. * COD_E_NOSYMBOLSLOADED: Symbols have not been loaded onto the board. -* COD_E_SYMBOLNOTFOUND: The symbol could not be found. +* -ESPIPE: The symbol could not be found. * Requires: * pstrSym != NULL. * pul_value != NULL.
drivers/dsp/bridge/pmgr/cod.c +1 -1
@@ -450,7 +450,7 @@ dsp_status cod_get_sym_value(struct cod_manager *hmgr, char *pstrSym, get_addr_fxn(hmgr->base_lib, pstrSym, &dbll_sym)) {if (!hmgr->fxns.get_c_addr_fxn (hmgr->base_lib, pstrSym, &dbll_sym)) -return COD_E_SYMBOLNOTFOUND ; +return -ESPIPE ; } }else {return COD_E_NOSYMBOLSLOADED ;
drivers/dsp/bridge/rmgr/node.c +1 -1
@@ -3098,7 +3098,7 @@ static dsp_status get_rms_fxns(struct node_mgr *hnode_mgr) status =dev_get_symbol (dev_obj, psz_fxns[i], &(hnode_mgr->ul_fxn_addrs[i]));if (DSP_FAILED (status)) { -if (status ==COD_E_SYMBOLNOTFOUND ) { +if (status == -ESPIPE ) {/* * May be loaded dynamically (in the future), * but return an error for now.
drivers/dsp/bridge/rmgr/proc.c +1 -1
@@ -970,7 +970,7 @@ dsp_status proc_load(void *hprocessor, IN CONST s32 argc_index,dev_dbg (bridge,"%s: Failure to Load the EXE\n" , __func__); } -if (status ==COD_E_SYMBOLNOTFOUND ) { +if (status == -ESPIPE ) {pr_err ("%s: Couldn't parse the file\n" , __func__); }
Signature · 1 line
1.7.1
PATCH 20/40 DSPBRIDGE: err code replace DSP_EDPMSUSPEND with EPERM
In reply to Omar Ramirez LunaReplace DSP_EDPMSUSPEND with EPERM
--- drivers/dsp/bridge/rmgr/drv_interface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dsp/bridge/rmgr/drv_interface.c +1 -1
@@ -112,7 +112,7 @@ static int omap34_xxbridge_suspend_lockout(struct omap34_xx_bridge_suspend_data {if ((s)->suspended) {if ((f)->f_flags &O_NONBLOCK ) -return DSP_EDPMSUSPEND ; +return -EPERM ;wait_event_interruptible ((s)->suspend_wq, (s)->suspended ==0 ); }return 0 ;
Signature · 1 line
1.7.1
PATCH 22/40 DSPBRIDGE: err code replace DSP_EBADSEGID with EBADR
In reply to Omar Ramirez LunaReplace DSP_EBADSEGID with EBADR
--- drivers/dsp/bridge/rmgr/node.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/dsp/bridge/rmgr/node.c +2 -2
@@ -731,7 +731,7 @@ DBAPI node_alloc_msg_buf(struct node_object *hnode, u32 usize,if (DSP_SUCCEEDED (status) && (!va_flag)) {if (pattr->segment_id !=1 ) {/* Node supports single SM segment only. */ - status =DSP_EBADSEGID ; + status = -EBADR ; }/* Arbitrary SM buffer alignment not supported for host side * allocs, but guaranteed for the following alignment
@@ -1695,7 +1695,7 @@ dsp_status node_free_msg_buf(struct node_object *hnode, IN u8 * pbuffer, }/* Node supports single SM segment only */ if (pattr->segment_id !=1 ) - status =DSP_EBADSEGID ; + status = -EBADR ;/* pbuffer is clients Va. */ status =cmm_xlator_free_buf (pnode->xlator, pbuffer);
Signature · 1 line
1.7.1
PATCH 23/40 DSPBRIDGE: err code replace DSP_EOVERLAYMEMORY with ENXIO
In reply to Omar Ramirez LunaReplace DSP_EOVERLAYMEMORY with ENXIO
--- arch/arm/plat-omap/include/dspbridge/nldrdefs.h | 2 +- arch/arm/plat-omap/include/dspbridge/rmm.h | 2 +- drivers/dsp/bridge/rmgr/rmm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-omap/include/dspbridge/nldrdefs.h +1 -1
@@ -247,7 +247,7 @@ typedef bool(*nldr_initfxn) (void);* Returns: * 0: Success. * -ENOMEM: Insufficient memory on GPP. -* DSP_EOVERLAYMEMORY: Can't overlay phase because overlay memory +* -ENXIO: Can't overlay phase because overlay memory * is already in use. * -EILSEQ: Failure in dynamic loader library. * DSP_EFWRITE: Failed to write phase's code or date to target.
arch/arm/plat-omap/include/dspbridge/rmm.h +1 -1
@@ -63,7 +63,7 @@ struct rmm_target_obj;* Returns: * 0: Success. * -ENOMEM: Memory allocation on GPP failed. -* DSP_EOVERLAYMEMORY: Cannot "allocate" overlay memory because it's +* -ENXIO: Cannot "allocate" overlay memory because it's * already in use. * Requires: * RMM initialized.
drivers/dsp/bridge/rmgr/rmm.c +1 -1
@@ -130,7 +130,7 @@ dsp_status rmm_alloc(struct rmm_target_obj *target, u32 segid, u32 size, (prev_sect->addr + prev_sect->size > addr))) { - status =DSP_EOVERLAYMEMORY ; + status = -ENXIO ; }break ; }
Signature · 1 line
1.7.1
PATCH 27/40 DSPBRIDGE: err code replace DSP_EDCDNOAUTOREGISTER with EACCES
In reply to Omar Ramirez LunaReplace DSP_EDCDNOAUTOREGISTER with EACCES
--- arch/arm/plat-omap/include/dspbridge/dbdcd.h | 6 +++--- drivers/dsp/bridge/rmgr/dbdcd.c | 2 +- drivers/dsp/bridge/rmgr/proc.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/plat-omap/include/dspbridge/dbdcd.h +3 -3
@@ -34,7 +34,7 @@* objects to be registered. * Returns: * 0: Success. -* DSP_EDCDNOAUTOREGISTER: Unable to find auto-registration section. +* -EACCES: Unable to find auto-registration section. * DSP_EDCDREADSECT: Unable to read object code section. * DSP_EDCDLOADBASE: Unable to load code base. * -EFAULT: Invalid DCD_HMANAGER handle..
@@ -60,7 +60,7 @@ extern dsp_status dcd_auto_register(IN struct dcd_manager *hdcd_mgr,* DCD objects to be unregistered. * Returns: * 0: Success. -* DSP_EDCDNOAUTOREGISTER: Unable to find auto-registration section. +* -EACCES: Unable to find auto-registration section. * DSP_EDCDREADSECT: Unable to read object code section. * DSP_EDCDLOADBASE: Unable to load code base. * -EFAULT: Invalid DCD_HMANAGER handle..
@@ -289,7 +289,7 @@ extern dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,* handle: Handle to pass to callback. * Returns: * 0: Success. -* DSP_EDCDNOAUTOREGISTER: Unable to find .dcd_register section. +* -EACCES: Unable to find .dcd_register section. * DSP_EDCDREADSECT: Unable to read object code section. * DSP_EDCDLOADBASE: Unable to load code base. * -EFAULT: Invalid DCD_HMANAGER handle..
drivers/dsp/bridge/rmgr/dbdcd.c +1 -1
@@ -567,7 +567,7 @@ dsp_status dcd_get_objects(IN struct dcd_manager *hdcd_mgr,/* Get DCD_RESIGER_SECTION section information. */ status =cod_get_section (lib,DCD_REGISTER_SECTION , &ul_addr, &ul_len);if (DSP_FAILED (status) || !(ul_len >0 )) { - status =DSP_EDCDNOAUTOREGISTER ; + status = -EACCES ; goto func_cont; }
drivers/dsp/bridge/rmgr/proc.c +2 -2
@@ -907,13 +907,13 @@ dsp_status proc_load(void *hprocessor, IN CONST s32 argc_index,if (DSP_SUCCEEDED (status)) {/* Auto register nodes in specified COFF * file. If registration did not fail, -* (status = 0 or DSP_EDCDNOAUTOREGISTER) +* (status = 0 or -EACCES) * save the name of the COFF file for * de-registration in the future. */ status =dcd_auto_register (hdcd_handle, (char *)user_args[0 ]); -if (status ==DSP_EDCDNOAUTOREGISTER ) +if (status == -EACCES ) status =0 ;if (DSP_FAILED (status)) {
Signature · 1 line
1.7.1
PATCH 30/40 DSPBRIDGE: err code replace DSP_EDCDPARSESECT with EACCES
In reply to Omar Ramirez LunaReplace DSP_EDCDPARSESECT with EACCES
--- arch/arm/plat-omap/include/dspbridge/dbdcd.h | 2 +- drivers/dsp/bridge/rmgr/dbdcd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/include/dspbridge/dbdcd.h +1 -1
@@ -255,7 +255,7 @@ extern dsp_status dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,* union of various possible DCD object types. * Returns: * 0: Success. -* DSP_EDCDPARSESECT: Unable to parse content of object code section. +* -EACCES: Unable to parse content of object code section. * DSP_EDCDREADSECT: Unable to read object code section. * -EACCES: Unable to access object code section. * -EACCES: Unable to load code base.
drivers/dsp/bridge/rmgr/dbdcd.c +1 -1
@@ -516,7 +516,7 @@ dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr, status =get_attrs_from_buf (psz_coff_buf, ul_len, obj_type, pObjDef);if (DSP_FAILED (status)) - status =DSP_EDCDPARSESECT ; + status = -EACCES ; }else { status =DSP_EDCDREADSECT ; }
Signature · 1 line
1.7.1
PATCH 31/40 DSPBRIDGE: err code replace DSP_EDCDREADSECT with EACCES
In reply to Omar Ramirez LunaReplace DSP_EDCDREADSECT with EACCES
--- arch/arm/plat-omap/include/dspbridge/dbdcd.h | 12 ++++++------ drivers/dsp/bridge/rmgr/dbdcd.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-)
arch/arm/plat-omap/include/dspbridge/dbdcd.h +6 -6
@@ -35,7 +35,7 @@* Returns: * 0: Success. * -EACCES: Unable to find auto-registration section. -* DSP_EDCDREADSECT: Unable to read object code section. +* -EACCES: Unable to read object code section. * -EACCES: Unable to load code base. * -EFAULT: Invalid DCD_HMANAGER handle.. * Requires:
@@ -61,7 +61,7 @@ extern dsp_status dcd_auto_register(IN struct dcd_manager *hdcd_mgr,* Returns: * 0: Success. * -EACCES: Unable to find auto-registration section. -* DSP_EDCDREADSECT: Unable to read object code section. +* -EACCES: Unable to read object code section. * -EACCES: Unable to load code base. * -EFAULT: Invalid DCD_HMANAGER handle.. * Requires:
@@ -164,7 +164,7 @@ extern void dcd_exit(void);* Returns: * 0: Success. * -ENOMEM: Memory allocation failure. -* DSP_EDCDREADSECT: Failure to read section containing library info. +* -EACCES: Failure to read section containing library info. * -EPERM: General failure. * Requires: * DCD initialized.
@@ -194,7 +194,7 @@ extern dsp_status dcd_get_dep_libs(IN struct dcd_manager *hdcd_mgr,* Returns: * 0: Success. * -ENOMEM: Memory allocation failure. -* DSP_EDCDREADSECT: Failure to read section containing library info. +* -EACCES: Failure to read section containing library info. * -EPERM: General failure. * Requires: * DCD initialized.
@@ -256,7 +256,7 @@ extern dsp_status dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,* Returns: * 0: Success. * -EACCES: Unable to parse content of object code section. -* DSP_EDCDREADSECT: Unable to read object code section. +* -EACCES: Unable to read object code section. * -EACCES: Unable to access object code section. * -EACCES: Unable to load code base. * -EPERM: General failure.
@@ -290,7 +290,7 @@ extern dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,* Returns: * 0: Success. * -EACCES: Unable to find .dcd_register section. -* DSP_EDCDREADSECT: Unable to read object code section. +* -EACCES: Unable to read object code section. * -EACCES: Unable to load code base. * -EFAULT: Invalid DCD_HMANAGER handle.. * Requires:
drivers/dsp/bridge/rmgr/dbdcd.c +2 -2
@@ -518,7 +518,7 @@ dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,if (DSP_FAILED (status)) status = -EACCES ; }else { - status =DSP_EDCDREADSECT ; + status = -EACCES ; }/* Free the previously allocated dynamic buffer. */
@@ -625,7 +625,7 @@ dsp_status dcd_get_objects(IN struct dcd_manager *hdcd_mgr, } } }else { - status =DSP_EDCDREADSECT ; + status = -EACCES ; }/* Free the previously allocated dynamic buffer. */
Signature · 1 line
1.7.1
PATCH 24/40 DSPBRIDGE: err code replace DSP_ENOSECT with ENXIO
In reply to Omar Ramirez LunaReplace DSP_ENOSECT with ENXIO
--- arch/arm/plat-omap/include/dspbridge/dblldefs.h | 8 ++++---- drivers/dsp/bridge/pmgr/dbll.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/plat-omap/include/dspbridge/dblldefs.h +4 -4
@@ -299,7 +299,7 @@ typedef bool(*dbll_get_c_addr_fxn) (struct dbll_library_obj *lib, char *name,* psize - Location to store section size on output. * Returns: * 0: Success. -* DSP_ENOSECT: Section not found. +* -ENXIO: Section not found. * Requires: * DBL initialized. * Valid lib.
@@ -359,7 +359,7 @@ typedef dsp_status(*dbll_load_fxn) (struct dbll_library_obj *lib,* attrs - Contains write function and handle to pass to it. * Returns: * 0: Success. -* DSP_ENOSECT: Section not found. +* -ENXIO: Section not found. * DSP_EFWRITE: Write function failed. * -ENOSYS: Function not implemented. * Requires:
@@ -412,7 +412,7 @@ typedef dsp_status(*dbll_open_fxn) (struct dbll_tar_obj *target, char *file,* size - Buffer size * Returns: * 0: Success. -* DSP_ENOSECT: Named section does not exists. +* -ENXIO: Named section does not exists. * Requires: * DBL initialized. * Valid lib.
@@ -465,7 +465,7 @@ typedef void (*dbll_unload_fxn) (struct dbll_library_obj *library,* attrs - Contains free() function and handle to pass to it. * Returns: * 0: Success. -* DSP_ENOSECT: Named section not found. +* -ENXIO: Named section not found. * -ENOSYS * Requires: * DBL initialized.
drivers/dsp/bridge/pmgr/dbll.c +2 -2
@@ -419,7 +419,7 @@ dsp_status dbll_get_sect(struct dbll_library_obj *lib, char *name, u32 *paddr,/* Align size */ *psize =DOFF_ALIGN (*psize); }else { - status =DSP_ENOSECT ; + status = -ENXIO ; } }if (opened_doff) {
@@ -764,7 +764,7 @@ dsp_status dbll_read_sect(struct dbll_library_obj *lib, char *name, byte_size =1 ;if (!dload_get_section_info (zl_lib->desc, name, §)) { - status =DSP_ENOSECT ; + status = -ENXIO ; goto func_cont; }/*
Signature · 1 line
1.7.1
PATCH 26/40 DSPBRIDGE: err code replace DSP_ENOTFOUND with ENOENT
In reply to Omar Ramirez LunaReplace DSP_ENOTFOUND with ENOENT
--- arch/arm/plat-omap/include/dspbridge/proc.h | 6 +++--- drivers/dsp/bridge/pmgr/dmm.c | 6 +++--- drivers/dsp/bridge/rmgr/drv.c | 8 ++++---- drivers/dsp/bridge/rmgr/nldr.c | 2 +- drivers/dsp/bridge/rmgr/node.c | 4 ++-- drivers/dsp/bridge/rmgr/strm.c | 6 +++--- 6 files changed, 16 insertions(+), 16 deletions(-)
arch/arm/plat-omap/include/dspbridge/proc.h +3 -3
@@ -515,7 +515,7 @@ extern dsp_status proc_invalidate_memory(void *hprocessor,* -EFAULT : Invalid processor handle. * -EPERM : General failure. * -ENOMEM : MPU side memory allocation error. -* DSP_ENOTFOUND : Cannot find a reserved region starting with this +* -ENOENT : Cannot find a reserved region starting with this * : address. * Requires: * pmpu_addr is not NULL
@@ -566,7 +566,7 @@ extern dsp_status proc_reserve_memory(void *hprocessor,* 0 : Success. * -EFAULT : Invalid processor handle. * -EPERM : General failure. -* DSP_ENOTFOUND : Cannot find a mapped region starting with this +* -ENOENT : Cannot find a mapped region starting with this * : address. * Requires: * map_addr is not NULL
@@ -588,7 +588,7 @@ extern dsp_status proc_un_map(void *hprocessor, void *map_addr,* 0 : Success. * -EFAULT : Invalid processor handle. * -EPERM : General failure. -* DSP_ENOTFOUND : Cannot find a reserved region starting with this +* -ENOENT : Cannot find a reserved region starting with this * : address. * Requires: * prsv_addr is not NULL
drivers/dsp/bridge/pmgr/dmm.c +3 -3
@@ -261,7 +261,7 @@ dsp_status dmm_map_memory(struct dmm_object *dmm_mgr, u32 addr, u32 size) chunk->mapped = true; chunk->mapped_size = (size /PG_SIZE4K ); }else - status =DSP_ENOTFOUND ; + status = -ENOENT ;spin_unlock (&dmm_obj->dmm_lock); dev_dbg(bridge, "%s dmm_mgr %p, addr %x, size %x\n\tstatus %x, "
@@ -336,7 +336,7 @@ dsp_status dmm_un_map_memory(struct dmm_object *dmm_mgr, u32 addr, u32 *psize)spin_lock (&dmm_obj->dmm_lock); chunk =get_mapped_region (addr);if (chunk ==NULL ) - status =DSP_ENOTFOUND ; + status = -ENOENT ;if (DSP_SUCCEEDED (status)) {/* Unmap the region */
@@ -370,7 +370,7 @@ dsp_status dmm_un_reserve_memory(struct dmm_object *dmm_mgr, u32 rsv_addr)/* Find the chunk containing the reserved address */ chunk =get_mapped_region (rsv_addr);if (chunk ==NULL ) - status =DSP_ENOTFOUND ; + status = -ENOENT ;if (DSP_SUCCEEDED (status)) {/* Free all the mapped pages for this reserved region */
drivers/dsp/bridge/rmgr/drv.c +4 -4
@@ -131,7 +131,7 @@ dsp_status drv_remove_node_res_element(void *hNodeRes, void *hPCtxt)while (temp_node && temp_node->next != node_res_obj) temp_node = temp_node->next;if (!temp_node) - status =DSP_ENOTFOUND ; + status = -ENOENT ;else temp_node->next = node_res_obj->next; }
@@ -267,7 +267,7 @@ dsp_status drv_get_node_res_element(void *hnode, void *hNodeRes,if (temp_node !=NULL ) *node_res = temp_node;else - status =DSP_ENOTFOUND ; + status = -ENOENT ;return status; }
@@ -328,7 +328,7 @@ dsp_status drv_proc_remove_strm_res_element(void *hstrm_res, void *hPCtxt)while (temp_strm_res && temp_strm_res->next != pstrm_res) temp_strm_res = temp_strm_res->next;if (temp_strm_res ==NULL ) - status =DSP_ENOTFOUND ; + status = -ENOENT ;else temp_strm_res->next = pstrm_res->next; }
@@ -405,7 +405,7 @@ dsp_status drv_get_strm_res_element(void *hStrm, void *hstrm_res,if (temp_strm !=NULL ) *strm_res = temp_strm;else - status =DSP_ENOTFOUND ; + status = -ENOENT ;return status; }
drivers/dsp/bridge/rmgr/nldr.c +1 -1
@@ -1492,7 +1492,7 @@ static dsp_status load_ovly(struct nldr_nodeobject *nldr_node_obj,DBC_ASSERT (i < nldr_obj->ovly_nodes);if (!po_node) { - status =DSP_ENOTFOUND ; + status = -ENOENT ; goto func_end; }
drivers/dsp/bridge/rmgr/node.c +2 -2
@@ -1573,7 +1573,7 @@ func_cont1:/* Free host-side resources allocated by node_create() * delete_node() fails if SM buffers not freed by client! */ if (drv_get_node_res_element (hnode, &node_res, pr_ctxt) != -DSP_ENOTFOUND ) + -ENOENT )drv_proc_node_update_status (node_res, false);delete_node (hnode, pr_ctxt);
@@ -3200,7 +3200,7 @@ dsp_status node_find_addr(struct node_mgr *node_mgr, u32 sym_addr, u32 offset_range, void *sym_addr_output, char *sym_name) { struct node_object *node_obj; -dsp_status status =DSP_ENOTFOUND ; +dsp_status status = -ENOENT ;u32 n; pr_debug("%s(0x%x, 0x%x, 0x%x, 0x%x, %s)\n", __func__,
drivers/dsp/bridge/rmgr/strm.c +3 -3
@@ -139,7 +139,7 @@ dsp_status strm_allocate_buffer(struct strm_object *hStrm, u32 usize, goto func_end;if (drv_get_strm_res_element (hStrm, &hstrm_res, pr_ctxt) != -DSP_ENOTFOUND ) + -ENOENT )drv_proc_update_strm_res (num_bufs, hstrm_res); func_end:
@@ -183,7 +183,7 @@ dsp_status strm_close(struct strm_object *hStrm, goto func_end;if (drv_get_strm_res_element (hStrm, &hstrm_res, pr_ctxt) != -DSP_ENOTFOUND ) + -ENOENT )drv_proc_remove_strm_res_element (hstrm_res, pr_ctxt); func_end: DBC_ENSURE(status == 0 || status == -EFAULT ||
@@ -297,7 +297,7 @@ dsp_status strm_free_buffer(struct strm_object *hStrm, u8 ** ap_buffer, } }if (drv_get_strm_res_element (hStrm, hstrm_res, pr_ctxt) != -DSP_ENOTFOUND ) + -ENOENT )drv_proc_update_strm_res (num_bufs - i, hstrm_res);return status;
Signature · 1 line
1.7.1
PATCH 34/40 DSPBRIDGE: err code replace DSP_EPENDING with EPIPE
In reply to Omar Ramirez LunaReplace DSP_EPENDING with EPIPE
--- arch/arm/plat-omap/include/dspbridge/strm.h | 2 +- drivers/dsp/bridge/rmgr/strm.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/plat-omap/include/dspbridge/strm.h +1 -1
@@ -59,7 +59,7 @@ extern dsp_status strm_allocate_buffer(struct strm_object *hStrm,* Returns: * 0: Success. * -EFAULT: Invalid hStrm. -* DSP_EPENDING: Some data buffers issued to the stream have not +* -EPIPE: Some data buffers issued to the stream have not * been reclaimed. * -EPERM: Failure to close stream. * Requires:
drivers/dsp/bridge/rmgr/strm.c +3 -3
@@ -166,7 +166,7 @@ dsp_status strm_close(struct strm_object *hStrm, status = -EFAULT ; }else {/* Have all buffers been reclaimed? If not, return -* DSP_EPENDING */ +* -EPIPE */ intf_fxns = hStrm->strm_mgr_obj->intf_fxns; status = (*intf_fxns->pfn_chnl_get_info) (hStrm->chnl_obj,
@@ -174,7 +174,7 @@ dsp_status strm_close(struct strm_object *hStrm,DBC_ASSERT (DSP_SUCCEEDED (status));if (chnl_info_obj.cio_cs >0 || chnl_info_obj.cio_reqs >0 ) - status =DSP_EPENDING ; + status = -EPIPE ;else status =delete_strm (hStrm); }
@@ -187,7 +187,7 @@ dsp_status strm_close(struct strm_object *hStrm,drv_proc_remove_strm_res_element (hstrm_res, pr_ctxt); func_end:DBC_ENSURE (status ==0 || status == -EFAULT || - status ==DSP_EPENDING || status == -EPERM ); + status == -EPIPE || status == -EPERM );dev_dbg (bridge,"%s: hStrm: %p, status 0x%x\n" , __func__, hStrm, status);
Signature · 1 line
1.7.1
PATCH 25/40 DSPBRIDGE: err code replace DSP_ETRANSLATE with ESRCH
In reply to Omar Ramirez LunaReplace DSP_ETRANSLATE with ESRCH
--- drivers/dsp/bridge/rmgr/node.c | 6 +++--- drivers/dsp/bridge/rmgr/strm.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/dsp/bridge/rmgr/node.c +3 -3
@@ -1861,10 +1861,10 @@ dsp_status node_get_message(struct node_object *hnode, pmsg->dw_arg1 = (u32 ) tmp_buf; pmsg->dw_arg2 *= hnode->hnode_mgr->udsp_word_size; }else { - status =DSP_ETRANSLATE ; + status = -ESRCH ; } }else { - status =DSP_ETRANSLATE ; + status = -ESRCH ; } func_end: dev_dbg(bridge, "%s: hnode: %p pmsg: %p utimeout: 0x%x\n", __func__,
@@ -2170,7 +2170,7 @@ dsp_status node_put_message(struct node_object *hnode, status = -EPERM ;/* bad DSPWordSize */ } }else {/* failed to translate buffer address */ - status =DSP_ETRANSLATE ; + status = -ESRCH ; } }if (DSP_SUCCEEDED (status)) {
drivers/dsp/bridge/rmgr/strm.c +4 -4
@@ -440,7 +440,7 @@ dsp_status strm_issue(struct strm_object *hStrm, IN u8 *pbuf, u32 ul_bytes, (void *)pbuf, CMM_VA2DSPPA);if (tmp_buf ==NULL ) - status =DSP_ETRANSLATE ; + status = -ESRCH ; }if (DSP_SUCCEEDED (status)) {
@@ -676,7 +676,7 @@ dsp_status strm_reclaim(struct strm_object *hStrm, OUT u8 ** buf_ptr, CMM_PA2VA); }if (tmp_buf ==NULL ) - status =DSP_ETRANSLATE ; + status = -ESRCH ; chnl_ioc_obj.pbuf = tmp_buf; }
@@ -685,7 +685,7 @@ dsp_status strm_reclaim(struct strm_object *hStrm, OUT u8 ** buf_ptr, func_end:/* ensure we return a documented return code */ DBC_ENSURE (DSP_SUCCEEDED (status) || status == -EFAULT || - status == -ETIME || status ==DSP_ETRANSLATE || + status == -ETIME || status == -ESRCH || status == -EPERM ); dev_dbg(bridge, "%s: hStrm: %p buf_ptr: %p pulBytes: %p pdw_arg: %p "
@@ -730,7 +730,7 @@ dsp_status strm_register_notify(struct strm_object *hStrm, u32 event_mask, }/* ensure we return a documented return code */ DBC_ENSURE (DSP_SUCCEEDED (status) || status == -EFAULT || - status == -ETIME || status ==DSP_ETRANSLATE || + status == -ETIME || status == -ESRCH || status == -ENOSYS || status == -EPERM );return status; }
Signature · 1 line
1.7.1
PATCH 28/40 DSPBRIDGE: err code replace DSP_EDCDLOADBASE with EACCES
In reply to Omar Ramirez LunaReplace DSP_EDCDLOADBASE with EACCES
--- arch/arm/plat-omap/include/dspbridge/dbdcd.h | 8 ++++---- drivers/dsp/bridge/rmgr/dbdcd.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/plat-omap/include/dspbridge/dbdcd.h +4 -4
@@ -36,7 +36,7 @@* 0: Success. * -EACCES: Unable to find auto-registration section. * DSP_EDCDREADSECT: Unable to read object code section. -* DSP_EDCDLOADBASE: Unable to load code base. +* -EACCES: Unable to load code base. * -EFAULT: Invalid DCD_HMANAGER handle.. * Requires: * DCD initialized.
@@ -62,7 +62,7 @@ extern dsp_status dcd_auto_register(IN struct dcd_manager *hdcd_mgr,* 0: Success. * -EACCES: Unable to find auto-registration section. * DSP_EDCDREADSECT: Unable to read object code section. -* DSP_EDCDLOADBASE: Unable to load code base. +* -EACCES: Unable to load code base. * -EFAULT: Invalid DCD_HMANAGER handle.. * Requires: * DCD initialized.
@@ -258,7 +258,7 @@ extern dsp_status dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,* DSP_EDCDPARSESECT: Unable to parse content of object code section. * DSP_EDCDREADSECT: Unable to read object code section. * DSP_EDCDGETSECT: Unable to access object code section. -* DSP_EDCDLOADBASE: Unable to load code base. +* -EACCES: Unable to load code base. * -EPERM: General failure. * -EFAULT: Invalid DCD_HMANAGER handle. * Requires:
@@ -291,7 +291,7 @@ extern dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,* 0: Success. * -EACCES: Unable to find .dcd_register section. * DSP_EDCDREADSECT: Unable to read object code section. -* DSP_EDCDLOADBASE: Unable to load code base. +* -EACCES: Unable to load code base. * -EFAULT: Invalid DCD_HMANAGER handle.. * Requires: * DCD initialized.
drivers/dsp/bridge/rmgr/dbdcd.c +2 -2
@@ -467,7 +467,7 @@ dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr, status =cod_open (dcd_mgr_obj->cod_mgr, dcd_key->path,COD_NOLOAD , &lib);if (DSP_FAILED (status)) { - status =DSP_EDCDLOADBASE ; + status = -EACCES ; goto func_end; }
@@ -560,7 +560,7 @@ dsp_status dcd_get_objects(IN struct dcd_manager *hdcd_mgr,/* Open DSP coff file, don't load symbols. */ status =cod_open (dcd_mgr_obj->cod_mgr, pszCoffPath,COD_NOLOAD , &lib);if (DSP_FAILED (status)) { - status =DSP_EDCDLOADBASE ; + status = -EACCES ; goto func_cont; }
Signature · 1 line
1.7.1
PATCH 29/40 DSPBRIDGE: err code replace DSP_EDCDGETSECT with EACCES
In reply to Omar Ramirez LunaReplace DSP_EDCDGETSECT with EACCES
--- arch/arm/plat-omap/include/dspbridge/dbdcd.h | 2 +- drivers/dsp/bridge/rmgr/dbdcd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/include/dspbridge/dbdcd.h +1 -1
@@ -257,7 +257,7 @@ extern dsp_status dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,* 0: Success. * DSP_EDCDPARSESECT: Unable to parse content of object code section. * DSP_EDCDREADSECT: Unable to read object code section. -* DSP_EDCDGETSECT: Unable to access object code section. +* -EACCES: Unable to access object code section. * -EACCES: Unable to load code base. * -EPERM: General failure. * -EFAULT: Invalid DCD_HMANAGER handle.
drivers/dsp/bridge/rmgr/dbdcd.c +1 -1
@@ -483,7 +483,7 @@ dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,/* Get section information. */ status =cod_get_section (lib, sz_sect_name, &ul_addr, &ul_len);if (DSP_FAILED (status)) { - status =DSP_EDCDGETSECT ; + status = -EACCES ; goto func_end; }
Signature · 1 line
1.7.1
PATCH 32/40 DSPBRIDGE: err code replace DSP_ESYMBOL with ESPIPE
In reply to Omar Ramirez LunaReplace DSP_ESYMBOL with ESPIPE
--- arch/arm/plat-omap/include/dspbridge/nldrdefs.h | 2 +- arch/arm/plat-omap/include/dspbridge/node.h | 8 ++++---- drivers/dsp/bridge/rmgr/nldr.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-)
arch/arm/plat-omap/include/dspbridge/nldrdefs.h +1 -1
@@ -214,7 +214,7 @@ typedef void (*nldr_freefxn) (struct nldr_nodeobject *nldr_node_obj);* pulAddr: Location to store function address. * Returns: * 0: Success. -* DSP_ESYMBOL: Address of function not found. +* -ESPIPE: Address of function not found. * Requires: * nldr_init(void) called. * Valid nldr_node_obj.
arch/arm/plat-omap/include/dspbridge/node.h +4 -4
@@ -41,7 +41,7 @@* 0: Success. * -ENOMEM: Insufficient memory on GPP. * -ENOKEY: Node UUID has not been registered. -* DSP_ESYMBOL: iAlg functions not found for a DAIS node. +* -ESPIPE: iAlg functions not found for a DAIS node. * -EDOM: attr_in != NULL and attr_in->prio out of * range. * -EPERM: A failure occured, unable to allocate node.
@@ -199,7 +199,7 @@ extern dsp_status node_connect(struct node_object *hNode1,* Returns: * 0: Success. * -EFAULT: Invalid hnode. -* DSP_ESYMBOL: Create function not found in the COFF file. +* -ESPIPE: Create function not found in the COFF file. * DSP_EWRONGSTATE: Node is not in the NODE_ALLOCATED state. * -ENOMEM: Memory allocation failure on the DSP. * DSP_ETASK: Unable to create node's task or process on the DSP.
@@ -255,7 +255,7 @@ extern dsp_status node_create_mgr(OUT struct node_mgr **phNodeMgr,* DSP_EDELETE: A deletion failure occurred. * DSP_EUSER1-16: Node specific failure occurred on the DSP. * -EPERM: A failure occurred in deleting the node. -* DSP_ESYMBOL: Delete function not found in the COFF file. +* -ESPIPE: Delete function not found in the COFF file. * Requires: * node_init(void) called. * Ensures:
@@ -522,7 +522,7 @@ extern dsp_status node_register_notify(struct node_object *hnode,* -ETIME: A timeout occurred before the DSP responded. * DSP_EWRONGSTSATE: Node is not in NODE_PAUSED or NODE_CREATED state. * -EPERM: Unable to start or resume execution. -* DSP_ESYMBOL: Execute function not found in the COFF file. +* -ESPIPE: Execute function not found in the COFF file. * Requires: * node_init(void) called. * Ensures:
drivers/dsp/bridge/rmgr/nldr.c +2 -2
@@ -764,7 +764,7 @@ dsp_status nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,if (status1) *pulAddr = dbll_sym->value;else - status =DSP_ESYMBOL ; + status = -ESPIPE ;return status; }
@@ -1992,7 +1992,7 @@ dsp_status nldr_find_addr(struct nldr_nodeobject *nldr_node, u32 sym_addr,if (!status1) {pr_debug ("%s: Address 0x%x not found in range %d.\n" , __func__, sym_addr, offset_range); - status =DSP_ESYMBOL ; + status = -ESPIPE ; }return status;
Signature · 1 line
1.7.1
PATCH 37/40 DSPBRIDGE: cleanup for duplicated error codes
In reply to Omar Ramirez LunaSome comments and pieces of code make reference to the same error code, this was removed to just have one instance where the code won't get too nested or complicated.
--- arch/arm/plat-omap/include/dspbridge/cfg.h | 9 ++----- arch/arm/plat-omap/include/dspbridge/chnl.h | 6 ++-- arch/arm/plat-omap/include/dspbridge/cod.h | 8 +++--- arch/arm/plat-omap/include/dspbridge/dbdcd.h | 19 +++++------------ arch/arm/plat-omap/include/dspbridge/dblldefs.h | 5 +-- arch/arm/plat-omap/include/dspbridge/dev.h | 4 +- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 12 +++------- arch/arm/plat-omap/include/dspbridge/io.h | 4 +- arch/arm/plat-omap/include/dspbridge/node.h | 25 +++++++++++------------ arch/arm/plat-omap/include/dspbridge/strm.h | 6 ++-- drivers/dsp/bridge/core/chnl_sm.c | 8 +----- drivers/dsp/bridge/rmgr/strm.c | 3 +- 12 files changed, 44 insertions(+), 65 deletions(-)
arch/arm/plat-omap/include/dspbridge/cfg.h +3 -6
@@ -82,8 +82,7 @@ extern dsp_status cfg_get_cd_version(OUT u32 *pdwVersion);* pdwValue: Ptr to location to store the value. * Returns: * 0: Success. -* -EFAULT: dev_node_obj is invalid. -* -EFAULT: phDevObject is invalid. +* -EFAULT: dev_node_obj is invalid or phDevObject is invalid. * -ENODATA: The resource is not available. * Requires: * CFG initialized.
@@ -104,8 +103,7 @@ extern dsp_status cfg_get_dev_object(IN struct cfg_devnode *dev_node_obj,* pstrExecFile: Ptr to character buf to hold ExecFile. * Returns: * 0: Success. -* -EFAULT: dev_node_obj is invalid. -* -EFAULT: pstrExecFile is invalid. +* -EFAULT: dev_node_obj is invalid or pstrExecFile is invalid. * -ENODATA: The resource is not available. * Requires: * CFG initialized.
@@ -160,8 +158,7 @@ extern void cfg_get_perf_value(OUT bool *pfEnablePerf);* pstrZLFileName: Ptr to character buf to hold ZLFileName. * Returns: * 0: Success. -* -EFAULT: pstrZLFileName is invalid. -* -EFAULT: dev_node_obj is invalid. +* -EFAULT: pstrZLFileName is invalid or dev_node_obj is invalid. * -ENODATA: couldn't find the ZLFileName. * Requires: * CFG initialized.
arch/arm/plat-omap/include/dspbridge/chnl.h +3 -3
@@ -61,13 +61,13 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);* Returns: * 0: Success; * -EFAULT: hdev_obj is invalid. -* -EINVAL: max_channels is 0. +* -EINVAL: max_channels is 0. +* Invalid DSP word size (must be > 0). +* Invalid base address for DSP communications. * -ENOMEM: Insufficient memory for requested resources. * -EIO: Unable to plug channel ISR for configured IRQ. * -ECHRNG: This manager cannot handle this many channels. * CHNL_E_INVALIDIRQ: Invalid IRQ number. Must be 0 <= birq <= 15. -* -EINVAL: Invalid DSP word size. Must be > 0. -* -EINVAL: Invalid base address for DSP communications. * -EEXIST: Channel manager already exists for this device. * Requires: * chnl_init(void) called.
arch/arm/plat-omap/include/dspbridge/cod.h +4 -4
@@ -212,8 +212,8 @@ extern dsp_status cod_get_loader(struct cod_manager *cod_mgr_obj,* puLen: Location to store length. * Returns: * 0: Success -* -ESPIPE: Symbols have not been loaded onto the board. -* -ESPIPE: The symbol could not be found. +* -ESPIPE: Symbols could not be found or have not been loaded onto +* the board. * Requires: * COD module initialized. * valid cod_mgr_obj.
@@ -242,8 +242,8 @@ extern dsp_status cod_get_section(struct cod_libraryobj *lib,* value: value of the symbol * Returns: * 0: Success. -* -ESPIPE: Symbols have not been loaded onto the board. -* -ESPIPE: The symbol could not be found. +* -ESPIPE: Symbols could not be found or have not been loaded onto +* the board. * Requires: * COD module initialized. * Valid cod_mgr_obj.
arch/arm/plat-omap/include/dspbridge/dbdcd.h +6 -13
@@ -34,9 +34,7 @@* objects to be registered. * Returns: * 0: Success. -* -EACCES: Unable to find auto-registration section. -* -EACCES: Unable to read object code section. -* -EACCES: Unable to load code base. +* -EACCES: Unable to find auto-registration/read/load section. * -EFAULT: Invalid DCD_HMANAGER handle.. * Requires: * DCD initialized.
@@ -60,9 +58,7 @@ extern dsp_status dcd_auto_register(IN struct dcd_manager *hdcd_mgr,* DCD objects to be unregistered. * Returns: * 0: Success. -* -EACCES: Unable to find auto-registration section. -* -EACCES: Unable to read object code section. -* -EACCES: Unable to load code base. +* -EACCES: Unable to find auto-registration/read/load section. * -EFAULT: Invalid DCD_HMANAGER handle.. * Requires: * DCD initialized.
@@ -255,10 +251,8 @@ extern dsp_status dcd_get_library_name(IN struct dcd_manager *hdcd_mgr,* union of various possible DCD object types. * Returns: * 0: Success. -* -EACCES: Unable to parse content of object code section. -* -EACCES: Unable to read object code section. -* -EACCES: Unable to access object code section. -* -EACCES: Unable to load code base. +* -EACCES: Unable to access/read/parse/load content of object code +* section. * -EPERM: General failure. * -EFAULT: Invalid DCD_HMANAGER handle. * Requires:
@@ -289,9 +283,8 @@ extern dsp_status dcd_get_object_def(IN struct dcd_manager *hdcd_mgr,* handle: Handle to pass to callback. * Returns: * 0: Success. -* -EACCES: Unable to find .dcd_register section. -* -EACCES: Unable to read object code section. -* -EACCES: Unable to load code base. +* -EACCES: Unable to access/read/parse/load content of object code +* section. * -EFAULT: Invalid DCD_HMANAGER handle.. * Requires: * DCD initialized.
arch/arm/plat-omap/include/dspbridge/dblldefs.h +2 -3
@@ -385,9 +385,8 @@ typedef dsp_status(*dbll_load_sect_fxn) (struct dbll_library_obj *lib,* Returns: * 0: Success. * -ENOMEM: Memory allocation failure. -* -EBADF: File open failure. -* -EBADF: File read failure. -* -EBADF: Unable to determine target type. +* -EBADF: File open/read failure. +* Unable to determine target type. * Requires: * DBL initialized. * Valid target.
arch/arm/plat-omap/include/dspbridge/dev.h +2 -2
@@ -492,8 +492,8 @@ extern dsp_status dev_get_node_manager(struct dev_object* Returns: * 0: Success. * -EFAULT: Invalid hdev_obj. -* -ESPIPE: Symbols have not been loaded onto the board. -* -ESPIPE: The symbol could not be found. +* -ESPIPE: Symbols couldn not be found or have not been loaded onto +* the board. * Requires: * pstrSym != NULL. * pul_value != NULL.
arch/arm/plat-omap/include/dspbridge/dspdefs.h +4 -8
@@ -450,8 +450,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object *chnl_obj);* dw_arg: A user argument that travels with the buffer. * Returns: * 0: Success; -* -EFAULT: Invalid chnl_obj. -* -EFAULT: pHostBuf is invalid. +* -EFAULT: Invalid chnl_obj or pHostBuf. * -EPERM: User cannot mark EOS on an input channel. * -ECANCELED: I/O has been cancelled on this channel. No further * I/O is allowed.
@@ -491,8 +490,7 @@ typedef dsp_status(*fxn_chnl_addioreq) (struct chnl_object* pIOC->status: See chnldefs.h. * Returns: * 0: Success. -* -EFAULT: Invalid chnl_obj. -* -EFAULT: pIOC is invalid. +* -EFAULT: Invalid chnl_obj or pIOC. * -EREMOTEIO: CHNL_IOCNOWAIT was specified as the dwTimeOut parameter * yet no I/O completions were queued. * Requires:
@@ -555,8 +553,7 @@ typedef dsp_status(*fxn_chnl_flushio) (struct chnl_object *chnl_obj,* pInfo: Location to store channel info. * Returns: * 0: Success; -* -EFAULT: Invalid chnl_obj. -* -EFAULT: pInfo == NULL. +* -EFAULT: Invalid chnl_obj or pInfo. * Requires: * Ensures: * 0: pInfo points to a filled in chnl_info struct,
@@ -575,8 +572,7 @@ typedef dsp_status(*fxn_chnl_getinfo) (struct chnl_object *chnl_obj,* pMgrInfo: Location to store channel manager info. * Returns: * 0: Success; -* -EFAULT: Invalid hchnl_mgr. -* -EFAULT: pMgrInfo == NULL. +* -EFAULT: Invalid hchnl_mgr or pMgrInfo. * -ECHRNG: Invalid channel ID. * Requires: * Ensures:
arch/arm/plat-omap/include/dspbridge/io.h +2 -2
@@ -42,8 +42,8 @@* -ENOMEM: Insufficient memory for requested resources. * -EIO: Unable to plug channel ISR for configured IRQ. * CHNL_E_INVALIDIRQ: Invalid IRQ number. Must be 0 <= birq <= 15. -* -EINVAL: Invalid DSP word size. Must be > 0. -* -EINVAL: Invalid base address for DSP communications. +* -EINVAL: Invalid DSP word size (must be > 0). +* Invalid base address for DSP communications. * Requires: * io_init(void) called. * phIOMgr != NULL.
arch/arm/plat-omap/include/dspbridge/node.h +12 -13
@@ -100,13 +100,13 @@ extern dsp_status node_alloc_msg_buf(struct node_object *hnode,* 0: Success. * -EFAULT: Invalid hnode. * -EDOM: prio is out of range. -* -EPERM: The specified node is not a task node. +* -EPERM: The specified node is not a task node. +* Unable to change node's runtime priority level. * -EBADR: Node is not in the NODE_ALLOCATED, NODE_PAUSED, * or NODE_RUNNING state. * -ETIME: A timeout occurred before the DSP responded. * DSP_ERESTART: A critical error has occurred and the DSP is * being restarted. -* -EPERM: Unable to change node's runtime priority level. * Requires: * node_init(void) called. * Ensures:
@@ -382,9 +382,9 @@ extern dsp_status node_get_attr(struct node_object *hnode,* Returns: * 0: Success. * -EFAULT: Invalid hnode. -* -EPERM: Cannot retrieve messages from this type of node. +* -EPERM: Cannot retrieve messages from this type of node. +* Error occurred while trying to retrieve a message. * -ETIME: Timeout occurred and no message is available. -* -EPERM: Error occurred while trying to retrieve a message. * Requires: * node_init(void) called. * message != NULL.
@@ -443,10 +443,10 @@ void node_on_exit(struct node_object *hnode, s32 nStatus);* Returns: * 0: Success. * -EFAULT: Invalid hnode. -* -EPERM: Node is not a task or socket node. +* -EPERM: Node is not a task or socket node. +* Failed to pause node. * -ETIME: A timeout occurred before the DSP responded. * DSP_EWRONGSTSATE: Node is not in NODE_RUNNING state. -* -EPERM: Failed to pause node. * Requires: * node_init(void) called. * Ensures:
@@ -467,10 +467,10 @@ extern dsp_status node_pause(struct node_object *hnode);* Returns: * 0: Success. * -EFAULT: Invalid hnode. -* -EPERM: Messages can't be sent to this type of node. +* -EPERM: Messages can't be sent to this type of node. +* Unable to send message. * -ETIME: Timeout occurred before message could be set. * -EBADR: Node is in invalid state for sending messages. -* -EPERM: Unable to send message. * Requires: * node_init(void) called. * pmsg != NULL.
@@ -517,11 +517,10 @@ extern dsp_status node_register_notify(struct node_object *hnode,* Returns: * 0: Success. * -EFAULT: Invalid hnode. -* -EPERM: hnode doesn't represent a message, task or dais -* socket node. +* -EPERM: hnode doesn't represent a message, task or dais socket node. +* Unable to start or resume execution. * -ETIME: A timeout occurred before the DSP responded. * DSP_EWRONGSTSATE: Node is not in NODE_PAUSED or NODE_CREATED state. -* -EPERM: Unable to start or resume execution. * -ESPIPE: Execute function not found in the COFF file. * Requires: * node_init(void) called.
@@ -543,9 +542,9 @@ extern dsp_status node_run(struct node_object *hnode);* 0: Success. * -EFAULT: Invalid hnode. * -ETIME: A timeout occurred before the DSP responded. -* -EPERM: Type of node specified cannot be terminated. +* -EPERM: Type of node specified cannot be terminated. +* Unable to terminate the node. * -EBADR: Operation not valid for the current node state. -* -EPERM: Unable to terminate the node. * Requires: * node_init(void) called. * pstatus != NULL.
arch/arm/plat-omap/include/dspbridge/strm.h +3 -3
@@ -259,10 +259,10 @@ extern dsp_status strm_issue(struct strm_object *hStrm, IN u8 * pbuf,* Returns: * 0: Success. * -EFAULT: Invalid hnode. -* -EPERM: Invalid dir. +* -EPERM: Invalid direction. +* hnode is not a task or DAIS socket node. +* Unable to open stream. * -EINVAL: Invalid index. -* -EPERM: hnode is not a task or DAIS socket node. -* -EPERM: Unable to open stream. * Requires: * strm_init(void) called. * phStrm != NULL.
drivers/dsp/bridge/core/chnl_sm.c +2 -6
@@ -107,9 +107,7 @@ dsp_status bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *pHostBuf, is_eos = (byte_size ==0 );/* Validate args */ -if (!pHostBuf) { - status = -EFAULT ; - }else if (!pchnl) { +if (!pHostBuf || !pchnl) { status = -EFAULT ; }else if (is_eos &&CHNL_IS_INPUT (pchnl->chnl_mode)) { status = -EPERM ;
@@ -582,9 +580,7 @@ dsp_status bridge_chnl_get_ioc(struct chnl_object *chnl_obj, u32 dwTimeOut,struct dev_object *dev_obj;/* Check args: */ -if (pIOC ==NULL ) { - status = -EFAULT ; - }else if (!pchnl) { +if (!pIOC || !pchnl) { status = -EFAULT ; }else if (dwTimeOut ==CHNL_IOCNOWAIT ) {if (LST_IS_EMPTY (pchnl->pio_completions))
drivers/dsp/bridge/rmgr/strm.c +1 -2
@@ -602,8 +602,7 @@ func_cont:DBC_ENSURE ((DSP_SUCCEEDED (status) && *phStrm) || (*phStrm ==NULL && (status == -EFAULT || status == -EPERM - || status == -EINVAL - || status == -EPERM ))); + || status == -EINVAL ))); dev_dbg(bridge, "%s: hnode: %p dir: 0x%x index: 0x%x pattr: %p " "phStrm: %p status: 0x%x\n", __func__,
Signature · 1 line
1.7.1
PATCH 38/40 DSPBRIDGE: removed unused error codes from comments
In reply to Omar Ramirez LunaOnly removed error codes which now does not exist, previously those were not used in the code.
--- arch/arm/plat-omap/include/dspbridge/chnl.h | 1 - arch/arm/plat-omap/include/dspbridge/cod.h | 3 --- arch/arm/plat-omap/include/dspbridge/dblldefs.h | 2 -- arch/arm/plat-omap/include/dspbridge/dev.h | 14 -------------- arch/arm/plat-omap/include/dspbridge/disp.h | 3 --- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 4 ---- arch/arm/plat-omap/include/dspbridge/io.h | 1 - arch/arm/plat-omap/include/dspbridge/nldrdefs.h | 1 - arch/arm/plat-omap/include/dspbridge/node.h | 9 +-------- arch/arm/plat-omap/include/dspbridge/proc.h | 11 ----------- arch/arm/plat-omap/include/dspbridge/strm.h | 1 - 11 files changed, 1 insertions(+), 49 deletions(-)
arch/arm/plat-omap/include/dspbridge/chnl.h +0 -1
@@ -67,7 +67,6 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);* -ENOMEM: Insufficient memory for requested resources. * -EIO: Unable to plug channel ISR for configured IRQ. * -ECHRNG: This manager cannot handle this many channels. -* CHNL_E_INVALIDIRQ: Invalid IRQ number. Must be 0 <= birq <= 15. * -EEXIST: Channel manager already exists for this device. * Requires: * chnl_init(void) called.
arch/arm/plat-omap/include/dspbridge/cod.h +0 -3
@@ -83,7 +83,6 @@ extern void cod_close(struct cod_libraryobj *lib);* will cause default attrs to be used. * Returns: * 0: Success. -* COD_E_NOZLFUNCTIONS: Could not initialize ZL functions. * -ESPIPE: ZL_Create failed. * -ENOSYS: attrs was not NULL. We don't yet support * non default values of attrs.
@@ -285,7 +284,6 @@ extern bool cod_init(void);* Returns: * 0: Success. * -EBADF: Failed to open target code. -* COD_E_LOADFAILED: Failed to load code onto target. * Requires: * COD module initialized. * hmgr is valid.
@@ -356,7 +354,6 @@ extern dsp_status cod_open_base(struct cod_manager *hmgr, IN char *pszCoffPath,* Returns: * 0: on success, error code on failure * -ESPIPE: Symbols have not been loaded onto the board. -* COD_E_READFAILED: Failed to read content of code section. * Requires: * COD module initialized. * valid cod_mgr_obj.
arch/arm/plat-omap/include/dspbridge/dblldefs.h +0 -2
@@ -338,7 +338,6 @@ typedef bool(*dbll_init_fxn) (void);* Returns: * 0: Success. * -EBADF: File read failed. -* DSP_EFWRITE: Write to target failed. * -EILSEQ: Failure in dynamic loader library. * Requires: * DBL initialized.
@@ -360,7 +359,6 @@ typedef dsp_status(*dbll_load_fxn) (struct dbll_library_obj *lib,* Returns: * 0: Success. * -ENXIO: Section not found. -* DSP_EFWRITE: Write function failed. * -ENOSYS: Function not implemented. * Requires: * Valid lib.
arch/arm/plat-omap/include/dspbridge/dev.h +0 -14
@@ -76,14 +76,7 @@ extern u32 dev_brd_write_fxn(void *pArb,* Returns: * 0: Module is loaded, device object has been created * -ENOMEM: Insufficient memory to create needed resources. -* DEV_E_NEWWMD: The WMD was compiled for a newer version of WCD. -* DEV_E_NULLWMDINTF: WMD passed back a NULL fxn Interface Struct Ptr -* DEV_E_NOCODMODULE: No ZL file name was specified in the registry -* for this dev_node_obj. -* LDR_E_FILEUNABLETOOPEN: Unable to open the specified WMD. -* LDR_E_NOMEMORY: PELDR is out of resources. * -EPERM: Unable to find WMD entry point function. -* COD_E_NOZLFUNCTIONS: One or more ZL functions exports not found. * -ESPIPE: Unable to load ZL DLL. * Requires: * DEV Initialized.
@@ -118,14 +111,7 @@ extern dsp_status dev_create_device(OUT struct dev_object* Returns: * 0: Module is loaded, device object has been created * -ENOMEM: Insufficient memory to create needed resources. -* DEV_E_NEWWMD: The WMD was compiled for a newer version of WCD. -* DEV_E_NULLWMDINTF: WMD passed back a NULL fxn Interface Struct Ptr -* DEV_E_NOCODMODULE: No ZL file name was specified in the registry -* for this dev_node_obj. -* LDR_E_FILEUNABLETOOPEN: Unable to open the specified WMD. -* LDR_E_NOMEMORY: PELDR is out of resources. * -EPERM: Unable to find WMD entry point function. -* COD_E_NOZLFUNCTIONS: One or more ZL functions exports not found. * -ESPIPE: Unable to load ZL DLL. * Requires: * DEV Initialized.
arch/arm/plat-omap/include/dspbridge/disp.h +0 -3
@@ -132,10 +132,7 @@ extern dsp_status disp_node_change_priority(struct disp_object* output. * Returns: * 0: Success. -* DSP_ETASK: Unable to create the node's task or process on the DSP. -* DSP_ESTREAM: Stream creation failure on the DSP. * -ETIME: A timeout occurred before the DSP responded. -* DSP_EUSER: A user-defined failure occurred. * -EPERM: A failure occurred, unable to create node. * Requires: * disp_init(void) called.
arch/arm/plat-omap/include/dspbridge/dspdefs.h +0 -4
@@ -58,7 +58,6 @@ struct bridge_dev_context;* hDevContext: Handle to mini-driver defined device context. * Returns: * 0: Success. -* WMD_E_HARDWARE: A test of hardware assumptions/integrity failed. * -ETIMEDOUT: Timeout occured waiting for a response from hardware. * -EPERM: Other, unspecified error. * Requires:
@@ -656,9 +655,6 @@ typedef dsp_status(*fxn_chnl_registernotify)* Returns: * 0: Success. * -ENOMEM: Unable to allocate memory for device context. -* WMD_E_BADCONFIG: One or more of the host or DSP configuration -* parameters did not satisfy hardware assumptions -* made by this WMD. * Requires: * phDevContext != NULL; * hdev_obj != NULL;
arch/arm/plat-omap/include/dspbridge/io.h +0 -1
@@ -41,7 +41,6 @@* 0: Success; * -ENOMEM: Insufficient memory for requested resources. * -EIO: Unable to plug channel ISR for configured IRQ. -* CHNL_E_INVALIDIRQ: Invalid IRQ number. Must be 0 <= birq <= 15. * -EINVAL: Invalid DSP word size (must be > 0). * Invalid base address for DSP communications. * Requires:
arch/arm/plat-omap/include/dspbridge/nldrdefs.h +0 -1
@@ -250,7 +250,6 @@ typedef bool(*nldr_initfxn) (void);* -ENXIO: Can't overlay phase because overlay memory * is already in use. * -EILSEQ: Failure in dynamic loader library. -* DSP_EFWRITE: Failed to write phase's code or date to target. * Requires: * nldr_init(void) called. * Valid nldr_node_obj.
arch/arm/plat-omap/include/dspbridge/node.h +1 -8
@@ -105,8 +105,6 @@ extern dsp_status node_alloc_msg_buf(struct node_object *hnode,* -EBADR: Node is not in the NODE_ALLOCATED, NODE_PAUSED, * or NODE_RUNNING state. * -ETIME: A timeout occurred before the DSP responded. -* DSP_ERESTART: A critical error has occurred and the DSP is -* being restarted. * Requires: * node_init(void) called. * Ensures:
@@ -202,10 +200,7 @@ extern dsp_status node_connect(struct node_object *hNode1,* -ESPIPE: Create function not found in the COFF file. * -EBADR: Node is not in the NODE_ALLOCATED state. * -ENOMEM: Memory allocation failure on the DSP. -* DSP_ETASK: Unable to create node's task or process on the DSP. -* DSP_ESTREAM: Stream creation failure on the DSP. * -ETIME: A timeout occurred before the DSP responded. -* DSP_EUSER1-16: A user-defined failure occurred on the DSP. * -EPERM: A failure occurred, unable to create node. * Requires: * node_init(void) called.
@@ -252,8 +247,6 @@ extern dsp_status node_create_mgr(OUT struct node_mgr **phNodeMgr,* 0: Success. * -EFAULT: Invalid hnode. * -ETIME: A timeout occurred before the DSP responded. -* DSP_EDELETE: A deletion failure occurred. -* DSP_EUSER1-16: Node specific failure occurred on the DSP. * -EPERM: A failure occurred in deleting the node. * -ESPIPE: Delete function not found in the COFF file. * Requires:
@@ -537,7 +530,7 @@ extern dsp_status node_run(struct node_object *hnode);* hnode: Node object representing a node currently * running on the DSP. * pstatus: Location to store execute-phase function return -* value (DSP_EUSER1-16). +* value. * Returns: * 0: Success. * -EFAULT: Invalid hnode.
arch/arm/plat-omap/include/dspbridge/proc.h +0 -11
@@ -91,10 +91,6 @@ extern dsp_status proc_auto_start(struct cfg_devnode *dev_node_obj,* -EFAULT : Invalid processor handle. * -ETIME: A Timeout Occured before the Control information * could be sent. -* DSP_EACCESSDENIED: Client does not have the access rights required -* to call this function. -* DSP_ERESTART: A Critical error has occured and the DSP is being -* restarted. * -EPERM : General Failure. * Requires: * PROC Initialized.
@@ -175,8 +171,6 @@ extern dsp_status proc_enum_nodes(void *hprocessor,* -EBADR: The processor is not in the PROC_RUNNING state. * -ETIME: A timeout occured before the DSP responded to the * querry. -* DSP_ERESTART: A Critical error has occured and the DSP is being -* restarted. * -EPERM : Unable to get Resource Information * Requires: * resource_info is not NULL.
@@ -322,11 +316,6 @@ extern dsp_status proc_get_trace(void *hprocessor, u8 * pbuf, u32 max_size);* 0: Success. * -ENOENT: The DSP Execuetable was not found. * -EFAULT: Invalid processor handle. -* DSP_ECORRUTFILE: Unable to Parse the DSP Execuetable -* DSP_EATTACHED: Abort because a GPP Client is attached to the -* specified Processor -* DSP_EACCESSDENIED: Client does not have the required access rights -* to reset and load the Processor * -EPERM : Unable to Load the Processor * Requires: * user_args is not NULL
arch/arm/plat-omap/include/dspbridge/strm.h +0 -1
@@ -201,7 +201,6 @@ extern dsp_status strm_get_info(struct strm_object *hStrm,* 0: Success. * -EFAULT: Invalid hStrm. * -ETIME: A timeout occurred before the stream could be idled. -* DSP_ERESTART: A critical error occurred, DSP is being restarted. * -EPERM: Unable to idle stream. * Requires: * strm_init(void) called.
Signature · 1 line
1.7.1
PATCH 39/40 DSPBRIDGE: error code guide
In reply to Omar Ramirez LunaDocument which specifies the uses of kernel error codes within bridge driver, in some case it also contains a common use case were the error might be seen.
It was generated from a previously deleted errbase.h file.
--- Documentation/tidspbridge/error-codes | 157 +++++++++++++++++++++++++++++++++ 1 files changed, 157 insertions(+), 0 deletions(-) create mode 100644 Documentation/tidspbridge/error-codes
Documentation/tidspbridge/error-codes new file +157 -0
@@ -0,0 +1,157 @@ + DSP/Bridge Error Code Guide + + +Success code is always taken as 0, except for one case where a success status +different than 0 can be possible, this is when enumerating a series of dsp +objects, if the enumeration doesn't have any more objects it is considered as a +successful case. In this case a positive ENODATA is returned (TODO: Change to +avoid this case). + +Error codes are returned as a negative 1, if an specific code is expected, it +can be propagated to user space by reading errno symbol defined in errno.h, for +specific details on the implementation a copy of the standard used should be +read first. + +The error codes used by this driver are: + +[EPERM] + General driver failure. + + According to the use case the following might apply: + - Device is in 'sleep/suspend' mode due to DPM. + - User cannot mark end of stream on an input channel. + - Requested operation is invalid for the node type. + - Invalid alignment for the node messaging buffer. + - The specified direction is invalid for the stream. + - Invalid stream mode. + +[ENOENT] + The specified object or file was not found. + +[ESRCH] + A shared memory buffer contained in a message or stream could not be mapped + to the GPP client process's virtual space. + +[EIO] + Driver interface I/O error. + + or: + - Unable to plug channel ISR for configured IRQ. + - No free I/O request packets are available. + +[ENXIO] + Unable to find a named section in DSP executable or a non-existent memory + segment identifier was specified. + +[EBADF] + General error for file handling: + + - Unable to open file. + - Unable to read file. + - An error occurred while parsing the DSP executable file. + +[ENOMEM] + A memory allocation failure occurred. + +[EACCES] + - Unable to read content of DCD data section; this is typically caused by + improperly configured nodes. + - Unable to decode DCD data section content; this is typically caused by + changes to DSP/BIOS Bridge data structures. + - Unable to get pointer to DCD data section; this is typically caused by + improperly configured UUIDs. + - Unable to load file containing DCD data section; this is typically + caused by a missing COFF file. + - The specified COFF file does not contain a valid node registration + section. + +[EFAULT] + Invalid pointer or handler. + +[EEXIST] + Attempted to create a channel manager when one already exists. + +[EINVAL] + Invalid argument. + +[ESPIPE] + Symbol not found in the COFF file. DSPNode_Create will return this if + the iAlg function table for an xDAIS socket is not found in the COFF file. + In this case, force the symbol to be linked into the COFF file. + DSPNode_Create, DSPNode_Execute, and DSPNode_Delete will return this if + the create, execute, or delete phase function, respectively, could not be + found in the COFF file. + + - No symbol table is loaded/found for this board. + - Unable to initialize the ZL COFF parsing module. + +[EPIPE] + I/O is currently pending. + + - End of stream was already requested on this output channel. + +[EDOM] + A parameter is specified outside its valid range. + +[ENOSYS] + The indicated operation is not supported. + +[EIDRM] + During enumeration a change in the number or properties of the objects + has occurred. + +[ECHRNG] + Attempt to created channel manager with too many channels or channel ID out + of range. + +[EBADR] + The state of the specified object is incorrect for the requested operation. + + - Invalid segment ID. + +[ENODATA] + Unable to retrieve resource information from the registry. + + - No more registry values. + +[ETIME] + A timeout occurred before the requested operation could complete. + +[ENOSR] + 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. + + - No free channels are available. + +[EILSEQ] + Error occurred in a dynamic loader library function. + +[EISCONN] + The Specified Connection already exists. + +[ENOTCONN] + Nodes not connected. + +[ETIMEDOUT] + Timeout occurred waiting for a response from the hardware. + + - Wait for flush operation on an output channel timed out. + +[ECONNREFUSED] + No more connections can be made for this node. + +[EALREADY] + Channel is already in use. + +[EREMOTEIO] + dwTimeOut parameter was CHNL_IOCNOWAIT, yet no I/O completions were + queued. + +[ECANCELED] + I/O has been cancelled on this channel. + +[ENOKEY] + Invalid subkey parameter. + + - UUID not found in registry.
Signature · 1 line
1.7.1
PATCH 33/40 DSPBRIDGE: err code replace DSP_EWRONGSTATE with EBADR
In reply to Omar Ramirez LunaReplace DSP_EWRONGSTATE with EBADR
--- arch/arm/plat-omap/include/dspbridge/node.h | 12 ++++++------ arch/arm/plat-omap/include/dspbridge/proc.h | 6 +++--- drivers/dsp/bridge/core/msg_sm.c | 2 +- drivers/dsp/bridge/rmgr/node.c | 18 +++++++++--------- drivers/dsp/bridge/rmgr/proc.c | 4 ++-- 5 files changed, 21 insertions(+), 21 deletions(-)
arch/arm/plat-omap/include/dspbridge/node.h +6 -6
@@ -45,7 +45,7 @@* -EDOM: attr_in != NULL and attr_in->prio out of * range. * -EPERM: A failure occured, unable to allocate node. -* DSP_EWRONGSTATE: Proccessor is not in the running state. +* -EBADR: Proccessor is not in the running state. * Requires: * node_init(void) called. * hprocessor != NULL.
@@ -101,7 +101,7 @@ extern dsp_status node_alloc_msg_buf(struct node_object *hnode,* -EFAULT: Invalid hnode. * -EDOM: prio is out of range. * -EPERM: The specified node is not a task node. -* DSP_EWRONGSTATE: Node is not in the NODE_ALLOCATED, NODE_PAUSED, +* -EBADR: Node is not in the NODE_ALLOCATED, NODE_PAUSED, * or NODE_RUNNING state. * -ETIME: A timeout occurred before the DSP responded. * DSP_ERESTART: A critical error has occurred and the DSP is
@@ -170,7 +170,7 @@ extern dsp_status node_close_orphans(struct node_mgr *hnode_mgr,* -EINVAL: A stream index parameter is invalid. * -EISCONN: A connection already exists for one of the * indices uStream1 or uStream2. -* DSP_EWRONGSTATE: Either hNode1 or hNode2 is not in the +* -EBADR: Either hNode1 or hNode2 is not in the * NODE_ALLOCATED state. * -ECONNREFUSED: No more connections available. * -EPERM: Attempt to make an illegal connection (eg,
@@ -200,7 +200,7 @@ extern dsp_status node_connect(struct node_object *hNode1,* 0: Success. * -EFAULT: Invalid hnode. * -ESPIPE: Create function not found in the COFF file. -* DSP_EWRONGSTATE: Node is not in the NODE_ALLOCATED state. +* -EBADR: Node is not in the NODE_ALLOCATED state. * -ENOMEM: Memory allocation failure on the DSP. * DSP_ETASK: Unable to create node's task or process on the DSP. * DSP_ESTREAM: Stream creation failure on the DSP.
@@ -469,7 +469,7 @@ extern dsp_status node_pause(struct node_object *hnode);* -EFAULT: Invalid hnode. * -EPERM: Messages can't be sent to this type of node. * -ETIME: Timeout occurred before message could be set. -* DSP_EWRONGSTATE: Node is in invalid state for sending messages. +* -EBADR: Node is in invalid state for sending messages. * -EPERM: Unable to send message. * Requires: * node_init(void) called.
@@ -544,7 +544,7 @@ extern dsp_status node_run(struct node_object *hnode);* -EFAULT: Invalid hnode. * -ETIME: A timeout occurred before the DSP responded. * -EPERM: Type of node specified cannot be terminated. -* DSP_EWRONGSTATE: Operation not valid for the current node state. +* -EBADR: Operation not valid for the current node state. * -EPERM: Unable to terminate the node. * Requires: * node_init(void) called.
arch/arm/plat-omap/include/dspbridge/proc.h +3 -3
@@ -172,7 +172,7 @@ extern dsp_status proc_enum_nodes(void *hprocessor,* Returns: * 0 : Success. * -EFAULT : Invalid processor handle. -* DSP_EWRONGSTATE: The processor is not in the PROC_RUNNING state. +* -EBADR: The processor is not in the PROC_RUNNING state. * -ETIME: A timeout occured before the DSP responded to the * querry. * DSP_ERESTART: A Critical error has occured and the DSP is being
@@ -423,7 +423,7 @@ extern dsp_status proc_notify_all_clients(void *hProc, u32 uEvents);* Returns: * 0 : Success. * -EFAULT : Invalid processor handle. -* DSP_EWRONGSTATE: Processor is not in PROC_LOADED state. +* -EBADR: Processor is not in PROC_LOADED state. * -EPERM : Unable to start the processor. * Requires: * PROC Initialized.
@@ -445,7 +445,7 @@ extern dsp_status proc_start(void *hprocessor);* Returns: * 0 : Success. * -EFAULT : Invalid processor handle. -* DSP_EWRONGSTATE: Processor is not in PROC_LOADED state. +* -EBADR: Processor is not in PROC_LOADED state. * -EPERM : Unable to start the processor. * Requires: * PROC Initialized.
drivers/dsp/bridge/core/msg_sm.c +1 -1
@@ -511,7 +511,7 @@ dsp_status bridge_msg_register_notify(struct msg_queue *msg_queue_obj, }if (notify_type !=DSP_SIGNALEVENT ) { - status =DSP_EWRONGSTATE ; + status = -EBADR ; goto func_end; }
drivers/dsp/bridge/rmgr/node.c +9 -9
@@ -801,7 +801,7 @@ dsp_status node_change_priority(struct node_object *hnode, s32 prio)NODE_SET_PRIORITY (hnode, prio); }else {if (state !=NODE_RUNNING ) { - status =DSP_EWRONGSTATE ; + status = -EBADR ; goto func_cont; } status =proc_get_processor_id (pnode->hprocessor, &proc_id);
@@ -917,10 +917,10 @@ dsp_status node_connect(struct node_object *hNode1, u32 uStream1,/* Nodes must be in the allocated state */ if (node1_type !=NODE_GPP &&node_get_state (hNode1) !=NODE_ALLOCATED ) - status =DSP_EWRONGSTATE ; + status = -EBADR ;if (node2_type !=NODE_GPP &&node_get_state (hNode2) !=NODE_ALLOCATED ) - status =DSP_EWRONGSTATE ; + status = -EBADR ;if (DSP_SUCCEEDED (status)) {/* Check that stream indices for task and dais socket nodes
@@ -1183,7 +1183,7 @@ dsp_status node_create(struct node_object *hnode)/* Check node state */ if (node_get_state (hnode) !=NODE_ALLOCATED ) - status =DSP_EWRONGSTATE ; + status = -EBADR ;if (DSP_SUCCEEDED (status)) status =proc_get_processor_id (pnode->hprocessor, &proc_id);
@@ -1275,7 +1275,7 @@ func_cont2: hnode_mgr->num_created++; goto func_cont; } -if (status !=DSP_EWRONGSTATE ) { +if (status != -EBADR ) {/* Put back in NODE_ALLOCATED state if error occurred */ NODE_SET_STATE (hnode,NODE_ALLOCATED ); }
@@ -2045,7 +2045,7 @@ dsp_status node_pause(struct node_object *hnode) state =node_get_state (hnode);/* Check node state */ if (state !=NODE_RUNNING ) - status =DSP_EWRONGSTATE ; + status = -EBADR ;if (DSP_FAILED (status)) goto func_cont;
@@ -2139,7 +2139,7 @@ dsp_status node_put_message(struct node_object *hnode,mutex_lock (&hnode_mgr->node_mgr_lock); state =node_get_state (hnode);if (state ==NODE_TERMINATING || state ==NODE_DONE ) - status =DSP_EWRONGSTATE ; + status = -EBADR ;/* end of sync_enter_cs */ mutex_unlock (&hnode_mgr->node_mgr_lock);
@@ -2290,7 +2290,7 @@ dsp_status node_run(struct node_object *hnode) state =node_get_state (hnode);if (state !=NODE_CREATED && state !=NODE_PAUSED ) - status =DSP_EWRONGSTATE ; + status = -EBADR ;if (DSP_SUCCEEDED (status)) status =proc_get_processor_id (pnode->hprocessor, &proc_id);
@@ -2400,7 +2400,7 @@ dsp_status node_terminate(struct node_object *hnode, OUT dsp_status *pstatus)mutex_lock (&hnode_mgr->node_mgr_lock); state =node_get_state (hnode);if (state !=NODE_RUNNING ) { - status =DSP_EWRONGSTATE ; + status = -EBADR ;/* Set the exit status if node terminated on * its own. */ if (state ==NODE_DONE )
drivers/dsp/bridge/rmgr/proc.c +2 -2
@@ -1288,7 +1288,7 @@ dsp_status proc_start(void *hprocessor) }/* Call the bridge_brd_start */ if (p_proc_object->proc_state !=PROC_LOADED ) { - status =DSP_EWRONGSTATE ; + status = -EBADR ; goto func_end; } status =dev_get_cod_mgr (p_proc_object->hdev_obj, &cod_mgr);
@@ -1375,7 +1375,7 @@ dsp_status proc_stop(void *hprocessor)if ((status == -EINVAL ) || (nodes_allocated >0 )) {pr_err ("%s: Can't stop device, active nodes = %d \n" , __func__, nodes_allocated); -return DSP_EWRONGSTATE ; +return -EBADR ; } }/* Call the bridge_brd_stop */
Signature · 1 line
1.7.1
PATCH 35/40 DSPBRIDGE: err code replace DSP_ECHANGEDURINGENUM with EIDRM
In reply to Omar Ramirez LunaReplace DSP_ECHANGEDURINGENUM with EIDRM
--- arch/arm/plat-omap/include/dspbridge/mgr.h | 2 +- drivers/dsp/bridge/rmgr/dbdcd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/include/dspbridge/mgr.h +1 -1
@@ -104,7 +104,7 @@ extern dsp_status mgr_destroy(struct mgr_object *hmgr_obj);* 0: Success. * -EINVAL: Parameter node_id is > than the number of nodes. * configutred in the system -* DSP_ECHANGEDURINGENUM: During Enumeration there has been a change in +* -EIDRM: During Enumeration there has been a change in * the number of nodes configured or in the * the properties of the enumerated nodes. * -EPERM: Failed to querry the Node Data Base
drivers/dsp/bridge/rmgr/dbdcd.c +1 -1
@@ -217,7 +217,7 @@ dsp_status dcd_enumerate_object(IN s32 cIndex, IN enum dsp_dcdobjtype obj_type,* than zero, then the current enum_refs must have been * incremented to greater than zero. */ - status =DSP_ECHANGEDURINGENUM ; + status = -EIDRM ; }else {/* * Pre-determine final key length. It's length of DCD_REGKEY +
Signature · 1 line
1.7.1
PATCH 36/40 DSPBRIDGE: remove custom errbase definitions
In reply to Omar Ramirez LunaThis are not used anymore, removing header file with custom error codes.
--- arch/arm/plat-omap/include/dspbridge/errbase.h | 177 ------------------------ arch/arm/plat-omap/include/dspbridge/ntfy.h | 1 - arch/arm/plat-omap/include/dspbridge/pwr.h | 1 - arch/arm/plat-omap/include/dspbridge/sync.h | 1 - drivers/dsp/bridge/core/chnl_sm.c | 1 - drivers/dsp/bridge/core/dsp-clock.c | 1 - drivers/dsp/bridge/core/io_sm.c | 1 - drivers/dsp/bridge/core/mmu_fault.c | 1 - drivers/dsp/bridge/core/msg_sm.c | 1 - drivers/dsp/bridge/core/tiomap3430.c | 1 - drivers/dsp/bridge/core/tiomap3430_pwr.c | 1 - drivers/dsp/bridge/core/tiomap_io.c | 1 - drivers/dsp/bridge/core/ue_deh.c | 1 - drivers/dsp/bridge/core/wdt.c | 1 - drivers/dsp/bridge/pmgr/chnl.c | 1 - drivers/dsp/bridge/pmgr/cmm.c | 1 - drivers/dsp/bridge/pmgr/cod.c | 1 - drivers/dsp/bridge/pmgr/dbll.c | 1 - drivers/dsp/bridge/pmgr/dev.c | 1 - drivers/dsp/bridge/pmgr/dmm.c | 1 - drivers/dsp/bridge/pmgr/dspapi.c | 1 - drivers/dsp/bridge/pmgr/io.c | 1 - drivers/dsp/bridge/pmgr/msg.c | 1 - drivers/dsp/bridge/rmgr/dbdcd.c | 1 - drivers/dsp/bridge/rmgr/disp.c | 1 - drivers/dsp/bridge/rmgr/drv.c | 1 - drivers/dsp/bridge/rmgr/drv_interface.c | 1 - drivers/dsp/bridge/rmgr/dspdrv.c | 1 - drivers/dsp/bridge/rmgr/mgr.c | 1 - drivers/dsp/bridge/rmgr/nldr.c | 1 - drivers/dsp/bridge/rmgr/node.c | 1 - drivers/dsp/bridge/rmgr/proc.c | 1 - drivers/dsp/bridge/rmgr/rmm.c | 1 - drivers/dsp/bridge/rmgr/strm.c | 1 - drivers/dsp/bridge/services/cfg.c | 1 - 35 files changed, 0 insertions(+), 211 deletions(-) delete mode 100644 arch/arm/plat-omap/include/dspbridge/errbase.h
arch/arm/plat-omap/include/dspbridge/errbase.h deleted +0 -177
@@ -1,177 +0,0 @@ -/* -* errbase.h -* -* DSP-BIOS Bridge driver support functions for TI OMAP processors. -* -* Central repository for DSP/BIOS Bridge error and status code. -* -* Error codes are of the form: -* [<MODULE>]_E<ERRORCODE> -* -* Success codes are of the form: -* [<MODULE>]_S<SUCCESSCODE> -* -* 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 ERRBASE_ -#define ERRBASE_ - -/* Base of generic errors and component errors */ -#define DSP_SBASE (dsp_status)0x00008000 -#define DSP_EBASE (dsp_status)0x80008000 - -#define DSP_COMP_EBASE (dsp_status)0x80040200 -#define DSP_COMP_ELAST (dsp_status)0x80047fff - -/* SUCCESS Codes */ - -/* Generic success code */ -#define 0 (DSP_SBASE + 0) - -/* GPP is already attached to this DSP processor */ -#define 0 (DSP_SBASE + 1) - -/* This is the last object available for enumeration. */ -#define DSP_SENUMCOMPLETE (DSP_SBASE + 2) - -/* The DSP is already asleep. */ -#define 0 (DSP_SBASE + 3) - -/* A library contains no dependent library references */ -#define 0 (DSP_SBASE + 7) - -/* A persistent library is already loaded by the dynamic loader */ -#define 0 (DSP_SBASE + 8) - -/* FAILURE Codes */ - -/* During enumeration a change in the number or properties of the objects - * has occurred. */ -#define DSP_ECHANGEDURINGENUM (DSP_EBASE + 3) - -/* I/O is currently pending. */ -#define DSP_EPENDING (DSP_EBASE + 0x11) - -/* 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. DSPNode_Create will return this if -* the iAlg function table for an xDAIS socket is not found in the COFF file. -* In this case, force the symbol to be linked into the COFF file. -* DSPNode_Create, DSPNode_Execute, and DSPNode_Delete will return this if -* the create, execute, or delete phase function, respectively, could not be -* 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) - -/* The specified COFF file does not contain a valid node registration -* section. */ -#define DSP_EDCDNOAUTOREGISTER (DSP_EBASE + 0x22) - -/* 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) - -/* A non-existent memory segment identifier was specified */ -#define DSP_EOVERLAYMEMORY (DSP_EBASE + 0x37) - -/* Invalid segment ID */ -#define DSP_EBADSEGID (DSP_EBASE + 0x38) - -/* 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) - -/* FAILURE Codes : COD */ -#define COD_EBASE (DSP_COMP_EBASE + 0x400) - -/* 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) - -/* FAILURE Codes : CHNL */ -#define CHNL_EBASE (DSP_COMP_EBASE + 0x500) - -/* 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) - -#endif /* ERRBASE_ */
arch/arm/plat-omap/include/dspbridge/ntfy.h +0 -1
@@ -21,7 +21,6 @@#include <dspbridge/host_os.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> #include <dspbridge/sync.h> /**
arch/arm/plat-omap/include/dspbridge/pwr.h +0 -1
@@ -18,7 +18,6 @@#define PWR_ #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> #include <dspbridge/pwr_sh.h> /*
arch/arm/plat-omap/include/dspbridge/sync.h +0 -1
@@ -19,7 +19,6 @@#ifndef _SYNC_H#define _SYNC_H -#include <dspbridge/errbase.h> #include <dspbridge/dbdefs.h>
drivers/dsp/bridge/core/chnl_sm.c +0 -1
@@ -48,7 +48,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/core/dsp-clock.c +0 -1
@@ -24,7 +24,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> #include <dspbridge/cfg.h> #include <dspbridge/drv.h> #include <dspbridge/dev.h>
drivers/dsp/bridge/core/io_sm.c +0 -1
@@ -31,7 +31,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/core/mmu_fault.c +0 -1
@@ -19,7 +19,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/host_os.h>
drivers/dsp/bridge/core/msg_sm.c +0 -1
@@ -19,7 +19,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/core/tiomap3430.c +0 -1
@@ -25,7 +25,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/core/tiomap3430_pwr.c +0 -1
@@ -18,7 +18,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> #include <dspbridge/cfg.h> #include <dspbridge/drv.h> #include <dspbridge/io_sm.h>
drivers/dsp/bridge/core/tiomap_io.c +0 -1
@@ -18,7 +18,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/core/ue_deh.c +0 -1
@@ -23,7 +23,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/core/wdt.c +0 -1
@@ -18,7 +18,6 @@#include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> #include <dspbridge/dspdeh.h> #include <dspbridge/dev.h> #include <dspbridge/_chnl_sm.h>
drivers/dsp/bridge/pmgr/chnl.c +0 -1
@@ -23,7 +23,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/pmgr/cmm.c +0 -1
@@ -36,7 +36,6 @@/* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h> -#include <dspbridge/errbase.h> /* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h>
drivers/dsp/bridge/pmgr/cod.c +0 -1
@@ -28,7 +28,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/pmgr/dbll.c +0 -1
@@ -20,7 +20,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/pmgr/dev.c +0 -1
@@ -22,7 +22,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/pmgr/dmm.c +0 -1
@@ -30,7 +30,6 @@/* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h> -#include <dspbridge/errbase.h> /* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/sync.h>
drivers/dsp/bridge/pmgr/dspapi.c +0 -1
@@ -23,7 +23,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/pmgr/io.c +0 -1
@@ -22,7 +22,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/pmgr/msg.c +0 -1
@@ -22,7 +22,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/rmgr/dbdcd.c +0 -1
@@ -29,7 +29,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/rmgr/disp.c +0 -1
@@ -23,7 +23,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/rmgr/drv.c +0 -1
@@ -22,7 +22,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/rmgr/drv_interface.c +0 -1
@@ -34,7 +34,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/rmgr/dspdrv.c +0 -1
@@ -22,7 +22,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/rmgr/mgr.c +0 -1
@@ -21,7 +21,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/rmgr/nldr.c +0 -1
@@ -20,7 +20,6 @@#include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> #include <dspbridge/dbc.h>
drivers/dsp/bridge/rmgr/node.c +0 -1
@@ -22,7 +22,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/rmgr/proc.c +0 -1
@@ -22,7 +22,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/rmgr/rmm.c +0 -1
@@ -40,7 +40,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/rmgr/strm.c +0 -1
@@ -22,7 +22,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
drivers/dsp/bridge/services/cfg.c +0 -1
@@ -19,7 +19,6 @@/* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h> #include <dspbridge/dbdefs.h> -#include <dspbridge/errbase.h> /* ----------------------------------- Trace & Debug */ #include <dspbridge/dbc.h>
Signature · 1 line
1.7.1
Ramirez Luna, Omar
AppliedQuoted 133 lines
From: Ramirez Luna, Omar
These set of patches gets rid of the custom error codes still present.
Although there are a lot of patches most of them are just replacements which were broken into single patches to avoid big patch files.
One of the patches creates a help file with the matching linux error codes just in case the error is not descriptive enough, and it also lists a common scenario where the error might be seen.
Finally, the last patch replaces a custom typedef (
dsp_status) with an int type as now those errors can have a negative value.Omar Ramirez Luna (40):
DSPBRIDGE: Remove success codes
DSPBRIDGE: changeDSP_SENUMCOMPLETEfor ENODATA
DSPBRIDGE: err code replaceCHNL_E_WAITTIMEOUTwith ETIMEDOUT
DSPBRIDGE: err code replaceCHNL_E_NOEOSwith EPERM
DSPBRIDGE: err code replaceCHNL_E_BUFSIZEwith EINVAL
DSPBRIDGE: err code replaceCHNL_E_NOIORPSwith EIO
DSPBRIDGE: err code replaceCHNL_E_ISRwith EIO
DSPBRIDGE: err code replaceCHNL_E_MGREXISTSwith EEXIST
DSPBRIDGE: err code replaceCHNL_E_NOMEMMAPwith EFAULT
DSPBRIDGE: err code replaceCHNL_E_INVALIDMEMBASEwith EINVAL
DSPBRIDGE: err code replaceCHNL_E_INVALIDWORDSIZEwith EINVAL
DSPBRIDGE: err code replaceCHNL_E_EOSwith EPIPE
DSPBRIDGE: err code replaceCHNL_E_NOIOCwith EREMOTEIO
DSPBRIDGE: err code replaceCHNL_E_BADCHANIDwith ECHRNG
DSPBRIDGE: err code replaceCHNL_E_OUTOFSTREAMSwith ENOSR
DSPBRIDGE: err code replaceCHNL_E_MAXCHANNELSwith ECHRNG
DSPBRIDGE: err code replaceCOD_E_ZLCREATEFAILEDwith ESPIPE
DSPBRIDGE: err code replaceCOD_E_SYMBOLNOTFOUNDwith ESPIPE
DSPBRIDGE: err code replaceCOD_E_NOSYMBOLSLOADEDwith ESPIPE
DSPBRIDGE: err code replaceDSP_EDPMSUSPENDwith EPERM
DSPBRIDGE: err code replaceDSP_EDYNLOADwith EILSEQ
DSPBRIDGE: err code replaceDSP_EBADSEGIDwith EBADR
DSPBRIDGE: err code replaceDSP_EOVERLAYMEMORYwith ENXIO
DSPBRIDGE: err code replaceDSP_ENOSECTwith ENXIO
DSPBRIDGE: err code replaceDSP_ETRANSLATEwith ESRCH
DSPBRIDGE: err code replaceDSP_ENOTFOUNDwith ENOENT
DSPBRIDGE: err code replaceDSP_EDCDNOAUTOREGISTERwith EACCES
DSPBRIDGE: err code replaceDSP_EDCDLOADBASEwith EACCES
DSPBRIDGE: err code replaceDSP_EDCDGETSECTwith EACCES
DSPBRIDGE: err code replaceDSP_EDCDPARSESECTwith EACCES
DSPBRIDGE: err code replaceDSP_EDCDREADSECTwith EACCES
DSPBRIDGE: err code replaceDSP_ESYMBOLwith ESPIPE
DSPBRIDGE: err code replaceDSP_EWRONGSTATEwith EBADR
DSPBRIDGE: err code replaceDSP_EPENDINGwith EPIPE
DSPBRIDGE: err code replaceDSP_ECHANGEDURINGENUMwith EIDRM
DSPBRIDGE: remove custom errbase definitions
DSPBRIDGE: cleanup for duplicated error codes
DSPBRIDGE: removed unused error codes from comments
DSPBRIDGE: error code guide
DSPBRIDGE: removedsp_statustypedefDocumentation/tidspbridge/error-codes | 157 ++++++++++++++ arch/arm/plat-omap/include/dspbridge/_chnl_sm.h | 2 +- arch/arm/plat-omap/include/dspbridge/cfg.h | 57 +++--- arch/arm/plat-omap/include/dspbridge/chnl.h | 31 ++-- arch/arm/plat-omap/include/dspbridge/clk.h | 8 +- arch/arm/plat-omap/include/dspbridge/cmm.h | 44 ++-- arch/arm/plat-omap/include/dspbridge/cod.h | 61 +++--- arch/arm/plat-omap/include/dspbridge/dbdcd.h | 73 +++---- arch/arm/plat-omap/include/dspbridge/dbdcddef.h | 2 +- arch/arm/plat-omap/include/dspbridge/dbdefs.h | 5 +- arch/arm/plat-omap/include/dspbridge/dbldefs.h | 2 +- arch/arm/plat-omap/include/dspbridge/dbll.h | 14 +- arch/arm/plat-omap/include/dspbridge/dblldefs.h | 47 ++--- arch/arm/plat-omap/include/dspbridge/dev.h | 156 ++++++-------- arch/arm/plat-omap/include/dspbridge/disp.h | 25 +-- arch/arm/plat-omap/include/dspbridge/dmm.h | 18 +- arch/arm/plat-omap/include/dspbridge/drv.h | 38 ++-- .../arm/plat-omap/include/dspbridge/dspapi-ioctl.h | 2 +- arch/arm/plat-omap/include/dspbridge/dspapi.h | 8 +- arch/arm/plat-omap/include/dspbridge/dspchnl.h | 24 +- arch/arm/plat-omap/include/dspbridge/dspdefs.h | 226 ++++++++++---------- arch/arm/plat-omap/include/dspbridge/dspdeh.h | 8 +- arch/arm/plat-omap/include/dspbridge/dspio.h | 10 +- arch/arm/plat-omap/include/dspbridge/dspmsg.h | 10 +- arch/arm/plat-omap/include/dspbridge/errbase.h | 177 --------------- arch/arm/plat-omap/include/dspbridge/io.h | 19 +- arch/arm/plat-omap/include/dspbridge/io_sm.h | 6 +- arch/arm/plat-omap/include/dspbridge/mgr.h | 34 ++-- arch/arm/plat-omap/include/dspbridge/msg.h | 2 +- arch/arm/plat-omap/include/dspbridge/nldr.h | 14 +- arch/arm/plat-omap/include/dspbridge/nldrdefs.h | 31 ++-- arch/arm/plat-omap/include/dspbridge/node.h | 148 ++++++------- arch/arm/plat-omap/include/dspbridge/nodepriv.h | 8 +- arch/arm/plat-omap/include/dspbridge/ntfy.h | 13 +- arch/arm/plat-omap/include/dspbridge/proc.h | 117 +++++------ arch/arm/plat-omap/include/dspbridge/pwr.h | 25 +-- .../plat-omap/include/dspbridge/resourcecleanup.h | 30 ++-- arch/arm/plat-omap/include/dspbridge/rmm.h | 10 +- arch/arm/plat-omap/include/dspbridge/strm.h | 71 +++--- arch/arm/plat-omap/include/dspbridge/sync.h | 11 +- drivers/dsp/bridge/core/_tiomap.h | 4 +- drivers/dsp/bridge/core/_tiomap_pwr.h | 14 +- drivers/dsp/bridge/core/chnl_sm.c | 83 ++++---- drivers/dsp/bridge/core/dsp-clock.c | 9 +- drivers/dsp/bridge/core/io_sm.c | 75 ++++---- drivers/dsp/bridge/core/mmu_fault.c | 1 - drivers/dsp/bridge/core/msg_sm.c | 31 ++-- drivers/dsp/bridge/core/tiomap3430.c | 123 ++++++------ drivers/dsp/bridge/core/tiomap3430_pwr.c | 45 ++-- drivers/dsp/bridge/core/tiomap_io.c | 21 +- drivers/dsp/bridge/core/tiomap_io.h | 6 +- drivers/dsp/bridge/core/ue_deh.c | 21 +- drivers/dsp/bridge/core/wdt.c | 1 - drivers/dsp/bridge/pmgr/chnl.c | 17 +- drivers/dsp/bridge/pmgr/cmm.c | 47 ++-- drivers/dsp/bridge/pmgr/cod.c | 61 +++--- drivers/dsp/bridge/pmgr/dbll.c | 47 ++-- drivers/dsp/bridge/pmgr/dev.c | 113 +++++----- drivers/dsp/bridge/pmgr/dmm.c | 43 ++-- drivers/dsp/bridge/pmgr/dspapi.c | 101 +++++----- drivers/dsp/bridge/pmgr/io.c | 13 +- drivers/dsp/bridge/pmgr/msg.c | 5 +- drivers/dsp/bridge/rmgr/dbdcd.c | 97 +++++---- drivers/dsp/bridge/rmgr/disp.c | 35 ++-- drivers/dsp/bridge/rmgr/drv.c | 97 ++++----- drivers/dsp/bridge/rmgr/drv_interface.c | 13 +- drivers/dsp/bridge/rmgr/dspdrv.c | 3 +- drivers/dsp/bridge/rmgr/mgr.c | 43 ++-- drivers/dsp/bridge/rmgr/nldr.c | 91 ++++---- drivers/dsp/bridge/rmgr/node.c | 157 +++++++------- drivers/dsp/bridge/rmgr/proc.c | 131 ++++++------ drivers/dsp/bridge/rmgr/pwr.c | 16 +- drivers/dsp/bridge/rmgr/rmm.c | 11 +- drivers/dsp/bridge/rmgr/strm.c | 84 ++++---- drivers/dsp/bridge/services/cfg.c | 41 ++-- drivers/dsp/bridge/services/sync.c | 10 +- 76 files changed, 1666 insertions(+), 1788 deletions(-)
Quoted 2 lines
create mode 100644
Documentation/tidspbridge/error-codesdelete mode 100644arch/arm/plat-omap/include/dspbridge/errbase.h
Pushed to dspbridge
- omar