[RFC][PATCH 0/13] Cleanup DSPBRIDGE custom error codes

2010-04-15 Thread Hebbar, Shivananda
This patch series tries to clean up the remaining 46 error codes.
Out of that 13 error codes are mapped to Linux errrorcodes.
Rest of the error codes will be kept as it is in the errbase.h.

Link to stage 1 cleanup can be found here.
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg25835.html


Shivananda Hebbar (13)

DSPBRIDGE: Cleanup custom error code (DSP_EDIRECTION - -EPERM)
DSPBRIDGE: Cleanup custom error code (DSP_ESTREAMFULL - -ENOSR)
DSPBRIDGE: Cleanup custom error code (DSP_ENOMORECONNECTIONS - -ECONNREFUSED)
DSPPBRIDGE: Cleanup custom error code (DSP_EFREAD - -EBADF)
DSPBRIDGE: Cleanup custom error code (DSP_EALIGNMENT - -EPERM)
DSPBRIDGE: Cleanup custom error code (DSP_ESTRMMODE - -EPERM)
DSPBRIDGE: Cleanup custom error code (CFG_E_INVALIDPOINTER - -EFAULT)
DSPBRIDGE: Cleanup custom error code (CFG_E_INVALIDHDEVNODE - -EFAULT)
DSPBRIDGE: Cleanup custom error code (CFG_E_RESOURCENOTAVAIL - -NODATA)
DSPBRIDGE: Cleanup custom error code (COD_E_OPENFAILED - -EBADF)
DSPBRIDGE: Cleanup custom error code (REG_E_INVALIDSUBKEY - -ENOKEY)
DSPBRIDGE: Cleanup custom error code (REG_E_NOMOREITEMS - -ENODATA)
DSPBRIDGE: Cleanup custom error code (DSP_EFAIL - -EPERM)


 arch/arm/plat-omap/include/dspbridge/_dcd.h |2 +-
 arch/arm/plat-omap/include/dspbridge/cfg.h  |   44 +++---
 arch/arm/plat-omap/include/dspbridge/clk.h  |   10 +-
 arch/arm/plat-omap/include/dspbridge/cmm.h  |   14 +-
 arch/arm/plat-omap/include/dspbridge/cod.h  |8 +-
 arch/arm/plat-omap/include/dspbridge/dbdcd.h|   16 +-
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |4 +-
 arch/arm/plat-omap/include/dspbridge/dev.h  |   14 +-
 arch/arm/plat-omap/include/dspbridge/disp.h |4 +-
 arch/arm/plat-omap/include/dspbridge/drv.h  |   12 +-
 arch/arm/plat-omap/include/dspbridge/errbase.h  |  205 ++-
 arch/arm/plat-omap/include/dspbridge/mgr.h  |   12 +-
 arch/arm/plat-omap/include/dspbridge/node.h |   30 ++--
 arch/arm/plat-omap/include/dspbridge/proc.h |   48 +++---
 arch/arm/plat-omap/include/dspbridge/pwr.h  |8 +-
 arch/arm/plat-omap/include/dspbridge/reg.h  |8 +-
 arch/arm/plat-omap/include/dspbridge/strm.h |   28 ++--
 arch/arm/plat-omap/include/dspbridge/sync.h |   10 +-
 arch/arm/plat-omap/include/dspbridge/wmd.h  |   44 +++---
 drivers/dsp/bridge/pmgr/cmm.c   |   12 +-
 drivers/dsp/bridge/pmgr/cod.c   |8 +-
 drivers/dsp/bridge/pmgr/dbll.c  |4 +-
 drivers/dsp/bridge/pmgr/dev.c   |   10 +-
 drivers/dsp/bridge/pmgr/msg.c   |2 +-
 drivers/dsp/bridge/pmgr/wcd.c   |   10 +-
 drivers/dsp/bridge/rmgr/dbdcd.c |   44 +++---
 drivers/dsp/bridge/rmgr/disp.c  |   16 +-
 drivers/dsp/bridge/rmgr/drv.c   |   20 +-
 drivers/dsp/bridge/rmgr/dspdrv.c|4 +-
 drivers/dsp/bridge/rmgr/mgr.c   |6 +-
 drivers/dsp/bridge/rmgr/nldr.c  |4 +-
 drivers/dsp/bridge/rmgr/node.c  |   42 +++---
 drivers/dsp/bridge/rmgr/proc.c  |   30 ++--
 drivers/dsp/bridge/rmgr/pwr.c   |8 +-
 drivers/dsp/bridge/rmgr/strm.c  |   22 ++--
 drivers/dsp/bridge/services/cfg.c   |   34 ++--
 drivers/dsp/bridge/services/clk.c   |   12 +-
 drivers/dsp/bridge/services/reg.c   |2 +-
 drivers/dsp/bridge/services/regsup.c|   10 +-
 drivers/dsp/bridge/services/regsup.h|4 +-
 drivers/dsp/bridge/services/sync.c  |6 +-
 drivers/dsp/bridge/wmd/chnl_sm.c|2 +-
 drivers/dsp/bridge/wmd/io_sm.c  |   20 +-
 drivers/dsp/bridge/wmd/msg_sm.c |8 +-
 drivers/dsp/bridge/wmd/tiomap3430.c |   44 +++---
 drivers/dsp/bridge/wmd/tiomap3430_pwr.c |   18 +-
 drivers/dsp/bridge/wmd/tiomap_io.c  |   20 +-
 drivers/dsp/bridge/wmd/ue_deh.c |2 +-
 48 files changed, 385 insertions(+), 560 deletions(-)
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH 1/13] DSPBRIDGE: Cleanup custom error code (DSP_EDIRECTION - -EPERM)

2010-04-15 Thread Hebbar, Shivananda
From 3c0c44b52335a21832d889382c9a631df23df356 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 8 Apr 2010 17:17:46 -0500
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_EDIRECTION - -EPERM)

This patch replaces DSP_EDIRECTION with -EPERM.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/strm.h|2 +-
 drivers/dsp/bridge/rmgr/strm.c |4 ++--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index a9ecb71..8a0e48c 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -79,9 +79,6 @@
 /* A failure occurred during a delete operation */
 #define DSP_EDELETE (DSP_EBASE + 5)
 
-/* The specified direction is invalid */
-#define DSP_EDIRECTION  (DSP_EBASE + 6)
-
 /* A stream has been issued the maximum number of buffers allowed in the
  * stream at once ;  buffers must be reclaimed from the stream before any
  * more can be issued. */
diff --git a/arch/arm/plat-omap/include/dspbridge/strm.h 
b/arch/arm/plat-omap/include/dspbridge/strm.h
index f53d66b..fd27da2 100644
--- a/arch/arm/plat-omap/include/dspbridge/strm.h
+++ b/arch/arm/plat-omap/include/dspbridge/strm.h
@@ -259,7 +259,7 @@ extern dsp_status strm_issue(struct strm_object *hStrm, IN 
u8 * pbuf,
  *  Returns:
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid hnode.
- *  DSP_EDIRECTION: Invalid dir.
+ *  -EPERM: Invalid dir.
  *  -EINVAL: Invalid index.
  *  -EPERM:  hnode is not a task or DAIS socket node.
  *  DSP_EFAIL:  Unable to open stream.
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index 45a15b4..10d86ca 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -495,7 +495,7 @@ dsp_status strm_open(struct node_object *hnode, u32 dir, 
u32 index,
DBC_REQUIRE(pattr != NULL);
*phStrm = NULL;
if (dir != DSP_TONODE  dir != DSP_FROMNODE) {
-   status = DSP_EDIRECTION;
+   status = -EPERM;
} else {
/* Get the channel id from the node (set in node_connect()) */
status = node_get_channel_id(hnode, dir, index, ul_chnl_id);
@@ -613,7 +613,7 @@ func_cont:
DBC_ENSURE((DSP_SUCCEEDED(status) 
MEM_IS_VALID_HANDLE((*phStrm), STRM_SIGNATURE)) ||
   (*phStrm == NULL  (status == -EFAULT ||
-   status == DSP_EDIRECTION
+   status == -EPERM
|| status == -EINVAL
|| status == DSP_EFAIL)));
 
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RFC] [PATCH 3/13] DSPBRIDGE: Cleanup custom error code (DSP_ENOMORECONNECTIONS - -ECONNREFUSED)

2010-04-15 Thread Hebbar, Shivananda
From 7ec741cb6e3e10844b77e1cb235488218bc0d1a9 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 9 Apr 2010 10:41:25 -0500
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_ENOMORECONNECTIONS 
- -ECONNREFUSED)

 This patch replaces DSP_ENOMORECONNECTIONS with -ECONNREFUSED.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/node.h|2 +-
 drivers/dsp/bridge/rmgr/node.c |4 ++--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 28c4d7b..3f637dd 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -85,9 +85,6 @@
 /* No error text was found for the specified error code. */
 #define DSP_ENOERRTEXT  (DSP_EBASE + 0xe)
 
-/* No more connections can be made for this node. */
-#define DSP_ENOMORECONNECTIONS  (DSP_EBASE + 0xf)
-
 /* I/O is currently pending. */
 #define DSP_EPENDING(DSP_EBASE + 0x11)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index 073991b..3c58ecb 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -172,7 +172,7 @@ extern dsp_status node_close_orphans(struct node_mgr 
*hnode_mgr,
  *  indices uStream1 or uStream2.
  *  DSP_EWRONGSTATE:Either hNode1 or hNode2 is not in the
  *  NODE_ALLOCATED state.
- *  DSP_ENOMORECONNECTIONS: No more connections available.
+ *  -ECONNREFUSED: No more connections available.
  *  DSP_EFAIL:  Attempt to make an illegal connection (eg,
  *  Device node to device node, or device node to
  *  GPP), the two nodes are on different DSPs.
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index d4949dc..c50ac1b 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -953,7 +953,7 @@ dsp_status node_connect(struct node_object *hNode1, u32 
uStream1,
/* Find available pipe */
pipe_id = gb_findandset(hnode_mgr-pipe_map);
if (pipe_id == GB_NOBITS) {
-   status = DSP_ENOMORECONNECTIONS;
+   status = -ECONNREFUSED;
} else {
hNode1-outputs[uStream1].type = NODECONNECT;
hNode2-inputs[uStream2].type = NODECONNECT;
@@ -1025,7 +1025,7 @@ dsp_status node_connect(struct node_object *hNode1, u32 
uStream1,
chnl_id = gb_findandset(hnode_mgr-chnl_map);
}
if (chnl_id == GB_NOBITS) {
-   status = DSP_ENOMORECONNECTIONS;
+   status = -ECONNREFUSED;
goto func_cont2;
}
pstr_dev_name = mem_calloc(HOSTNAMELEN + 1, MEM_PAGED);
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC] [PATCH 2/13] DSPBRIDGE: Cleanup custom error code (DSP_ESTREAMFULL - -ENOSR)

2010-04-15 Thread Hebbar, Shivananda
From 0e3d9c1ccc09389155202da25b856698195fb556 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 8 Apr 2010 17:34:59 -0500
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_ESTREAMFULL - 
-ENOSR)

This patch replaces DSP_ESTREAMFULL with -ENOSR.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |5 -
 arch/arm/plat-omap/include/dspbridge/strm.h|2 +-
 drivers/dsp/bridge/rmgr/strm.c |2 +-
 3 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 8a0e48c..28c4d7b 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -79,11 +79,6 @@
 /* A failure occurred during a delete operation */
 #define DSP_EDELETE (DSP_EBASE + 5)
 
-/* A stream has been issued the maximum number of buffers allowed in the
- * stream at once ;  buffers must be reclaimed from the stream before any
- * more can be issued. */
-#define DSP_ESTREAMFULL (DSP_EBASE + 7)
-
 /* A general failure occurred */
 #define DSP_EFAIL   (DSP_EBASE + 8)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/strm.h 
b/arch/arm/plat-omap/include/dspbridge/strm.h
index fd27da2..8770608 100644
--- a/arch/arm/plat-omap/include/dspbridge/strm.h
+++ b/arch/arm/plat-omap/include/dspbridge/strm.h
@@ -234,7 +234,7 @@ extern bool strm_init(void);
  *  Returns:
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid hStrm.
- *  DSP_ESTREAMFULL:The stream is full.
+ *  -ENOSR:The stream is full.
  *  DSP_EFAIL:  Failure occurred, unable to issue buffer.
  *  Requires:
  *  strm_init(void) called.
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index 10d86ca..5102422 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -459,7 +459,7 @@ dsp_status strm_issue(struct strm_object *hStrm, IN u8 
*pbuf, u32 ul_bytes,
 (u32) tmp_buf, dw_arg);
}
if (status == CHNL_E_NOIORPS)
-   status = DSP_ESTREAMFULL;
+   status = -ENOSR;
}
 
dev_dbg(bridge, %s: hStrm: %p pbuf: %p ul_bytes: 0x%x dw_arg: 0x%x 
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC] [PATCH 4/13] DSPPBRIDGE: Cleanup custom error code (DSP_EFREAD - -EBADF)

2010-04-15 Thread Hebbar, Shivananda
From 35bb007415ef78a380edfb4b79729626473eff3b Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 9 Apr 2010 10:59:06 -0500
Subject: [PATCH] DSPPBRIDGE: Cleanup custom error code (DSP_EFREAD - -EBADF)

This patch replaces DSP_EFREAD with -EBADF

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |4 ++--
 arch/arm/plat-omap/include/dspbridge/errbase.h  |3 ---
 drivers/dsp/bridge/pmgr/cod.c   |2 +-
 drivers/dsp/bridge/pmgr/dbll.c  |2 +-
 4 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dblldefs.h 
b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
index 527d47e..5dd23fb 100644
--- a/arch/arm/plat-omap/include/dspbridge/dblldefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
@@ -337,7 +337,7 @@ typedef bool(*dbll_init_fxn) (void);
  *  pulEntry- Location to store program entry on output.
  *  Returns:
  *  DSP_SOK:Success.
- *  DSP_EFREAD: File read failed.
+ *  -EBADF: File read failed.
  *  DSP_EFWRITE:Write to target failed.
  *  DSP_EDYNLOAD:   Failure in dynamic loader library.
  *  Requires:
@@ -386,7 +386,7 @@ typedef dsp_status(*dbll_load_sect_fxn) (struct 
dbll_library_obj *lib,
  *  DSP_SOK:Success.
  *  -ENOMEM:Memory allocation failure.
  *  -EBADF: File open failure.
- *  DSP_EFREAD: File read failure.
+ *  -EBADF: File read failure.
  *  DSP_ECORRUPTFILE:   Unable to determine target type.
  *  Requires:
  *  DBL initialized.
diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 3f637dd..c9316ac 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -162,9 +162,6 @@
 /* Unable to find a named section in DSP executable */
 #define DSP_ENOSECT (DSP_EBASE + 0x32)
 
-/* Unable to read file */
-#define DSP_EFREAD  (DSP_EBASE + 0x34)
-
 /* A non-existent memory segment identifier was specified */
 #define DSP_EOVERLAYMEMORY  (DSP_EBASE + 0x37)
 
diff --git a/drivers/dsp/bridge/pmgr/cod.c b/drivers/dsp/bridge/pmgr/cod.c
index b4b71fc..010e90c 100644
--- a/drivers/dsp/bridge/pmgr/cod.c
+++ b/drivers/dsp/bridge/pmgr/cod.c
@@ -149,7 +149,7 @@ static s32 cod_f_read(void __user *pbuffer, s32 size, s32 
cCount,
set_fs(fs);
 
if (!dw_bytes_read)
-   return DSP_EFREAD;
+   return -EBADF;
 
return dw_bytes_read / size;
}
diff --git a/drivers/dsp/bridge/pmgr/dbll.c b/drivers/dsp/bridge/pmgr/dbll.c
index 5544029..e692b78 100644
--- a/drivers/dsp/bridge/pmgr/dbll.c
+++ b/drivers/dsp/bridge/pmgr/dbll.c
@@ -795,7 +795,7 @@ dsp_status dbll_read_sect(struct dbll_library_obj *lib, 
char *name,
status = DSP_EFAIL;
} else {
if (!dload_get_section(zl_lib-desc, sect, pContent))
-   status = DSP_EFREAD;
+   status = -EBADF;
 
}
 func_cont:
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RFC] [PATCH 5/13] DSPBRIDGE: Cleanup custom error code (DSP_EALIGNMENT - -EPERM)

2010-04-15 Thread Hebbar, Shivananda
From 045a98ee10ecfd8ef28dccb23918af92cbeb1bf3 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 9 Apr 2010 11:03:16 -0500
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_EALIGNMENT - -EPERM)

This patch replaces DSP_ALIGNMENT with -EPERM.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/rmgr/node.c |2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index c9316ac..46fa77e 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -168,9 +168,6 @@
 /* Invalid segment ID */
 #define DSP_EBADSEGID   (DSP_EBASE + 0x38)
 
-/* Invalid alignment */
-#define DSP_EALIGNMENT   (DSP_EBASE + 0x39)
-
 /* Invalid stream mode */
 #define DSP_ESTRMMODE   (DSP_EBASE + 0x3a)
 
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index c50ac1b..871cd13 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -741,7 +741,7 @@ DBAPI node_alloc_msg_buf(struct node_object *hnode, u32 
usize,
break;
default:
/* alignment value not suportted */
-   status = DSP_EALIGNMENT;
+   status = -EPERM;
break;
}
if (DSP_SUCCEEDED(status)) {
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC] [PATCH 6/13] DSPBRIDGE: Cleanup custom error code (DSP_ESTRMMODE - -EPERM)

2010-04-15 Thread Hebbar, Shivananda
From 8d982475f18c66f7b1d5e4d3677d479a8ec81781 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 9 Apr 2010 11:08:36 -0500
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_ESTRMMODE - -EPERM)

This patch replaces DSP_ESTRMMODE with -EPERM

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/rmgr/node.c |2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 46fa77e..06c6030 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -168,9 +168,6 @@
 /* Invalid segment ID */
 #define DSP_EBADSEGID   (DSP_EBASE + 0x38)
 
-/* Invalid stream mode */
-#define DSP_ESTRMMODE   (DSP_EBASE + 0x3a)
-
 /* Not shared memory */
 #define DSP_ENOTSHAREDMEM   (DSP_EBASE + 0x3c)
 
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index 871cd13..7f35052 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -901,7 +901,7 @@ dsp_status node_connect(struct node_object *hNode1, u32 
uStream1,
 */
if (DSP_SUCCEEDED(status)  pattrs) {
if (pattrs-strm_mode != STRMMODE_PROCCOPY)
-   status = DSP_ESTRMMODE; /* illegal stream mode */
+   status = -EPERM;/* illegal stream mode */
 
}
if (DSP_FAILED(status))
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC] [PATCH 7/13] DSPBRIDGE: Cleanup custom error code (CFG_E_INVALIDPOINTER - -EFAULT)

2010-04-15 Thread Hebbar, Shivananda
From d7646f5d1aff38453705586e256bc12a2cfd289a Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 9 Apr 2010 11:23:35 -0500
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (CFG_E_INVALIDPOINTER - 
-EFAULT)

This patch replaces CFG_E_INVALIDPOINTER with -EFAULT.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/cfg.h |8 
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/services/cfg.c  |8 
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cfg.h 
b/arch/arm/plat-omap/include/dspbridge/cfg.h
index 9a9ab8e..faeb87c 100644
--- a/arch/arm/plat-omap/include/dspbridge/cfg.h
+++ b/arch/arm/plat-omap/include/dspbridge/cfg.h
@@ -83,7 +83,7 @@ extern dsp_status cfg_get_cd_version(OUT u32 *pdwVersion);
  *  Returns:
  *  DSP_SOK:Success.
  *  CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
- *  CFG_E_INVALIDPOINTER:   phDevObject is invalid.
+ *  -EFAULT:   phDevObject is invalid.
  *  CFG_E_RESOURCENOTAVAIL: The resource is not available.
  *  Requires:
  *  CFG initialized.
@@ -126,7 +126,7 @@ extern dsp_status cfg_get_dsp_resources(IN struct 
cfg_devnode *dev_node_obj,
  *  Returns:
  *  DSP_SOK:Success.
  *  CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
- *  CFG_E_INVALIDPOINTER:   pstrExecFile is invalid.
+ *  -EFAULT:   pstrExecFile is invalid.
  *  CFG_E_RESOURCENOTAVAIL: The resource is not available.
  *  Requires:
  *  CFG initialized.
@@ -147,7 +147,7 @@ extern dsp_status cfg_get_exec_file(IN struct cfg_devnode 
*dev_node_obj,
  *  pHostResTable:  Ptr to a location to store the host resource table.
  *  Returns:
  *  DSP_SOK:On success.
- *  CFG_E_INVALIDPOINTER:   pHostResTable is invalid.
+ *  -EFAULT:   pHostResTable is invalid.
  *  CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
  *  CFG_E_RESOURCENOTAVAIL: The resource is not available.
  *  Requires:
@@ -226,7 +226,7 @@ extern dsp_status cfg_get_wmd_file_name(IN struct 
cfg_devnode *dev_node_obj,
  *  pstrZLFileName: Ptr to character buf to hold ZLFileName.
  *  Returns:
  *  DSP_SOK:Success.
- *  CFG_E_INVALIDPOINTER:   pstrZLFileName is invalid.
+ *  -EFAULT:   pstrZLFileName is invalid.
  *  CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
  *  CFG_E_RESOURCENOTAVAIL: couldn't find the ZLFileName.
  *  Requires:
diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 06c6030..660deb6 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -216,9 +216,6 @@
 /* FAILURE Codes : CFG */
 #define CFG_EBASE   (DSP_COMP_EBASE + 0x200)
 
-/* Invalid pointer passed into a configuration module function */
-#define CFG_E_INVALIDPOINTER(CFG_EBASE + 0x00)
-
 /* Invalid device node handle passed into a configuration module function. */
 #define CFG_E_INVALIDHDEVNODE   (CFG_EBASE + 0x01)
 
diff --git a/drivers/dsp/bridge/services/cfg.c 
b/drivers/dsp/bridge/services/cfg.c
index 36f1a7b..ad02875 100644
--- a/drivers/dsp/bridge/services/cfg.c
+++ b/drivers/dsp/bridge/services/cfg.c
@@ -60,7 +60,7 @@ dsp_status cfg_get_auto_start(struct cfg_devnode 
*dev_node_obj,
if (!dev_node_obj)
status = CFG_E_INVALIDHDEVNODE;
if (!pdwAutoStart)
-   status = CFG_E_INVALIDPOINTER;
+   status = -EFAULT;
if (DSP_SUCCEEDED(status)) {
status = reg_get_value(AUTOSTART, (u8 *) pdwAutoStart,
   dw_buf_size);
@@ -122,7 +122,7 @@ dsp_status cfg_get_dsp_resources(struct cfg_devnode 
*dev_node_obj,
if (!dev_node_obj) {
status = CFG_E_INVALIDHDEVNODE;
} else if (!pDSPResTable) {
-   status = CFG_E_INVALIDPOINTER;
+   status = -EFAULT;
} else {
status = reg_get_value(DSPRESOURCES, (u8 *) pDSPResTable,
   dw_res_size);
@@ -154,7 +154,7 @@ dsp_status cfg_get_exec_file(struct cfg_devnode 
*dev_node_obj, u32 ul_buf_size,
if (!dev_node_obj)
status = CFG_E_INVALIDHDEVNODE;
else if (!pstrExecFile)
-   status = CFG_E_INVALIDPOINTER;
+   status = -EFAULT;
 
if (DSP_SUCCEEDED(status)) {
status =
@@ -188,7 +188,7 @@ dsp_status cfg_get_host_resources(struct cfg_devnode 
*dev_node_obj,
status = CFG_E_INVALIDHDEVNODE;
 
if (!pHostResTable)
-   status = CFG_E_INVALIDPOINTER;
+   status = -EFAULT;
 
if (DSP_SUCCEEDED(status)) {
dw_buf_size = sizeof(struct cfg_hostres);
-- 
1.6.0.4

--
To unsubscribe from this list: send the line 

[RFC] [PATCH 8/13] DSPBRIDGE: Cleanup custom error code (CFG_E_INVALIDHDEVNODE - -EFAULT)

2010-04-15 Thread Hebbar, Shivananda
From 1daa5435abd871e8451c93fbd1d2de136566ac7e Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 9 Apr 2010 11:28:53 -0500
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (CFG_E_INVALIDHDEVNODE - 
-EFAULT)

This patch replaces CFG_E_INVALIDHDEVNODE with -EFAULT.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/cfg.h |   16 
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/services/cfg.c  |   14 +++---
 3 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cfg.h 
b/arch/arm/plat-omap/include/dspbridge/cfg.h
index faeb87c..635ffbc 100644
--- a/arch/arm/plat-omap/include/dspbridge/cfg.h
+++ b/arch/arm/plat-omap/include/dspbridge/cfg.h
@@ -43,7 +43,7 @@ extern void cfg_exit(void);
  *  pdwAutoStart:   Ptr to location for 32 bit autostart mask.
  *  Returns:
  *  DSP_SOK:Success.
- *  CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *  -EFAULT:  dev_node_obj is invalid.
  *  CFG_E_RESOURCENOTAVAIL: Unable to retreive resource.
  *  Requires:
  *  CFG initialized.
@@ -82,7 +82,7 @@ extern dsp_status cfg_get_cd_version(OUT u32 *pdwVersion);
  *  pdwValue:   Ptr to location to store the value.
  *  Returns:
  *  DSP_SOK:Success.
- *  CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *  -EFAULT:  dev_node_obj is invalid.
  *  -EFAULT:   phDevObject is invalid.
  *  CFG_E_RESOURCENOTAVAIL: The resource is not available.
  *  Requires:
@@ -103,7 +103,7 @@ extern dsp_status cfg_get_dev_object(IN struct cfg_devnode 
*dev_node_obj,
  *  pDSPResTable:   Ptr to a location to store the DSP resource table.
  *  Returns:
  *  DSP_SOK:On success.
- *  CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *  -EFAULT:  dev_node_obj is invalid.
  *  CFG_E_RESOURCENOTAVAIL: The DSP Resource information is not
  *  available
  *  Requires:
@@ -125,7 +125,7 @@ extern dsp_status cfg_get_dsp_resources(IN struct 
cfg_devnode *dev_node_obj,
  *  pstrExecFile:   Ptr to character buf to hold ExecFile.
  *  Returns:
  *  DSP_SOK:Success.
- *  CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *  -EFAULT:  dev_node_obj is invalid.
  *  -EFAULT:   pstrExecFile is invalid.
  *  CFG_E_RESOURCENOTAVAIL: The resource is not available.
  *  Requires:
@@ -148,7 +148,7 @@ extern dsp_status cfg_get_exec_file(IN struct cfg_devnode 
*dev_node_obj,
  *  Returns:
  *  DSP_SOK:On success.
  *  -EFAULT:   pHostResTable is invalid.
- *  CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *  -EFAULT:  dev_node_obj is invalid.
  *  CFG_E_RESOURCENOTAVAIL: The resource is not available.
  *  Requires:
  *  CFG initialized.
@@ -203,7 +203,7 @@ extern void cfg_get_perf_value(OUT bool *pfEnablePerf);
  *  pWMDFileName:   Ptr to a character buffer to hold the WMD filename.
  *  Returns:
  *  DSP_SOK:On success.
- *  CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *  -EFAULT:  dev_node_obj is invalid.
  *  CFG_E_RESOURCENOTAVAIL: The filename is not available.
  *  Requires:
  *  CFG initialized.
@@ -227,7 +227,7 @@ extern dsp_status cfg_get_wmd_file_name(IN struct 
cfg_devnode *dev_node_obj,
  *  Returns:
  *  DSP_SOK:Success.
  *  -EFAULT:   pstrZLFileName is invalid.
- *  CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *  -EFAULT:  dev_node_obj is invalid.
  *  CFG_E_RESOURCENOTAVAIL: couldn't find the ZLFileName.
  *  Requires:
  *  CFG initialized.
@@ -261,7 +261,7 @@ extern bool cfg_init(void);
  *  dwValue:Arbitrary value to store.
  *  Returns:
  *  DSP_SOK:Success.
- *  CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *  -EFAULT:  dev_node_obj is invalid.
  *  DSP_EFAIL:  Internal Error.
  *  Requires:
  *  CFG initialized.
diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 660deb6..1c3da08 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -216,9 +216,6 @@
 /* FAILURE Codes : CFG */
 #define CFG_EBASE   (DSP_COMP_EBASE + 0x200)
 
-/* Invalid device node handle passed into a configuration module function. */
-#define CFG_E_INVALIDHDEVNODE   (CFG_EBASE + 0x01)
-
 /* Unable to retrieve resource information from the registry. */
 #define CFG_E_RESOURCENOTAVAIL  (CFG_EBASE + 0x02)
 
diff --git a/drivers/dsp/bridge/services/cfg.c 
b/drivers/dsp/bridge/services/cfg.c
index ad02875..747ae0e 100644
--- a/drivers/dsp/bridge/services/cfg.c
+++ b/drivers/dsp/bridge/services/cfg.c
@@ -58,7 +58,7 @@ dsp_status cfg_get_auto_start(struct cfg_devnode 
*dev_node_obj,

[RFC] [PATCH 9/13] DSPBRIDGE: Cleanup custom error code (CFG_E_RESOURCENOTAVAIL - -NODATA)

2010-04-15 Thread Hebbar, Shivananda
From 23669058bd3ab9c981cc6b630505f055ace0b05b Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 9 Apr 2010 11:33:05 -0500
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (CFG_E_RESOURCENOTAVAIL 
- -NODATA)

 This patch replaces CFG_E_RESOURCENOTAVAIL  with -ENODATA.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/cfg.h |   14 +++---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/services/cfg.c  |   12 ++--
 3 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cfg.h 
b/arch/arm/plat-omap/include/dspbridge/cfg.h
index 635ffbc..3eb47f5 100644
--- a/arch/arm/plat-omap/include/dspbridge/cfg.h
+++ b/arch/arm/plat-omap/include/dspbridge/cfg.h
@@ -44,7 +44,7 @@ extern void cfg_exit(void);
  *  Returns:
  *  DSP_SOK:Success.
  *  -EFAULT:  dev_node_obj is invalid.
- *  CFG_E_RESOURCENOTAVAIL: Unable to retreive resource.
+ *  -ENODATA: Unable to retreive resource.
  *  Requires:
  *  CFG initialized.
  *  Ensures:
@@ -84,7 +84,7 @@ extern dsp_status cfg_get_cd_version(OUT u32 *pdwVersion);
  *  DSP_SOK:Success.
  *  -EFAULT:  dev_node_obj is invalid.
  *  -EFAULT:   phDevObject is invalid.
- *  CFG_E_RESOURCENOTAVAIL: The resource is not available.
+ *  -ENODATA: The resource is not available.
  *  Requires:
  *  CFG initialized.
  *  Ensures:
@@ -104,7 +104,7 @@ extern dsp_status cfg_get_dev_object(IN struct cfg_devnode 
*dev_node_obj,
  *  Returns:
  *  DSP_SOK:On success.
  *  -EFAULT:  dev_node_obj is invalid.
- *  CFG_E_RESOURCENOTAVAIL: The DSP Resource information is not
+ *  -ENODATA: The DSP Resource information is not
  *  available
  *  Requires:
  *  CFG initialized.
@@ -127,7 +127,7 @@ extern dsp_status cfg_get_dsp_resources(IN struct 
cfg_devnode *dev_node_obj,
  *  DSP_SOK:Success.
  *  -EFAULT:  dev_node_obj is invalid.
  *  -EFAULT:   pstrExecFile is invalid.
- *  CFG_E_RESOURCENOTAVAIL: The resource is not available.
+ *  -ENODATA: The resource is not available.
  *  Requires:
  *  CFG initialized.
  *  Ensures:
@@ -149,7 +149,7 @@ extern dsp_status cfg_get_exec_file(IN struct cfg_devnode 
*dev_node_obj,
  *  DSP_SOK:On success.
  *  -EFAULT:   pHostResTable is invalid.
  *  -EFAULT:  dev_node_obj is invalid.
- *  CFG_E_RESOURCENOTAVAIL: The resource is not available.
+ *  -ENODATA: The resource is not available.
  *  Requires:
  *  CFG initialized.
  *  Ensures:
@@ -204,7 +204,7 @@ extern void cfg_get_perf_value(OUT bool *pfEnablePerf);
  *  Returns:
  *  DSP_SOK:On success.
  *  -EFAULT:  dev_node_obj is invalid.
- *  CFG_E_RESOURCENOTAVAIL: The filename is not available.
+ *  -ENODATA: The filename is not available.
  *  Requires:
  *  CFG initialized.
  *  Ensures:
@@ -228,7 +228,7 @@ extern dsp_status cfg_get_wmd_file_name(IN struct 
cfg_devnode *dev_node_obj,
  *  DSP_SOK:Success.
  *  -EFAULT:   pstrZLFileName is invalid.
  *  -EFAULT:  dev_node_obj is invalid.
- *  CFG_E_RESOURCENOTAVAIL: couldn't find the ZLFileName.
+ *  -ENODATA: couldn't find the ZLFileName.
  *  Requires:
  *  CFG initialized.
  *  Ensures:
diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 1c3da08..dec4b34 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -216,9 +216,6 @@
 /* FAILURE Codes : CFG */
 #define CFG_EBASE   (DSP_COMP_EBASE + 0x200)
 
-/* Unable to retrieve resource information from the registry. */
-#define CFG_E_RESOURCENOTAVAIL  (CFG_EBASE + 0x02)
-
 /* Unable to find board name key in registry. */
 #define CFG_E_INVALIDBOARDNAME  (CFG_EBASE + 0x03)
 
diff --git a/drivers/dsp/bridge/services/cfg.c 
b/drivers/dsp/bridge/services/cfg.c
index 747ae0e..952dc25 100644
--- a/drivers/dsp/bridge/services/cfg.c
+++ b/drivers/dsp/bridge/services/cfg.c
@@ -65,7 +65,7 @@ dsp_status cfg_get_auto_start(struct cfg_devnode 
*dev_node_obj,
status = reg_get_value(AUTOSTART, (u8 *) pdwAutoStart,
   dw_buf_size);
if (DSP_FAILED(status))
-   status = CFG_E_RESOURCENOTAVAIL;
+   status = -ENODATA;
}
 
DBC_ENSURE((status == DSP_SOK 
@@ -128,7 +128,7 @@ dsp_status cfg_get_dsp_resources(struct cfg_devnode 
*dev_node_obj,
   dw_res_size);
}
if (DSP_FAILED(status)) {
-   status = CFG_E_RESOURCENOTAVAIL;
+   status = -ENODATA;
pr_err(%s: Failed, status 0x%x\n, __func__, status);
}
  

[RFC] [PATCH 10/13] DSPBRIDGE: Cleanup custom error code (COD_E_OPENFAILED - -EBADF)

2010-04-15 Thread Hebbar, Shivananda
From beb1254acdd2d91aef4624f72783f298cb5187cd Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 9 Apr 2010 11:39:04 -0500
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (COD_E_OPENFAILED - 
-EBADF)

This patch replaces COD_E_OPENFAILED with -EBADF.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/cod.h |6 +++---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/rmgr/proc.c |2 +-
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cod.h 
b/arch/arm/plat-omap/include/dspbridge/cod.h
index 381291c..f9d0aef 100644
--- a/arch/arm/plat-omap/include/dspbridge/cod.h
+++ b/arch/arm/plat-omap/include/dspbridge/cod.h
@@ -286,7 +286,7 @@ extern bool cod_init(void);
  *  envp:   array of environment strings for DSP exec.
  *  Returns:
  *  DSP_SOK:   Success.
- *  COD_E_OPENFAILED:   Failed to open target code.
+ *  -EBADF:   Failed to open target code.
  *  COD_E_LOADFAILED:   Failed to load code onto target.
  *  Requires:
  *  COD module initialized.
@@ -315,7 +315,7 @@ extern dsp_status cod_load_base(struct cod_manager 
*cod_mgr_obj,
  *  and cod_get_section.
  *  Returns:
  *  S_OK:   Success.
- *  COD_E_OPENFAILED:   Failed to open target code.
+ *  -EBADF:   Failed to open target code.
  *  Requires:
  *  COD module initialized.
  *  hmgr is valid.
@@ -337,7 +337,7 @@ extern dsp_status cod_open(struct cod_manager *hmgr,
  *  flags:  Specifies whether to load symbols.
  *  Returns:
  *  DSP_SOK:Success.
- *  COD_E_OPENFAILED:   Failed to open target code.
+ *  -EBADF:   Failed to open target code.
  *  Requires:
  *  COD module initialized.
  *  hmgr is valid.
diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index dec4b34..679bb59 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -240,9 +240,6 @@
 /* Unable to initialize the ZL COFF parsing module. */
 #define COD_E_ZLCREATEFAILED(COD_EBASE + 0x03)
 
-/* Unable to open DSP executable COFF file. */
-#define COD_E_OPENFAILED(COD_EBASE + 0x04)
-
 /* Unable to parse DSP executable COFF file. */
 #define COD_E_LOADFAILED(COD_EBASE + 0x05)
 
diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c
index bdd11a1..1199053 100644
--- a/drivers/dsp/bridge/rmgr/proc.c
+++ b/drivers/dsp/bridge/rmgr/proc.c
@@ -966,7 +966,7 @@ dsp_status proc_load(void *hprocessor, IN CONST s32 
argc_index,
   dev_brd_write_fxn,
   p_proc_object-hdev_obj, NULL);
if (DSP_FAILED(status)) {
-   if (status == COD_E_OPENFAILED) {
+   if (status == -EBADF) {
dev_dbg(bridge, %s: Failure to Load the EXE\n,
__func__);
}
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC] [PATCH 11/13] DSPBRIDGE: Cleanup custom error code (REG_E_INVALIDSUBKEY - -ENOKEY)

2010-04-15 Thread Hebbar, Shivananda
From 5ee78a0e44159548400b1727b9dc3e127e8b8406 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 9 Apr 2010 12:05:01 -0500
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (REG_E_INVALIDSUBKEY - 
-ENOKEY)

This patch replaces REG_E_INVALIDSUBKEY with -ENOKEY

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/services/regsup.c   |2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 679bb59..60f902c 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -341,9 +341,6 @@
 /* FAILURE Codes : REG */
 #define REG_EBASE   (DSP_COMP_EBASE + 0x800)
 
-/* Invalid subkey parameter. */
-#define REG_E_INVALIDSUBKEY (REG_EBASE + 0x00)
-
 /* Invalid entry parameter. */
 #define REG_E_INVALIDENTRY  (REG_EBASE + 0x01)
 
diff --git a/drivers/dsp/bridge/services/regsup.c 
b/drivers/dsp/bridge/services/regsup.c
index 275d91c..eca9bb2 100644
--- a/drivers/dsp/bridge/services/regsup.c
+++ b/drivers/dsp/bridge/services/regsup.c
@@ -172,7 +172,7 @@ dsp_status regsup_enum_value(IN u32 dw_index, IN CONST char 
*pstrKey,
 IN OUT char *pstrValue, IN OUT u32 * pdwValueSize,
 IN OUT char *pstrData, IN OUT u32 * pdwDataSize)
 {
-   dsp_status ret = REG_E_INVALIDSUBKEY;
+   dsp_status ret = -ENOKEY;
struct reg_value *rv = (struct reg_value *)lst_first(reg_key_list);
u32 dw_key_len;
u32 count = 0;
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC] [PATCH 12/13] DSPBRIDGE: Cleanup custom error code (REG_E_NOMOREITEMS - -ENODATA)

2010-04-15 Thread Hebbar, Shivananda
From a70cecfb7c889d75492241110a547bc4ef0b5ee4 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 9 Apr 2010 12:11:58 -0500
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (REG_E_NOMOREITEMS  - 
-ENODATA)

This patch replaces REG_E_NOMOREITEMS with -ENODATA

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/rmgr/dbdcd.c|2 +-
 drivers/dsp/bridge/services/regsup.c   |2 +-
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 60f902c..0ae64fa 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -344,9 +344,6 @@
 /* Invalid entry parameter. */
 #define REG_E_INVALIDENTRY  (REG_EBASE + 0x01)
 
-/* No more registry values. */
-#define REG_E_NOMOREITEMS   (REG_EBASE + 0x02)
-
 /* Insufficient space to hold data in registry value. */
 #define REG_E_MOREDATA  (REG_EBASE + 0x03)
 
diff --git a/drivers/dsp/bridge/rmgr/dbdcd.c b/drivers/dsp/bridge/rmgr/dbdcd.c
index 21333fc..a80b726 100644
--- a/drivers/dsp/bridge/rmgr/dbdcd.c
+++ b/drivers/dsp/bridge/rmgr/dbdcd.c
@@ -281,7 +281,7 @@ dsp_status dcd_enumerate_object(IN s32 cIndex, IN enum 
dsp_dcdobjtype obj_type,
enum_refs++;
 
status = DSP_SOK;
-   } else if (status == REG_E_NOMOREITEMS) {
+   } else if (status == -ENODATA) {
/* At the end of enumeration. Reset enum_refs. */
enum_refs = 0;
 
diff --git a/drivers/dsp/bridge/services/regsup.c 
b/drivers/dsp/bridge/services/regsup.c
index eca9bb2..d69960b 100644
--- a/drivers/dsp/bridge/services/regsup.c
+++ b/drivers/dsp/bridge/services/regsup.c
@@ -201,7 +201,7 @@ dsp_status regsup_enum_value(IN u32 dw_index, IN CONST char 
*pstrKey,
}
 
if (count  DSP_FAILED(ret))
-   ret = REG_E_NOMOREITEMS;
+   ret = -ENODATA;
 
dev_dbg(bridge, REG: enum Key %s, Value %s, status = 0x%x,
pstrKey, pstrValue, ret);
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC] [PATCH v2]DSPBRIDGE: Remove unused custom error codes

2010-04-15 Thread Hebbar, Shivananda
From 199a4cc5ba1e0d582fbacf3fffceb00afdfd191a Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 14:03:48 -0600
Subject: [PATCH] DSPBRIDGE: Remove unused custom error codes

This patch removes unused custom errorcodes.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |  158 
 1 files changed, 0 insertions(+), 158 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 02cf8c6..38101a3 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -66,36 +66,13 @@
 
 /* FAILURE Codes */
 
-/* The caller does not have access privileges to call this function */
-#define DSP_EACCESSDENIED   (DSP_EBASE + 0)
-
-/* The GPP must be detached from the DSP before this function is called */
-#define DSP_EATTACHED   (DSP_EBASE + 2)
-
 /* During enumeration a change in the number or properties of the objects
  * has occurred. */
 #define DSP_ECHANGEDURINGENUM   (DSP_EBASE + 3)
 
-/* A failure occurred during a delete operation */
-#define DSP_EDELETE (DSP_EBASE + 5)
-
-/* No error text was found for the specified error code. */
-#define DSP_ENOERRTEXT  (DSP_EBASE + 0xe)
-
 /* I/O is currently pending. */
 #define DSP_EPENDING(DSP_EBASE + 0x11)
 
-/* A stream creation failure occurred on the DSP. */
-#define DSP_ESTREAM (DSP_EBASE + 0x15)
-
-/* A task creation failure occurred on the DSP. */
-#define DSP_ETASK   (DSP_EBASE + 0x16)
-
-/* A data truncation occurred, e.g., when requesting a descriptive error
- * string, not enough space was allocated for the complete error message. */
-
-#define DSP_ETRUNCATED  (DSP_EBASE + 0x18)
-
 /* The state of the specified object is incorrect for the requested
  * operation. */
 #define DSP_EWRONGSTATE (DSP_EBASE + 0x1b)
@@ -128,34 +105,13 @@
  * section. */
 #define DSP_EDCDNOAUTOREGISTER  (DSP_EBASE + 0x22)
 
-/* A requested resource is not available. */
-#define DSP_ERESOURCE   (DSP_EBASE + 0x28)
-
-/* A critical error has occurred, and the DSP is being re-started. */
-#define DSP_ERESTART(DSP_EBASE + 0x29)
-
-/* A DSP memory free operation failed. */
-#define DSP_EFREE   (DSP_EBASE + 0x2a)
-
-/* A DSP I/O free operation failed. */
-#define DSP_EIOFREE (DSP_EBASE + 0x2b)
-
-/* Multiple instances are not allowed. */
-#define DSP_EMULINST(DSP_EBASE + 0x2c)
-
 /* A specified entity was not found. */
 #define DSP_ENOTFOUND   (DSP_EBASE + 0x2d)
 
-/* A DSP I/O resource is not available. */
-#define DSP_EOUTOFIO(DSP_EBASE + 0x2e)
-
 /* 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)
 
-/* File or section load write function failed to write to DSP */
-#define DSP_EFWRITE (DSP_EBASE + 0x31)
-
 /* Unable to find a named section in DSP executable */
 #define DSP_ENOSECT (DSP_EBASE + 0x32)
 
@@ -165,63 +121,12 @@
 /* Invalid segment ID */
 #define DSP_EBADSEGID   (DSP_EBASE + 0x38)
 
-/* Not shared memory */
-#define DSP_ENOTSHAREDMEM   (DSP_EBASE + 0x3c)
-
 /* Error occurred in a dynamic loader library function */
 #define DSP_EDYNLOAD(DSP_EBASE + 0x3d)
 
 /* Device in 'sleep/suspend' mode due to DPM */
 #define DSP_EDPMSUSPEND (DSP_EBASE + 0x3e)
 
-/* A node-specific error has occurred. */
-#define DSP_EUSER1  (DSP_EBASE + 0x40)
-#define DSP_EUSER2  (DSP_EBASE + 0x41)
-#define DSP_EUSER3  (DSP_EBASE + 0x42)
-#define DSP_EUSER4  (DSP_EBASE + 0x43)
-#define DSP_EUSER5  (DSP_EBASE + 0x44)
-#define DSP_EUSER6  (DSP_EBASE + 0x45)
-#define DSP_EUSER7  (DSP_EBASE + 0x46)
-#define DSP_EUSER8  (DSP_EBASE + 0x47)
-#define DSP_EUSER9  (DSP_EBASE + 0x48)
-#define DSP_EUSER10 (DSP_EBASE + 0x49)
-#define DSP_EUSER11 (DSP_EBASE + 0x4a)
-#define DSP_EUSER12 (DSP_EBASE + 0x4b)
-#define DSP_EUSER13 (DSP_EBASE + 0x4c)
-#define DSP_EUSER14 (DSP_EBASE + 0x4d)
-#define DSP_EUSER15 (DSP_EBASE + 0x4e)
-#define DSP_EUSER16 (DSP_EBASE + 0x4f)
-
-/* FAILURE Codes : DEV */
-#define DEV_EBASE   (DSP_COMP_EBASE + 0x000)
-
-/* The mini-driver expected a newer version of the class driver. */
-#define DEV_E_NEWWMD(DEV_EBASE + 0x00)
-
-/* bridge_drv_entry function returned a NULL function interface table. */
-#define DEV_E_NULLWMDINTF   (DEV_EBASE + 0x01)
-

[PATCH] DSPBRIDGE:Change dev_type to u8

2010-04-03 Thread Hebbar, Shivananda
From e2327644af26aaf22ca6a6b987b745c60e02ab4a Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 19 Mar 2010 12:58:23 -0600
Subject: [PATCH] DSPBRIDGE:Change dev_type to u8

dev_type can take one of the 2 values
DSP_UNIT0
IVA_UNIT1
So it need not be s32 or u32. Hence changing it to u8.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/dev.h |2 +-
 drivers/dsp/bridge/pmgr/dev.c  |4 ++--
 drivers/dsp/bridge/pmgr/wcd.c  |2 +-
 drivers/dsp/bridge/rmgr/disp.c |8 
 drivers/dsp/bridge/rmgr/mgr.c  |4 ++--
 drivers/dsp/bridge/rmgr/node.c |2 +-
 drivers/dsp/bridge/rmgr/proc.c |   10 +-
 drivers/dsp/bridge/wmd/io_sm.c |2 +-
 8 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dev.h 
b/arch/arm/plat-omap/include/dspbridge/dev.h
index 13b0cad..417af59 100644
--- a/arch/arm/plat-omap/include/dspbridge/dev.h
+++ b/arch/arm/plat-omap/include/dspbridge/dev.h
@@ -355,7 +355,7 @@ extern dsp_status dev_get_dev_node(struct dev_object 
*hdev_obj,
  *  else:   *phDevNode is NULL.
  */
 extern dsp_status dev_get_dev_type(struct dev_object *hdevObject,
-   u32 *dev_type);
+ u8 *dev_type);
 
 /*
  *   dev_get_first 
diff --git a/drivers/dsp/bridge/pmgr/dev.c b/drivers/dsp/bridge/pmgr/dev.c
index 5bc16e9..2470264 100644
--- a/drivers/dsp/bridge/pmgr/dev.c
+++ b/drivers/dsp/bridge/pmgr/dev.c
@@ -64,7 +64,7 @@
 struct dev_object {
  /* LST requires link to be first field! */
  struct list_head link; /* Link to next dev_object. */
- u32 dev_type;  /* Device Type */
+ u8 dev_type;  /* Device Type */
  u32 dw_signature; /* Used for object validation. */
  struct cfg_devnode *dev_node_obj; /* Platform specific dev id */
  struct wmd_dev_context *hwmd_context; /* WMD Context Handle */
@@ -1072,7 +1072,7 @@ dsp_status dev_remove_proc_object(struct dev_object 
*hdev_obj, u32 proc_obj)
  return status;
 }
 
-dsp_status dev_get_dev_type(struct dev_object *hdevObject, u32 *dev_type)
+dsp_status dev_get_dev_type(struct dev_object *hdevObject, u8 *dev_type)
 {
  dsp_status status = DSP_SOK;
  struct dev_object *dev_obj = (struct dev_object *)hdevObject;
diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c
index f30e023..88dd3db 100644
--- a/drivers/dsp/bridge/pmgr/wcd.c
+++ b/drivers/dsp/bridge/pmgr/wcd.c
@@ -381,7 +381,7 @@ dsp_status wcd_init_complete2(void)
  dsp_status status = DSP_SOK;
  struct cfg_devnode *dev_node;
  struct dev_object *hdev_obj;
- u32 dev_type;
+ u8 dev_type;
 
  DBC_REQUIRE(wcd_c_refs  0);
 
diff --git a/drivers/dsp/bridge/rmgr/disp.c b/drivers/dsp/bridge/rmgr/disp.c
index 8a3b9d5..d8e0c84 100644
--- a/drivers/dsp/bridge/rmgr/disp.c
+++ b/drivers/dsp/bridge/rmgr/disp.c
@@ -100,7 +100,7 @@ dsp_status disp_create(OUT struct disp_object 
**phDispObject,
  u32 ul_chnl_id;
  struct chnl_attr chnl_attr_obj;
  dsp_status status = DSP_SOK;
- u32 dev_type;
+ u8 dev_type;
 
  DBC_REQUIRE(refs  0);
  DBC_REQUIRE(phDispObject != NULL);
@@ -283,7 +283,7 @@ dsp_status disp_node_create(struct disp_object *disp_obj,
  u32 max;
  dsp_status status = DSP_SOK;
  struct dsp_nodeinfo node_info;
- u32 dev_type;
+ u8 dev_type;
 
  DBC_REQUIRE(refs  0);
  DBC_REQUIRE(MEM_IS_VALID_HANDLE(disp_obj, DISP_SIGNATURE));
@@ -498,7 +498,7 @@ dsp_status disp_node_delete(struct disp_object *disp_obj,
  u32 dw_arg;
  struct rms_command *rms_cmd;
  dsp_status status = DSP_SOK;
- u32 dev_type;
+ u8 dev_type;
 
  DBC_REQUIRE(refs  0);
  DBC_REQUIRE(MEM_IS_VALID_HANDLE(disp_obj, DISP_SIGNATURE));
@@ -552,7 +552,7 @@ dsp_status disp_node_run(struct disp_object *disp_obj,
  u32 dw_arg;
  struct rms_command *rms_cmd;
  dsp_status status = DSP_SOK;
- u32 dev_type;
+ u8 dev_type;
  DBC_REQUIRE(refs  0);
  DBC_REQUIRE(MEM_IS_VALID_HANDLE(disp_obj, DISP_SIGNATURE));
  DBC_REQUIRE(hnode != NULL);
diff --git a/drivers/dsp/bridge/rmgr/mgr.c b/drivers/dsp/bridge/rmgr/mgr.c
index cece9da..d02f50c 100644
--- a/drivers/dsp/bridge/rmgr/mgr.c
+++ b/drivers/dsp/bridge/rmgr/mgr.c
@@ -200,7 +200,7 @@ dsp_status mgr_enum_processor_info(u32 processor_id,
  struct mgr_processorextinfo *ext_info;
  struct dev_object *hdev_obj;
  struct drv_object *hdrv_obj;
- s32 dev_type;
+ u8 dev_type;
  struct cfg_devnode *dev_node;
  struct cfg_dspres chip_resources;
  bool proc_detect = false;
@@ -215,7 +215,7 @@ dsp_status mgr_enum_processor_info(u32 processor_id,
  if (DSP_SUCCEEDED(status)) {
   status = drv_get_dev_object(processor_id, hdrv_obj, hdev_obj);
   if (DSP_SUCCEEDED(status)) {
-   status = dev_get_dev_type(hdev_obj, (u32 *) dev_type);
+   status = dev_get_dev_type(hdev_obj, (u8 *) dev_type);
status = dev_get_dev_node(hdev_obj, dev_node);
if (dev_type == DSP_UNIT)
 status = cfg_get_dsp_resources(dev_node,
diff --git a/drivers/dsp/bridge/rmgr/node.c 

[PATCH] DSPBRIDGE: Change dw_state type to u8

2010-04-03 Thread Hebbar, Shivananda
From 147cea10f8b5ff19f4a0308f82dedc829e3d1562 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 19 Mar 2010 13:25:00 -0600
Subject: [PATCH] DSPBRIDGE: Change dw_state type to u8

The channel state can have values 0, 1 or 2. Hence changing the type to u8.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/_chnl_sm.h |2 +-
 arch/arm/plat-omap/include/dspbridge/chnlpriv.h |8 
 drivers/dsp/bridge/wmd/chnl_sm.c|2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h 
b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
index 3c6f891..cd153ed 100644
--- a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
+++ b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
@@ -135,7 +135,7 @@ struct chnl_object {
  /* Pointer back to channel manager */
  struct chnl_mgr *chnl_mgr_obj;
  u32 chnl_id;  /* Channel id */
- u32 dw_state;  /* Current channel state */
+ u8 dw_state;  /* Current channel state */
  u32 chnl_mode;  /* Chnl mode and attributes */
  /* Chnl I/O completion event (user mode) */
  bhandle user_event;
diff --git a/arch/arm/plat-omap/include/dspbridge/chnlpriv.h 
b/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
index 0793e0d..939b783 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
@@ -49,9 +49,9 @@
 #define CHNL_MODEMASK   0x1001
 
 /* Higher level channel states: */
-#define CHNL_STATEREADY 0x /* Channel ready for I/O. */
-#define CHNL_STATECANCEL0x0001 /* I/O was cancelled. */
-#define CHNL_STATEEOS   0x0002 /* End Of Stream reached. */
+#define CHNL_STATEREADY  0 /* Channel ready for I/O. */
+#define CHNL_STATECANCEL 1 /* I/O was cancelled. */
+#define CHNL_STATEEOS  2 /* End Of Stream reached. */
 
 /* Determine if user supplied an event for this channel: */
 #define CHNL_IS_USER_EVENT(mode)  (mode  CHNL_MODEUSEREVENT)
@@ -78,7 +78,7 @@ struct chnl_info {
  /*Abstraction of I/O completion event. */
  struct sync_object *sync_event;
  u32 dw_mode;  /* Channel mode. */
- u32 dw_state;  /* Current channel state. */
+ u8 dw_state;  /* Current channel state. */
  u32 bytes_tx;  /* Total bytes transferred. */
  u32 cio_cs;  /* Number of IOCs in queue. */
  u32 cio_reqs;  /* Number of IO Requests in queue. */
diff --git a/drivers/dsp/bridge/wmd/chnl_sm.c b/drivers/dsp/bridge/wmd/chnl_sm.c
index 0c14bc2..1050228 100644
--- a/drivers/dsp/bridge/wmd/chnl_sm.c
+++ b/drivers/dsp/bridge/wmd/chnl_sm.c
@@ -99,7 +99,7 @@ dsp_status bridge_chnl_add_io_req(struct chnl_object 
*chnl_obj, void *pHostBuf,
  struct chnl_irp *chnl_packet_obj = NULL;
  struct wmd_dev_context *dev_ctxt;
  struct dev_object *dev_obj;
- u32 dw_state;
+ u8 dw_state;
  bool is_eos;
  struct chnl_mgr *chnl_mgr_obj = pchnl-chnl_mgr_obj;
  u8 *host_sys_buf = NULL;
-- 
1.6.0.4--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] DSPBRIDGE: Change channel mode type to u8

2010-04-03 Thread Hebbar, Shivananda
From 4723494935d2188ef014297a5bed66fecb3901ad Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 19 Mar 2010 15:12:03 -0600
Subject: [PATCH] DSPBRIDGE: Change channel mode type to u8

chnl_mode or dw_mode can have value 0 or 1.
Hence changing the type to u8.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/_chnl_sm.h |2 +-
 arch/arm/plat-omap/include/dspbridge/chnldefs.h |4 ++--
 arch/arm/plat-omap/include/dspbridge/chnlpriv.h |2 +-
 arch/arm/plat-omap/include/dspbridge/wmd.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/wmdchnl.h  |2 +-
 drivers/dsp/bridge/rmgr/node.c  |2 +-
 drivers/dsp/bridge/rmgr/strm.c  |2 +-
 drivers/dsp/bridge/wmd/chnl_sm.c|8 
 8 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h 
b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
index cd153ed..131c37c 100644
--- a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
+++ b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
@@ -136,7 +136,7 @@ struct chnl_object {
  struct chnl_mgr *chnl_mgr_obj;
  u32 chnl_id;  /* Channel id */
  u8 dw_state;  /* Current channel state */
- u32 chnl_mode;  /* Chnl mode and attributes */
+ u8 chnl_mode;  /* Chnl mode and attributes */
  /* Chnl I/O completion event (user mode) */
  bhandle user_event;
  /* Abstract syncronization object */
diff --git a/arch/arm/plat-omap/include/dspbridge/chnldefs.h 
b/arch/arm/plat-omap/include/dspbridge/chnldefs.h
index a12870e..66fb660 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnldefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnldefs.h
@@ -26,8 +26,8 @@
 #define CHNL_INITIOREQS  4 /* Default # of I/O requests. */
 
 /* Channel modes */
-#define CHNL_MODETODSP   0x /* Data streaming to the DSP. */
-#define CHNL_MODEFROMDSP 0x0001 /* Data streaming from the DSP. */
+#define CHNL_MODETODSP  0 /* Data streaming to the DSP. */
+#define CHNL_MODEFROMDSP 1 /* Data streaming from the DSP. */
 
 /* GetIOCompletion flags */
 #define CHNL_IOCINFINITE 0x /* Wait forever for IO completion. */
diff --git a/arch/arm/plat-omap/include/dspbridge/chnlpriv.h 
b/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
index 939b783..c24e78f 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
@@ -77,7 +77,7 @@ struct chnl_info {
  bhandle event_obj; /* Channel I/O completion event. */
  /*Abstraction of I/O completion event. */
  struct sync_object *sync_event;
- u32 dw_mode;  /* Channel mode. */
+ u8 dw_mode;  /* Channel mode. */
  u8 dw_state;  /* Current channel state. */
  u32 bytes_tx;  /* Total bytes transferred. */
  u32 cio_cs;  /* Number of IOCs in queue. */
diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h 
b/arch/arm/plat-omap/include/dspbridge/wmd.h
index f9883db..a798ec9 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmd.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmd.h
@@ -409,7 +409,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
 typedef dsp_status(*fxn_chnl_open) (OUT struct chnl_object
 **phChnl,
 struct chnl_mgr *hchnl_mgr,
-short int chnl_mode,
+ u8 chnl_mode,
 u32 uChnlId,
 CONST IN OPTIONAL struct
 chnl_attr * pattrs);
diff --git a/arch/arm/plat-omap/include/dspbridge/wmdchnl.h 
b/arch/arm/plat-omap/include/dspbridge/wmdchnl.h
index 0d874ab..193db25 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmdchnl.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmdchnl.h
@@ -33,7 +33,7 @@ extern dsp_status bridge_chnl_destroy(struct chnl_mgr 
*hchnl_mgr);
 
 extern dsp_status bridge_chnl_open(OUT struct chnl_object **phChnl,
struct chnl_mgr *hchnl_mgr,
-   short int chnl_mode,
+ u8 chnl_mode,
u32 uChnlId,
CONST IN OPTIONAL struct chnl_attr
*pattrs);
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index a761eb0..c18539d 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -845,7 +845,7 @@ dsp_status node_connect(struct node_object *hNode1, u32 
uStream1,
  struct stream_chnl *pstream;
  gb_bit_num pipe_id = GB_NOBITS;
  gb_bit_num chnl_id = GB_NOBITS;
- short int chnl_mode;
+ u8 chnl_mode;
  u32 dw_length;
  dsp_status status = DSP_SOK;
  DBC_REQUIRE(refs  0);
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index ed62925..113b9bd 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -483,7 +483,7 @@ dsp_status strm_open(struct node_object *hnode, u32 dir, 
u32 index,
  struct bridge_drv_interface *intf_fxns;
  u32 ul_chnl_id;
  struct strm_object *strm_obj = NULL;
- short int chnl_mode;
+ u8 chnl_mode;
  struct chnl_attr chnl_attr_obj;
  dsp_status status = DSP_SOK;
  struct cmm_object *hcmm_mgr = NULL; /* Shared memory manager hndl */
diff 

[PATCH] DSPBRIDGE: Change num_proc type to u8.

2010-04-03 Thread Hebbar, Shivananda
From 1203012297c7b0a6a36f000a870c5e1210a233e1 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 19 Mar 2010 17:29:46 -0600
Subject: [PATCH] DSPBRIDGE: Change num_proc type to u8.

num_proc is used to represent number of processors.
As of now its 1. Also it can not be  256.
So changing it to u8.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 drivers/dsp/bridge/pmgr/wcd.c  |2 +-
 drivers/dsp/bridge/wmd/io_sm.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c
index 88dd3db..cd9db42 100644
--- a/drivers/dsp/bridge/pmgr/wcd.c
+++ b/drivers/dsp/bridge/pmgr/wcd.c
@@ -447,7 +447,7 @@ u32 mgrwrap_enum_node_info(union Trapped_Args *args, void 
*pr_ctxt)
 u32 mgrwrap_enum_proc_info(union Trapped_Args *args, void *pr_ctxt)
 {
  u8 *processor_info;
- u32 num_procs;
+ u8 num_procs;
  dsp_status status = DSP_SOK;
  u32 size = args-args_mgr_enumproc_info.processor_info_size;
 
diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
index 867402f..91d67d1 100644
--- a/drivers/dsp/bridge/wmd/io_sm.c
+++ b/drivers/dsp/bridge/wmd/io_sm.c
@@ -320,7 +320,7 @@ dsp_status bridge_io_on_loaded(struct io_mgr *hio_mgr)
  u32 ul_pad_size = 0;
  u32 i;
  dsp_status status = DSP_SOK;
- u32 num_procs = 0;
+ u8 num_procs = 0;
  s32 ndx = 0;
  /* DSP MMU setup table */
  struct wmdioctl_extproc ae_proc[WMDIOCTL_NUMOFMMUTLB];
-- 
1.6.0.4--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] DSPBRIDGE: Change dw_type to u8.

2010-04-03 Thread Hebbar, Shivananda
From 8bb4088a58220da7e80e5a7a4b59f12c4dd3922a Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 19 Mar 2010 15:37:56 -0600
Subject: [PATCH] DSPBRIDGE: Change dw_type to u8.

channel type can take value 1 or 2.
Hence changing the type to u8.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/_chnl_sm.h |2 +-
 arch/arm/plat-omap/include/dspbridge/cfg.h  |4 ++--
 arch/arm/plat-omap/include/dspbridge/chnlpriv.h |2 +-
 drivers/dsp/bridge/services/cfg.c   |2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h 
b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
index 131c37c..1c64165 100644
--- a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
+++ b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
@@ -121,7 +121,7 @@ struct chnl_mgr {
  u32 max_channels; /* Total number of channels */
  u32 open_channels; /* Total number of open channels */
  struct chnl_object **ap_channel; /* Array of channels */
- u32 dw_type;  /* Type of channel class library */
+ u8 dw_type;  /* Type of channel class library */
  /* If no shm syms, return for CHNL_Open */
  dsp_status chnl_open_status;
 };
diff --git a/arch/arm/plat-omap/include/dspbridge/cfg.h 
b/arch/arm/plat-omap/include/dspbridge/cfg.h
index 80c8fde..9a9ab8e 100644
--- a/arch/arm/plat-omap/include/dspbridge/cfg.h
+++ b/arch/arm/plat-omap/include/dspbridge/cfg.h
@@ -175,7 +175,7 @@ extern dsp_status cfg_get_host_resources(IN struct 
cfg_devnode *dev_node_obj,
  *  DSP_SOK:*pdwValue is set to the retrieved u32(non-Zero).
  *  else:   *pdwValue is set to 0L.
  */
-extern dsp_status cfg_get_object(OUT u32 *pdwValue, u32 dw_type);
+extern dsp_status cfg_get_object(OUT u32 *pdwValue, u8 dw_type);
 
 /*
  *   cfg_get_perf_value 
@@ -286,6 +286,6 @@ extern dsp_status cfg_set_dev_object(IN struct cfg_devnode 
*dev_node_obj,
  *  Ensures:
  *  DSP_SOK:The Private u32 was successfully set.
  */
-extern dsp_status cfg_set_object(IN u32 dwValue, IN u32 dw_type);
+extern dsp_status cfg_set_object(IN u32 dwValue, u8 dw_type);
 
 #endif /* CFG_ */
diff --git a/arch/arm/plat-omap/include/dspbridge/chnlpriv.h 
b/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
index c24e78f..ba00974 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
@@ -91,7 +91,7 @@ struct chnl_info {
 
 /* Channel manager info: */
 struct chnl_mgrinfo {
- u32 dw_type;  /* Type of channel class library. */
+ u8 dw_type;  /* Type of channel class library. */
  /* Channel handle, given the channel id. */
  struct chnl_object *chnl_obj;
  u32 open_channels; /* Number of open channels. */
diff --git a/drivers/dsp/bridge/services/cfg.c 
b/drivers/dsp/bridge/services/cfg.c
index a3daad7..a878b6c 100644
--- a/drivers/dsp/bridge/services/cfg.c
+++ b/drivers/dsp/bridge/services/cfg.c
@@ -208,7 +208,7 @@ dsp_status cfg_get_host_resources(struct cfg_devnode 
*dev_node_obj,
  *  Purpose:
  *  Retrieve the Object handle from the Registry
  */
-dsp_status cfg_get_object(OUT u32 *pdwValue, u32 dw_type)
+dsp_status cfg_get_object(OUT u32 *pdwValue, u8 dw_type)
 {
  dsp_status status = DSP_EINVALIDARG;
  u32 dw_buf_size;
-- 
1.6.0.4--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] DSPBRIDGE: Change max channels/open channels type to u8

2010-04-03 Thread Hebbar, Shivananda
From eb282300f2527473fa0bfbaa23a516ca8361f18a Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 19 Mar 2010 16:15:25 -0600
Subject: [PATCH] DSPBRIDGE: Change max channels/open channels type to u8

max channels can have max value of 32. So changing
max channnels and open channels type to u8

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/_chnl_sm.h |4 ++--
 arch/arm/plat-omap/include/dspbridge/chnlpriv.h |6 +++---
 drivers/dsp/bridge/wmd/chnl_sm.c|2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h 
b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
index 1c64165..0084c2e 100644
--- a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
+++ b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
@@ -118,8 +118,8 @@ struct chnl_mgr {
  /* Critical section object handle */
  struct sync_csobject *hcs_obj;
  u32 word_size;  /* Size in bytes of DSP word */
- u32 max_channels; /* Total number of channels */
- u32 open_channels; /* Total number of open channels */
+ u8 max_channels; /* Total number of channels */
+ u8 open_channels; /* Total number of open channels */
  struct chnl_object **ap_channel; /* Array of channels */
  u8 dw_type;  /* Type of channel class library */
  /* If no shm syms, return for CHNL_Open */
diff --git a/arch/arm/plat-omap/include/dspbridge/chnlpriv.h 
b/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
index ba00974..fbb05f3 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
@@ -94,14 +94,14 @@ struct chnl_mgrinfo {
  u8 dw_type;  /* Type of channel class library. */
  /* Channel handle, given the channel id. */
  struct chnl_object *chnl_obj;
- u32 open_channels; /* Number of open channels. */
- u32 max_channels; /* total # of chnls supported */
+ u8 open_channels; /* Number of open channels. */
+ u8 max_channels; /* total # of chnls supported */
 };
 
 /* Channel Manager Attrs: */
 struct chnl_mgrattrs {
  /* Max number of channels this manager can use. */
- u32 max_channels;
+ u8 max_channels;
  u32 word_size;  /* DSP Word size. */
 };
 
diff --git a/drivers/dsp/bridge/wmd/chnl_sm.c b/drivers/dsp/bridge/wmd/chnl_sm.c
index 8a10eee..ebb4827 100644
--- a/drivers/dsp/bridge/wmd/chnl_sm.c
+++ b/drivers/dsp/bridge/wmd/chnl_sm.c
@@ -389,7 +389,7 @@ dsp_status bridge_chnl_create(OUT struct chnl_mgr 
**phChnlMgr,
 {
  dsp_status status = DSP_SOK;
  struct chnl_mgr *chnl_mgr_obj = NULL;
- s32 max_channels;
+ u8 max_channels;
 
  /* Check DBC requirements: */
  DBC_REQUIRE(phChnlMgr != NULL);
-- 
1.6.0.4--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2010-03-26 Thread Hebbar, Shivananda

This RFC v1 patch series fixes E to -Ex

Dsp_status replacement will be sent out as separate patch.


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

Here are the details:

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

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

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

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

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

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

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

Shivananda Hebbar (19)

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

 arch/arm/plat-omap/include/dspbridge/_dcd.h |2 +-
 arch/arm/plat-omap/include/dspbridge/chnl.h |   10 +-
 arch/arm/plat-omap/include/dspbridge/cmm.h  |   28 +++---
 arch/arm/plat-omap/include/dspbridge/cod.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/dbdcd.h|   16 ++--
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |   10 +-
 arch/arm/plat-omap/include/dspbridge/dev.h  |   36 
 arch/arm/plat-omap/include/dspbridge/disp.h |   10 +-
 arch/arm/plat-omap/include/dspbridge/drv.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/errbase.h  |   58 
 arch/arm/plat-omap/include/dspbridge/io.h   |6 +-
 arch/arm/plat-omap/include/dspbridge/mgr.h  |8 +-
 arch/arm/plat-omap/include/dspbridge/nldrdefs.h |8 +-
 arch/arm/plat-omap/include/dspbridge/node.h |   86 +-
 arch/arm/plat-omap/include/dspbridge/nodepriv.h |8 +-
 arch/arm/plat-omap/include/dspbridge/ntfy.h |8 +-
 arch/arm/plat-omap/include/dspbridge/proc.h |   54 ++--
 arch/arm/plat-omap/include/dspbridge/pwr.h  |   10 +-
 arch/arm/plat-omap/include/dspbridge/rmm.h  |4 +-
 arch/arm/plat-omap/include/dspbridge/strm.h |   52 +-
 arch/arm/plat-omap/include/dspbridge/sync.h |   26 +++---
 arch/arm/plat-omap/include/dspbridge/wmd.h  |   78 
 drivers/dsp/bridge/pmgr/chnl.c  |4 +-
 drivers/dsp/bridge/pmgr/cmm.c   |   34 
 drivers/dsp/bridge/pmgr/cod.c   |   16 ++--
 drivers/dsp/bridge/pmgr/dbll.c  |   24 +++---
 drivers/dsp/bridge/pmgr/dev.c   |   36 
 drivers/dsp/bridge/pmgr/dmm.c   |   10 +-
 drivers/dsp/bridge/pmgr/wcd.c   |   86 +-
 drivers/dsp/bridge/rmgr/dbdcd.c |   24 +++---
 drivers/dsp/bridge/rmgr/disp.c  |8 +-
 drivers/dsp/bridge/rmgr/drv.c   |   14 ++--
 drivers/dsp/bridge/rmgr/drv_interface.c |2 +-
 drivers/dsp/bridge/rmgr/mgr.c   |4 +-
 drivers/dsp/bridge/rmgr/nldr.c  |   30 +++---
 drivers/dsp/bridge/rmgr/node.c  |  112 +++---
 drivers/dsp/bridge/rmgr/proc.c  |   56 ++--
 drivers/dsp/bridge/rmgr/pwr.c   |4 +-
 drivers/dsp/bridge/rmgr/rmm.c   |   14 ++--
 drivers/dsp/bridge/rmgr/strm.c  |   62 

[RFC][PATCH v1 1/19] DSPBRIDGE: Cleanup custom error code(DSP_EALREADYCONNECTED --EISCONN)

2010-03-26 Thread Hebbar, Shivananda
From 0c883100634921b732c0b1bd149fec08080fbace Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 09:10:22 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code(DSP_EALREADYCONNECTED 
--EISCONN)

This patch replaces DSP_EALREADYCONNECTED with -EISCONN

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/rmgr/node.c |4 ++--
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index d43ff86..a2fa786 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -69,9 +69,6 @@
 /* The caller does not have access privileges to call this function */
 #define DSP_EACCESSDENIED   (DSP_EBASE + 0)
 
-/* The Specified Connection already exists */
-#define DSP_EALREADYCONNECTED   (DSP_EBASE + 1)
-
 /* The GPP must be detached from the DSP before this function is called */
 #define DSP_EATTACHED   (DSP_EBASE + 2)
 
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index c18539d..86035a1 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -933,7 +933,7 @@ dsp_status node_connect(struct node_object *hNode1, u32 
uStream1,
(hNode1-create_args.asa.
  task_arg_obj.strm_out_def[uStream1]);
if (output-sz_device != NULL)
-   status = DSP_EALREADYCONNECTED;
+   status = -EISCONN;
 
}
if (node2_type == NODE_TASK || node2_type == NODE_DAISSOCKET) {
@@ -941,7 +941,7 @@ dsp_status node_connect(struct node_object *hNode1, u32 
uStream1,
(hNode2-create_args.asa.
  task_arg_obj.strm_in_def[uStream2]);
if (input-sz_device != NULL)
-   status = DSP_EALREADYCONNECTED;
+   status = -EISCONN;
 
}
}
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH v1 2/19] DSPBRIDGE: Cleanup custom error code (DSP_ECORRUPTFILE --EBADF)

2010-03-26 Thread Hebbar, Shivananda
From ca52a733142bba7f132a314b93d1489a89c4574b Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 09:27:38 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_ECORRUPTFILE 
--EBADF)

This patch replaces DSP_ECORRUPTFILE with -EBADF.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/rmgr/nldr.c |2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index a2fa786..81fc1b1 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -76,9 +76,6 @@
  * has occurred. */
 #define DSP_ECHANGEDURINGENUM   (DSP_EBASE + 3)
 
-/* An error occurred while parsing the DSP executable file */
-#define DSP_ECORRUPTFILE(DSP_EBASE + 4)
-
 /* A failure occurred during a delete operation */
 #define DSP_EDELETE (DSP_EBASE + 5)
 
diff --git a/drivers/dsp/bridge/rmgr/nldr.c b/drivers/dsp/bridge/rmgr/nldr.c
index c23deda..2d79b37 100644
--- a/drivers/dsp/bridge/rmgr/nldr.c
+++ b/drivers/dsp/bridge/rmgr/nldr.c
@@ -521,7 +521,7 @@ dsp_status nldr_create(OUT struct nldr_object **phNldr,
/* Parse memory segment data */
dload_segs = (u16) (*((u32 *) psz_coff_buf));
if (dload_segs  MAXMEMSEGS)
-   status = DSP_ECORRUPTFILE;
+   status = -EBADF;
}
/* Parse dynamic load memory segments */
if (DSP_SUCCEEDED(status)  dload_segs  0) {
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH v1 3/19] DSPBRIDGE: Cleanup custom error code (DSP_EFILE --ENOENT)

2010-03-26 Thread Hebbar, Shivananda
From abf0989e50ae07724253136d88a6b679f8f1da39 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 09:32:41 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_EFILE --ENOENT)

This patch replaces error code DSP_EFILE with -ENOENT.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/rmgr/proc.c |2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 81fc1b1..30d13f9 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -90,9 +90,6 @@
 /* A general failure occurred */
 #define DSP_EFAIL   (DSP_EBASE + 8)
 
-/* The specified executable file could not be found. */
-#define DSP_EFILE   (DSP_EBASE + 9)
-
 /* The specified handle is invalid. */
 #define DSP_EHANDLE (DSP_EBASE + 0xa)
 
diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c
index d664f96..42f4734 100644
--- a/drivers/dsp/bridge/rmgr/proc.c
+++ b/drivers/dsp/bridge/rmgr/proc.c
@@ -239,7 +239,7 @@ static dsp_status get_exec_file(struct cfg_devnode 
*dev_node_obj,
return DSP_SOK;
}
}
-   return DSP_EFILE;
+   return -ENOENT;
 }
 
 /*
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH v1 5/19] DSPBRIDGE: Cleanup custom error code (DSP_EINVALIDARG - -EINVAL)

2010-03-26 Thread Hebbar, Shivananda
From 619341afefb8cc8e188b49525976488c94068864 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 11:32:19 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_EINVALIDARG - 
-EINVAL)

This patch replaces DSP_EINVALIDARG with -EINVAL.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/_dcd.h|2 +-
 arch/arm/plat-omap/include/dspbridge/chnl.h|2 +-
 arch/arm/plat-omap/include/dspbridge/cmm.h |8 
 arch/arm/plat-omap/include/dspbridge/dev.h |2 +-
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/mgr.h |4 ++--
 arch/arm/plat-omap/include/dspbridge/pwr.h |2 +-
 arch/arm/plat-omap/include/dspbridge/sync.h|2 +-
 arch/arm/plat-omap/include/dspbridge/wmd.h |2 +-
 drivers/dsp/bridge/pmgr/chnl.c |2 +-
 drivers/dsp/bridge/pmgr/cmm.c  |4 ++--
 drivers/dsp/bridge/pmgr/cod.c  |2 +-
 drivers/dsp/bridge/pmgr/wcd.c  |   18 +-
 drivers/dsp/bridge/rmgr/dbdcd.c|2 +-
 drivers/dsp/bridge/rmgr/drv_interface.c|2 +-
 drivers/dsp/bridge/rmgr/mgr.c  |2 +-
 drivers/dsp/bridge/rmgr/node.c |2 +-
 drivers/dsp/bridge/rmgr/pwr.c  |4 ++--
 drivers/dsp/bridge/rmgr/strm.c |2 +-
 drivers/dsp/bridge/services/cfg.c  |4 ++--
 drivers/dsp/bridge/wmd/chnl_sm.c   |4 ++--
 drivers/dsp/bridge/wmd/tiomap3430.c|6 +++---
 drivers/dsp/bridge/wmd/tiomap3430_pwr.c|2 +-
 23 files changed, 40 insertions(+), 43 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/_dcd.h 
b/arch/arm/plat-omap/include/dspbridge/_dcd.h
index 1350feb..7e6745d 100644
--- a/arch/arm/plat-omap/include/dspbridge/_dcd.h
+++ b/arch/arm/plat-omap/include/dspbridge/_dcd.h
@@ -31,7 +31,7 @@
  *  args:   Argument structure.
  *  pResult:
  *  Returns:
- *  DSP_SOK if command called; DSP_EINVALIDARG if command not in IOCTL
+ *  DSP_SOK if command called; -EINVAL if command not in IOCTL
  *  table.
  *  Requires:
  *  Ensures:
diff --git a/arch/arm/plat-omap/include/dspbridge/chnl.h 
b/arch/arm/plat-omap/include/dspbridge/chnl.h
index a52efb8..b45b08b 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnl.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnl.h
@@ -61,7 +61,7 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);
  *  Returns:
  *  DSP_SOK:Success;
  *  -EFAULT:hdev_obj is invalid.
- *  DSP_EINVALIDARG:max_channels is 0.
+ *  -EINVAL:max_channels is 0.
  *  DSP_EMEMORY:Insufficient memory for requested resources.
  *  CHNL_E_ISR: Unable to plug channel ISR for configured IRQ.
  *  CHNL_E_MAXCHANNELS: This manager cannot handle this many channels.
diff --git a/arch/arm/plat-omap/include/dspbridge/cmm.h 
b/arch/arm/plat-omap/include/dspbridge/cmm.h
index b2cb087..fe179d5 100644
--- a/arch/arm/plat-omap/include/dspbridge/cmm.h
+++ b/arch/arm/plat-omap/include/dspbridge/cmm.h
@@ -176,7 +176,7 @@ extern dsp_status cmm_get_handle(void *hprocessor,
  *  Returns:
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid handle.
- *  DSP_EINVALIDARG Invalid input argument.
+ *  -EINVAL Invalid input argument.
  *  Requires:
  *  Ensures:
  *
@@ -214,7 +214,7 @@ extern bool cmm_init(void);
  *  Returns:
  *  DSP_SOK: Success.
  *  -EFAULT: Invalid hcmm_mgr handle.
- *  DSP_EINVALIDARG: Invalid input argument.
+ *  -EINVAL: Invalid input argument.
  *  DSP_EFAIL:   Unable to register.
  *  - On success *pulSegId is a valid SM segment ID.
  *  Requires:
@@ -245,7 +245,7 @@ extern dsp_status cmm_register_gppsm_seg(struct cmm_object 
*hcmm_mgr,
  *  Returns:
  *   DSP_SOK: Success.
  *   -EFAULT: Invalid handle.
- *   DSP_EINVALIDARG: Invalid ul_seg_id.
+ *   -EINVAL: Invalid ul_seg_id.
  *   DSP_EFAIL:   Unable to unregister for unknown reason.
  *  Requires:
  *  Ensures:
@@ -286,7 +286,7 @@ extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject 
*xlator,
  * pXlatorAttrs:   Translator attributes used for the client NODE or 
STREAM.
  *  Returns:
  * DSP_SOK:Success.
- * DSP_EINVALIDARG:Bad input Attrs.
+ * -EINVAL:Bad input Attrs.
  * DSP_EMEMORY:   Insufficient memory(local) for requested resources.
  *  Requires:
  * phXlator != NULL
diff --git a/arch/arm/plat-omap/include/dspbridge/dev.h 
b/arch/arm/plat-omap/include/dspbridge/dev.h
index b9e3483..2cc7295 100644
--- a/arch/arm/plat-omap/include/dspbridge/dev.h
+++ b/arch/arm/plat-omap/include/dspbridge/dev.h
@@ -640,7 +640,7 @@ extern dsp_status dev_remove_proc_object(struct dev_object
  *  

[RFC][PATCH v1 7/19] DSPBRIDGE: Cleanup custom error code (DSP_ENODETYPE - -EPERM)

2010-03-26 Thread Hebbar, Shivananda
From 78f772ea5115714c15740482079c8b8c04920fcc Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 12:02:46 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_ENODETYPE - -EPERM)

This patch replaces DSP_ENODETYPE with -EPERM

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h  |3 ---
 arch/arm/plat-omap/include/dspbridge/node.h |   12 ++--
 arch/arm/plat-omap/include/dspbridge/nodepriv.h |2 +-
 arch/arm/plat-omap/include/dspbridge/strm.h |2 +-
 drivers/dsp/bridge/rmgr/node.c  |   16 
 drivers/dsp/bridge/wmd/msg_sm.c |2 +-
 6 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 2ba76d4..5b8d9e5 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -90,9 +90,6 @@
 /* A general failure occurred */
 #define DSP_EFAIL   (DSP_EBASE + 8)
 
-/* The requested operation is invalid for this node type. */
-#define DSP_ENODETYPE   (DSP_EBASE + 0xd)
-
 /* No error text was found for the specified error code. */
 #define DSP_ENOERRTEXT  (DSP_EBASE + 0xe)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index 7364564..66afafe 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -100,7 +100,7 @@ extern dsp_status node_alloc_msg_buf(struct node_object 
*hnode,
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid hnode.
  *  DSP_ERANGE: prio is out of range.
- *  DSP_ENODETYPE:  The specified node is not a task node.
+ *  -EPERM:  The specified node is not a task node.
  *  DSP_EWRONGSTATE:Node is not in the NODE_ALLOCATED, NODE_PAUSED,
  *  or NODE_RUNNING state.
  *  DSP_ETIMEOUT:   A timeout occurred before the DSP responded.
@@ -382,7 +382,7 @@ extern dsp_status node_get_attr(struct node_object *hnode,
  *  Returns:
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid hnode.
- *  DSP_ENODETYPE:  Cannot retrieve messages from this type of node.
+ *  -EPERM:  Cannot retrieve messages from this type of node.
  *  DSP_ETIMEOUT:   Timeout occurred and no message is available.
  *  DSP_EFAIL:  Error occurred while trying to retrieve a message.
  *  Requires:
@@ -443,7 +443,7 @@ void node_on_exit(struct node_object *hnode, s32 nStatus);
  *  Returns:
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid hnode.
- *  DSP_ENODETYPE:  Node is not a task or socket node.
+ *  -EPERM:  Node is not a task or socket node.
  *  DSP_ETIMEOUT:   A timeout occurred before the DSP responded.
  *  DSP_EWRONGSTSATE:   Node is not in NODE_RUNNING state.
  *  DSP_EFAIL:  Failed to pause node.
@@ -467,7 +467,7 @@ extern dsp_status node_pause(struct node_object *hnode);
  *  Returns:
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid hnode.
- *  DSP_ENODETYPE:  Messages can't be sent to this type of node.
+ *  -EPERM:  Messages can't be sent to this type of node.
  *  DSP_ETIMEOUT:   Timeout occurred before message could be set.
  *  DSP_EWRONGSTATE:Node is in invalid state for sending messages.
  *  DSP_EFAIL:  Unable to send message.
@@ -517,7 +517,7 @@ extern dsp_status node_register_notify(struct node_object 
*hnode,
  *  Returns:
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid hnode.
- *  DSP_ENODETYPE:  hnode doesn't represent a message, task or dais
+ *  -EPERM:  hnode doesn't represent a message, task or dais
  *  socket node.
  *  DSP_ETIMEOUT:   A timeout occurred before the DSP responded.
  *  DSP_EWRONGSTSATE:   Node is not in NODE_PAUSED or NODE_CREATED state.
@@ -543,7 +543,7 @@ extern dsp_status node_run(struct node_object *hnode);
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid hnode.
  *  DSP_ETIMEOUT:   A timeout occurred before the DSP responded.
- *  DSP_ENODETYPE:  Type of node specified cannot be terminated.
+ *  -EPERM:  Type of node specified cannot be terminated.
  *  DSP_EWRONGSTATE:Operation not valid for the current node state.
  *  DSP_EFAIL:  Unable to terminate the node.
  *  Requires:
diff --git a/arch/arm/plat-omap/include/dspbridge/nodepriv.h 
b/arch/arm/plat-omap/include/dspbridge/nodepriv.h
index 0658981..05118bf 100644
--- a/arch/arm/plat-omap/include/dspbridge/nodepriv.h
+++ b/arch/arm/plat-omap/include/dspbridge/nodepriv.h
@@ -92,7 +92,7 @@ struct node_createargs {
  *  Returns:
  *  DSP_SOK:Success.
  *  -EFAULT:

[RFC][PATCH v1 8/19] DSPBRIDGE: Cleanup custom error code (DSP_ENOTIMPL - -ENOSYS)

2010-03-26 Thread Hebbar, Shivananda
From ca9fb2edaa1934aeea76403a12377bfff6ed22c4 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 12:19:38 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_ENOTIMPL - -ENOSYS)

This patch replaces DSP_ENOTIMPL with -ENOSYS

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/cod.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |4 ++--
 arch/arm/plat-omap/include/dspbridge/errbase.h  |3 ---
 arch/arm/plat-omap/include/dspbridge/node.h |2 +-
 arch/arm/plat-omap/include/dspbridge/proc.h |2 +-
 arch/arm/plat-omap/include/dspbridge/strm.h |2 +-
 arch/arm/plat-omap/include/dspbridge/wmd.h  |2 +-
 drivers/dsp/bridge/pmgr/cod.c   |2 +-
 drivers/dsp/bridge/pmgr/dbll.c  |4 ++--
 drivers/dsp/bridge/pmgr/dev.c   |6 +++---
 drivers/dsp/bridge/pmgr/wcd.c   |8 
 drivers/dsp/bridge/rmgr/node.c  |2 +-
 drivers/dsp/bridge/rmgr/proc.c  |2 +-
 drivers/dsp/bridge/rmgr/strm.c  |4 ++--
 drivers/dsp/bridge/services/ntfy.c  |4 ++--
 15 files changed, 23 insertions(+), 26 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cod.h 
b/arch/arm/plat-omap/include/dspbridge/cod.h
index 3d76a6b..381291c 100644
--- a/arch/arm/plat-omap/include/dspbridge/cod.h
+++ b/arch/arm/plat-omap/include/dspbridge/cod.h
@@ -87,7 +87,7 @@ extern void cod_close(struct cod_libraryobj *lib);
  *  DSP_SOK:Success.
  *  COD_E_NOZLFUNCTIONS:Could not initialize ZL functions.
  *  COD_E_ZLCREATEFAILED:   ZL_Create failed.
- *  DSP_ENOTIMPL:   attrs was not NULL.  We don't yet support
+ *  -ENOSYS:   attrs was not NULL.  We don't yet support
  *  non default values of attrs.
  *  Requires:
  *  COD module initialized.
diff --git a/arch/arm/plat-omap/include/dspbridge/dblldefs.h 
b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
index 90683a2..fce35ab 100644
--- a/arch/arm/plat-omap/include/dspbridge/dblldefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
@@ -361,7 +361,7 @@ typedef dsp_status(*dbll_load_fxn) (struct dbll_library_obj 
*lib,
  *  DSP_SOK:Success.
  *  DSP_ENOSECT:Section not found.
  *  DSP_EFWRITE:Write function failed.
- *  DSP_ENOTIMPL:   Function not implemented.
+ *  -ENOSYS:   Function not implemented.
  *  Requires:
  *  Valid lib.
  *  sectName != NULL.
@@ -466,7 +466,7 @@ typedef void (*dbll_unload_fxn) (struct dbll_library_obj 
*library,
  *  Returns:
  *  DSP_SOK:Success.
  *  DSP_ENOSECT:Named section not found.
- *  DSP_ENOTIMPL
+ *  -ENOSYS
  *  Requires:
  *  DBL initialized.
  *  Valid lib.
diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 5b8d9e5..09ae0c6 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -96,9 +96,6 @@
 /* No more connections can be made for this node. */
 #define DSP_ENOMORECONNECTIONS  (DSP_EBASE + 0xf)
 
-/* The indicated operation is not supported. */
-#define DSP_ENOTIMPL(DSP_EBASE + 0x10)
-
 /* I/O is currently pending. */
 #define DSP_EPENDING(DSP_EBASE + 0x11)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index 66afafe..3bf8a03 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -493,7 +493,7 @@ extern dsp_status node_put_message(struct node_object 
*hnode,
  *  -EFAULT:Invalid hnode.
  *  -ENOMEM:Insufficient memory on GPP.
  *  DSP_EVALUE: event_mask is invalid.
- *  DSP_ENOTIMPL:   Notification type specified by notify_type is not
+ *  -ENOSYS:   Notification type specified by notify_type is not
  *  supported.
  *  Requires:
  *  node_init(void) called.
diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h 
b/arch/arm/plat-omap/include/dspbridge/proc.h
index dfae597..5220a1b 100644
--- a/arch/arm/plat-omap/include/dspbridge/proc.h
+++ b/arch/arm/plat-omap/include/dspbridge/proc.h
@@ -184,7 +184,7 @@ extern dsp_status proc_enum_nodes(void *hprocessor,
  *  Ensures:
  *  Details:
  *  This function currently returns
- *  DSP_ENOTIMPL, and does not write any data to the resource_info struct.
+ *  -ENOSYS, and does not write any data to the resource_info struct.
  */
 extern dsp_status proc_get_resource_info(void *hprocessor,
 u32 resource_type,
diff --git a/arch/arm/plat-omap/include/dspbridge/strm.h 
b/arch/arm/plat-omap/include/dspbridge/strm.h
index 33b2676..c2a5ed7 100644
--- 

[RFC][PATCH v1 9/19] DSPBRIDGE: Cleanup custom error code (DSP_EFOPEN -- EBADF)

2010-03-26 Thread Hebbar, Shivananda
From 3bf9c85d6d0794e790491334dca1dde8d0ada863 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 13:24:31 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_EFOPEN -- EBADF)

This patch replaces DSP_EFOPEN with -EBADF

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |2 +-
 arch/arm/plat-omap/include/dspbridge/errbase.h  |3 ---
 drivers/dsp/bridge/pmgr/dbll.c  |4 ++--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dblldefs.h 
b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
index fce35ab..527d47e 100644
--- a/arch/arm/plat-omap/include/dspbridge/dblldefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
@@ -385,7 +385,7 @@ typedef dsp_status(*dbll_load_sect_fxn) (struct 
dbll_library_obj *lib,
  *  Returns:
  *  DSP_SOK:Success.
  *  -ENOMEM:Memory allocation failure.
- *  DSP_EFOPEN: File open failure.
+ *  -EBADF: File open failure.
  *  DSP_EFREAD: File read failure.
  *  DSP_ECORRUPTFILE:   Unable to determine target type.
  *  Requires:
diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 09ae0c6..aa848c8 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -192,9 +192,6 @@
 /* Unable to find a named section in DSP executable */
 #define DSP_ENOSECT (DSP_EBASE + 0x32)
 
-/* Unable to open file */
-#define DSP_EFOPEN  (DSP_EBASE + 0x33)
-
 /* Unable to read file */
 #define DSP_EFREAD  (DSP_EBASE + 0x34)
 
diff --git a/drivers/dsp/bridge/pmgr/dbll.c b/drivers/dsp/bridge/pmgr/dbll.c
index 8d6f9ea..5544029 100644
--- a/drivers/dsp/bridge/pmgr/dbll.c
+++ b/drivers/dsp/bridge/pmgr/dbll.c
@@ -915,10 +915,10 @@ static dsp_status dof_open(struct dbll_library_obj 
*zl_lib)
if (zl_lib-desc == NULL) {
(zl_lib-target_obj-attrs.fclose) (zl_lib-fp);
zl_lib-fp = NULL;
-   status = DSP_EFOPEN;
+   status = -EBADF;
}
} else {
-   status = DSP_EFOPEN;
+   status = -EBADF;
}
 
return status;
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH v1 10/19] DSPBRIDGE: Cleanup custom error code (DSP_EPOINTER - -EFAULT)

2010-03-26 Thread Hebbar, Shivananda
From 169b4262b63ee4cc81a4061d402c53536574dfc9 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 11:26:00 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_EPOINTER - -EFAULT)

This patch replaces DSP_EPOINTER with -EFAULT

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/wmd.h |8 
 drivers/dsp/bridge/pmgr/cmm.c  |2 +-
 drivers/dsp/bridge/pmgr/wcd.c  |   18 +-
 drivers/dsp/bridge/services/sync.c |2 +-
 drivers/dsp/bridge/wmd/chnl_sm.c   |   14 +++---
 drivers/dsp/bridge/wmd/io_sm.c |2 +-
 drivers/dsp/bridge/wmd/msg_sm.c|6 +++---
 8 files changed, 26 insertions(+), 29 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index aa848c8..da2900c 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -99,9 +99,6 @@
 /* I/O is currently pending. */
 #define DSP_EPENDING(DSP_EBASE + 0x11)
 
-/* An invalid pointer was specified. */
-#define DSP_EPOINTER(DSP_EBASE + 0x12)
-
 /* A parameter is specified outside its valid range. */
 #define DSP_ERANGE  (DSP_EBASE + 0x13)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h 
b/arch/arm/plat-omap/include/dspbridge/wmd.h
index 6cc0084..cf2f64c 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmd.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmd.h
@@ -451,7 +451,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object 
*chnl_obj);
  *  Returns:
  *  DSP_SOK:Success;
  *  -EFAULT:Invalid chnl_obj.
- *  DSP_EPOINTER:   pHostBuf is invalid.
+ *  -EFAULT:   pHostBuf is invalid.
  *  CHNL_E_NOEOS:   User cannot mark EOS on an input channel.
  *  CHNL_E_CANCELLED: I/O has been cancelled on this channel.  No further
  *  I/O is allowed.
@@ -492,7 +492,7 @@ typedef dsp_status(*fxn_chnl_addioreq) (struct chnl_object
  *  Returns:
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid chnl_obj.
- *  DSP_EPOINTER:   pIOC is invalid.
+ *  -EFAULT:   pIOC is invalid.
  *  CHNL_E_NOIOC:   CHNL_IOCNOWAIT was specified as the dwTimeOut parameter
  *  yet no I/O completions were queued.
  *  Requires:
@@ -556,7 +556,7 @@ typedef dsp_status(*fxn_chnl_flushio) (struct chnl_object 
*chnl_obj,
  *  Returns:
  *  DSP_SOK:Success;
  *  -EFAULT:Invalid chnl_obj.
- *  DSP_EPOINTER:   pInfo == NULL.
+ *  -EFAULT:   pInfo == NULL.
  *  Requires:
  *  Ensures:
  *  DSP_SOK:pInfo points to a filled in chnl_info struct,
@@ -576,7 +576,7 @@ typedef dsp_status(*fxn_chnl_getinfo) (struct chnl_object 
*chnl_obj,
  *  Returns:
  *  DSP_SOK:Success;
  *  -EFAULT:Invalid hchnl_mgr.
- *  DSP_EPOINTER:   pMgrInfo == NULL.
+ *  -EFAULT:   pMgrInfo == NULL.
  *  CHNL_E_BADCHANID:   Invalid channel ID.
  *  Requires:
  *  Ensures:
diff --git a/drivers/dsp/bridge/pmgr/cmm.c b/drivers/dsp/bridge/pmgr/cmm.c
index b8ba5f2..2894b77 100644
--- a/drivers/dsp/bridge/pmgr/cmm.c
+++ b/drivers/dsp/bridge/pmgr/cmm.c
@@ -391,7 +391,7 @@ dsp_status cmm_free_buf(struct cmm_object *hcmm_mgr, void 
*buf_pa,
u32 ul_seg_id)
 {
struct cmm_object *cmm_mgr_obj = (struct cmm_object *)hcmm_mgr;
-   dsp_status status = DSP_EPOINTER;
+   dsp_status status = -EFAULT;
struct cmm_mnode *mnode_obj = NULL;
struct cmm_allocator *allocator = NULL;
struct cmm_attrs *pattrs;
diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c
index a7ed6af..6937ea6 100644
--- a/drivers/dsp/bridge/pmgr/wcd.c
+++ b/drivers/dsp/bridge/pmgr/wcd.c
@@ -174,12 +174,12 @@ static inline void _cp_fm_usr(void *to, const void __user 
* from,
return;
 
if (unlikely(!from)) {
-   *err = DSP_EPOINTER;
+   *err = -EFAULT;
return;
}
 
if (unlikely(copy_from_user(to, from, bytes)))
-   *err = DSP_EPOINTER;
+   *err = -EFAULT;
 }
 
 #define CP_FM_USR(to, from, err, n)\
@@ -192,12 +192,12 @@ static inline void _cp_to_usr(void __user *to, const void 
*from,
return;
 
if (unlikely(!to)) {
-   *err = DSP_EPOINTER;
+   *err = -EFAULT;
return;
}
 
if (unlikely(copy_to_user(to, from, bytes)))
-   *err = DSP_EPOINTER;
+   *err = -EFAULT;
 }
 
 #define CP_TO_USR(to, from, err, n)\
@@ -500,7 +500,7 @@ u32 mgrwrap_register_object(union Trapped_Args *args, void 
*pr_ctxt)

[RFC][PATCH v1 12/19] DSPBRIDGE: Cleanup custom error code (DSP_ESIZE - -EINVAL)

2010-03-26 Thread Hebbar, Shivananda
From 992e701bbfcd681cee8af53cfe6fabc32d6d02a3 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 11:44:03 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_ESIZE - -EINVAL)

This patch replaces DSP_ESIZE with -EINVAL.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/node.h|6 +++---
 arch/arm/plat-omap/include/dspbridge/proc.h|2 +-
 arch/arm/plat-omap/include/dspbridge/strm.h|4 ++--
 drivers/dsp/bridge/pmgr/wcd.c  |   18 +-
 drivers/dsp/bridge/rmgr/node.c |2 +-
 drivers/dsp/bridge/rmgr/proc.c |2 +-
 drivers/dsp/bridge/rmgr/strm.c |4 ++--
 drivers/dsp/bridge/services/cfg.c  |2 +-
 9 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 1cc0101..87667a6 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -99,9 +99,6 @@
 /* I/O is currently pending. */
 #define DSP_EPENDING(DSP_EBASE + 0x11)
 
-/* An invalid size parameter was specified. */
-#define DSP_ESIZE   (DSP_EBASE + 0x14)
-
 /* A stream creation failure occurred on the DSP. */
 #define DSP_ESTREAM (DSP_EBASE + 0x15)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index 814065f..7d882f2 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -79,7 +79,7 @@ extern dsp_status node_allocate(struct proc_object 
*hprocessor,
  *  -EFAULT:Invalid node handle.
  *  -ENOMEM:Insufficent memory.
  *  DSP_EFAIL:  General Failure.
- *  DSP_ESIZE:  Invalid Size.
+ *  -EINVAL:  Invalid Size.
  *  Requires:
  *  node_init(void) called.
  *  pbuffer != NULL.
@@ -292,14 +292,14 @@ extern dsp_status node_delete_mgr(struct node_mgr 
*hnode_mgr);
  *  pu_allocated:Location to write total number of allocated nodes.
  *  Returns:
  *  DSP_SOK:Success.
- *  DSP_ESIZE:  node_tab is too small to hold all node handles.
+ *  -EINVAL:  node_tab is too small to hold all node handles.
  *  Requires:
  *  Valid hnode_mgr.
  *  node_tab != NULL || node_tab_size == 0.
  *  pu_num_nodes != NULL.
  *  pu_allocated != NULL.
  *  Ensures:
- *  - (DSP_ESIZE  *pu_num_nodes == 0)
+ *  - (EINVAL  *pu_num_nodes == 0)
  *  - || (DSP_SOK  *pu_num_nodes = node_tab_size)  
  *(*pu_allocated == *pu_num_nodes)
  */
diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h 
b/arch/arm/plat-omap/include/dspbridge/proc.h
index 5220a1b..64b208c 100644
--- a/arch/arm/plat-omap/include/dspbridge/proc.h
+++ b/arch/arm/plat-omap/include/dspbridge/proc.h
@@ -138,7 +138,7 @@ extern dsp_status proc_detach(struct process_context 
*pr_ctxt);
  *  Returns:
  *  DSP_SOK :   Success.
  *  -EFAULT :   Invalid processor handle.
- *  DSP_ESIZE   :   The amount of memory allocated for node_tab is
+ *  -EINVAL   :   The amount of memory allocated for node_tab is
  *   insufficent. That is the number of nodes actually
  *   allocated on the DSP is greater than the value
  *   specified for node_tab_size.
diff --git a/arch/arm/plat-omap/include/dspbridge/strm.h 
b/arch/arm/plat-omap/include/dspbridge/strm.h
index 73902a8..6f86c04 100644
--- a/arch/arm/plat-omap/include/dspbridge/strm.h
+++ b/arch/arm/plat-omap/include/dspbridge/strm.h
@@ -38,7 +38,7 @@
  *  -EFAULT:Invalid hStrm.
  *  -ENOMEM:Insufficient memory.
  *  DSP_EFAIL:  Failure occurred, unable to allocate buffers.
- *  DSP_ESIZE:  usize must be  0 bytes.
+ *  -EINVAL:  usize must be  0 bytes.
  *  Requires:
  *  strm_init(void) called.
  *  ap_buffer != NULL.
@@ -172,7 +172,7 @@ extern dsp_status strm_get_event_handle(struct strm_object 
*hStrm,
  *  Returns:
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid hStrm.
- *  DSP_ESIZE:  stream_info_size  sizeof(dsp_streaminfo).
+ *  -EINVAL:  stream_info_size  sizeof(dsp_streaminfo).
  *  DSP_EFAIL:  Unable to get stream info.
  *  Requires:
  *  strm_init(void) called.
diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c
index 6937ea6..7186f5d 100644
--- a/drivers/dsp/bridge/pmgr/wcd.c
+++ b/drivers/dsp/bridge/pmgr/wcd.c
@@ -420,7 +420,7 @@ u32 mgrwrap_enum_node_info(union Trapped_Args *args, void 
*pr_ctxt)
u32 size = args-args_mgr_enumnode_info.undb_props_size;
 
if (size  sizeof(struct dsp_ndbprops))
-   return DSP_ESIZE;
+   return -EINVAL;
 

[RFC][PATCH v1 13/19] DSPBRIDGE: Cleanup custom error code (DSP_ETIMEOUT - -ETIME)

2010-03-26 Thread Hebbar, Shivananda
From 3584d0af0c04d04b47f4ca54336467afd33de20d Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 11:55:35 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_ETIMEOUT - -ETIME)

This patch replaces DSP_ETIMEOUT with -ETIME

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/disp.h|8 
 arch/arm/plat-omap/include/dspbridge/errbase.h |4 
 arch/arm/plat-omap/include/dspbridge/mgr.h |2 +-
 arch/arm/plat-omap/include/dspbridge/node.h|   16 
 arch/arm/plat-omap/include/dspbridge/proc.h|4 ++--
 arch/arm/plat-omap/include/dspbridge/pwr.h |8 
 arch/arm/plat-omap/include/dspbridge/strm.h|6 +++---
 arch/arm/plat-omap/include/dspbridge/wmd.h |4 ++--
 drivers/dsp/bridge/rmgr/disp.c |4 ++--
 drivers/dsp/bridge/rmgr/node.c |2 +-
 drivers/dsp/bridge/rmgr/strm.c |6 +++---
 drivers/dsp/bridge/services/sync.c |2 +-
 drivers/dsp/bridge/wmd/chnl_sm.c   |2 +-
 13 files changed, 32 insertions(+), 36 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/disp.h 
b/arch/arm/plat-omap/include/dspbridge/disp.h
index dc18292..3a49170 100644
--- a/arch/arm/plat-omap/include/dspbridge/disp.h
+++ b/arch/arm/plat-omap/include/dspbridge/disp.h
@@ -105,7 +105,7 @@ extern bool disp_init(void);
  *  prio:  New priority level to set node's priority to.
  *  Returns:
  *  DSP_SOK:Success.
- *  DSP_ETIMEOUT:   A timeout occurred before the DSP responded.
+ *  -ETIME:   A timeout occurred before the DSP responded.
  *  Requires:
  *  disp_init(void) called.
  *  Valid hDispObject.
@@ -134,7 +134,7 @@ extern dsp_status disp_node_change_priority(struct 
disp_object
  *  DSP_SOK:Success.
  *  DSP_ETASK:  Unable to create the node's task or process on the DSP.
  *  DSP_ESTREAM:Stream creation failure on the DSP.
- *  DSP_ETIMEOUT:   A timeout occurred before the DSP responded.
+ *  -ETIME:   A timeout occurred before the DSP responded.
  *  DSP_EUSER:  A user-defined failure occurred.
  *  DSP_EFAIL:  A failure occurred, unable to create node.
  *  Requires:
@@ -166,7 +166,7 @@ extern dsp_status disp_node_create(struct disp_object 
*hDispObject,
  *  node_env:Address of node's environment structure.
  *  Returns:
  *  DSP_SOK:Success.
- *  DSP_ETIMEOUT:   A timeout occurred before the DSP responded.
+ *  -ETIME:   A timeout occurred before the DSP responded.
  *  Requires:
  *  disp_init(void) called.
  *  Valid hDispObject.
@@ -192,7 +192,7 @@ extern dsp_status disp_node_delete(struct disp_object 
*hDispObject,
  *  node_env:Address of node's environment structure.
  *  Returns:
  *  DSP_SOK:Success.
- *  DSP_ETIMEOUT:   A timeout occurred before the DSP responded.
+ *  -ETIME:   A timeout occurred before the DSP responded.
  *  Requires:
  *  disp_init(void) called.
  *  Valid hDispObject.
diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 87667a6..874054c 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -105,10 +105,6 @@
 /* A task creation failure occurred on the DSP. */
 #define DSP_ETASK   (DSP_EBASE + 0x16)

-/* A timeout occurred before the requested operation could complete. */
-
-#define DSP_ETIMEOUT(DSP_EBASE + 0x17)
-
 /* A data truncation occurred, e.g., when requesting a descriptive error
  * string, not enough space was allocated for the complete error message. */

diff --git a/arch/arm/plat-omap/include/dspbridge/mgr.h 
b/arch/arm/plat-omap/include/dspbridge/mgr.h
index 7ceb2ee..9fa0d23 100644
--- a/arch/arm/plat-omap/include/dspbridge/mgr.h
+++ b/arch/arm/plat-omap/include/dspbridge/mgr.h
@@ -34,7 +34,7 @@
  *  utimeout: timeout interval in milliseocnds
  *  Returns:
  *  DSP_SOK : Success.
- *  DSP_ETIMEOUT: Wait timed out. *pu_index is undetermined.
+ *  -ETIME: Wait timed out. *pu_index is undetermined.
  *  Details:
  */

diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index 7d882f2..9fe302e 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -103,7 +103,7 @@ extern dsp_status node_alloc_msg_buf(struct node_object 
*hnode,
  *  -EPERM:  The specified node is not a task node.
  *  DSP_EWRONGSTATE:Node is not in the NODE_ALLOCATED, NODE_PAUSED,
  *  or NODE_RUNNING state.
- *  DSP_ETIMEOUT:   A timeout occurred before the DSP responded.
+ *  -ETIME:   A timeout occurred before the DSP 

[RFC][PATCH v1 14/19] DSPBRIDGE: Cleanup custom error code (DSP_EVALUE - -EINVAL)

2010-03-26 Thread Hebbar, Shivananda
From dbd66bb187c17c027db6d8106cf878cf74bdcc43 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 12:40:50 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_EVALUE - -EINVAL)

This patch replaces DSP_EVALUE with -EINVAL.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h  |3 ---
 arch/arm/plat-omap/include/dspbridge/node.h |4 ++--
 arch/arm/plat-omap/include/dspbridge/nodepriv.h |2 +-
 arch/arm/plat-omap/include/dspbridge/ntfy.h |2 +-
 arch/arm/plat-omap/include/dspbridge/proc.h |2 +-
 arch/arm/plat-omap/include/dspbridge/strm.h |4 ++--
 arch/arm/plat-omap/include/dspbridge/wmd.h  |2 +-
 drivers/dsp/bridge/rmgr/node.c  |   10 +-
 drivers/dsp/bridge/rmgr/proc.c  |6 +++---
 drivers/dsp/bridge/rmgr/strm.c  |4 ++--
 drivers/dsp/bridge/services/ntfy.c  |2 +-
 drivers/dsp/bridge/wmd/msg_sm.c |2 +-
 12 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 874054c..dedca5d 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -110,9 +110,6 @@
 
 #define DSP_ETRUNCATED  (DSP_EBASE + 0x18)
 
-/* A parameter is invalid. */
-#define DSP_EVALUE  (DSP_EBASE + 0x1a)
-
 /* The state of the specified object is incorrect for the requested
  * operation. */
 #define DSP_EWRONGSTATE (DSP_EBASE + 0x1b)
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index 9fe302e..00affd0 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -167,7 +167,7 @@ extern dsp_status node_close_orphans(struct node_mgr 
*hnode_mgr,
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid hNode1 or hNode2.
  *  -ENOMEM:Insufficient host memory.
- *  DSP_EVALUE: A stream index parameter is invalid.
+ *  -EINVAL: A stream index parameter is invalid.
  *  DSP_EALREADYCONNECTED:  A connection already exists for one of the
  *  indices uStream1 or uStream2.
  *  DSP_EWRONGSTATE:Either hNode1 or hNode2 is not in the
@@ -492,7 +492,7 @@ extern dsp_status node_put_message(struct node_object 
*hnode,
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid hnode.
  *  -ENOMEM:Insufficient memory on GPP.
- *  DSP_EVALUE: event_mask is invalid.
+ *  -EINVAL: event_mask is invalid.
  *  -ENOSYS:   Notification type specified by notify_type is not
  *  supported.
  *  Requires:
diff --git a/arch/arm/plat-omap/include/dspbridge/nodepriv.h 
b/arch/arm/plat-omap/include/dspbridge/nodepriv.h
index 05118bf..96b5e54 100644
--- a/arch/arm/plat-omap/include/dspbridge/nodepriv.h
+++ b/arch/arm/plat-omap/include/dspbridge/nodepriv.h
@@ -93,7 +93,7 @@ struct node_createargs {
  *  DSP_SOK:Success.
  *  -EFAULT:Invalid hnode.
  *  -EPERM:  Not a task or DAIS socket node.
- *  DSP_EVALUE: The node's stream corresponding to index and dir
+ *  -EINVAL: The node's stream corresponding to index and dir
  *  is not a stream to or from the host.
  *  Requires:
  *  node_init(void) called.
diff --git a/arch/arm/plat-omap/include/dspbridge/ntfy.h 
b/arch/arm/plat-omap/include/dspbridge/ntfy.h
index 3109c44..d59e0fb 100644
--- a/arch/arm/plat-omap/include/dspbridge/ntfy.h
+++ b/arch/arm/plat-omap/include/dspbridge/ntfy.h
@@ -107,7 +107,7 @@ extern void ntfy_notify(IN struct ntfy_object *ntfy_obj, IN 
u32 event_mask);
  *  Returns:
  *  DSP_SOK:Success.
  *  -ENOMEM:Insufficient memory.
- *  DSP_EVALUE: event_mask is 0 and hnotification was not
+ *  -EINVAL: event_mask is 0 and hnotification was not
  *  previously registered.
  *  -EFAULT:NULL hnotification, hnotification event name
  *  too long, or hnotification event name NULL.
diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h 
b/arch/arm/plat-omap/include/dspbridge/proc.h
index e276cb7..5435169 100644
--- a/arch/arm/plat-omap/include/dspbridge/proc.h
+++ b/arch/arm/plat-omap/include/dspbridge/proc.h
@@ -353,7 +353,7 @@ extern dsp_status proc_load(void *hprocessor,
  *  Returns:
  *  DSP_SOK :   Success.
  *  -EFAULT :   Invalid processor handle or hnotification.
- *  DSP_EVALUE  :   Parameter event_mask is Invalid
+ *  -EINVAL  :   Parameter event_mask is Invalid
  *  DSP_ENOTIMP :   The notification type specified in uNotifyMask
  *   is not supported.
  *  DSP_EFAIL   :   Unable 

[RFC][PATCH v1 17/19] DSPBRIDGE: Cleanup custom error code (CHNL_E_CHANBUSY - -EALREADY)

2010-03-26 Thread Hebbar, Shivananda
From 98871a2583479220d285a9115043debc4e4e8369 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 13:00:15 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (CHNL_E_CHANBUSY - 
-EALREADY)

This patch replaces CHNL_E_CHANBUSY with -EALREADY.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/wmd.h |2 +-
 drivers/dsp/bridge/rmgr/strm.c |2 +-
 drivers/dsp/bridge/wmd/chnl_sm.c   |2 +-
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index e564284..51e9407 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -293,9 +293,6 @@
 /* Channel ID is out of range. */
 #define CHNL_E_BADCHANID(CHNL_EBASE + 0x03)
 
-/* Channel is already in use. */
-#define CHNL_E_CHANBUSY (CHNL_EBASE + 0x04)
-
 /* Invalid channel mode argument. */
 #define CHNL_E_BADMODE  (CHNL_EBASE + 0x05)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h 
b/arch/arm/plat-omap/include/dspbridge/wmd.h
index 339acfd..e368bbc 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmd.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmd.h
@@ -394,7 +394,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
  *  -EINVAL:Invalid number of IOReqs.
  *  CHNL_E_OUTOFSTREAMS:No free channels available.
  *  CHNL_E_BADCHANID:   Channel ID is out of range.
- *  CHNL_E_CHANBUSY:Channel is in use.
+ *  -EALREADY:Channel is in use.
  *  CHNL_E_NOIORPS: No free IO request packets available for
  *  queuing.
  *  Requires:
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index b78360f..45a15b4 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -596,7 +596,7 @@ func_cont:
 */
DBC_ASSERT(status == CHNL_E_OUTOFSTREAMS ||
   status == CHNL_E_BADCHANID ||
-  status == CHNL_E_CHANBUSY ||
+  status == -EALREADY ||
   status == CHNL_E_NOIORPS);
status = DSP_EFAIL;
}
diff --git a/drivers/dsp/bridge/wmd/chnl_sm.c b/drivers/dsp/bridge/wmd/chnl_sm.c
index 63ffc34..d3e59d3 100644
--- a/drivers/dsp/bridge/wmd/chnl_sm.c
+++ b/drivers/dsp/bridge/wmd/chnl_sm.c
@@ -811,7 +811,7 @@ dsp_status bridge_chnl_open(OUT struct chnl_object **phChnl,
status = CHNL_E_BADCHANID;
else if (chnl_mgr_obj-ap_channel[uChnlId] !=
 NULL)
-   status = CHNL_E_CHANBUSY;
+   status = -EALREADY;
} else {
/* Check for free channel */
status =
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH v1 18/19] DSPBRIDGE: Cleanup custom error code (CHNL_E_CANCELLED - -ECANCELED)

2010-03-26 Thread Hebbar, Shivananda
From ce0e8ff1367c7de7e958bbef03298bbe75715874 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 13:05:18 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (CHNL_E_CANCELLED - 
-ECANCELED)

This patch replaces CHNL_E_CANCELLED with -ECANCELED.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/wmd.h |2 +-
 drivers/dsp/bridge/wmd/chnl_sm.c   |2 +-
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 51e9407..3524a33 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -300,9 +300,6 @@
  * queued. */
 #define CHNL_E_NOIOC(CHNL_EBASE + 0x06)
 
-/* I/O has been cancelled on this channel. */
-#define CHNL_E_CANCELLED(CHNL_EBASE + 0x07)
-
 /* End of stream was already requested on this output channel. */
 #define CHNL_E_EOS  (CHNL_EBASE + 0x09)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h 
b/arch/arm/plat-omap/include/dspbridge/wmd.h
index e368bbc..856a737 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmd.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmd.h
@@ -453,7 +453,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object 
*chnl_obj);
  *  -EFAULT:Invalid chnl_obj.
  *  -EFAULT:   pHostBuf is invalid.
  *  CHNL_E_NOEOS:   User cannot mark EOS on an input channel.
- *  CHNL_E_CANCELLED: I/O has been cancelled on this channel.  No further
+ *  -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
  *  IORequest on this channel.  No further I/O is expected.
diff --git a/drivers/dsp/bridge/wmd/chnl_sm.c b/drivers/dsp/bridge/wmd/chnl_sm.c
index d3e59d3..38b9194 100644
--- a/drivers/dsp/bridge/wmd/chnl_sm.c
+++ b/drivers/dsp/bridge/wmd/chnl_sm.c
@@ -123,7 +123,7 @@ dsp_status bridge_chnl_add_io_req(struct chnl_object 
*chnl_obj, void *pHostBuf,
dw_state = pchnl-dw_state;
if (dw_state != CHNL_STATEREADY) {
if (dw_state  CHNL_STATECANCEL)
-   status = CHNL_E_CANCELLED;
+   status = -ECANCELED;
else if ((dw_state  CHNL_STATEEOS) 
 CHNL_IS_OUTPUT(pchnl-chnl_mode))
status = CHNL_E_EOS;
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH v1 19/19] DSPBRIDGE: Cleanup custom error code (WMD_E_TIMEOUT - -ETIMEDOUT)

2010-03-26 Thread Hebbar, Shivananda
From 2c3007b76da6145b165510bfa9c27f4f98209059 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 13:12:12 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (WMD_E_TIMEOUT - 
-ETIMEDOUT)

This patch replaces WMD_E_TIMEOUT with -ETIMEDOUT.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/wmd.h |   12 ++--
 drivers/dsp/bridge/wmd/tiomap3430.c|2 +-
 drivers/dsp/bridge/wmd/tiomap3430_pwr.c|4 ++--
 4 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 3524a33..a9ecb71 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -370,9 +370,6 @@
 /* One or more configuration parameters violated WMD hardware assumptions. */
 #define WMD_E_BADCONFIG (WMD_EBASE + 0x01)
 
-/* Timeout occurred waiting for a response from the hardware. */
-#define WMD_E_TIMEOUT   (WMD_EBASE + 0x02)
-
 /* FAILURE Codes : REG */
 #define REG_EBASE   (DSP_COMP_EBASE + 0x800)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h 
b/arch/arm/plat-omap/include/dspbridge/wmd.h
index 856a737..540b568 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmd.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmd.h
@@ -59,7 +59,7 @@ struct wmd_dev_context;
  *  Returns:
  *  DSP_SOK:Success.
  *  WMD_E_HARDWARE: A test of hardware assumptions/integrity failed.
- *  WMD_E_TIMEOUT:  Timeout occured waiting for a response from hardware.
+ *  -ETIMEDOUT:  Timeout occured waiting for a response from hardware.
  *  DSP_EFAIL:  Other, unspecified error.
  *  Requires:
  *  hDevContext != NULL
@@ -98,7 +98,7 @@ typedef dsp_status(*fxn_brd_setstate) (struct wmd_dev_context
  *  dwDSPAddr:  DSP address at which to start execution.
  *  Returns:
  *  DSP_SOK:Success.
- *  WMD_E_TIMEOUT:  Timeout occured waiting for a response from hardware.
+ *  -ETIMEDOUT:  Timeout occured waiting for a response from hardware.
  *  DSP_EFAIL:  Other, unspecified error.
  *  Requires:
  *  hDevContext != NULL
@@ -149,7 +149,7 @@ typedef dsp_status(*fxn_brd_memcopy) (struct wmd_dev_context
  *  ulMemType:  Memory space on DSP to which to transfer.
  *  Returns:
  *  DSP_SOK:Success.
- *  WMD_E_TIMEOUT:  Timeout occured waiting for a response from hardware.
+ *  -ETIMEDOUT:  Timeout occured waiting for a response from hardware.
  *  DSP_EFAIL:  Other, unspecified error.
  *  Requires:
  *  hDevContext != NULL;
@@ -211,7 +211,7 @@ typedef dsp_status(*fxn_brd_memunmap) (struct 
wmd_dev_context
  *  hDevContext:Handle to mini-driver defined device context.
  *  Returns:
  *  DSP_SOK:Success.
- *  WMD_E_TIMEOUT:  Timeout occured waiting for a response from hardware.
+ *  -ETIMEDOUT:  Timeout occured waiting for a response from hardware.
  *  DSP_EFAIL:  Other, unspecified error.
  *  Requires:
  *  hDevContext != NULL
@@ -253,7 +253,7 @@ typedef dsp_status(*fxn_brd_status) (struct wmd_dev_context 
*hDevContext,
  *  ulMemType:  Memory space on DSP from which to transfer.
  *  Returns:
  *  DSP_SOK:Success.
- *  WMD_E_TIMEOUT:  Timeout occured waiting for a response from hardware.
+ *  -ETIMEDOUT:  Timeout occured waiting for a response from hardware.
  *  DSP_EFAIL:  Other, unspecified error.
  *  Requires:
  *  hDevContext != NULL;
@@ -279,7 +279,7 @@ typedef dsp_status(*fxn_brd_read) (struct wmd_dev_context 
*hDevContext,
  *  ulMemType:  Memory space on DSP to which to transfer.
  *  Returns:
  *  DSP_SOK:Success.
- *  WMD_E_TIMEOUT:  Timeout occured waiting for a response from hardware.
+ *  -ETIMEDOUT:  Timeout occured waiting for a response from hardware.
  *  DSP_EFAIL:  Other, unspecified error.
  *  Requires:
  *  hDevContext != NULL;
diff --git a/drivers/dsp/bridge/wmd/tiomap3430.c 
b/drivers/dsp/bridge/wmd/tiomap3430.c
index b06b11d..16ce28d 100644
--- a/drivers/dsp/bridge/wmd/tiomap3430.c
+++ b/drivers/dsp/bridge/wmd/tiomap3430.c
@@ -722,7 +722,7 @@ static dsp_status bridge_brd_start(struct wmd_dev_context 
*hDevContext,
/* Wait for DSP to clear word in shared memory */
/* Read the Location */
if (!wait_for_start(dev_context, dw_sync_addr))
-   status = WMD_E_TIMEOUT;
+   status = -ETIMEDOUT;
 
status = dev_get_io_mgr(dev_context-hdev_obj, hio_mgr);
if (DSP_SUCCEEDED(status)) {
diff --git a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c 
b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
index 17f4e7d..6c4911d 100644
--- 

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

2010-03-25 Thread Hebbar, Shivananda
This RFC patch series tries to address the use of Linux standard error codes in 
dspbridge.

Here is the proposal.

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

Here are the details:

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

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

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

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

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

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

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

Shivananda Hebbar (19)

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

Shivananda Hebbar (1)

DSPBRIDGE: Cleanup- unused custom error codes

Shivananda Hebbar (1)

DSPBRIDGE: Cleanup- unused success codes


 arch/arm/plat-omap/include/dspbridge/_dcd.h |2 +-
 arch/arm/plat-omap/include/dspbridge/chnl.h |   10 +-
 arch/arm/plat-omap/include/dspbridge/cmm.h  |   28 ++--
 arch/arm/plat-omap/include/dspbridge/cod.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/dbdcd.h|   16 +-
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |   10 +-
 arch/arm/plat-omap/include/dspbridge/dev.h  |   36 ++--
 arch/arm/plat-omap/include/dspbridge/disp.h |   10 +-
 arch/arm/plat-omap/include/dspbridge/drv.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/errbase.h  |  198 ---
 arch/arm/plat-omap/include/dspbridge/io.h   |6 +-
 arch/arm/plat-omap/include/dspbridge/mgr.h  |8 +-
 arch/arm/plat-omap/include/dspbridge/nldrdefs.h |8 +-
 arch/arm/plat-omap/include/dspbridge/node.h |   86 +-
 arch/arm/plat-omap/include/dspbridge/nodepriv.h |8 +-
 arch/arm/plat-omap/include/dspbridge/ntfy.h |8 +-
 arch/arm/plat-omap/include/dspbridge/proc.h |   54 +++---
 arch/arm/plat-omap/include/dspbridge/pwr.h  |   10 +-
 arch/arm/plat-omap/include/dspbridge/rmm.h  |4 +-
 arch/arm/plat-omap/include/dspbridge/strm.h |   52 +++---
 arch/arm/plat-omap/include/dspbridge/sync.h |   26 ++--
 arch/arm/plat-omap/include/dspbridge/wmd.h  |   78 +-
 drivers/dsp/bridge/pmgr/chnl.c  |4 +-
 drivers/dsp/bridge/pmgr/cmm.c   |   34 ++--
 drivers/dsp/bridge/pmgr/cod.c   |   16 +-
 drivers/dsp/bridge/pmgr/dbll.c  |   24 ++--
 drivers/dsp/bridge/pmgr/dev.c   |   36 ++--
 drivers/dsp/bridge/pmgr/dmm.c   |   10 +-
 drivers/dsp/bridge/pmgr/wcd.c   |   86 +-
 drivers/dsp/bridge/rmgr/dbdcd.c |   24 ++--
 drivers/dsp/bridge/rmgr/disp.c  |8 +-
 drivers/dsp/bridge/rmgr/drv.c   |   14 +-
 drivers/dsp/bridge/rmgr/drv_interface.c |2 +-
 drivers/dsp/bridge/rmgr/mgr.c   |4 +-
 drivers/dsp/bridge/rmgr/nldr.c  |   30 ++--
 drivers/dsp/bridge/rmgr/node.c  |  112 +++---
 drivers/dsp/bridge/rmgr/proc.c  |   56 
 drivers/dsp/bridge/rmgr/pwr.c   |4 +-
 drivers/dsp/bridge/rmgr/rmm.c   |   14 +-
 

[RFC][PATCH 1/19] DSPBRIDGE: Cleanup custom error code (DSP_EALREADYCONNECTED -EISCONN)

2010-03-25 Thread Hebbar, Shivananda
From 8efca5b26980b94ed9caa812fa702477d4b78fc2 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 09:10:22 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_EALREADYCONNECTED 
-EISCONN)

This patch replaces DSP_EALREADYCONNECTED with EISCONN.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/rmgr/node.c |4 ++--
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index d43ff86..a2fa786 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -69,9 +69,6 @@
 /* The caller does not have access privileges to call this function */
 #define DSP_EACCESSDENIED   (DSP_EBASE + 0)
 
-/* The Specified Connection already exists */
-#define DSP_EALREADYCONNECTED   (DSP_EBASE + 1)
-
 /* The GPP must be detached from the DSP before this function is called */
 #define DSP_EATTACHED   (DSP_EBASE + 2)
 
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index c18539d..9535dfc 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -933,7 +933,7 @@ dsp_status node_connect(struct node_object *hNode1, u32 
uStream1,
(hNode1-create_args.asa.
  task_arg_obj.strm_out_def[uStream1]);
if (output-sz_device != NULL)
-   status = DSP_EALREADYCONNECTED;
+   status = EISCONN;
 
}
if (node2_type == NODE_TASK || node2_type == NODE_DAISSOCKET) {
@@ -941,7 +941,7 @@ dsp_status node_connect(struct node_object *hNode1, u32 
uStream1,
(hNode2-create_args.asa.
  task_arg_obj.strm_in_def[uStream2]);
if (input-sz_device != NULL)
-   status = DSP_EALREADYCONNECTED;
+   status = EISCONN;
 
}
}
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH 2/19] DSPBRIDGE: Cleanup custom error code (DSP_ECORRUPTFILE -EBADF)

2010-03-25 Thread Hebbar, Shivananda
From e7bc198d031784db9eae9cfbca1afac63e3b0453 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 09:27:38 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code(DSP_ECORRUPTFILE -EBADF)

This patch replaces DSP_ECORRUPTFILE with EBADF.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/rmgr/nldr.c |2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index a2fa786..81fc1b1 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -76,9 +76,6 @@
  * has occurred. */
 #define DSP_ECHANGEDURINGENUM   (DSP_EBASE + 3)
 
-/* An error occurred while parsing the DSP executable file */
-#define DSP_ECORRUPTFILE(DSP_EBASE + 4)
-
 /* A failure occurred during a delete operation */
 #define DSP_EDELETE (DSP_EBASE + 5)
 
diff --git a/drivers/dsp/bridge/rmgr/nldr.c b/drivers/dsp/bridge/rmgr/nldr.c
index c23deda..aa5b0c3 100644
--- a/drivers/dsp/bridge/rmgr/nldr.c
+++ b/drivers/dsp/bridge/rmgr/nldr.c
@@ -521,7 +521,7 @@ dsp_status nldr_create(OUT struct nldr_object **phNldr,
/* Parse memory segment data */
dload_segs = (u16) (*((u32 *) psz_coff_buf));
if (dload_segs  MAXMEMSEGS)
-   status = DSP_ECORRUPTFILE;
+   status = EBADF;
}
/* Parse dynamic load memory segments */
if (DSP_SUCCEEDED(status)  dload_segs  0) {
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH 3/19] DSPBRIDGE: Cleanup custom error code (DSP_EFILE -ENOENT)

2010-03-25 Thread Hebbar, Shivananda
From 26285ce4fad4381fc340a91cfb47dc1b22c376b1 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 09:32:41 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_EFILE -ENOENT)

This patch replaces error code DSP_EFILE with ENOENT.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 drivers/dsp/bridge/rmgr/proc.c |2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 81fc1b1..30d13f9 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -90,9 +90,6 @@
 /* A general failure occurred */
 #define DSP_EFAIL   (DSP_EBASE + 8)
 
-/* The specified executable file could not be found. */
-#define DSP_EFILE   (DSP_EBASE + 9)
-
 /* The specified handle is invalid. */
 #define DSP_EHANDLE (DSP_EBASE + 0xa)
 
diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c
index d664f96..b154102 100644
--- a/drivers/dsp/bridge/rmgr/proc.c
+++ b/drivers/dsp/bridge/rmgr/proc.c
@@ -239,7 +239,7 @@ static dsp_status get_exec_file(struct cfg_devnode 
*dev_node_obj,
return DSP_SOK;
}
}
-   return DSP_EFILE;
+   return ENOENT;
 }
 
 /*
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH 5/19] DSPBRIDGE: Cleanup custom error code (DSP_EINVALIDARG - EINVAL)

2010-03-25 Thread Hebbar, Shivananda
From abbca2b727ef2554790430b4c412902a6783267d Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 11:32:19 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_EINVALIDARG - 
EINVAL)

This patch replaces DSP_EINVALIDARG with EINVAL.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/_dcd.h|2 +-
 arch/arm/plat-omap/include/dspbridge/chnl.h|2 +-
 arch/arm/plat-omap/include/dspbridge/cmm.h |8 
 arch/arm/plat-omap/include/dspbridge/dev.h |2 +-
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/mgr.h |4 ++--
 arch/arm/plat-omap/include/dspbridge/pwr.h |2 +-
 arch/arm/plat-omap/include/dspbridge/sync.h|2 +-
 arch/arm/plat-omap/include/dspbridge/wmd.h |2 +-
 drivers/dsp/bridge/pmgr/chnl.c |2 +-
 drivers/dsp/bridge/pmgr/cmm.c  |4 ++--
 drivers/dsp/bridge/pmgr/cod.c  |2 +-
 drivers/dsp/bridge/pmgr/wcd.c  |   18 +-
 drivers/dsp/bridge/rmgr/dbdcd.c|2 +-
 drivers/dsp/bridge/rmgr/drv_interface.c|2 +-
 drivers/dsp/bridge/rmgr/mgr.c  |2 +-
 drivers/dsp/bridge/rmgr/node.c |2 +-
 drivers/dsp/bridge/rmgr/pwr.c  |4 ++--
 drivers/dsp/bridge/rmgr/strm.c |2 +-
 drivers/dsp/bridge/services/cfg.c  |4 ++--
 drivers/dsp/bridge/wmd/chnl_sm.c   |4 ++--
 drivers/dsp/bridge/wmd/tiomap3430.c|6 +++---
 drivers/dsp/bridge/wmd/tiomap3430_pwr.c|2 +-
 23 files changed, 40 insertions(+), 43 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/_dcd.h 
b/arch/arm/plat-omap/include/dspbridge/_dcd.h
index 1350feb..242774c 100644
--- a/arch/arm/plat-omap/include/dspbridge/_dcd.h
+++ b/arch/arm/plat-omap/include/dspbridge/_dcd.h
@@ -31,7 +31,7 @@
  *  args:   Argument structure.
  *  pResult:
  *  Returns:
- *  DSP_SOK if command called; DSP_EINVALIDARG if command not in IOCTL
+ *  DSP_SOK if command called; EINVAL if command not in IOCTL
  *  table.
  *  Requires:
  *  Ensures:
diff --git a/arch/arm/plat-omap/include/dspbridge/chnl.h 
b/arch/arm/plat-omap/include/dspbridge/chnl.h
index e70c90f..48e2aaf 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnl.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnl.h
@@ -61,7 +61,7 @@ extern dsp_status chnl_close(struct chnl_object *chnl_obj);
  *  Returns:
  *  DSP_SOK:Success;
  *  EFAULT:hdev_obj is invalid.
- *  DSP_EINVALIDARG:max_channels is 0.
+ *  EINVAL:max_channels is 0.
  *  DSP_EMEMORY:Insufficient memory for requested resources.
  *  CHNL_E_ISR: Unable to plug channel ISR for configured IRQ.
  *  CHNL_E_MAXCHANNELS: This manager cannot handle this many channels.
diff --git a/arch/arm/plat-omap/include/dspbridge/cmm.h 
b/arch/arm/plat-omap/include/dspbridge/cmm.h
index bc60035..5fc8f97 100644
--- a/arch/arm/plat-omap/include/dspbridge/cmm.h
+++ b/arch/arm/plat-omap/include/dspbridge/cmm.h
@@ -176,7 +176,7 @@ extern dsp_status cmm_get_handle(void *hprocessor,
  *  Returns:
  *  DSP_SOK:Success.
  *  EFAULT:Invalid handle.
- *  DSP_EINVALIDARG Invalid input argument.
+ *  EINVAL Invalid input argument.
  *  Requires:
  *  Ensures:
  *
@@ -214,7 +214,7 @@ extern bool cmm_init(void);
  *  Returns:
  *  DSP_SOK: Success.
  *  EFAULT: Invalid hcmm_mgr handle.
- *  DSP_EINVALIDARG: Invalid input argument.
+ *  EINVAL: Invalid input argument.
  *  DSP_EFAIL:   Unable to register.
  *  - On success *pulSegId is a valid SM segment ID.
  *  Requires:
@@ -245,7 +245,7 @@ extern dsp_status cmm_register_gppsm_seg(struct cmm_object 
*hcmm_mgr,
  *  Returns:
  *   DSP_SOK: Success.
  *   EFAULT: Invalid handle.
- *   DSP_EINVALIDARG: Invalid ul_seg_id.
+ *   EINVAL: Invalid ul_seg_id.
  *   DSP_EFAIL:   Unable to unregister for unknown reason.
  *  Requires:
  *  Ensures:
@@ -286,7 +286,7 @@ extern void *cmm_xlator_alloc_buf(struct cmm_xlatorobject 
*xlator,
  * pXlatorAttrs:   Translator attributes used for the client NODE or 
STREAM.
  *  Returns:
  * DSP_SOK:Success.
- * DSP_EINVALIDARG:Bad input Attrs.
+ * EINVAL:Bad input Attrs.
  * DSP_EMEMORY:   Insufficient memory(local) for requested resources.
  *  Requires:
  * phXlator != NULL
diff --git a/arch/arm/plat-omap/include/dspbridge/dev.h 
b/arch/arm/plat-omap/include/dspbridge/dev.h
index fdf15dc..26cf971 100644
--- a/arch/arm/plat-omap/include/dspbridge/dev.h
+++ b/arch/arm/plat-omap/include/dspbridge/dev.h
@@ -640,7 +640,7 @@ extern dsp_status dev_remove_proc_object(struct dev_object
  *  ulStatus:A 

[RFC][PATCH 10/19] DSPBRIDGE: Cleanup custom error code (DSP_EPOINTER - EFAULT)

2010-03-25 Thread Hebbar, Shivananda
From c4c2d2e82b5329c5fced3730c8b9ea7612bf861c Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 11:26:00 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_EPOINTER - EFAULT).

This patch replaces DSP_EPOINTER with EFAULT

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/wmd.h |8 
 drivers/dsp/bridge/pmgr/cmm.c  |2 +-
 drivers/dsp/bridge/pmgr/wcd.c  |   18 +-
 drivers/dsp/bridge/services/sync.c |2 +-
 drivers/dsp/bridge/wmd/chnl_sm.c   |   14 +++---
 drivers/dsp/bridge/wmd/io_sm.c |2 +-
 drivers/dsp/bridge/wmd/msg_sm.c|6 +++---
 8 files changed, 26 insertions(+), 29 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index aa848c8..da2900c 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -99,9 +99,6 @@
 /* I/O is currently pending. */
 #define DSP_EPENDING(DSP_EBASE + 0x11)
 
-/* An invalid pointer was specified. */
-#define DSP_EPOINTER(DSP_EBASE + 0x12)
-
 /* A parameter is specified outside its valid range. */
 #define DSP_ERANGE  (DSP_EBASE + 0x13)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h 
b/arch/arm/plat-omap/include/dspbridge/wmd.h
index 6fe5d3f..8624538 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmd.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmd.h
@@ -451,7 +451,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object 
*chnl_obj);
  *  Returns:
  *  DSP_SOK:Success;
  *  EFAULT:Invalid chnl_obj.
- *  DSP_EPOINTER:   pHostBuf is invalid.
+ *  EFAULT:   pHostBuf is invalid.
  *  CHNL_E_NOEOS:   User cannot mark EOS on an input channel.
  *  CHNL_E_CANCELLED: I/O has been cancelled on this channel.  No further
  *  I/O is allowed.
@@ -492,7 +492,7 @@ typedef dsp_status(*fxn_chnl_addioreq) (struct chnl_object
  *  Returns:
  *  DSP_SOK:Success.
  *  EFAULT:Invalid chnl_obj.
- *  DSP_EPOINTER:   pIOC is invalid.
+ *  EFAULT:   pIOC is invalid.
  *  CHNL_E_NOIOC:   CHNL_IOCNOWAIT was specified as the dwTimeOut parameter
  *  yet no I/O completions were queued.
  *  Requires:
@@ -556,7 +556,7 @@ typedef dsp_status(*fxn_chnl_flushio) (struct chnl_object 
*chnl_obj,
  *  Returns:
  *  DSP_SOK:Success;
  *  EFAULT:Invalid chnl_obj.
- *  DSP_EPOINTER:   pInfo == NULL.
+ *  EFAULT:   pInfo == NULL.
  *  Requires:
  *  Ensures:
  *  DSP_SOK:pInfo points to a filled in chnl_info struct,
@@ -576,7 +576,7 @@ typedef dsp_status(*fxn_chnl_getinfo) (struct chnl_object 
*chnl_obj,
  *  Returns:
  *  DSP_SOK:Success;
  *  EFAULT:Invalid hchnl_mgr.
- *  DSP_EPOINTER:   pMgrInfo == NULL.
+ *  EFAULT:   pMgrInfo == NULL.
  *  CHNL_E_BADCHANID:   Invalid channel ID.
  *  Requires:
  *  Ensures:
diff --git a/drivers/dsp/bridge/pmgr/cmm.c b/drivers/dsp/bridge/pmgr/cmm.c
index 84bec40..69fbf03 100644
--- a/drivers/dsp/bridge/pmgr/cmm.c
+++ b/drivers/dsp/bridge/pmgr/cmm.c
@@ -391,7 +391,7 @@ dsp_status cmm_free_buf(struct cmm_object *hcmm_mgr, void 
*buf_pa,
u32 ul_seg_id)
 {
struct cmm_object *cmm_mgr_obj = (struct cmm_object *)hcmm_mgr;
-   dsp_status status = DSP_EPOINTER;
+   dsp_status status = EFAULT;
struct cmm_mnode *mnode_obj = NULL;
struct cmm_allocator *allocator = NULL;
struct cmm_attrs *pattrs;
diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c
index d062d22..8b0aeea 100644
--- a/drivers/dsp/bridge/pmgr/wcd.c
+++ b/drivers/dsp/bridge/pmgr/wcd.c
@@ -174,12 +174,12 @@ static inline void _cp_fm_usr(void *to, const void __user 
* from,
return;
 
if (unlikely(!from)) {
-   *err = DSP_EPOINTER;
+   *err = EFAULT;
return;
}
 
if (unlikely(copy_from_user(to, from, bytes)))
-   *err = DSP_EPOINTER;
+   *err = EFAULT;
 }
 
 #define CP_FM_USR(to, from, err, n)\
@@ -192,12 +192,12 @@ static inline void _cp_to_usr(void __user *to, const void 
*from,
return;
 
if (unlikely(!to)) {
-   *err = DSP_EPOINTER;
+   *err = EFAULT;
return;
}
 
if (unlikely(copy_to_user(to, from, bytes)))
-   *err = DSP_EPOINTER;
+   *err = EFAULT;
 }
 
 #define CP_TO_USR(to, from, err, n)\
@@ -500,7 +500,7 @@ u32 mgrwrap_register_object(union Trapped_Args *args, void 
*pr_ctxt)

[RFC][PATCH 9/19] DSPBRIDGE: Cleanup custom error code (DSP_EFOPEN - EBADF)

2010-03-25 Thread Hebbar, Shivananda
From 05c56defce05af67fe61226960dca4bb02b89bdb Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 13:24:31 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_EFOPEN - EBADF).

This patch replaces DSP_EFOPEN with EBADF

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |2 +-
 arch/arm/plat-omap/include/dspbridge/errbase.h  |3 ---
 drivers/dsp/bridge/pmgr/dbll.c  |4 ++--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dblldefs.h 
b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
index 0ebdd6a..10b3e40 100644
--- a/arch/arm/plat-omap/include/dspbridge/dblldefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
@@ -385,7 +385,7 @@ typedef dsp_status(*dbll_load_sect_fxn) (struct 
dbll_library_obj *lib,
  *  Returns:
  *  DSP_SOK:Success.
  *  ENOMEM:Memory allocation failure.
- *  DSP_EFOPEN: File open failure.
+ *  EBADF: File open failure.
  *  DSP_EFREAD: File read failure.
  *  DSP_ECORRUPTFILE:   Unable to determine target type.
  *  Requires:
diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 09ae0c6..aa848c8 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -192,9 +192,6 @@
 /* Unable to find a named section in DSP executable */
 #define DSP_ENOSECT (DSP_EBASE + 0x32)
 
-/* Unable to open file */
-#define DSP_EFOPEN  (DSP_EBASE + 0x33)
-
 /* Unable to read file */
 #define DSP_EFREAD  (DSP_EBASE + 0x34)
 
diff --git a/drivers/dsp/bridge/pmgr/dbll.c b/drivers/dsp/bridge/pmgr/dbll.c
index 25b0c6e..5f0a9b9 100644
--- a/drivers/dsp/bridge/pmgr/dbll.c
+++ b/drivers/dsp/bridge/pmgr/dbll.c
@@ -915,10 +915,10 @@ static dsp_status dof_open(struct dbll_library_obj 
*zl_lib)
if (zl_lib-desc == NULL) {
(zl_lib-target_obj-attrs.fclose) (zl_lib-fp);
zl_lib-fp = NULL;
-   status = DSP_EFOPEN;
+   status = EBADF;
}
} else {
-   status = DSP_EFOPEN;
+   status = EBADF;
}
 
return status;
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH 11/19] DSPBRIDGE: Cleanup custom error code (DSP_ERANGE - EDOM)

2010-03-25 Thread Hebbar, Shivananda
From 97dbbf09aabd0dc94396ad15eeaa6871142ae290 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 11:31:43 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_ERANGE - EDOM)

This patch replaces DSP_ERANGE with EDOM.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/node.h|4 ++--
 arch/arm/plat-omap/include/dspbridge/strm.h|2 +-
 drivers/dsp/bridge/rmgr/node.c |4 ++--
 4 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index da2900c..1cc0101 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -99,9 +99,6 @@
 /* I/O is currently pending. */
 #define DSP_EPENDING(DSP_EBASE + 0x11)
 
-/* A parameter is specified outside its valid range. */
-#define DSP_ERANGE  (DSP_EBASE + 0x13)
-
 /* An invalid size parameter was specified. */
 #define DSP_ESIZE   (DSP_EBASE + 0x14)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index 77af26d..e2c5c94 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -42,7 +42,7 @@
  *  ENOMEM:Insufficient memory on GPP.
  *  DSP_EUUID:  Node UUID has not been registered.
  *  DSP_ESYMBOL:iAlg functions not found for a DAIS node.
- *  DSP_ERANGE: attr_in != NULL and attr_in-prio out of
+ *  EDOM: attr_in != NULL and attr_in-prio out of
  *  range.
  *  DSP_EFAIL:  A failure occured, unable to allocate node.
  *  DSP_EWRONGSTATE:Proccessor is not in the running state.
@@ -99,7 +99,7 @@ extern dsp_status node_alloc_msg_buf(struct node_object 
*hnode,
  *  Returns:
  *  DSP_SOK:Success.
  *  EFAULT:Invalid hnode.
- *  DSP_ERANGE: prio is out of range.
+ *  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,
  *  or NODE_RUNNING state.
diff --git a/arch/arm/plat-omap/include/dspbridge/strm.h 
b/arch/arm/plat-omap/include/dspbridge/strm.h
index d0026c7..609a6e7 100644
--- a/arch/arm/plat-omap/include/dspbridge/strm.h
+++ b/arch/arm/plat-omap/include/dspbridge/strm.h
@@ -363,7 +363,7 @@ extern dsp_status strm_register_notify(struct strm_object 
*hStrm,
  *  utimeout:   Timeout value (milliseconds).
  *  Returns:
  *  DSP_SOK:Success.
- *  DSP_ERANGE: nStrms out of range.
+ *  EDOM: nStrms out of range.
 
  *  EFAULT:Invalid stream handle in array.
  *  DSP_ETIMEOUT:   A timeout occurred before a stream became ready.
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index 49c6d17..6bc0e2e 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -374,7 +374,7 @@ dsp_status node_allocate(struct proc_object *hprocessor,
/* Check if attr_in-prio is within range */
if (attr_in-prio  hnode_mgr-min_pri ||
attr_in-prio  hnode_mgr-max_pri)
-   status = DSP_ERANGE;
+   status = EDOM;
}
}
/* Allocate node object and fill in */
@@ -785,7 +785,7 @@ dsp_status node_change_priority(struct node_object *hnode, 
s32 prio)
if (node_type != NODE_TASK  node_type != NODE_DAISSOCKET)
status = EPERM;
else if (prio  hnode_mgr-min_pri || prio  hnode_mgr-max_pri)
-   status = DSP_ERANGE;
+   status = EDOM;
}
if (DSP_FAILED(status))
goto func_end;
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH 8/19] DSPBRIDGE: Cleanup custom error code (DSP_ENOTIMPL - ENOSYS)

2010-03-25 Thread Hebbar, Shivananda
From 2010dcf45f5539f8b7603d327a9a22bb0aeeb972 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 12:19:38 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_ENOTIMPL - ENOSYS)

This patch replaces DSP_ENOTIMPL with ENOSYS

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/cod.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |4 ++--
 arch/arm/plat-omap/include/dspbridge/errbase.h  |3 ---
 arch/arm/plat-omap/include/dspbridge/node.h |2 +-
 arch/arm/plat-omap/include/dspbridge/proc.h |2 +-
 arch/arm/plat-omap/include/dspbridge/strm.h |2 +-
 arch/arm/plat-omap/include/dspbridge/wmd.h  |2 +-
 drivers/dsp/bridge/pmgr/cod.c   |2 +-
 drivers/dsp/bridge/pmgr/dbll.c  |4 ++--
 drivers/dsp/bridge/pmgr/dev.c   |6 +++---
 drivers/dsp/bridge/pmgr/wcd.c   |8 
 drivers/dsp/bridge/rmgr/node.c  |2 +-
 drivers/dsp/bridge/rmgr/proc.c  |2 +-
 drivers/dsp/bridge/rmgr/strm.c  |4 ++--
 drivers/dsp/bridge/services/ntfy.c  |4 ++--
 15 files changed, 23 insertions(+), 26 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cod.h 
b/arch/arm/plat-omap/include/dspbridge/cod.h
index 3d76a6b..78a70ef 100644
--- a/arch/arm/plat-omap/include/dspbridge/cod.h
+++ b/arch/arm/plat-omap/include/dspbridge/cod.h
@@ -87,7 +87,7 @@ extern void cod_close(struct cod_libraryobj *lib);
  *  DSP_SOK:Success.
  *  COD_E_NOZLFUNCTIONS:Could not initialize ZL functions.
  *  COD_E_ZLCREATEFAILED:   ZL_Create failed.
- *  DSP_ENOTIMPL:   attrs was not NULL.  We don't yet support
+ *  ENOSYS:   attrs was not NULL.  We don't yet support
  *  non default values of attrs.
  *  Requires:
  *  COD module initialized.
diff --git a/arch/arm/plat-omap/include/dspbridge/dblldefs.h 
b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
index b9ad305..0ebdd6a 100644
--- a/arch/arm/plat-omap/include/dspbridge/dblldefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
@@ -361,7 +361,7 @@ typedef dsp_status(*dbll_load_fxn) (struct dbll_library_obj 
*lib,
  *  DSP_SOK:Success.
  *  DSP_ENOSECT:Section not found.
  *  DSP_EFWRITE:Write function failed.
- *  DSP_ENOTIMPL:   Function not implemented.
+ *  ENOSYS:   Function not implemented.
  *  Requires:
  *  Valid lib.
  *  sectName != NULL.
@@ -466,7 +466,7 @@ typedef void (*dbll_unload_fxn) (struct dbll_library_obj 
*library,
  *  Returns:
  *  DSP_SOK:Success.
  *  DSP_ENOSECT:Named section not found.
- *  DSP_ENOTIMPL
+ *  ENOSYS
  *  Requires:
  *  DBL initialized.
  *  Valid lib.
diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 5b8d9e5..09ae0c6 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -96,9 +96,6 @@
 /* No more connections can be made for this node. */
 #define DSP_ENOMORECONNECTIONS  (DSP_EBASE + 0xf)
 
-/* The indicated operation is not supported. */
-#define DSP_ENOTIMPL(DSP_EBASE + 0x10)
-
 /* I/O is currently pending. */
 #define DSP_EPENDING(DSP_EBASE + 0x11)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index 6bde825..77af26d 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -493,7 +493,7 @@ extern dsp_status node_put_message(struct node_object 
*hnode,
  *  EFAULT:Invalid hnode.
  *  ENOMEM:Insufficient memory on GPP.
  *  DSP_EVALUE: event_mask is invalid.
- *  DSP_ENOTIMPL:   Notification type specified by notify_type is not
+ *  ENOSYS:   Notification type specified by notify_type is not
  *  supported.
  *  Requires:
  *  node_init(void) called.
diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h 
b/arch/arm/plat-omap/include/dspbridge/proc.h
index fa748fe..09a7fdf 100644
--- a/arch/arm/plat-omap/include/dspbridge/proc.h
+++ b/arch/arm/plat-omap/include/dspbridge/proc.h
@@ -184,7 +184,7 @@ extern dsp_status proc_enum_nodes(void *hprocessor,
  *  Ensures:
  *  Details:
  *  This function currently returns
- *  DSP_ENOTIMPL, and does not write any data to the resource_info struct.
+ *  ENOSYS, and does not write any data to the resource_info struct.
  */
 extern dsp_status proc_get_resource_info(void *hprocessor,
 u32 resource_type,
diff --git a/arch/arm/plat-omap/include/dspbridge/strm.h 
b/arch/arm/plat-omap/include/dspbridge/strm.h
index c36a9ef..d0026c7 100644
--- a/arch/arm/plat-omap/include/dspbridge/strm.h
+++ 

[RFC][PATCH 7/19] DSPBRIDGE: Cleanup custom error code (DSP_ENODETYPE - EPERM)

2010-03-25 Thread Hebbar, Shivananda
From 6bb5942655ec4fd4a3f389da358b5a7096fba630 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 23 Mar 2010 12:02:46 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (DSP_ENODETYPE - EPERM).

This patch replaces DSP_ENODETYPE with EPERM

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h  |3 ---
 arch/arm/plat-omap/include/dspbridge/node.h |   12 ++--
 arch/arm/plat-omap/include/dspbridge/nodepriv.h |2 +-
 arch/arm/plat-omap/include/dspbridge/strm.h |2 +-
 drivers/dsp/bridge/rmgr/node.c  |   16 
 drivers/dsp/bridge/wmd/msg_sm.c |2 +-
 6 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 2ba76d4..5b8d9e5 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -90,9 +90,6 @@
 /* A general failure occurred */
 #define DSP_EFAIL   (DSP_EBASE + 8)
 
-/* The requested operation is invalid for this node type. */
-#define DSP_ENODETYPE   (DSP_EBASE + 0xd)
-
 /* No error text was found for the specified error code. */
 #define DSP_ENOERRTEXT  (DSP_EBASE + 0xe)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index 4f5f356..6bde825 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -100,7 +100,7 @@ extern dsp_status node_alloc_msg_buf(struct node_object 
*hnode,
  *  DSP_SOK:Success.
  *  EFAULT:Invalid hnode.
  *  DSP_ERANGE: prio is out of range.
- *  DSP_ENODETYPE:  The specified node is not a task node.
+ *  EPERM:  The specified node is not a task node.
  *  DSP_EWRONGSTATE:Node is not in the NODE_ALLOCATED, NODE_PAUSED,
  *  or NODE_RUNNING state.
  *  DSP_ETIMEOUT:   A timeout occurred before the DSP responded.
@@ -382,7 +382,7 @@ extern dsp_status node_get_attr(struct node_object *hnode,
  *  Returns:
  *  DSP_SOK:Success.
  *  EFAULT:Invalid hnode.
- *  DSP_ENODETYPE:  Cannot retrieve messages from this type of node.
+ *  EPERM:  Cannot retrieve messages from this type of node.
  *  DSP_ETIMEOUT:   Timeout occurred and no message is available.
  *  DSP_EFAIL:  Error occurred while trying to retrieve a message.
  *  Requires:
@@ -443,7 +443,7 @@ void node_on_exit(struct node_object *hnode, s32 nStatus);
  *  Returns:
  *  DSP_SOK:Success.
  *  EFAULT:Invalid hnode.
- *  DSP_ENODETYPE:  Node is not a task or socket node.
+ *  EPERM:  Node is not a task or socket node.
  *  DSP_ETIMEOUT:   A timeout occurred before the DSP responded.
  *  DSP_EWRONGSTSATE:   Node is not in NODE_RUNNING state.
  *  DSP_EFAIL:  Failed to pause node.
@@ -467,7 +467,7 @@ extern dsp_status node_pause(struct node_object *hnode);
  *  Returns:
  *  DSP_SOK:Success.
  *  EFAULT:Invalid hnode.
- *  DSP_ENODETYPE:  Messages can't be sent to this type of node.
+ *  EPERM:  Messages can't be sent to this type of node.
  *  DSP_ETIMEOUT:   Timeout occurred before message could be set.
  *  DSP_EWRONGSTATE:Node is in invalid state for sending messages.
  *  DSP_EFAIL:  Unable to send message.
@@ -517,7 +517,7 @@ extern dsp_status node_register_notify(struct node_object 
*hnode,
  *  Returns:
  *  DSP_SOK:Success.
  *  EFAULT:Invalid hnode.
- *  DSP_ENODETYPE:  hnode doesn't represent a message, task or dais
+ *  EPERM:  hnode doesn't represent a message, task or dais
  *  socket node.
  *  DSP_ETIMEOUT:   A timeout occurred before the DSP responded.
  *  DSP_EWRONGSTSATE:   Node is not in NODE_PAUSED or NODE_CREATED state.
@@ -543,7 +543,7 @@ extern dsp_status node_run(struct node_object *hnode);
  *  DSP_SOK:Success.
  *  EFAULT:Invalid hnode.
  *  DSP_ETIMEOUT:   A timeout occurred before the DSP responded.
- *  DSP_ENODETYPE:  Type of node specified cannot be terminated.
+ *  EPERM:  Type of node specified cannot be terminated.
  *  DSP_EWRONGSTATE:Operation not valid for the current node state.
  *  DSP_EFAIL:  Unable to terminate the node.
  *  Requires:
diff --git a/arch/arm/plat-omap/include/dspbridge/nodepriv.h 
b/arch/arm/plat-omap/include/dspbridge/nodepriv.h
index a0108e9..efff651 100644
--- a/arch/arm/plat-omap/include/dspbridge/nodepriv.h
+++ b/arch/arm/plat-omap/include/dspbridge/nodepriv.h
@@ -92,7 +92,7 @@ struct node_createargs {
  *  Returns:
  *  DSP_SOK:Success.
  *  EFAULT:Invalid hnode.
- * 

[RFC][PATCH 12/19] DSPBRIDGE: Cleanup custom error code (DSP_ESIZE - EINVAL)

2010-03-25 Thread Hebbar, Shivananda
From c423abda17246b08b64ff4489a50c68697c63714 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 11:44:03 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code(DSP_ESIZE - EINVAL).

This patch replaces DSP_ESIZE with EINVAL.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/node.h|6 +++---
 arch/arm/plat-omap/include/dspbridge/proc.h|2 +-
 arch/arm/plat-omap/include/dspbridge/strm.h|4 ++--
 drivers/dsp/bridge/pmgr/wcd.c  |   18 +-
 drivers/dsp/bridge/rmgr/node.c |2 +-
 drivers/dsp/bridge/rmgr/proc.c |2 +-
 drivers/dsp/bridge/rmgr/strm.c |4 ++--
 drivers/dsp/bridge/services/cfg.c  |2 +-
 9 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 1cc0101..87667a6 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -99,9 +99,6 @@
 /* I/O is currently pending. */
 #define DSP_EPENDING(DSP_EBASE + 0x11)
 
-/* An invalid size parameter was specified. */
-#define DSP_ESIZE   (DSP_EBASE + 0x14)
-
 /* A stream creation failure occurred on the DSP. */
 #define DSP_ESTREAM (DSP_EBASE + 0x15)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index e2c5c94..aff4493 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -79,7 +79,7 @@ extern dsp_status node_allocate(struct proc_object 
*hprocessor,
  *  EFAULT:Invalid node handle.
  *  ENOMEM:Insufficent memory.
  *  DSP_EFAIL:  General Failure.
- *  DSP_ESIZE:  Invalid Size.
+ *  EINVAL:  Invalid Size.
  *  Requires:
  *  node_init(void) called.
  *  pbuffer != NULL.
@@ -292,14 +292,14 @@ extern dsp_status node_delete_mgr(struct node_mgr 
*hnode_mgr);
  *  pu_allocated:Location to write total number of allocated nodes.
  *  Returns:
  *  DSP_SOK:Success.
- *  DSP_ESIZE:  node_tab is too small to hold all node handles.
+ *  EINVAL:  node_tab is too small to hold all node handles.
  *  Requires:
  *  Valid hnode_mgr.
  *  node_tab != NULL || node_tab_size == 0.
  *  pu_num_nodes != NULL.
  *  pu_allocated != NULL.
  *  Ensures:
- *  - (DSP_ESIZE  *pu_num_nodes == 0)
+ *  - (EINVAL  *pu_num_nodes == 0)
  *  - || (DSP_SOK  *pu_num_nodes = node_tab_size)  
  *(*pu_allocated == *pu_num_nodes)
  */
diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h 
b/arch/arm/plat-omap/include/dspbridge/proc.h
index 09a7fdf..307f1fd 100644
--- a/arch/arm/plat-omap/include/dspbridge/proc.h
+++ b/arch/arm/plat-omap/include/dspbridge/proc.h
@@ -138,7 +138,7 @@ extern dsp_status proc_detach(struct process_context 
*pr_ctxt);
  *  Returns:
  *  DSP_SOK :   Success.
  *  EFAULT :   Invalid processor handle.
- *  DSP_ESIZE   :   The amount of memory allocated for node_tab is
+ *  EINVAL   :   The amount of memory allocated for node_tab is
  *   insufficent. That is the number of nodes actually
  *   allocated on the DSP is greater than the value
  *   specified for node_tab_size.
diff --git a/arch/arm/plat-omap/include/dspbridge/strm.h 
b/arch/arm/plat-omap/include/dspbridge/strm.h
index 609a6e7..c598366 100644
--- a/arch/arm/plat-omap/include/dspbridge/strm.h
+++ b/arch/arm/plat-omap/include/dspbridge/strm.h
@@ -38,7 +38,7 @@
  *  EFAULT:Invalid hStrm.
  *  ENOMEM:Insufficient memory.
  *  DSP_EFAIL:  Failure occurred, unable to allocate buffers.
- *  DSP_ESIZE:  usize must be  0 bytes.
+ *  EINVAL:  usize must be  0 bytes.
  *  Requires:
  *  strm_init(void) called.
  *  ap_buffer != NULL.
@@ -172,7 +172,7 @@ extern dsp_status strm_get_event_handle(struct strm_object 
*hStrm,
  *  Returns:
  *  DSP_SOK:Success.
  *  EFAULT:Invalid hStrm.
- *  DSP_ESIZE:  stream_info_size  sizeof(dsp_streaminfo).
+ *  EINVAL:  stream_info_size  sizeof(dsp_streaminfo).
  *  DSP_EFAIL:  Unable to get stream info.
  *  Requires:
  *  strm_init(void) called.
diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c
index 8b0aeea..a2b0255 100644
--- a/drivers/dsp/bridge/pmgr/wcd.c
+++ b/drivers/dsp/bridge/pmgr/wcd.c
@@ -420,7 +420,7 @@ u32 mgrwrap_enum_node_info(union Trapped_Args *args, void 
*pr_ctxt)
u32 size = args-args_mgr_enumnode_info.undb_props_size;
 
if (size  sizeof(struct dsp_ndbprops))
-   return DSP_ESIZE;
+   return EINVAL;
 
pndb_props = 

[RFC][PATCH 18/19] DSPBRIDGE: Cleanup custom error code (CHNL_E_CANCELLED - ECANCELED)

2010-03-25 Thread Hebbar, Shivananda
From ba0442c11ea834ad6b2323051c22c4964ad52a0b Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 13:05:18 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code(CHNL_E_CANCELLED - 
ECANCELED)

This patch replaces CHNL_E_CANCELLED with ECANCELED.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/wmd.h |2 +-
 drivers/dsp/bridge/wmd/chnl_sm.c   |2 +-
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 51e9407..3524a33 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -300,9 +300,6 @@
  * queued. */
 #define CHNL_E_NOIOC(CHNL_EBASE + 0x06)
 
-/* I/O has been cancelled on this channel. */
-#define CHNL_E_CANCELLED(CHNL_EBASE + 0x07)
-
 /* End of stream was already requested on this output channel. */
 #define CHNL_E_EOS  (CHNL_EBASE + 0x09)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h 
b/arch/arm/plat-omap/include/dspbridge/wmd.h
index d743063..7f339dd 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmd.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmd.h
@@ -453,7 +453,7 @@ typedef dsp_status(*fxn_chnl_close) (struct chnl_object 
*chnl_obj);
  *  EFAULT:Invalid chnl_obj.
  *  EFAULT:   pHostBuf is invalid.
  *  CHNL_E_NOEOS:   User cannot mark EOS on an input channel.
- *  CHNL_E_CANCELLED: I/O has been cancelled on this channel.  No further
+ *  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
  *  IORequest on this channel.  No further I/O is expected.
diff --git a/drivers/dsp/bridge/wmd/chnl_sm.c b/drivers/dsp/bridge/wmd/chnl_sm.c
index b926779..9c4dada 100644
--- a/drivers/dsp/bridge/wmd/chnl_sm.c
+++ b/drivers/dsp/bridge/wmd/chnl_sm.c
@@ -123,7 +123,7 @@ dsp_status bridge_chnl_add_io_req(struct chnl_object 
*chnl_obj, void *pHostBuf,
dw_state = pchnl-dw_state;
if (dw_state != CHNL_STATEREADY) {
if (dw_state  CHNL_STATECANCEL)
-   status = CHNL_E_CANCELLED;
+   status = ECANCELED;
else if ((dw_state  CHNL_STATEEOS) 
 CHNL_IS_OUTPUT(pchnl-chnl_mode))
status = CHNL_E_EOS;
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH 17/19] DSPBRIDGE: Cleanup custom error code (CHNL_E_CHANBUSY - EALREADY)

2010-03-25 Thread Hebbar, Shivananda
From c1e9ac00a68f40da3712b3a907a3b46e23df923e Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 13:00:15 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (CHNL_E_CHANBUSY - 
EALREADY).

This patch replaces CHNL_E_CHANBUSY with EALREADY.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/wmd.h |2 +-
 drivers/dsp/bridge/rmgr/strm.c |2 +-
 drivers/dsp/bridge/wmd/chnl_sm.c   |2 +-
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index e564284..51e9407 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -293,9 +293,6 @@
 /* Channel ID is out of range. */
 #define CHNL_E_BADCHANID(CHNL_EBASE + 0x03)
 
-/* Channel is already in use. */
-#define CHNL_E_CHANBUSY (CHNL_EBASE + 0x04)
-
 /* Invalid channel mode argument. */
 #define CHNL_E_BADMODE  (CHNL_EBASE + 0x05)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h 
b/arch/arm/plat-omap/include/dspbridge/wmd.h
index 0cee536..d743063 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmd.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmd.h
@@ -394,7 +394,7 @@ typedef void (*fxn_deh_notify) (struct deh_mgr *hdeh_mgr,
  *  EINVAL:Invalid number of IOReqs.
  *  CHNL_E_OUTOFSTREAMS:No free channels available.
  *  CHNL_E_BADCHANID:   Channel ID is out of range.
- *  CHNL_E_CHANBUSY:Channel is in use.
+ *  EALREADY:Channel is in use.
  *  CHNL_E_NOIORPS: No free IO request packets available for
  *  queuing.
  *  Requires:
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index 274d387..003df3d 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -596,7 +596,7 @@ func_cont:
 */
DBC_ASSERT(status == CHNL_E_OUTOFSTREAMS ||
   status == CHNL_E_BADCHANID ||
-  status == CHNL_E_CHANBUSY ||
+  status == EALREADY ||
   status == CHNL_E_NOIORPS);
status = DSP_EFAIL;
}
diff --git a/drivers/dsp/bridge/wmd/chnl_sm.c b/drivers/dsp/bridge/wmd/chnl_sm.c
index 7bcaaac..b926779 100644
--- a/drivers/dsp/bridge/wmd/chnl_sm.c
+++ b/drivers/dsp/bridge/wmd/chnl_sm.c
@@ -811,7 +811,7 @@ dsp_status bridge_chnl_open(OUT struct chnl_object **phChnl,
status = CHNL_E_BADCHANID;
else if (chnl_mgr_obj-ap_channel[uChnlId] !=
 NULL)
-   status = CHNL_E_CHANBUSY;
+   status = EALREADY;
} else {
/* Check for free channel */
status =
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC][PATCH] DSPBRIDGE: Cleanup unused custom error codes

2010-03-25 Thread Hebbar, Shivananda
From cd86b1a92364ab19d24463a3cce9d593afbb069c Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 14:03:48 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup unused custom error codes

This patch removes unused DSPBRIDGE error codes.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |  128 
 1 files changed, 0 insertions(+), 128 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index a9ecb71..d60a179 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -66,19 +66,10 @@
 
 /* FAILURE Codes */
 
-/* The caller does not have access privileges to call this function */
-#define DSP_EACCESSDENIED   (DSP_EBASE + 0)
-
-/* The GPP must be detached from the DSP before this function is called */
-#define DSP_EATTACHED   (DSP_EBASE + 2)
-
 /* During enumeration a change in the number or properties of the objects
  * has occurred. */
 #define DSP_ECHANGEDURINGENUM   (DSP_EBASE + 3)
 
-/* A failure occurred during a delete operation */
-#define DSP_EDELETE (DSP_EBASE + 5)
-
 /* The specified direction is invalid */
 #define DSP_EDIRECTION  (DSP_EBASE + 6)
 
@@ -90,26 +81,15 @@
 /* A general failure occurred */
 #define DSP_EFAIL   (DSP_EBASE + 8)
 
-/* No error text was found for the specified error code. */
-#define DSP_ENOERRTEXT  (DSP_EBASE + 0xe)
-
 /* No more connections can be made for this node. */
 #define DSP_ENOMORECONNECTIONS  (DSP_EBASE + 0xf)
 
 /* I/O is currently pending. */
 #define DSP_EPENDING(DSP_EBASE + 0x11)
 
-/* A stream creation failure occurred on the DSP. */
-#define DSP_ESTREAM (DSP_EBASE + 0x15)
-
 /* A task creation failure occurred on the DSP. */
 #define DSP_ETASK   (DSP_EBASE + 0x16)
 
-/* A data truncation occurred, e.g., when requesting a descriptive error
- * string, not enough space was allocated for the complete error message. */
-
-#define DSP_ETRUNCATED  (DSP_EBASE + 0x18)
-
 /* The state of the specified object is incorrect for the requested
  * operation. */
 #define DSP_EWRONGSTATE (DSP_EBASE + 0x1b)
@@ -142,34 +122,13 @@
  * section. */
 #define DSP_EDCDNOAUTOREGISTER  (DSP_EBASE + 0x22)
 
-/* A requested resource is not available. */
-#define DSP_ERESOURCE   (DSP_EBASE + 0x28)
-
-/* A critical error has occurred, and the DSP is being re-started. */
-#define DSP_ERESTART(DSP_EBASE + 0x29)
-
-/* A DSP memory free operation failed. */
-#define DSP_EFREE   (DSP_EBASE + 0x2a)
-
-/* A DSP I/O free operation failed. */
-#define DSP_EIOFREE (DSP_EBASE + 0x2b)
-
-/* Multiple instances are not allowed. */
-#define DSP_EMULINST(DSP_EBASE + 0x2c)
-
 /* A specified entity was not found. */
 #define DSP_ENOTFOUND   (DSP_EBASE + 0x2d)
 
-/* A DSP I/O resource is not available. */
-#define DSP_EOUTOFIO(DSP_EBASE + 0x2e)
-
 /* 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)
 
-/* File or section load write function failed to write to DSP */
-#define DSP_EFWRITE (DSP_EBASE + 0x31)
-
 /* Unable to find a named section in DSP executable */
 #define DSP_ENOSECT (DSP_EBASE + 0x32)
 
@@ -215,24 +174,6 @@
 #define DSP_EUSER15 (DSP_EBASE + 0x4e)
 #define DSP_EUSER16 (DSP_EBASE + 0x4f)
 
-/* FAILURE Codes : DEV */
-#define DEV_EBASE   (DSP_COMP_EBASE + 0x000)
-
-/* The mini-driver expected a newer version of the class driver. */
-#define DEV_E_NEWWMD(DEV_EBASE + 0x00)
-
-/* bridge_drv_entry function returned a NULL function interface table. */
-#define DEV_E_NULLWMDINTF   (DEV_EBASE + 0x01)
-
-/* FAILURE Codes : LDR */
-#define LDR_EBASE   (DSP_COMP_EBASE + 0x100)
-
-/* Insufficient memory to export class driver services. */
-#define LDR_E_NOMEMORY  (LDR_EBASE + 0x00)
-
-/* Unable to find WMD file in system directory. */
-#define LDR_E_FILEUNABLETOOPEN  (LDR_EBASE + 0x01)
-
 /* FAILURE Codes : CFG */
 #define CFG_EBASE   (DSP_COMP_EBASE + 0x200)
 
@@ -245,15 +186,6 @@
 /* Unable to retrieve resource information from the registry. */
 #define CFG_E_RESOURCENOTAVAIL  (CFG_EBASE + 0x02)
 
-/* Unable to find board name key in registry. */
-#define CFG_E_INVALIDBOARDNAME  (CFG_EBASE + 0x03)
-
-/* Unable to find a device node in registry with given unit number. */
-#define CFG_E_INVALIDUNITNUM(CFG_EBASE + 0x04)
-
-/* Insufficient buffer size */
-#define CFG_E_INSUFFICIENTBUFSIZE   (CFG_EBASE + 0x05)
-
 /* FAILURE 

[RFC][PATCH 19/19] DSPBRIDGE: Cleanup custom error code (WMD_E_TIMEOUT - ETIMEDOUT)

2010-03-25 Thread Hebbar, Shivananda
From a80fb3467de1367e4a7ce143d744abc807f7dc61 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 13:12:12 -0600
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code(WMD_E_TIMEOUT - 
ETIMEDOUT)

This patch replaces WMD_E_TIMEOUT with ETIMEDOUT.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |3 ---
 arch/arm/plat-omap/include/dspbridge/wmd.h |   12 ++--
 drivers/dsp/bridge/wmd/tiomap3430.c|2 +-
 drivers/dsp/bridge/wmd/tiomap3430_pwr.c|4 ++--
 4 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 3524a33..a9ecb71 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -370,9 +370,6 @@
 /* One or more configuration parameters violated WMD hardware assumptions. */
 #define WMD_E_BADCONFIG (WMD_EBASE + 0x01)
 
-/* Timeout occurred waiting for a response from the hardware. */
-#define WMD_E_TIMEOUT   (WMD_EBASE + 0x02)
-
 /* FAILURE Codes : REG */
 #define REG_EBASE   (DSP_COMP_EBASE + 0x800)
 
diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h 
b/arch/arm/plat-omap/include/dspbridge/wmd.h
index 7f339dd..ba98da8 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmd.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmd.h
@@ -59,7 +59,7 @@ struct wmd_dev_context;
  *  Returns:
  *  DSP_SOK:Success.
  *  WMD_E_HARDWARE: A test of hardware assumptions/integrity failed.
- *  WMD_E_TIMEOUT:  Timeout occured waiting for a response from hardware.
+ *  ETIMEOUT:  Timeout occured waiting for a response from hardware.
  *  DSP_EFAIL:  Other, unspecified error.
  *  Requires:
  *  hDevContext != NULL
@@ -98,7 +98,7 @@ typedef dsp_status(*fxn_brd_setstate) (struct wmd_dev_context
  *  dwDSPAddr:  DSP address at which to start execution.
  *  Returns:
  *  DSP_SOK:Success.
- *  WMD_E_TIMEOUT:  Timeout occured waiting for a response from hardware.
+ *  ETIMEOUT:  Timeout occured waiting for a response from hardware.
  *  DSP_EFAIL:  Other, unspecified error.
  *  Requires:
  *  hDevContext != NULL
@@ -149,7 +149,7 @@ typedef dsp_status(*fxn_brd_memcopy) (struct wmd_dev_context
  *  ulMemType:  Memory space on DSP to which to transfer.
  *  Returns:
  *  DSP_SOK:Success.
- *  WMD_E_TIMEOUT:  Timeout occured waiting for a response from hardware.
+ *  ETIMEOUT:  Timeout occured waiting for a response from hardware.
  *  DSP_EFAIL:  Other, unspecified error.
  *  Requires:
  *  hDevContext != NULL;
@@ -211,7 +211,7 @@ typedef dsp_status(*fxn_brd_memunmap) (struct 
wmd_dev_context
  *  hDevContext:Handle to mini-driver defined device context.
  *  Returns:
  *  DSP_SOK:Success.
- *  WMD_E_TIMEOUT:  Timeout occured waiting for a response from hardware.
+ *  ETIMEOUT:  Timeout occured waiting for a response from hardware.
  *  DSP_EFAIL:  Other, unspecified error.
  *  Requires:
  *  hDevContext != NULL
@@ -253,7 +253,7 @@ typedef dsp_status(*fxn_brd_status) (struct wmd_dev_context 
*hDevContext,
  *  ulMemType:  Memory space on DSP from which to transfer.
  *  Returns:
  *  DSP_SOK:Success.
- *  WMD_E_TIMEOUT:  Timeout occured waiting for a response from hardware.
+ *  ETIMEOUT:  Timeout occured waiting for a response from hardware.
  *  DSP_EFAIL:  Other, unspecified error.
  *  Requires:
  *  hDevContext != NULL;
@@ -279,7 +279,7 @@ typedef dsp_status(*fxn_brd_read) (struct wmd_dev_context 
*hDevContext,
  *  ulMemType:  Memory space on DSP to which to transfer.
  *  Returns:
  *  DSP_SOK:Success.
- *  WMD_E_TIMEOUT:  Timeout occured waiting for a response from hardware.
+ *  ETIMEOUT:  Timeout occured waiting for a response from hardware.
  *  DSP_EFAIL:  Other, unspecified error.
  *  Requires:
  *  hDevContext != NULL;
diff --git a/drivers/dsp/bridge/wmd/tiomap3430.c 
b/drivers/dsp/bridge/wmd/tiomap3430.c
index 647643d..899df1a 100644
--- a/drivers/dsp/bridge/wmd/tiomap3430.c
+++ b/drivers/dsp/bridge/wmd/tiomap3430.c
@@ -722,7 +722,7 @@ static dsp_status bridge_brd_start(struct wmd_dev_context 
*hDevContext,
/* Wait for DSP to clear word in shared memory */
/* Read the Location */
if (!wait_for_start(dev_context, dw_sync_addr))
-   status = WMD_E_TIMEOUT;
+   status = ETIMEDOUT;
 
status = dev_get_io_mgr(dev_context-hdev_obj, hio_mgr);
if (DSP_SUCCEEDED(status)) {
diff --git a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c 
b/drivers/dsp/bridge/wmd/tiomap3430_pwr.c
index 48dbeae..f515cae 100644
--- a/drivers/dsp/bridge/wmd/tiomap3430_pwr.c

[RFC][PATCH]DSPBRIDGE:Cleanup unused success codes

2010-03-25 Thread Hebbar, Shivananda
From 6ee4200fd19d0a2a41ad90df2af015c2d08438a7 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Wed, 24 Mar 2010 15:54:33 -0600
Subject: [PATCH] DSPBRIDGE: Remove unused success codes.

This patch removes unused success codes.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/errbase.h |   12 
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index d60a179..90059bc 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -46,24 +46,12 @@
 /* The DSP is already asleep. */
 #define DSP_SALREADYASLEEP  (DSP_SBASE + 3)
 
-/* The DSP is already awake. */
-#define DSP_SALREADYAWAKE   (DSP_SBASE + 4)
-
-/* TRUE */
-#define DSP_STRUE   (DSP_SBASE + 5)
-
-/* FALSE */
-#define DSP_SFALSE  (DSP_SBASE + 6)
-
 /* A library contains no dependent library references */
 #define DSP_SNODEPENDENTLIBS(DSP_SBASE + 7)
 
 /* A persistent library is already loaded by the dynamic loader */
 #define DSP_SALREADYLOADED  (DSP_SBASE + 8)
 
-/* Some error occured, but it is OK to continue */
-#define DSP_OKTO_CONTINUE  (DSP_SBASE + 9)
-
 /* FAILURE Codes */
 
 /* During enumeration a change in the number or properties of the objects
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2010-03-25 Thread Hebbar, Shivananda

 -Original Message-
 From: Menon, Nishanth
 Sent: Thursday, March 25, 2010 3:58 PM
 To: Hebbar, Shivananda
 Cc: linux-omap@vger.kernel.org; Ramirez Luna, Omar; Felipe Contreras;
 Palande Ameya (Nokia-D/Helsinki)
 Subject: Re: [RFC][PATCH 0/19] Cleanup- custom error codes
 
 Hebbar, Shivananda had written, on 03/25/2010 03:06 PM, the following:
  This RFC patch series tries to address the use of Linux standard error
 codes in dspbridge.
 
  1. 41 error codes are not currently used in bridge. Hence they can be
 removed.
 
 
  2. 19 error codes are mapped to Linux standard error codes. Patches 1 to
 19 contains these changes.
 
  3. 7 error codes are used as base address to access the rest of error
 codes which can be removed. Some base addresses are removed as part of 1
 but some are still kept as point 4 has dependency on these addresses.
  Ex: (Removed base address)
  /* FAILURE Codes: LDR */
  #define LDR_EBASE   (DSP_COMP_EBASE + 0x100)
 
  /* Insufficient memory to export class driver services. */
  #define LDR_E_NOMEMORY  (LDR_EBASE + 0x00)
 
  /* Unable to find WMD file in system directory. */
  #define LDR_E_FILEUNABLETOOPEN  (LDR_EBASE + 0x01)
 
  4. For 46 error codes, couldn't find an exact match in Linux error code.
 This still needs to be worked out. This is not addressed in this patch
 series. (See attached text file for details)
 lets keep this for stage 2 cleanup.
 
  As for as OMX components concerned, they really don't care about the
 specific error codes. Hence no changes required for the OMX code.
 
  Shivananda Hebbar (19)
 
  DSPBRIDGE: Cleanup custom error code (DSP_EALREADYCONNECTED -EISCONN)
 DSPBRIDGE: Cleanup custom error code (DSP_ECORRUPTFILE -EBADF)
  DSPBRIDGE: Cleanup custom error code (DSP_EFILE -ENOENT)
  DSPBRIDGE: Cleanup custom error code (DSP_EHANDLE - EFAULT)
  DSPBRIDGE: Cleanup custom error code (DSP_EINVALIDARG - EINVAL)
  DSPBRIDGE: Cleanup custom error code (DSP_ENOMEM - ENOMEM)
  DSPBRIDGE: Cleanup custom error code (DSP_ENODETYPE - EPERM)
  DSPBRIDGE: Cleanup custom error code (DSP_ENOTIMPL - ENOSYS)
  DSPBRIDGE: Cleanup custom error code (DSP_EFOPEN - EBADF)
  DSPBRIDGE: Cleanup custom error code (DSP_EPOINTER - EFAULT)
  DSPBRIDGE: Cleanup custom error code (DSP_ERANGE - EDOM)
  DSPBRIDGE: Cleanup custom error code (DSP_ESIZE - EINVAL)
  DSPBRIDGE: Cleanup custom error code (DSP_ETIMEOUT - ETIME)
  DSPBRIDGE: Cleanup custom error code (DSP_EVALUE - EINVAL)
  DSPBRIDGE: Cleanup custom error code (DSP_EUUID - ENOKEY)
  DSPBRIDGE: Cleanup custom error code (DSP_ENOTCONNECTED - ENOTCONN)
  DSPBRIDGE: Cleanup custom error code (CHNL_E_CHANBUSY - EALREADY)
  DSPBRIDGE: Cleanup custom error code (CHNL_E_CANCELLED - ECANCELED)
  DSPBRIDGE: Cleanup custom error code (WMD_E_TIMEOUT - ETIMEDOUT)
 
 
   Shivananda Hebbar (1)
  
   DSPBRIDGE: Cleanup- unused custom error codes
  
   Shivananda Hebbar (1)
  
   DSPBRIDGE: Cleanup- unused success codes
 
 please add the remove unused codes into the series.
Ok
 love the cleanup *but*:
 arch/arm/plat-omap/include/dspbridge/dbdefs.h:typedef u32 dsp_status;
 1) All usage of dsp_status should be changed to int

Looks like MM code uses this variable. Even MM code needs to be changed for 
this. But changes are minimal.

 2) You should be using -E instead of Ex in all the patches.
 Ok!!

Regards,
Shivananda

 
 
 
 [...]
 
 --
 Regards,
 Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2010-03-25 Thread Hebbar, Shivananda


 -Original Message-
 From: Felipe Contreras [mailto:felipe.contre...@gmail.com]
 Sent: Thursday, March 25, 2010 5:08 PM
 To: Hebbar, Shivananda
 Cc: Menon, Nishanth; linux-omap@vger.kernel.org; Ramirez Luna, Omar;
 Felipe Contreras; Palande Ameya (Nokia-D/Helsinki)
 Subject: Re: [RFC][PATCH 0/19] Cleanup- custom error codes
 
 On Thu, Mar 25, 2010 at 11:37 PM, Hebbar, Shivananda x0heb...@ti.com
 wrote:
  love the cleanup *but*:
  arch/arm/plat-omap/include/dspbridge/dbdefs.h:typedef u32 dsp_status;
  1) All usage of dsp_status should be changed to int
 
  Looks like MM code uses this variable. Even MM code needs to be changed
 for this. But changes are minimal.
 
 What do you mean by MM uses this variable? If you mean user-space
 (omx, gst-dsp), then no, error codes are passed through ioctl, which
 returns an int.
Ok ignore my previous comment. TI Multimedia code (lcml) uses DSP_STATUS which 
is again declared in bridge user side header file.

So what Nishanth is referring to can be cleaned up from bridge driver code.

Regards,
Shivananda
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 2/2] DSPBRIDGE: DSP recovery feature

2010-03-19 Thread Hebbar, Shivananda
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org 
 [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Felipe 
 Contreras
 Sent: Friday, March 19, 2010 10:54 AM
 To: Guzman Lugo, Fernando
 Cc: linux-omap@vger.kernel.org; Hiroshi DOYU; Ameya Palande; 
 felipe.contre...@nokia.com
 Subject: Re: [PATCH 2/2] DSPBRIDGE: DSP recovery feature
 
 On Fri, Mar 19, 2010 at 1:51 PM, Felipe Contreras 
 felipe.contre...@gmail.com wrote:
  I tried to rebase this patch on top of the latest head and the 
  user-space client never gets notified of the MMUFAULT. 
 After manually 
  killing the process, the DSP is restarted correctly though.
 
 Strike that. MMUFAULTS are not notified even before this 
 patch... great.
Client app must register for MMUFault/DSPSysError events. Then only
You will receive notifications.

--Shivananda


 
 --
 Felipe Contreras
 --
 To unsubscribe from this list: send the line unsubscribe 
 linux-omap in the body of a message to 
 majord...@vger.kernel.org More majordomo info at  
 http://vger.kernel.org/majordomo-info.html
 --
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Patch[0/2]:DSPBRIDGE: Excessive u32 Cleanup

2010-02-18 Thread Hebbar, Shivananda
These patches remove excessive u32 type and replaces it with the Normal C types.

Shivananda Hebbar (2)

DSPBRIDGE: Excessive u32 Cleanup (u32-short int)
DSPBRIDGE: Excessive u32 Cleanup (u32-int)

 arch/arm/plat-omap/include/dspbridge/_chnl_sm.h |   10 
 arch/arm/plat-omap/include/dspbridge/cfg.h  |4 +-
 arch/arm/plat-omap/include/dspbridge/cfgdefs.h  |   10 
 arch/arm/plat-omap/include/dspbridge/chnlpriv.h |   16 ++--
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |2 +-
 arch/arm/plat-omap/include/dspbridge/drv.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/io_sm.h|2 +-
 arch/arm/plat-omap/include/dspbridge/nodepriv.h |2 +-
 arch/arm/plat-omap/include/dspbridge/strm.h |2 +-
 arch/arm/plat-omap/include/dspbridge/wcdioctl.h |2 +-
 drivers/dsp/bridge/pmgr/chnl.c  |2 +-
 drivers/dsp/bridge/pmgr/cmm.c   |2 +-
 drivers/dsp/bridge/pmgr/cod.c   |2 +-
 drivers/dsp/bridge/pmgr/dbll.c  |4 +-
 drivers/dsp/bridge/pmgr/dev.c   |8 +++---
 drivers/dsp/bridge/pmgr/dmm.c   |2 +-
 drivers/dsp/bridge/pmgr/io.c|2 +-
 drivers/dsp/bridge/pmgr/wcd.c   |8 +++---
 drivers/dsp/bridge/rmgr/dbdcd.c |4 +-
 drivers/dsp/bridge/rmgr/disp.c  |   15 +---
 drivers/dsp/bridge/rmgr/drv.c   |2 +-
 drivers/dsp/bridge/rmgr/drv_interface.c |2 +-
 drivers/dsp/bridge/rmgr/mgr.c   |6 ++--
 drivers/dsp/bridge/rmgr/nldr.c  |2 +-
 drivers/dsp/bridge/rmgr/node.c  |   12 +-
 drivers/dsp/bridge/rmgr/proc.c  |4 +-
 drivers/dsp/bridge/rmgr/rmm.c   |2 +-
 drivers/dsp/bridge/rmgr/strm.c  |8 +++---
 drivers/dsp/bridge/services/cfg.c   |4 +-
 drivers/dsp/bridge/services/mem.c   |2 +-
 drivers/dsp/bridge/wmd/_tiomap.h|2 +-
 drivers/dsp/bridge/wmd/chnl_sm.c|2 +-
 drivers/dsp/bridge/wmd/io_sm.c  |   28 +++---
 drivers/dsp/bridge/wmd/msg_sm.c |4 +-
 34 files changed, 89 insertions(+), 92 deletions(-)
 

Regards
Shivananda
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Patch [1/2] DSPBRIDGE: Execessive u32 Cleanup(u32-short int)

2010-02-18 Thread Hebbar, Shivananda

From 9c472382f598ed86fa2fe3f83dd064323918ff5e Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 28 Jan 2010 18:22:56 -0600
Subject: [PATCH] DSPBRIDGE: Execessive u32 Cleanup(u32-short int)

This patch removes execessive u32's used in bridge.
As part of this, u32 types is changed to short int.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/_chnl_sm.h |   10 
 arch/arm/plat-omap/include/dspbridge/cfg.h  |4 +-
 arch/arm/plat-omap/include/dspbridge/cfgdefs.h  |8 +++---
 arch/arm/plat-omap/include/dspbridge/chnlpriv.h |   12 +-
 arch/arm/plat-omap/include/dspbridge/io_sm.h|2 +-
 drivers/dsp/bridge/pmgr/dev.c   |2 +-
 drivers/dsp/bridge/pmgr/wcd.c   |2 +-
 drivers/dsp/bridge/rmgr/mgr.c   |4 +-
 drivers/dsp/bridge/rmgr/node.c  |6 ++--
 drivers/dsp/bridge/services/cfg.c   |4 +-
 drivers/dsp/bridge/wmd/chnl_sm.c|2 +-
 drivers/dsp/bridge/wmd/io_sm.c  |   26 +++---
 12 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h 
b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
index eb5adc2..a581349 100644
--- a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
+++ b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
@@ -119,10 +119,10 @@ struct loadMonStruct {
/* Critical section object handle */
struct SYNC_CSOBJECT *hCSObj;
u32 uWordSize;  /* Size in bytes of DSP word */
-   u32 cChannels;  /* Total number of channels */
-   u32 cOpenChannels;  /* Total number of open channels */
+   short int cChannels;/* Total number of channels */
+   short int cOpenChannels;/* Total number of open channels */
struct CHNL_OBJECT **apChannel; /* Array of channels */
-   u32 dwType; /* Type of channel class library */
+   short int dwType;   /* Type of channel class library */
/* If no SHM syms, return for CHNL_Open */
DSP_STATUS chnlOpenStatus;
} ;
@@ -136,8 +136,8 @@ struct loadMonStruct {
/* Pointer back to channel manager */
struct CHNL_MGR *pChnlMgr;
u32 uId;/* Channel id */
-   u32 dwState;/* Current channel state */
-   u32 uMode;  /* Chnl mode and attributes */
+   short int dwState;  /* Current channel state */
+   short int uMode;/* Chnl mode and attributes */
/* Chnl I/O completion event (user mode) */
HANDLE hUserEvent;
/* Abstract syncronization object */
diff --git a/arch/arm/plat-omap/include/dspbridge/cfg.h 
b/arch/arm/plat-omap/include/dspbridge/cfg.h
index 62cb6df..a186bd6 100644
--- a/arch/arm/plat-omap/include/dspbridge/cfg.h
+++ b/arch/arm/plat-omap/include/dspbridge/cfg.h
@@ -176,7 +176,7 @@
  *  DSP_SOK:*pdwValue is set to the retrieved u32(non-Zero).
  *  else:   *pdwValue is set to 0L.
  */
-   extern DSP_STATUS CFG_GetObject(OUT u32 *pdwValue, u32 dwType);
+   extern DSP_STATUS CFG_GetObject(OUT u32 *pdwValue, short int dwType);
 
 /*
  *   CFG_GetPerfValue 
@@ -288,6 +288,6 @@
  *  Ensures:
  *  DSP_SOK:The Private u32 was successfully set.
  */
-   extern DSP_STATUS CFG_SetObject(IN u32 dwValue, IN u32 dwType);
+   extern DSP_STATUS CFG_SetObject(IN u32 dwValue, short int dwType);
 
 #endif /* CFG_ */
diff --git a/arch/arm/plat-omap/include/dspbridge/cfgdefs.h 
b/arch/arm/plat-omap/include/dspbridge/cfgdefs.h
index 55c6634..4c612c2 100644
--- a/arch/arm/plat-omap/include/dspbridge/cfgdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/cfgdefs.h
@@ -45,7 +45,7 @@
  *  Host resource structure.
  */
struct CFG_HOSTRES {
-   u32 wNumMemWindows; /* Set to default */
+   short int wNumMemWindows;   /* Set to default */
/* This is the base.memory */
u32 dwMemBase[CFG_MAXMEMREGISTERS];  /* SHM virtual address */
u32 dwMemLength[CFG_MAXMEMREGISTERS]; /* Length of the Base */
@@ -63,7 +63,7 @@
 */
u32 dwChnlOffset;
u32 dwChnlBufSize;
-   u32 dwNumChnls;
+   short int NumChnls;
void __iomem *dwPrmBase;
void __iomem *dwCmBase;
void __iomem *dwPerBase;
@@ -84,8 +84,8 @@
struct CFG_DSPRES {
u32 uChipType;  /* DSP chip type.   */
u32 uWordSize;  /* Number of bytes in a word*/
-   u32 cChips; /* Number of chips. */
-   u32 cMemTypes;  /* Types of memory. */
+   

Patch [2/2]: DSPBRIDGE: Execessive u32 Cleanup(u32-int)

2010-02-18 Thread Hebbar, Shivananda
From 8884e6d372daa1ab2e5d3822ec6aa450ebcd0c47 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Mon, 1 Feb 2010 15:27:42 -0600
Subject: [PATCH] DSPBRIDGE: Execessive u32 Cleanup(u32-int)

This patch removes execessive u32 types and replaces it
with normal int type.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/cfgdefs.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/chnlpriv.h |4 ++--
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |2 +-
 arch/arm/plat-omap/include/dspbridge/drv.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/nodepriv.h |2 +-
 arch/arm/plat-omap/include/dspbridge/strm.h |2 +-
 arch/arm/plat-omap/include/dspbridge/wcdioctl.h |2 +-
 drivers/dsp/bridge/pmgr/chnl.c  |2 +-
 drivers/dsp/bridge/pmgr/cmm.c   |2 +-
 drivers/dsp/bridge/pmgr/cod.c   |2 +-
 drivers/dsp/bridge/pmgr/dbll.c  |4 ++--
 drivers/dsp/bridge/pmgr/dev.c   |6 +++---
 drivers/dsp/bridge/pmgr/dmm.c   |2 +-
 drivers/dsp/bridge/pmgr/io.c|2 +-
 drivers/dsp/bridge/pmgr/wcd.c   |6 +++---
 drivers/dsp/bridge/rmgr/dbdcd.c |4 ++--
 drivers/dsp/bridge/rmgr/disp.c  |   15 ++-
 drivers/dsp/bridge/rmgr/drv.c   |2 +-
 drivers/dsp/bridge/rmgr/drv_interface.c |2 +-
 drivers/dsp/bridge/rmgr/mgr.c   |2 +-
 drivers/dsp/bridge/rmgr/nldr.c  |2 +-
 drivers/dsp/bridge/rmgr/node.c  |6 +++---
 drivers/dsp/bridge/rmgr/proc.c  |4 ++--
 drivers/dsp/bridge/rmgr/rmm.c   |2 +-
 drivers/dsp/bridge/rmgr/strm.c  |8 
 drivers/dsp/bridge/services/mem.c   |2 +-
 drivers/dsp/bridge/wmd/_tiomap.h|2 +-
 drivers/dsp/bridge/wmd/io_sm.c  |2 +-
 drivers/dsp/bridge/wmd/msg_sm.c |4 ++--
 29 files changed, 48 insertions(+), 51 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cfgdefs.h 
b/arch/arm/plat-omap/include/dspbridge/cfgdefs.h
index 4c612c2..5e8c3c8 100644
--- a/arch/arm/plat-omap/include/dspbridge/cfgdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/cfgdefs.h
@@ -82,7 +82,7 @@
} ;

struct CFG_DSPRES {
-   u32 uChipType;  /* DSP chip type.   */
+   int uChipType;  /* DSP chip type.   */
u32 uWordSize;  /* Number of bytes in a word*/
short int cChips;   /* Number of chips. */
short int cMemTypes;/* Types of memory. */
diff --git a/arch/arm/plat-omap/include/dspbridge/chnlpriv.h 
b/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
index c7a9b25..fd0ad8f 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnlpriv.h
@@ -81,8 +81,8 @@
short int uMode;/* Channel mode. */
short int dwState;  /* Current channel state.*/
u32 cPosition;  /* Total bytes transferred.*/
-   u32 cIOCs;  /* Number of IOCs in queue.   */
-   u32 cIOReqs;/* Number of IO Requests in queue.*/
+   int cIOCs;  /* Number of IOCs in queue.   */
+   int cIOReqs;/* Number of IO Requests in queue.*/
u32 hProcess;   /* Process owning this channel. */
/*
 * Name of channel I/O completion event. Not required in Linux
diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index fc9fdc8..32a677e 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -421,7 +421,7 @@
u32 uClockRate;
u32 ulInternalMemSize;
u32 ulExternalMemSize;
-   u32 uProcessorID;
+   int uProcessorID;
DSP_RTOSTYPE tyRunningRTOS;
s32 nNodeMinPriority;
s32 nNodeMaxPriority;
diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h 
b/arch/arm/plat-omap/include/dspbridge/drv.h
index e4e91f3..03b58ed 100644
--- a/arch/arm/plat-omap/include/dspbridge/drv.h
+++ b/arch/arm/plat-omap/include/dspbridge/drv.h
@@ -261,7 +261,7 @@ struct PROCESS_CONTEXT{
  *  DSP_SOK:*phDevObject != NULL
  *  DSP_EFAIL:  *phDevObject = NULL
  */
-   extern DSP_STATUS DRV_GetDevObject(u32 uIndex,
+   extern DSP_STATUS DRV_GetDevObject(int uIndex,
   struct DRV_OBJECT *hDrvObject,
   struct DEV_OBJECT **phDevObject);

diff --git a/arch/arm/plat-omap/include/dspbridge/nodepriv.h 

RE: Patch[0/2]:DSPBRIDGE: Excessive u32 Cleanup

2010-02-18 Thread Hebbar, Shivananda
Hi,

 -Original Message-
 From: Menon, Nishanth 
 Sent: Thursday, February 18, 2010 1:47 PM
 To: Hebbar, Shivananda; linux-omap
 Subject: RE: Patch[0/2]:DSPBRIDGE: Excessive u32 Cleanup
 
  -Original Message-
  From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap- 
  ow...@vger.kernel.org] On Behalf Of Hebbar, Shivananda
  Sent: Thursday, February 18, 2010 9:24 PM
  To: linux-omap
  Subject: Patch[0/2]:DSPBRIDGE: Excessive u32 Cleanup
  
  These patches remove excessive u32 type and replaces it with the 
  Normal C types.
 What is the motivation of this change?

Sometime back ,there was comment on excessive u32ypes used in bridge.

http://marc.info/?l=linux-omapm=123998339213416w=2

  
  Shivananda Hebbar (2)
  
  DSPBRIDGE: Excessive u32 Cleanup (u32-short int)
 You are changing the signedness a) u16 might be a better 
 option here. b) it might be enough to use short.
 
  DSPBRIDGE: Excessive u32 Cleanup (u32-int)
 Why is this needed? u32 is a standard kernel usage and you 
 are changing the signedness of it's usage
 
  [...]

--Shivananda
 
 --
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Resend: Patch] DSPBRIDGE: Remove conditional check from the InputMsg function

2010-02-12 Thread Hebbar, Shivananda
From: Shivananda Hebbar x0heb...@ti.com

This patch removes conditional check for uMaxMsgs for the below reasons.
1)1st conditional check.
MPU Bridge stops processing messages from DSP, if uMaxMsgs (currently 8) are 
sent in one shot. The check (=) will make it to return from function without 
processing any messages. So DSP will be waiting forever to get the ack from MPU 
saying that MPU has read the messages. If this happens, the communication from 
DSP to MPU is broken forever.
2)2nd conditional check
- This patch also removes unnecessary check because DSP never sends messages 
more than uMaxMsgs.

Discovered-by: Bhavin Shah bs...@ti.com
Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 drivers/dsp/bridge/wmd/io_sm.c |5 +
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c 
index 39b37a6..b2092a2 100644
--- a/drivers/dsp/bridge/wmd/io_sm.c
+++ b/drivers/dsp/bridge/wmd/io_sm.c
@@ -1328,7 +1328,7 @@ static void InputMsg(struct IO_MGR *pIOMgr, struct 
MSG_MGR *hMsgMgr)
fInputEmpty = IO_GetValue(pIOMgr-hWmdContext, struct MSG, pCtrl,
 bufEmpty);
uMsgs = IO_GetValue(pIOMgr-hWmdContext, struct MSG, pCtrl, size);
-   if (fInputEmpty || uMsgs = hMsgMgr-uMaxMsgs)
+   if (fInputEmpty)
goto func_end;
 
pMsgInput = pIOMgr-pMsgInput;
@@ -1356,9 +1356,6 @@ static void InputMsg(struct IO_MGR *pIOMgr, struct 
MSG_MGR *hMsgMgr)
 * input locations have been set up. If all nodes were
 * cleaned up, hMsgMgr-uMaxMsgs should be 0.
 */
-   if (hMsgQueue  uMsgs  hMsgMgr-uMaxMsgs)
-   goto func_end;
-
while (hMsgQueue != NULL) {
if (msg.dwId == hMsgQueue-dwId) {
/* Found it */
--
1.6.2.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patchv2 0/8] DSPBRIDGE: typedef cleanup

2010-02-05 Thread Hebbar, Shivananda
Resending the patches after updating review comments and also 
Fixing some compilation breaks.

These patches remove the typedefs and replace it with normal C types:

Shivananda Hebbar (8)

DSPBRIDGE: typedef cleanup -DSP RTOS
DSPBRIDGE: typedef cleanup -PROCTYPE
DSPBRIDGE: typedef cleanup -PROCFAMILY
DSPBRIDGE: typedef cleanup -DSP_HSTREAM
DSPBRIDGE: typedef cleanup -DSP_HPROCESSOR
DSPBRIDGE: typedef cleanup -DSP_HNODE
DSPBRIDGE: typedef cleanup -BRD_STATUS
DSPBRIDGE: typedef cleanup -CHNL_MODE

 arch/arm/plat-omap/include/dspbridge/brddefs.h  |1 -
 arch/arm/plat-omap/include/dspbridge/chnldefs.h |2 -
 arch/arm/plat-omap/include/dspbridge/cmm.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |   18 +---
 arch/arm/plat-omap/include/dspbridge/dispdefs.h |4 +-
 arch/arm/plat-omap/include/dspbridge/dmm.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/drv.h  |6 +-
 arch/arm/plat-omap/include/dspbridge/node.h |4 +-
 arch/arm/plat-omap/include/dspbridge/proc.h |   43 +-
 arch/arm/plat-omap/include/dspbridge/wcdioctl.h |   96 +++---
 arch/arm/plat-omap/include/dspbridge/wmd.h  |4 +-
 arch/arm/plat-omap/include/dspbridge/wmdchnl.h  |2 +-
 drivers/dsp/bridge/pmgr/cmm.c   |2 +-
 drivers/dsp/bridge/pmgr/dev.c   |6 +-
 drivers/dsp/bridge/pmgr/dmm.c   |2 +-
 drivers/dsp/bridge/pmgr/wcd.c   |4 +-
 drivers/dsp/bridge/rmgr/node.c  |   12 ++--
 drivers/dsp/bridge/rmgr/proc.c  |   56 +++---
 drivers/dsp/bridge/rmgr/strm.c  |2 +-
 drivers/dsp/bridge/wmd/chnl_sm.c|8 +-
 drivers/dsp/bridge/wmd/tiomap3430.c |4 +-
 21 files changed, 134 insertions(+), 146 deletions(-)
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 1/8] DSPBRIDGE: typedef cleanup -DSP RTOS

2010-02-05 Thread Hebbar, Shivananda
From 5855acc38e699f9abfcdd11f1dbd5d648feecb74 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 28 Jan 2010 18:57:02 -0600
Subject: [PATCH] DSPBRIDGE: typedef cleanup -DSPRTOS

This patch removes the typdef used for DSPRTOS type
and replaces it with normal C type.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/dbdefs.h |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index fc9fdc8..049fcee 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -115,7 +115,6 @@
 
typedef u32 DSP_PROCFAMILY; /* Processor family */
typedef u32 DSP_PROCTYPE;   /* Processor type (w/in family) */
-   typedef u32 DSP_RTOSTYPE;   /* Type of DSP RTOS */
 
 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x)  (DSP_PROCESSORSTATECHANGE | 
\
@@ -422,7 +421,7 @@
u32 ulInternalMemSize;
u32 ulExternalMemSize;
u32 uProcessorID;
-   DSP_RTOSTYPE tyRunningRTOS;
+   int tyRunningRTOS;
s32 nNodeMinPriority;
s32 nNodeMaxPriority;
} ;
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 2/8] DSPBRIDGE: typedef cleanup -PROCTYPE

2010-02-05 Thread Hebbar, Shivananda
From 40939eb42f476a0ef7b4f67ebcb412b562daed81 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 28 Jan 2010 19:14:21 -0600
Subject: [PATCH] DSPBRIDGE: typedef cleanup -PROCTYPE

This patch removes the typedef used for PROCTYPE
and replace it with the normal C type.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |3 +--
 arch/arm/plat-omap/include/dspbridge/dispdefs.h |2 +-
 drivers/dsp/bridge/rmgr/node.c  |2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index 049fcee..37ac1dd 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -114,7 +114,6 @@
typedef HANDLE DSP_HSTREAM; /* Handle to a Stream object*/
 
typedef u32 DSP_PROCFAMILY; /* Processor family */
-   typedef u32 DSP_PROCTYPE;   /* Processor type (w/in family) */
 
 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x)  (DSP_PROCESSORSTATECHANGE | 
\
@@ -416,7 +415,7 @@
struct DSP_PROCESSORINFO {
u32 cbStruct;
DSP_PROCFAMILY uProcessorFamily;
-   DSP_PROCTYPE uProcessorType;
+   int uProcessorType;
u32 uClockRate;
u32 ulInternalMemSize;
u32 ulExternalMemSize;
diff --git a/arch/arm/plat-omap/include/dspbridge/dispdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dispdefs.h
index 9633bbc..f60b351 100644
--- a/arch/arm/plat-omap/include/dspbridge/dispdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dispdefs.h
@@ -27,7 +27,7 @@
/* Size of buffer for sending data to RMS */
u32 ulChnlBufSize;
DSP_PROCFAMILY procFamily;  /* eg, 5000 */
-   DSP_PROCTYPE procType;  /* eg, 5510 */
+   int procType;   /* eg, 5510 */
HANDLE hReserved1;  /* Reserved for future use. */
u32 hReserved2; /* Reserved for future use. */
} ;
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index 336abea..92d51d1 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -153,7 +153,7 @@ struct NODE_MGR {
u32 ulChnlOffset;   /* Offset of chnl ids rsvd for RMS */
u32 ulChnlBufSize;  /* Buffer size for data to RMS */
DSP_PROCFAMILY procFamily;  /* eg, 5000 */
-   DSP_PROCTYPE procType;  /* eg, 5510 */
+   int procType;   /* eg, 5510 */
u32 uDSPWordSize;   /* Size of DSP word on host bytes */
u32 uDSPDataMauSize;/* Size of DSP data MAU */
u32 uDSPMauSize;/* Size of MAU */
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 3/8] DSPBRIDGE: typedef cleanup -PROCFAMILY

2010-02-05 Thread Hebbar, Shivananda
From 108329666e2bf829915c7de4a693fd83c00581a3 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 29 Jan 2010 15:03:02 -0600
Subject: [PATCH] DSPBRIDGE: typedef cleanup -PROCFAMILY

This patch removes the typdef used for PROCFAMILY and
replaces it with normal C type.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |4 +---
 arch/arm/plat-omap/include/dspbridge/dispdefs.h |2 +-
 drivers/dsp/bridge/rmgr/node.c  |2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index 37ac1dd..36cd569 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -113,8 +113,6 @@
typedef HANDLE DSP_HPROCESSOR;  /* Handle to a Processor object */
typedef HANDLE DSP_HSTREAM; /* Handle to a Stream object*/
 
-   typedef u32 DSP_PROCFAMILY; /* Processor family */
-
 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x)  (DSP_PROCESSORSTATECHANGE | 
\
DSP_PROCESSORATTACH | \
@@ -414,7 +412,7 @@
  */
struct DSP_PROCESSORINFO {
u32 cbStruct;
-   DSP_PROCFAMILY uProcessorFamily;
+   int uProcessorFamily;
int uProcessorType;
u32 uClockRate;
u32 ulInternalMemSize;
diff --git a/arch/arm/plat-omap/include/dspbridge/dispdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dispdefs.h
index f60b351..a9a2961 100644
--- a/arch/arm/plat-omap/include/dspbridge/dispdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dispdefs.h
@@ -26,7 +26,7 @@
u32 ulChnlOffset; /* Offset of channel ids reserved for RMS */
/* Size of buffer for sending data to RMS */
u32 ulChnlBufSize;
-   DSP_PROCFAMILY procFamily;  /* eg, 5000 */
+   int procFamily; /* eg, 5000 */
int procType;   /* eg, 5510 */
HANDLE hReserved1;  /* Reserved for future use. */
u32 hReserved2; /* Reserved for future use. */
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index 92d51d1..4bc0435 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -152,7 +152,7 @@ struct NODE_MGR {
u32 ulNumChnls; /* Total number of channels */
u32 ulChnlOffset;   /* Offset of chnl ids rsvd for RMS */
u32 ulChnlBufSize;  /* Buffer size for data to RMS */
-   DSP_PROCFAMILY procFamily;  /* eg, 5000 */
+   int procFamily; /* eg, 5000 */
int procType;   /* eg, 5510 */
u32 uDSPWordSize;   /* Size of DSP word on host bytes */
u32 uDSPDataMauSize;/* Size of DSP data MAU */
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 4/8] DSPBRIDGE: typedef cleanup -DSP_HSTREAM

2010-02-05 Thread Hebbar, Shivananda
From d3edb20499a7b084a7510d9930264ff2935a6048 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 29 Jan 2010 15:32:44 -0600
Subject: [PATCH] DSPBRIDGE :typedef cleanup -DSP_HSTREAM

This patch removes typedef used for stream handle and replaces
it with the normal C types.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |1 -
 arch/arm/plat-omap/include/dspbridge/drv.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/wcdioctl.h |   22 +++---
 3 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index 36cd569..c0d4c1d 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -111,7 +111,6 @@
 
typedef HANDLE DSP_HNODE;   /* Handle to a DSP Node object  */
typedef HANDLE DSP_HPROCESSOR;  /* Handle to a Processor object */
-   typedef HANDLE DSP_HSTREAM; /* Handle to a Stream object*/
 
 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x)  (DSP_PROCESSORSTATECHANGE | 
\
diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h 
b/arch/arm/plat-omap/include/dspbridge/drv.h
index e4e91f3..3eb1abd 100644
--- a/arch/arm/plat-omap/include/dspbridge/drv.h
+++ b/arch/arm/plat-omap/include/dspbridge/drv.h
@@ -116,7 +116,7 @@ struct DSPHEAP_RES_OBJECT {
 /* New structure (member of process context) abstracts stream resource info */
 struct STRM_RES_OBJECT {
s32streamAllocated; /* Stream status */
-   DSP_HSTREAM hStream;
+   void *hStream;
u32uNumBufs;
u32uDir;
struct STRM_RES_OBJECT *next;
diff --git a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h 
b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
index 0dcbef7..9d1cdb3 100644
--- a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
+++ b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
@@ -262,40 +262,40 @@ union Trapped_Args {
/* STRM module */
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
u32 uSize;
u8 *__user *apBuffer;
u32 uNumBufs;
} ARGS_STRM_ALLOCATEBUFFER;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
} ARGS_STRM_CLOSE;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
u8 *__user *apBuffer;
u32 uNumBufs;
} ARGS_STRM_FREEBUFFER;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
HANDLE *phEvent;
} ARGS_STRM_GETEVENTHANDLE;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
struct STRM_INFO __user *pStreamInfo;
u32 uStreamInfoSize;
} ARGS_STRM_GETINFO;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
bool bFlush;
} ARGS_STRM_IDLE;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
u8 *pBuffer;
u32 dwBytes;
u32 dwBufSize;
@@ -307,11 +307,11 @@ union Trapped_Args {
u32 uDirection;
u32 uIndex;
struct STRM_ATTR __user *pAttrIn;
-   DSP_HSTREAM __user *phStream;
+   void *__user *phStream;
} ARGS_STRM_OPEN;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
u8 *__user *pBufPtr;
u32 __user *pBytes;
u32 __user *pBufSize;
@@ -319,14 +319,14 @@ union Trapped_Args {
} ARGS_STRM_RECLAIM;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
u32 uEventMask;
u32 uNotifyType;
struct DSP_NOTIFICATION __user *hNotification;
} ARGS_STRM_REGISTERNOTIFY;
 
struct {
-   DSP_HSTREAM __user *aStreamTab;
+   void *__user *aStreamTab;
u32 nStreams;
u32 __user *pMask;
u32 uTimeout;
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 5/8] DSPBRIDGE: typedef cleanup -DSP_HPROCESSOR

2010-02-05 Thread Hebbar, Shivananda
From fce3de8671931f5af3df467e0f923e86e9d1f9b3 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 28 Jan 2010 20:06:40 -0600
Subject: [PATCH] DSPBRIDGE : typedef cleanup -DSP_HPROCESSOR

This patch removes the typedef used for processor handle
and replaces it with the normal C type.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/cmm.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |1 -
 arch/arm/plat-omap/include/dspbridge/dmm.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/drv.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/node.h |2 +-
 arch/arm/plat-omap/include/dspbridge/proc.h |   41 ++---
 arch/arm/plat-omap/include/dspbridge/wcdioctl.h |   40 ++--
 drivers/dsp/bridge/pmgr/cmm.c   |2 +-
 drivers/dsp/bridge/pmgr/dev.c   |6 ++--
 drivers/dsp/bridge/pmgr/dmm.c   |2 +-
 drivers/dsp/bridge/pmgr/wcd.c   |2 +-
 drivers/dsp/bridge/rmgr/node.c  |2 +-
 drivers/dsp/bridge/rmgr/proc.c  |   44 +++---
 13 files changed, 73 insertions(+), 75 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cmm.h 
b/arch/arm/plat-omap/include/dspbridge/cmm.h
index fc2f51e..bad3ab0 100644
--- a/arch/arm/plat-omap/include/dspbridge/cmm.h
+++ b/arch/arm/plat-omap/include/dspbridge/cmm.h
@@ -160,7 +160,7 @@
  *  hDevObject != NULL
  *  Ensures:
  */
-   extern DSP_STATUS CMM_GetHandle(DSP_HPROCESSOR hProcessor,
+   extern DSP_STATUS CMM_GetHandle(void *hProcessor,
OUT struct CMM_OBJECT **phCmmMgr);

 /*
diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index 222a93e..f2ff74c 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -110,7 +110,6 @@
typedef u32 DSP_STATUS; /* API return code type */

typedef HANDLE DSP_HNODE;   /* Handle to a DSP Node object  */
-   typedef HANDLE DSP_HPROCESSOR;  /* Handle to a Processor object */

 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x)  (DSP_PROCESSORSTATECHANGE | 
\
diff --git a/arch/arm/plat-omap/include/dspbridge/dmm.h 
b/arch/arm/plat-omap/include/dspbridge/dmm.h
index 13a5088..688473a 100644
--- a/arch/arm/plat-omap/include/dspbridge/dmm.h
+++ b/arch/arm/plat-omap/include/dspbridge/dmm.h
@@ -38,7 +38,7 @@
  *  This is typically called from the client process.
  */

-   extern DSP_STATUS DMM_GetHandle(DSP_HPROCESSOR hProcessor,
+   extern DSP_STATUS DMM_GetHandle(void *hProcessor,
OUT struct DMM_OBJECT **phDmmMgr);

extern DSP_STATUS DMM_ReserveMemory(struct DMM_OBJECT *hDmmMgr,
diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h 
b/arch/arm/plat-omap/include/dspbridge/drv.h
index 3eb1abd..c6d4626 100644
--- a/arch/arm/plat-omap/include/dspbridge/drv.h
+++ b/arch/arm/plat-omap/include/dspbridge/drv.h
@@ -134,7 +134,7 @@ struct PROCESS_CONTEXT{
enum GPP_PROC_RES_STATE resState;

/* Handle to Processor */
-   DSP_HPROCESSOR hProcessor;
+   void *hProcessor;

/* DSP Node resources */
struct NODE_RES_OBJECT *pNodeList;
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index df15884..9f0110a 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -570,7 +570,7 @@
  *  Parameters:
  *
  */
-   extern DSP_STATUS NODE_GetUUIDProps(DSP_HPROCESSOR hProcessor,
+   extern DSP_STATUS NODE_GetUUIDProps(void *hProcessor,
IN CONST struct DSP_UUID *pNodeId,
OUT struct DSP_NDBPROPS
*pNodeProps);
diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h 
b/arch/arm/plat-omap/include/dspbridge/proc.h
index 8dbdaac..bbb089e 100644
--- a/arch/arm/plat-omap/include/dspbridge/proc.h
+++ b/arch/arm/plat-omap/include/dspbridge/proc.h
@@ -51,8 +51,7 @@
  */
extern DSP_STATUS PROC_Attach(u32 uProcessor,
  OPTIONAL CONST struct DSP_PROCESSORATTRIN
- *pAttrIn,
- OUT DSP_HPROCESSOR *phProcessor,
+ *pAttrIn, void **phProcessor,
  struct PROCESS_CONTEXT *pr_ctxt);

 /*
@@ -101,7 +100,7 @@
  *  Details:
  *  This function Calls WMD_BRD_Ioctl.
  */
-   extern DSP_STATUS PROC_Ctrl(DSP_HPROCESSOR hProcessor,
+   extern DSP_STATUS PROC_Ctrl(void *hProcessor,
u32 dwCmd, IN struct DSP_CBDATA *pArgs);

 /*
@@ -153,7 +152,7 @@
  *  Ensures:
  *  

[Patch 6/8] DSPBRIDGE: typedef cleanup -DSP_HNODE

2010-02-05 Thread Hebbar, Shivananda
From b90284e0c81aa983ee60ce1fee8d69beba4061a6 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 28 Jan 2010 20:22:04 -0600
Subject: [PATCH] DSPBRIDGE: typdef cleanup -DSP_HNODE

This patch removes the typedef used for node handle
and replaces it with the normal C type.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |6 +---
 arch/arm/plat-omap/include/dspbridge/drv.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/node.h |2 +-
 arch/arm/plat-omap/include/dspbridge/proc.h |2 +-
 arch/arm/plat-omap/include/dspbridge/wcdioctl.h |   34 +++---
 drivers/dsp/bridge/pmgr/wcd.c   |2 +-
 drivers/dsp/bridge/rmgr/node.c  |4 +-
 drivers/dsp/bridge/rmgr/proc.c  |4 +-
 8 files changed, 27 insertions(+), 29 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index e3be0fc..472b62f 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -109,8 +109,6 @@
 /* Types defined for 'Bridge API */
typedef u32 DSP_STATUS; /* API return code type */
 
-   typedef HANDLE DSP_HNODE;   /* Handle to a DSP Node object  */
-
 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x)  (DSP_PROCESSORSTATECHANGE | 
\
DSP_PROCESSORATTACH | \
@@ -318,7 +316,7 @@
u32 cbStruct;
enum DSP_CONNECTTYPE lType;
u32 uThisNodeStreamIndex;
-   DSP_HNODE hConnectedNode;
+   void *hConnectedNode;
struct DSP_UUID uiConnectedNodeID;
u32 uConnectedNodeStreamIndex;
} ;
@@ -368,7 +366,7 @@
struct DSP_NDBPROPS nbNodeDatabaseProps;
u32 uExecutionPriority;
enum NODE_STATE nsExecutionState;
-   DSP_HNODE hDeviceOwner;
+   void *hDeviceOwner;
u32 uNumberStreams;
struct DSP_STREAMCONNECT scStreamConnection[16];
u32 uNodeEnv;
diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h 
b/arch/arm/plat-omap/include/dspbridge/drv.h
index c6d4626..b31c8e3 100644
--- a/arch/arm/plat-omap/include/dspbridge/drv.h
+++ b/arch/arm/plat-omap/include/dspbridge/drv.h
@@ -84,7 +84,7 @@
 
 /* New structure (member of process context) abstracts NODE resource info */
 struct NODE_RES_OBJECT {
-   DSP_HNODE   hNode;
+   void *hNode;
s32nodeAllocated; /* Node status */
s32heapAllocated; /* Heap status */
s32streamsAllocated; /* Streams status */
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index 9f0110a..2a45fc0 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -308,7 +308,7 @@
  *(*puAllocated == *puNumNodes)
  */
extern DSP_STATUS NODE_EnumNodes(struct NODE_MGR *hNodeMgr,
-IN DSP_HNODE *aNodeTab,
+void **aNodeTab,
 u32 uNodeTabSize,
 OUT u32 *puNumNodes,
 OUT u32 *puAllocated);
diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h 
b/arch/arm/plat-omap/include/dspbridge/proc.h
index bbb089e..d5edbd5 100644
--- a/arch/arm/plat-omap/include/dspbridge/proc.h
+++ b/arch/arm/plat-omap/include/dspbridge/proc.h
@@ -153,7 +153,7 @@
  *  Details:
  */
extern DSP_STATUS PROC_EnumNodes(void *hProcessor,
-IN DSP_HNODE *aNodeTab,
+void **aNodeTab,
 IN u32 uNodeTabSize,
 OUT u32 *puNumNodes,
 OUT u32 *puAllocated);
diff --git a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h 
b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
index 4f5a274..eccda18 100644
--- a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
+++ b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
@@ -79,7 +79,7 @@ union Trapped_Args {
 
struct {
void *hProcessor;
-   DSP_HNODE __user *aNodeTab;
+   void *__user *aNodeTab;
u32 uNodeTabSize;
u32 __user *puNumNodes;
u32 __user *puAllocated;
@@ -177,79 +177,79 @@ union Trapped_Args {
struct DSP_UUID __user *pNodeID;
struct DSP_CBDATA __user *pArgs;
struct DSP_NODEATTRIN __user *pAttrIn;
-   DSP_HNODE __user *phNode;
+   void *__user *phNode;
} ARGS_NODE_ALLOCATE;
 
struct {
-   DSP_HNODE 

[Patch 7/8] DSPBRIDGE: typedef cleanup -BRD_STATUS

2010-02-05 Thread Hebbar, Shivananda
From 75fabc1654f4671906f64c12a348aa38625d4f28 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 28 Jan 2010 20:40:48 -0600
Subject: [PATCH] DSPBRIDGE: typedef cleanup - BRD_STATUS

This patch removes the typedef BRD_STATUS and replaces
it with the normal C type. Here it need not be u32 value.
So replacing it with int type.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/brddefs.h |1 -
 arch/arm/plat-omap/include/dspbridge/wmd.h |2 +-
 drivers/dsp/bridge/rmgr/proc.c |   10 +-
 drivers/dsp/bridge/wmd/tiomap3430.c|4 ++--
 4 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/brddefs.h 
b/arch/arm/plat-omap/include/dspbridge/brddefs.h
index ca503e2..ff83166 100644
--- a/arch/arm/plat-omap/include/dspbridge/brddefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/brddefs.h
@@ -32,7 +32,6 @@
 #define BRD_RETENTION 0x8   /* Retention mode */
 #define BRD_DSP_HIBERNATION 0x9   /* DSP initiated hibernation */
 #define BRD_ERROR  0xA   /* Board state is Error */
-   typedef u32 BRD_STATUS;
 
 /* BRD Object */
struct BRD_OBJECT;
diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h 
b/arch/arm/plat-omap/include/dspbridge/wmd.h
index 748b1c6..70f3970 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmd.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmd.h
@@ -244,7 +244,7 @@
  */
typedef DSP_STATUS(*
   WMD_BRD_STATUS) (struct WMD_DEV_CONTEXT *hDevContext,
-   OUT BRD_STATUS * pdwState);
+   int *pdwState);
 
 /*
  *   WMD_BRD_Read 
diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c
index 439dbe8..5a33df7 100644
--- a/drivers/dsp/bridge/rmgr/proc.c
+++ b/drivers/dsp/bridge/rmgr/proc.c
@@ -808,7 +808,7 @@ DSP_STATUS PROC_GetState(void *hProcessor,
 {
DSP_STATUS status = DSP_SOK;
struct PROC_OBJECT *pProcObject = (struct PROC_OBJECT *)hProcessor;
-   BRD_STATUS brdStatus;
+   int brdStatus;
struct DEH_MGR *hDehMgr;
 
DBC_Require(cRefs  0);
@@ -949,7 +949,7 @@ DSP_STATUS PROC_Load(void *hProcessor, IN CONST s32 iArgc,
u32 dwExtEnd;
u32 uProcId;
 #ifdef CONFIG_BRIDGE_DEBUG
-   BRD_STATUS uBrdState;
+   int uBrdState;
 #endif
 
 #ifdef OPT_LOAD_TIME_INSTRUMENTATION
@@ -1442,7 +1442,7 @@ DSP_STATUS PROC_Start(void *hProcessor)
struct COD_MANAGER *hCodMgr;/* Code manager handle*/
u32 dwDspAddr;  /* Loaded code's entry point.*/
 #ifdef CONFIG_BRIDGE_DEBUG
-   BRD_STATUS uBrdState;
+   int uBrdState;
 #endif
DBC_Require(cRefs  0);
GT_1trace(PROC_DebugMask, GT_ENTER, Entered PROC_Start, args:\n\t
@@ -1538,7 +1538,7 @@ DSP_STATUS PROC_Stop(void *hProcessor)
u32 uNodeTabSize = 1;
u32 uNumNodes = 0;
u32 uNodesAllocated = 0;
-   BRD_STATUS uBrdState;
+   int uBrdState;
 
DBC_Require(cRefs  0);
GT_1trace(PROC_DebugMask, GT_ENTER, Entered PROC_Stop, args:\n\t
@@ -1730,7 +1730,7 @@ static DSP_STATUS PROC_Monitor(struct PROC_OBJECT 
*hProcObject)
struct PROC_OBJECT *pProcObject = (struct PROC_OBJECT *)hProcObject;
struct MSG_MGR *hMsgMgr;
 #ifdef CONFIG_BRIDGE_DEBUG
-   BRD_STATUS uBrdState;
+   int uBrdState;
 #endif
 
DBC_Require(cRefs  0);
diff --git a/drivers/dsp/bridge/wmd/tiomap3430.c 
b/drivers/dsp/bridge/wmd/tiomap3430.c
index 3b9052e..a17a9ff 100644
--- a/drivers/dsp/bridge/wmd/tiomap3430.c
+++ b/drivers/dsp/bridge/wmd/tiomap3430.c
@@ -93,7 +93,7 @@ static DSP_STATUS WMD_BRD_Read(struct WMD_DEV_CONTEXT 
*pDevContext,
 static DSP_STATUS WMD_BRD_Start(struct WMD_DEV_CONTEXT *pDevContext,
u32 dwDSPAddr);
 static DSP_STATUS WMD_BRD_Status(struct WMD_DEV_CONTEXT *pDevContext,
-   OUT BRD_STATUS *pdwState);
+   int *pdwState);
 static DSP_STATUS WMD_BRD_Stop(struct WMD_DEV_CONTEXT *pDevContext);
 static DSP_STATUS WMD_BRD_Write(struct WMD_DEV_CONTEXT *pDevContext,
IN u8 *pbHostBuf,
@@ -926,7 +926,7 @@ static DSP_STATUS WMD_BRD_Delete(struct WMD_DEV_CONTEXT 
*hDevContext)
  *  Returns the board status.
  */
 static DSP_STATUS WMD_BRD_Status(struct WMD_DEV_CONTEXT *hDevContext,
-OUT BRD_STATUS *pdwState)
+int *pdwState)
 {
struct WMD_DEV_CONTEXT *pDevContext = hDevContext;
*pdwState = pDevContext-dwBrdState;
-- 
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 8/8] DSPBRIDGE: typedef cleanup -CHNL_MODE

2010-02-05 Thread Hebbar, Shivananda
From 607802b2c411265fefa29983ea08e0e0d44d9f1a Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 28 Jan 2010 20:53:48 -0600
Subject: [PATCH] DSPBRIDGE: typedef cleanup -CHNL_MODE

This patch removes the typedef CHNL_MODE.
CHNL_MODE values are well within the range of short int.
Hence changing it from u32 to short int.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/chnldefs.h |2 --
 arch/arm/plat-omap/include/dspbridge/wmd.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/wmdchnl.h  |2 +-
 drivers/dsp/bridge/rmgr/node.c  |2 +-
 drivers/dsp/bridge/rmgr/strm.c  |2 +-
 drivers/dsp/bridge/wmd/chnl_sm.c|8 
 6 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/chnldefs.h 
b/arch/arm/plat-omap/include/dspbridge/chnldefs.h
index be405ba..43df8b7 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnldefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnldefs.h
@@ -45,8 +45,6 @@
 #define CHNL_IsIOCancelled(ioc) (ioc.status  CHNL_IOCSTATCANCEL)
 #define CHNL_IsTimedOut(ioc)(ioc.status  CHNL_IOCSTATTIMEOUT)
 
-/* CHNL types: */
-   typedef u32 CHNL_MODE;  /* Channel transfer mode. */
 
 /* Channel attributes: */
struct CHNL_ATTRS {
diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h 
b/arch/arm/plat-omap/include/dspbridge/wmd.h
index 70f3970..3305eab 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmd.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmd.h
@@ -418,7 +418,7 @@ typedef DSP_STATUS(*WMD_BRD_WRITE)(struct WMD_DEV_CONTEXT 
*hDevContext,
typedef DSP_STATUS(*WMD_CHNL_OPEN) (OUT struct CHNL_OBJECT
   **phChnl,
   struct CHNL_MGR *hChnlMgr,
-  CHNL_MODE uMode,
+  short int uMode,
   u32 uChnlId,
   CONST IN OPTIONAL struct
   CHNL_ATTRS *pAttrs);
diff --git a/arch/arm/plat-omap/include/dspbridge/wmdchnl.h 
b/arch/arm/plat-omap/include/dspbridge/wmdchnl.h
index 4b733d8..f2608e0 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmdchnl.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmdchnl.h
@@ -33,7 +33,7 @@
 
extern DSP_STATUS WMD_CHNL_Open(OUT struct CHNL_OBJECT **phChnl,
struct CHNL_MGR *hChnlMgr,
-   CHNL_MODE uMode,
+   short int uMode,
u32 uChnlId,
CONST IN OPTIONAL struct CHNL_ATTRS
*pAttrs);
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index 11af1dc..ed8f2b9 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -895,7 +895,7 @@ DSP_STATUS NODE_Connect(struct NODE_OBJECT *hNode1, u32 
uStream1,
struct STREAM *pStream;
GB_BitNum pipeId = GB_NOBITS;
GB_BitNum chnlId = GB_NOBITS;
-   CHNL_MODE uMode;
+   short int uMode;
u32 dwLength;
DSP_STATUS status = DSP_SOK;
DBC_Require(cRefs  0);
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index febb6c2..f03064e 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -524,7 +524,7 @@ DSP_STATUS STRM_Open(struct NODE_OBJECT *hNode, u32 uDir, 
u32 uIndex,
struct WMD_DRV_INTERFACE *pIntfFxns;
u32 ulChnlId;
struct STRM_OBJECT *pStrm = NULL;
-   CHNL_MODE uMode;
+   short int uMode;
struct CHNL_ATTRS chnlAttrs;
DSP_STATUS status = DSP_SOK;
struct CMM_OBJECT *hCmmMgr = NULL;  /* Shared memory manager hndl */
diff --git a/drivers/dsp/bridge/wmd/chnl_sm.c b/drivers/dsp/bridge/wmd/chnl_sm.c
index ca5662d..362dc99 100644
--- a/drivers/dsp/bridge/wmd/chnl_sm.c
+++ b/drivers/dsp/bridge/wmd/chnl_sm.c
@@ -253,7 +253,7 @@ DSP_STATUS WMD_CHNL_CancelIO(struct CHNL_OBJECT *hChnl)
DSP_STATUS status = DSP_SOK;
struct CHNL_OBJECT *pChnl = (struct CHNL_OBJECT *)hChnl;
u32 iChnl = -1;
-   CHNL_MODE uMode;
+   short int uMode;
struct CHNL_IRP *pChirp;
struct CHNL_MGR *pChnlMgr = NULL;
 
@@ -483,7 +483,7 @@ DSP_STATUS WMD_CHNL_FlushIO(struct CHNL_OBJECT *hChnl, u32 
dwTimeOut)
 {
DSP_STATUS status = DSP_SOK;
struct CHNL_OBJECT *pChnl = (struct CHNL_OBJECT *)hChnl;
-   CHNL_MODE uMode = -1;
+   short int uMode = -1;
struct CHNL_MGR *pChnlMgr;
struct CHNL_IOC chnlIOC;
/* Check args:  */
@@ -758,7 +758,7 @@ DSP_STATUS WMD_CHNL_GetMgrInfo(struct CHNL_MGR *hChnlMgr, 
u32 uChnlID,
 

RE: [Patch 1/8] DSPBRIDGE: typedef cleanup -DSP RTOS

2010-02-03 Thread Hebbar, Shivananda
Fernando,

 -Original Message-
 From: Guzman Lugo, Fernando
 Sent: Wednesday, February 03, 2010 12:27 AM
 To: Hebbar, Shivananda; linux-omap
 Subject: RE: [Patch 1/8] DSPBRIDGE: typedef cleanup -DSP RTOS
 
 
 
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-
 ow...@vger.kernel.org] On Behalf Of Hebbar, Shivananda
 Sent: Tuesday, February 02, 2010 6:44 PM
 To: linux-omap
 Subject: [Patch 1/8] DSPBRIDGE: typedef cleanup -DSP RTOS
 
 From 5855acc38e699f9abfcdd11f1dbd5d648feecb74 Mon Sep 17 00:00:00 2001
 From: Shivananda Hebbar x0heb...@ti.com
 Date: Thu, 28 Jan 2010 18:57:02 -0600
 Subject: [PATCH] DSPBRIDGE: Remove typedef used for DSPRTOS type and
 replace it with normal C type.
 
 This patch removes the typdef used for DSPRTOS type and replaces it with
 normal C type.
 
 Signed-off-by: Shivananda Hebbar x0heb...@ti.com
 ---
  arch/arm/plat-omap/include/dspbridge/dbdefs.h |3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)
 
 diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
 b/arch/arm/plat-
 omap/include/dspbridge/dbdefs.h
 index fc9fdc8..049fcee 100644
 --- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
 +++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
 @@ -115,7 +115,6 @@
 
 typedef u32 DSP_PROCFAMILY; /* Processor family
 */
 typedef u32 DSP_PROCTYPE;   /* Processor type (w/in family)
 */
 -   typedef u32 DSP_RTOSTYPE;   /* Type of DSP RTOS
 */
 
  /* Handy Macros */
  #define IsValidProcEvent(x) (((x) == 0) || (((x) 
 (DSP_PROCESSORSTATECHANGE | \ @@ -422,7 +421,7 @@
 u32 ulInternalMemSize;
 u32 ulExternalMemSize;
 u32 uProcessorID;
 -   DSP_RTOSTYPE tyRunningRTOS;
 +   long tyRunningRTOS;
 
 Why was it changed to long and not to unsigned int as it as defined before
 (u32) or int which is the tiye return by Atoi?
I didn't understand your question here.
  Long and int are both signed 32 bit type.
 
 pGenObj-objData.procObj.tyRunningRTOS = Atoi(token);
 
 s32 nNodeMinPriority;
 s32 nNodeMaxPriority;
 } ;
 --
 --
 To unsubscribe from this list: send the line unsubscribe linux-omap in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
 Regards,
 Fernando.

--Shivananda
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 0/8] DSPBRIDGE: typedef cleanup

2010-02-02 Thread Hebbar, Shivananda
These patches remove the typedefs and replace it with normal C types:

Shivananda Hebbar (8)

DSPBRIDGE: typedef cleanup -DSP RTOS
DSPBRIDGE: typedef cleanup -PROCTYPE 
DSPBRIDGE: typedef cleanup -PROCFAMILY 
DSPBRIDGE: typedef cleanup -DSP_HSTREAM
DSPBRIDGE: typedef cleanup -DSP_HPROCESSOR
DSPBRIDGE: typedef cleanup -DSP_HNODE
DSPBRIDGE: typedef cleanup -BRD_STATUS
DSPBRIDGE: typedef cleanup -CHNL_MODE

arch/arm/plat-omap/include/dspbridge/brddefs.h  |1 -
arch/arm/plat-omap/include/dspbridge/chnldefs.h |2 -
arch/arm/plat-omap/include/dspbridge/cmm.h  |2 +-
arch/arm/plat-omap/include/dspbridge/dbdefs.h   |   18 +---
arch/arm/plat-omap/include/dspbridge/dispdefs.h |4 +-
arch/arm/plat-omap/include/dspbridge/dmm.h  |2 +-
arch/arm/plat-omap/include/dspbridge/drv.h  |6 +-
arch/arm/plat-omap/include/dspbridge/node.h |4 +-
arch/arm/plat-omap/include/dspbridge/proc.h |   43 +-
arch/arm/plat-omap/include/dspbridge/wcdioctl.h |   96 +++---
arch/arm/plat-omap/include/dspbridge/wmd.h  |4 +-
arch/arm/plat-omap/include/dspbridge/wmdchnl.h  |2 +-
drivers/dsp/bridge/pmgr/cmm.c   |2 +-
drivers/dsp/bridge/pmgr/dev.c   |6 +-
drivers/dsp/bridge/pmgr/dmm.c   |2 +-
drivers/dsp/bridge/pmgr/wcd.c   |4 +-
drivers/dsp/bridge/rmgr/node.c  |   12 ++--
drivers/dsp/bridge/rmgr/proc.c  |   54 +++--- 
drivers/dsp/bridge/rmgr/strm.c  |2 +-
drivers/dsp/bridge/wmd/chnl_sm.c|8 +- 
drivers/dsp/bridge/wmd/tiomap3430.c |4 +-
21 files changed, 133 insertions(+), 145 deletions(-)
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 0/8] DSPBRIDGE: typedef cleanup

2010-02-02 Thread Hebbar, Shivananda
These patches remove the typedefs and replace it with normal C types:

Shivananda Hebbar (8)

DSPBRIDGE: typedef cleanup -DSP RTOS
DSPBRIDGE: typedef cleanup -PROCTYPE
DSPBRIDGE: typedef cleanup -PROCFAMILY
DSPBRIDGE: typedef cleanup -DSP_HSTREAM
DSPBRIDGE: typedef cleanup -DSP_HPROCESSOR
DSPBRIDGE: typedef cleanup -DSP_HNODE
DSPBRIDGE: typedef cleanup -BRD_STATUS
DSPBRIDGE: typedef cleanup -CHNL_MODE

arch/arm/plat-omap/include/dspbridge/brddefs.h  |1 -
arch/arm/plat-omap/include/dspbridge/chnldefs.h |2 -
arch/arm/plat-omap/include/dspbridge/cmm.h  |2 +-
arch/arm/plat-omap/include/dspbridge/dbdefs.h   |   18 +---
arch/arm/plat-omap/include/dspbridge/dispdefs.h |4 +-
arch/arm/plat-omap/include/dspbridge/dmm.h  |2 +-
arch/arm/plat-omap/include/dspbridge/drv.h  |6 +-
arch/arm/plat-omap/include/dspbridge/node.h |4 +-
arch/arm/plat-omap/include/dspbridge/proc.h |   43 +-
arch/arm/plat-omap/include/dspbridge/wcdioctl.h |   96 +++---
arch/arm/plat-omap/include/dspbridge/wmd.h  |4 +-
arch/arm/plat-omap/include/dspbridge/wmdchnl.h  |2 +-
drivers/dsp/bridge/pmgr/cmm.c   |2 +-
drivers/dsp/bridge/pmgr/dev.c   |6 +-
drivers/dsp/bridge/pmgr/dmm.c   |2 +-
drivers/dsp/bridge/pmgr/wcd.c   |4 +-
drivers/dsp/bridge/rmgr/node.c  |   12 ++--
drivers/dsp/bridge/rmgr/proc.c  |   54 +++---
drivers/dsp/bridge/rmgr/strm.c  |2 +-
drivers/dsp/bridge/wmd/chnl_sm.c|8 +-
drivers/dsp/bridge/wmd/tiomap3430.c |4 +-
21 files changed, 133 insertions(+), 145 deletions(-)
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 1/8] DSPBRIDGE: typedef cleanup -DSP RTOS

2010-02-02 Thread Hebbar, Shivananda
From 5855acc38e699f9abfcdd11f1dbd5d648feecb74 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 28 Jan 2010 18:57:02 -0600
Subject: [PATCH] DSPBRIDGE: Remove typedef used for DSPRTOS type and  replace 
it with normal C type.

This patch removes the typdef used for DSPRTOS type and replaces it with normal 
C type.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/dbdefs.h |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index fc9fdc8..049fcee 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -115,7 +115,6 @@

typedef u32 DSP_PROCFAMILY; /* Processor family */
typedef u32 DSP_PROCTYPE;   /* Processor type (w/in family) */
-   typedef u32 DSP_RTOSTYPE;   /* Type of DSP RTOS */

 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x)  (DSP_PROCESSORSTATECHANGE | 
\ @@ -422,7 +421,7 @@
u32 ulInternalMemSize;
u32 ulExternalMemSize;
u32 uProcessorID;
-   DSP_RTOSTYPE tyRunningRTOS;
+   long tyRunningRTOS;
s32 nNodeMinPriority;
s32 nNodeMaxPriority;
} ;
--
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 2/8] DSPBRIDGE: typedef cleanup -PROCTYPE

2010-02-02 Thread Hebbar, Shivananda
From 40939eb42f476a0ef7b4f67ebcb412b562daed81 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 28 Jan 2010 19:14:21 -0600
Subject: [PATCH] DSPBRIDGE: Remove typedef used for PROCTYPE and replace
   it with the normal C type

This patch removes the typedef used for PROCTYPE
and replace it with the normal C type.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |3 +--
 arch/arm/plat-omap/include/dspbridge/dispdefs.h |2 +-
 drivers/dsp/bridge/rmgr/node.c  |2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index 049fcee..37ac1dd 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -114,7 +114,6 @@
typedef HANDLE DSP_HSTREAM; /* Handle to a Stream object*/
 
typedef u32 DSP_PROCFAMILY; /* Processor family */
-   typedef u32 DSP_PROCTYPE;   /* Processor type (w/in family) */
 
 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x)  (DSP_PROCESSORSTATECHANGE | 
\ @@ -416,7 +415,7 @@
struct DSP_PROCESSORINFO {
u32 cbStruct;
DSP_PROCFAMILY uProcessorFamily;
-   DSP_PROCTYPE uProcessorType;
+   long uProcessorType;
u32 uClockRate;
u32 ulInternalMemSize;
u32 ulExternalMemSize;
diff --git a/arch/arm/plat-omap/include/dspbridge/dispdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dispdefs.h
index 9633bbc..f60b351 100644
--- a/arch/arm/plat-omap/include/dspbridge/dispdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dispdefs.h
@@ -27,7 +27,7 @@
/* Size of buffer for sending data to RMS */
u32 ulChnlBufSize;
DSP_PROCFAMILY procFamily;  /* eg, 5000 */
-   DSP_PROCTYPE procType;  /* eg, 5510 */
+   long procType;  /* eg, 5510 */
HANDLE hReserved1;  /* Reserved for future use. */
u32 hReserved2; /* Reserved for future use. */
} ;
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c 
index 336abea..92d51d1 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -153,7 +153,7 @@ struct NODE_MGR {
u32 ulChnlOffset;   /* Offset of chnl ids rsvd for RMS */
u32 ulChnlBufSize;  /* Buffer size for data to RMS */
DSP_PROCFAMILY procFamily;  /* eg, 5000 */
-   DSP_PROCTYPE procType;  /* eg, 5510 */
+   long procType;  /* eg, 5510 */
u32 uDSPWordSize;   /* Size of DSP word on host bytes */
u32 uDSPDataMauSize;/* Size of DSP data MAU */
u32 uDSPMauSize;/* Size of MAU */
--
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 3/8] DSPBRIDGE: typedef cleanup -PROCFAMILY

2010-02-02 Thread Hebbar, Shivananda
From 108329666e2bf829915c7de4a693fd83c00581a3 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 29 Jan 2010 15:03:02 -0600
Subject: [PATCH] DSPBRIDGE: Remove  typedef for PROCFAMILY and  Replace it
   with normal C type

This patch removes the typdef used for PROCFAMILY and replaces it with normal C 
type.
---
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |4 +---
 arch/arm/plat-omap/include/dspbridge/dispdefs.h |2 +-
 drivers/dsp/bridge/rmgr/node.c  |2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index 37ac1dd..36cd569 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -113,8 +113,6 @@
typedef HANDLE DSP_HPROCESSOR;  /* Handle to a Processor object */
typedef HANDLE DSP_HSTREAM; /* Handle to a Stream object*/
 
-   typedef u32 DSP_PROCFAMILY; /* Processor family */
-
 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x)  (DSP_PROCESSORSTATECHANGE | 
\
DSP_PROCESSORATTACH | \
@@ -414,7 +412,7 @@
  */
struct DSP_PROCESSORINFO {
u32 cbStruct;
-   DSP_PROCFAMILY uProcessorFamily;
+   long uProcessorFamily;
long uProcessorType;
u32 uClockRate;
u32 ulInternalMemSize;
diff --git a/arch/arm/plat-omap/include/dspbridge/dispdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dispdefs.h
index f60b351..a9a2961 100644
--- a/arch/arm/plat-omap/include/dspbridge/dispdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dispdefs.h
@@ -26,7 +26,7 @@
u32 ulChnlOffset; /* Offset of channel ids reserved for RMS */
/* Size of buffer for sending data to RMS */
u32 ulChnlBufSize;
-   DSP_PROCFAMILY procFamily;  /* eg, 5000 */
+   long procFamily;/* eg, 5000 */
long procType;  /* eg, 5510 */
HANDLE hReserved1;  /* Reserved for future use. */
u32 hReserved2; /* Reserved for future use. */
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c 
index 92d51d1..4bc0435 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -152,7 +152,7 @@ struct NODE_MGR {
u32 ulNumChnls; /* Total number of channels */
u32 ulChnlOffset;   /* Offset of chnl ids rsvd for RMS */
u32 ulChnlBufSize;  /* Buffer size for data to RMS */
-   DSP_PROCFAMILY procFamily;  /* eg, 5000 */
+   long procFamily;/* eg, 5000 */
long procType;  /* eg, 5510 */
u32 uDSPWordSize;   /* Size of DSP word on host bytes */
u32 uDSPDataMauSize;/* Size of DSP data MAU */
--
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 4/8] DSPBRIDGE: typedef cleanup -DSP_HSTREAM

2010-02-02 Thread Hebbar, Shivananda
From d3edb20499a7b084a7510d9930264ff2935a6048 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Fri, 29 Jan 2010 15:32:44 -0600
Subject: [PATCH] DSPBRIDGE :Remove typedefs used for stream handle and replace 
it with normal C types

This patch removes typedef used for stream handle and replaces it with the 
normal C types.
---
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |1 -
 arch/arm/plat-omap/include/dspbridge/drv.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/wcdioctl.h |   22 +++---
 3 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index 36cd569..c0d4c1d 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -111,7 +111,6 @@
 
typedef HANDLE DSP_HNODE;   /* Handle to a DSP Node object  */
typedef HANDLE DSP_HPROCESSOR;  /* Handle to a Processor object */
-   typedef HANDLE DSP_HSTREAM; /* Handle to a Stream object*/
 
 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x)  (DSP_PROCESSORSTATECHANGE | 
\ diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h 
b/arch/arm/plat-omap/include/dspbridge/drv.h
index e4e91f3..3eb1abd 100644
--- a/arch/arm/plat-omap/include/dspbridge/drv.h
+++ b/arch/arm/plat-omap/include/dspbridge/drv.h
@@ -116,7 +116,7 @@ struct DSPHEAP_RES_OBJECT {
 /* New structure (member of process context) abstracts stream resource info */ 
 struct STRM_RES_OBJECT {
s32streamAllocated; /* Stream status */
-   DSP_HSTREAM hStream;
+   void *hStream;
u32uNumBufs;
u32uDir;
struct STRM_RES_OBJECT *next;
diff --git a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h 
b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
index 0dcbef7..9d1cdb3 100644
--- a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
+++ b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
@@ -262,40 +262,40 @@ union Trapped_Args {
/* STRM module */
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
u32 uSize;
u8 *__user *apBuffer;
u32 uNumBufs;
} ARGS_STRM_ALLOCATEBUFFER;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
} ARGS_STRM_CLOSE;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
u8 *__user *apBuffer;
u32 uNumBufs;
} ARGS_STRM_FREEBUFFER;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
HANDLE *phEvent;
} ARGS_STRM_GETEVENTHANDLE;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
struct STRM_INFO __user *pStreamInfo;
u32 uStreamInfoSize;
} ARGS_STRM_GETINFO;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
bool bFlush;
} ARGS_STRM_IDLE;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
u8 *pBuffer;
u32 dwBytes;
u32 dwBufSize;
@@ -307,11 +307,11 @@ union Trapped_Args {
u32 uDirection;
u32 uIndex;
struct STRM_ATTR __user *pAttrIn;
-   DSP_HSTREAM __user *phStream;
+   void *__user *phStream;
} ARGS_STRM_OPEN;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
u8 *__user *pBufPtr;
u32 __user *pBytes;
u32 __user *pBufSize;
@@ -319,14 +319,14 @@ union Trapped_Args {
} ARGS_STRM_RECLAIM;
 
struct {
-   DSP_HSTREAM hStream;
+   void *hStream;
u32 uEventMask;
u32 uNotifyType;
struct DSP_NOTIFICATION __user *hNotification;
} ARGS_STRM_REGISTERNOTIFY;
 
struct {
-   DSP_HSTREAM __user *aStreamTab;
+   void *__user *aStreamTab;
u32 nStreams;
u32 __user *pMask;
u32 uTimeout;
--
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 5/8] DSPBRIDGE: typedef cleanup -DSP_HPROCESSOR

2010-02-02 Thread Hebbar, Shivananda
From 82f402b577d1afb535b319eed4a18087010ef679 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 28 Jan 2010 20:06:40 -0600
Subject: [PATCH] DSPBRIDGE: Remove typdef used for Processor type replace it 
with standard C type

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/cmm.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |2 -
 arch/arm/plat-omap/include/dspbridge/dmm.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/drv.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/node.h |2 +-
 arch/arm/plat-omap/include/dspbridge/proc.h |   41 +++---
 arch/arm/plat-omap/include/dspbridge/wcdioctl.h |   40 +++---
 drivers/dsp/bridge/pmgr/cmm.c   |2 +-
 drivers/dsp/bridge/pmgr/dev.c   |6 ++--
 drivers/dsp/bridge/pmgr/dmm.c   |2 +-
 drivers/dsp/bridge/pmgr/wcd.c   |2 +-
 drivers/dsp/bridge/rmgr/node.c  |2 +-
 drivers/dsp/bridge/rmgr/proc.c  |   42 +++---
 13 files changed, 72 insertions(+), 75 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cmm.h 
b/arch/arm/plat-omap/include/dspbridge/cmm.h
index fc2f51e..bad3ab0 100644
--- a/arch/arm/plat-omap/include/dspbridge/cmm.h
+++ b/arch/arm/plat-omap/include/dspbridge/cmm.h
@@ -160,7 +160,7 @@
  *  hDevObject != NULL
  *  Ensures:
  */
- extern DSP_STATUS CMM_GetHandle(DSP_HPROCESSOR hProcessor,
+ extern DSP_STATUS CMM_GetHandle(void *hProcessor,
  OUT struct CMM_OBJECT **phCmmMgr);

 /*
diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index 10d5514..e3be0fc 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -111,8 +111,6 @@

  typedef HANDLE DSP_HNODE; /* Handle to a DSP Node object  */

- typedef HANDLE DSP_HPROCESSOR; /* Handle to a Processor object */
-
 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x)  (DSP_PROCESSORSTATECHANGE | 
\
 DSP_PROCESSORATTACH | \
diff --git a/arch/arm/plat-omap/include/dspbridge/dmm.h 
b/arch/arm/plat-omap/include/dspbridge/dmm.h
index 13a5088..688473a 100644
--- a/arch/arm/plat-omap/include/dspbridge/dmm.h
+++ b/arch/arm/plat-omap/include/dspbridge/dmm.h
@@ -38,7 +38,7 @@
  *  This is typically called from the client process.
  */

- extern DSP_STATUS DMM_GetHandle(DSP_HPROCESSOR hProcessor,
+ extern DSP_STATUS DMM_GetHandle(void *hProcessor,
  OUT struct DMM_OBJECT **phDmmMgr);

  extern DSP_STATUS DMM_ReserveMemory(struct DMM_OBJECT *hDmmMgr, diff --git 
a/arch/arm/plat-omap/include/dspbridge/drv.h 
b/arch/arm/plat-omap/include/dspbridge/drv.h
index 3eb1abd..c6d4626 100644
--- a/arch/arm/plat-omap/include/dspbridge/drv.h
+++ b/arch/arm/plat-omap/include/dspbridge/drv.h
@@ -134,7 +134,7 @@ struct PROCESS_CONTEXT{
  enum GPP_PROC_RES_STATE resState;

  /* Handle to Processor */
- DSP_HPROCESSOR hProcessor;
+ void *hProcessor;

  /* DSP Node resources */
  struct NODE_RES_OBJECT *pNodeList;
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index df15884..9f0110a 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -570,7 +570,7 @@
  *  Parameters:
  *
  */
- extern DSP_STATUS NODE_GetUUIDProps(DSP_HPROCESSOR hProcessor,
+ extern DSP_STATUS NODE_GetUUIDProps(void *hProcessor,
  IN CONST struct DSP_UUID *pNodeId,
  OUT struct DSP_NDBPROPS
  *pNodeProps);
diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h 
b/arch/arm/plat-omap/include/dspbridge/proc.h
index 8dbdaac..bbb089e 100644
--- a/arch/arm/plat-omap/include/dspbridge/proc.h
+++ b/arch/arm/plat-omap/include/dspbridge/proc.h
@@ -51,8 +51,7 @@
  */
  extern DSP_STATUS PROC_Attach(u32 uProcessor,
   OPTIONAL CONST struct DSP_PROCESSORATTRIN
-  *pAttrIn,
-  OUT DSP_HPROCESSOR *phProcessor,
+  *pAttrIn, void **phProcessor,
   struct PROCESS_CONTEXT *pr_ctxt);

 /*
@@ -101,7 +100,7 @@
  *  Details:
  *  This function Calls WMD_BRD_Ioctl.
  */
- extern DSP_STATUS PROC_Ctrl(DSP_HPROCESSOR hProcessor,
+ extern DSP_STATUS PROC_Ctrl(void *hProcessor,
 u32 dwCmd, IN struct DSP_CBDATA *pArgs);

 /*
@@ -153,7 +152,7 @@
  *  Ensures:
  *  Details:
  */
- extern DSP_STATUS PROC_EnumNodes(DSP_HPROCESSOR hProcessor,
+ extern DSP_STATUS PROC_EnumNodes(void *hProcessor,
   IN DSP_HNODE *aNodeTab,
   IN u32 uNodeTabSize,
   OUT u32 *puNumNodes,
@@ -187,7 +186,7 @@
  *  This function currently returns
  *  DSP_ENOTIMPL, and does not write any data to the pResourceInfo struct.
  */
- extern DSP_STATUS PROC_GetResourceInfo(DSP_HPROCESSOR hProcessor,
+ extern DSP_STATUS PROC_GetResourceInfo(void *hProcessor,
 u32 uResourceType,
 OUT 

[Patch 6/8] DSPBRIDGE: typedef cleanup -DSP_HNODE

2010-02-02 Thread Hebbar, Shivananda
From b90284e0c81aa983ee60ce1fee8d69beba4061a6 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 28 Jan 2010 20:22:04 -0600
Subject: [PATCH] DSPBRIDGE: Remove typedef for the node handle and replace it 
with the C normal type.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |6 +---
 arch/arm/plat-omap/include/dspbridge/drv.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/node.h |2 +-
 arch/arm/plat-omap/include/dspbridge/proc.h |2 +-
 arch/arm/plat-omap/include/dspbridge/wcdioctl.h |   34 +++---
 drivers/dsp/bridge/pmgr/wcd.c   |2 +-
 drivers/dsp/bridge/rmgr/node.c  |4 +-
 drivers/dsp/bridge/rmgr/proc.c  |4 +-
 8 files changed, 27 insertions(+), 29 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index e3be0fc..472b62f 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -109,8 +109,6 @@
 /* Types defined for 'Bridge API */
  typedef u32 DSP_STATUS; /* API return code type */
 
- typedef HANDLE DSP_HNODE; /* Handle to a DSP Node object  */
-
 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x)  (DSP_PROCESSORSTATECHANGE | 
\
 DSP_PROCESSORATTACH | \
@@ -318,7 +316,7 @@
   u32 cbStruct;
   enum DSP_CONNECTTYPE lType;
   u32 uThisNodeStreamIndex;
-  DSP_HNODE hConnectedNode;
+  void *hConnectedNode;
   struct DSP_UUID uiConnectedNodeID;
   u32 uConnectedNodeStreamIndex;
  } ;
@@ -368,7 +366,7 @@
   struct DSP_NDBPROPS nbNodeDatabaseProps;
   u32 uExecutionPriority;
   enum NODE_STATE nsExecutionState;
-  DSP_HNODE hDeviceOwner;
+  void *hDeviceOwner;
   u32 uNumberStreams;
   struct DSP_STREAMCONNECT scStreamConnection[16];
   u32 uNodeEnv;
diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h 
b/arch/arm/plat-omap/include/dspbridge/drv.h
index c6d4626..b31c8e3 100644
--- a/arch/arm/plat-omap/include/dspbridge/drv.h
+++ b/arch/arm/plat-omap/include/dspbridge/drv.h
@@ -84,7 +84,7 @@
 
 /* New structure (member of process context) abstracts NODE resource info */  
struct NODE_RES_OBJECT {
- DSP_HNODE   hNode;
+ void *hNode;
  s32nodeAllocated; /* Node status */
  s32heapAllocated; /* Heap status */
  s32streamsAllocated; /* Streams status */
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h 
b/arch/arm/plat-omap/include/dspbridge/node.h
index 9f0110a..2a45fc0 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -308,7 +308,7 @@
  *(*puAllocated == *puNumNodes)
  */
  extern DSP_STATUS NODE_EnumNodes(struct NODE_MGR *hNodeMgr,
-  IN DSP_HNODE *aNodeTab,
+  void **aNodeTab,
   u32 uNodeTabSize,
   OUT u32 *puNumNodes,
   OUT u32 *puAllocated);
diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h 
b/arch/arm/plat-omap/include/dspbridge/proc.h
index bbb089e..d5edbd5 100644
--- a/arch/arm/plat-omap/include/dspbridge/proc.h
+++ b/arch/arm/plat-omap/include/dspbridge/proc.h
@@ -153,7 +153,7 @@
  *  Details:
  */
  extern DSP_STATUS PROC_EnumNodes(void *hProcessor,
-  IN DSP_HNODE *aNodeTab,
+  void **aNodeTab,
   IN u32 uNodeTabSize,
   OUT u32 *puNumNodes,
   OUT u32 *puAllocated);
diff --git a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h 
b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
index 4f5a274..eccda18 100644
--- a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
+++ b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
@@ -79,7 +79,7 @@ union Trapped_Args {
 
  struct {
   void *hProcessor;
-  DSP_HNODE __user *aNodeTab;
+  void *__user *aNodeTab;
   u32 uNodeTabSize;
   u32 __user *puNumNodes;
   u32 __user *puAllocated;
@@ -177,79 +177,79 @@ union Trapped_Args {
   struct DSP_UUID __user *pNodeID;
   struct DSP_CBDATA __user *pArgs;
   struct DSP_NODEATTRIN __user *pAttrIn;
-  DSP_HNODE __user *phNode;
+  void *__user *phNode;
  } ARGS_NODE_ALLOCATE;
 
  struct {
-  DSP_HNODE hNode;
+  void *hNode;
   u32 uSize;
   struct DSP_BUFFERATTR __user *pAttr;
   u8 *__user *pBuffer;
  } ARGS_NODE_ALLOCMSGBUF;
 
  struct {
-  DSP_HNODE hNode;
+  void *hNode;
   s32 iPriority;
  } ARGS_NODE_CHANGEPRIORITY;
 
  struct {
-  DSP_HNODE hNode;
+  void *hNode;
   u32 uStream;
-  DSP_HNODE hOtherNode;
+  void *hOtherNode;
   u32 uOtherStream;
   struct DSP_STRMATTR __user *pAttrs;
   struct DSP_CBDATA __user *pConnParam;
  } ARGS_NODE_CONNECT;
 
  struct {
-  DSP_HNODE hNode;
+  void *hNode;
  } ARGS_NODE_CREATE;
 
  struct {
-  DSP_HNODE hNode;
+  void *hNode;
  } ARGS_NODE_DELETE;
 
  struct {
-  DSP_HNODE hNode;
+  void *hNode;
   struct DSP_BUFFERATTR __user *pAttr;
   u8 *pBuffer;
  } ARGS_NODE_FREEMSGBUF;
 
  struct {
-  DSP_HNODE hNode;
+  void *hNode;
   struct DSP_NODEATTR __user *pAttr;
   u32 uAttrSize;
  } 

[Patch 7/8] DSPBRIDGE: typedef cleanup -BRD_STATUS

2010-02-02 Thread Hebbar, Shivananda
From 9c41e6639d93696cf92c740c026d887ab77f16a9 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 28 Jan 2010 20:40:48 -0600
Subject: [PATCH] DSPBRIDGE: Remove typedef BRD_STATUS and replace it with
   normal C type

This patch removes the typedef BRD_STATUS and replaces it with the normal C 
type. Here BRD_STATUS need not be u32 type.
So replacing it with a short int type.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/brddefs.h |1 -
 arch/arm/plat-omap/include/dspbridge/wmd.h |2 +-
 drivers/dsp/bridge/rmgr/proc.c |   10 +-
 drivers/dsp/bridge/wmd/tiomap3430.c|4 ++--
 4 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/brddefs.h 
b/arch/arm/plat-omap/include/dspbridge/brddefs.h
index ca503e2..ff83166 100644
--- a/arch/arm/plat-omap/include/dspbridge/brddefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/brddefs.h
@@ -32,7 +32,6 @@
 #define BRD_RETENTION 0x8   /* Retention mode */
 #define BRD_DSP_HIBERNATION 0x9   /* DSP initiated hibernation */
 #define BRD_ERROR  0xA   /* Board state is Error */
-   typedef u32 BRD_STATUS;
 
 /* BRD Object */
struct BRD_OBJECT;
diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h 
b/arch/arm/plat-omap/include/dspbridge/wmd.h
index 748b1c6..70f3970 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmd.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmd.h
@@ -244,7 +244,7 @@
  */
typedef DSP_STATUS(*
   WMD_BRD_STATUS) (struct WMD_DEV_CONTEXT *hDevContext,
-   OUT BRD_STATUS * pdwState);
+   int *pdwState);
 
 /*
  *   WMD_BRD_Read 
diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c 
index 84f4cb5..a4bd721 100644
--- a/drivers/dsp/bridge/rmgr/proc.c
+++ b/drivers/dsp/bridge/rmgr/proc.c
@@ -808,7 +808,7 @@ DSP_STATUS PROC_GetState(DSP_HPROCESSOR hProcessor,  {
DSP_STATUS status = DSP_SOK;
struct PROC_OBJECT *pProcObject = (struct PROC_OBJECT *)hProcessor;
-   BRD_STATUS brdStatus;
+   int brdStatus;
struct DEH_MGR *hDehMgr;
 
DBC_Require(cRefs  0);
@@ -949,7 +949,7 @@ DSP_STATUS PROC_Load(DSP_HPROCESSOR hProcessor, IN CONST 
s32 iArgc,
u32 dwExtEnd;
u32 uProcId;
 #ifdef CONFIG_BRIDGE_DEBUG
-   BRD_STATUS uBrdState;
+   int uBrdState;
 #endif
 
 #ifdef OPT_LOAD_TIME_INSTRUMENTATION
@@ -1442,7 +1442,7 @@ DSP_STATUS PROC_Start(DSP_HPROCESSOR hProcessor)
struct COD_MANAGER *hCodMgr;/* Code manager handle*/
u32 dwDspAddr;  /* Loaded code's entry point.*/
 #ifdef CONFIG_BRIDGE_DEBUG
-   BRD_STATUS uBrdState;
+   int uBrdState;
 #endif
DBC_Require(cRefs  0);
GT_1trace(PROC_DebugMask, GT_ENTER, Entered PROC_Start, args:\n\t
@@ -1538,7 +1538,7 @@ DSP_STATUS PROC_Stop(DSP_HPROCESSOR hProcessor)
u32 uNodeTabSize = 1;
u32 uNumNodes = 0;
u32 uNodesAllocated = 0;
-   BRD_STATUS uBrdState;
+   int uBrdState;
 
DBC_Require(cRefs  0);
GT_1trace(PROC_DebugMask, GT_ENTER, Entered PROC_Stop, args:\n\t
@@ -1730,7 +1730,7 @@ static DSP_STATUS PROC_Monitor(struct PROC_OBJECT 
*hProcObject)
struct PROC_OBJECT *pProcObject = (struct PROC_OBJECT *)hProcObject;
struct MSG_MGR *hMsgMgr;
 #ifdef CONFIG_BRIDGE_DEBUG
-   BRD_STATUS uBrdState;
+   int uBrdState;
 #endif
 
DBC_Require(cRefs  0);
diff --git a/drivers/dsp/bridge/wmd/tiomap3430.c 
b/drivers/dsp/bridge/wmd/tiomap3430.c
index 3b9052e..a17a9ff 100644
--- a/drivers/dsp/bridge/wmd/tiomap3430.c
+++ b/drivers/dsp/bridge/wmd/tiomap3430.c
@@ -93,7 +93,7 @@ static DSP_STATUS WMD_BRD_Read(struct WMD_DEV_CONTEXT 
*pDevContext,  static DSP_STATUS WMD_BRD_Start(struct WMD_DEV_CONTEXT 
*pDevContext,
u32 dwDSPAddr);
 static DSP_STATUS WMD_BRD_Status(struct WMD_DEV_CONTEXT *pDevContext,
-   OUT BRD_STATUS *pdwState);
+   int *pdwState);
 static DSP_STATUS WMD_BRD_Stop(struct WMD_DEV_CONTEXT *pDevContext);  static 
DSP_STATUS WMD_BRD_Write(struct WMD_DEV_CONTEXT *pDevContext,
IN u8 *pbHostBuf,
@@ -926,7 +926,7 @@ static DSP_STATUS WMD_BRD_Delete(struct WMD_DEV_CONTEXT 
*hDevContext)
  *  Returns the board status.
  */
 static DSP_STATUS WMD_BRD_Status(struct WMD_DEV_CONTEXT *hDevContext,
-OUT BRD_STATUS *pdwState)
+int *pdwState)
 {
struct WMD_DEV_CONTEXT *pDevContext = hDevContext;
*pdwState = pDevContext-dwBrdState;
--
1.6.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 8/8] DSPBRIDGE: typedef cleanup -CHNL_MODE

2010-02-02 Thread Hebbar, Shivananda
From 23b8b63a9f57c20b3f87ac886623d227d5448e8f Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 28 Jan 2010 20:53:48 -0600
Subject: [PATCH] DSPBRIDGE: Remove typedef CHNL_MODE and replace it with
   normal C type

This patch removes the typedef CHNL_MODE.
CHNL_MODE values are well within the range of short int.
Hence changing it from u32 type to short int.

Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/chnldefs.h |2 --
 arch/arm/plat-omap/include/dspbridge/wmd.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/wmdchnl.h  |2 +-
 drivers/dsp/bridge/rmgr/node.c  |2 +-
 drivers/dsp/bridge/rmgr/strm.c  |2 +-
 drivers/dsp/bridge/wmd/chnl_sm.c|8 
 6 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/chnldefs.h 
b/arch/arm/plat-omap/include/dspbridge/chnldefs.h
index be405ba..43df8b7 100644
--- a/arch/arm/plat-omap/include/dspbridge/chnldefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/chnldefs.h
@@ -45,8 +45,6 @@
 #define CHNL_IsIOCancelled(ioc) (ioc.status  CHNL_IOCSTATCANCEL)
 #define CHNL_IsTimedOut(ioc)(ioc.status  CHNL_IOCSTATTIMEOUT)
 
-/* CHNL types: */
-   typedef u32 CHNL_MODE;  /* Channel transfer mode. */
 
 /* Channel attributes: */
struct CHNL_ATTRS {
diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h 
b/arch/arm/plat-omap/include/dspbridge/wmd.h
index 70f3970..95c79f2 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmd.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmd.h
@@ -418,7 +418,7 @@ typedef DSP_STATUS(*WMD_BRD_WRITE)(struct WMD_DEV_CONTEXT 
*hDevContext,
typedef DSP_STATUS(*WMD_CHNL_OPEN) (OUT struct CHNL_OBJECT
   **phChnl,
   struct CHNL_MGR *hChnlMgr,
-  CHNL_MODE uMode,
+  short int chnlMode,
   u32 uChnlId,
   CONST IN OPTIONAL struct
   CHNL_ATTRS *pAttrs);
diff --git a/arch/arm/plat-omap/include/dspbridge/wmdchnl.h 
b/arch/arm/plat-omap/include/dspbridge/wmdchnl.h
index 4b733d8..9e73516 100644
--- a/arch/arm/plat-omap/include/dspbridge/wmdchnl.h
+++ b/arch/arm/plat-omap/include/dspbridge/wmdchnl.h
@@ -33,7 +33,7 @@
 
extern DSP_STATUS WMD_CHNL_Open(OUT struct CHNL_OBJECT **phChnl,
struct CHNL_MGR *hChnlMgr,
-   CHNL_MODE uMode,
+   short int chnlMode,
u32 uChnlId,
CONST IN OPTIONAL struct CHNL_ATTRS
*pAttrs);
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c 
index 5352923..538c806 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -895,7 +895,7 @@ DSP_STATUS NODE_Connect(struct NODE_OBJECT *hNode1, u32 
uStream1,
struct STREAM *pStream;
GB_BitNum pipeId = GB_NOBITS;
GB_BitNum chnlId = GB_NOBITS;
-   CHNL_MODE uMode;
+   short int uMode;
u32 dwLength;
DSP_STATUS status = DSP_SOK;
DBC_Require(cRefs  0);
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c 
index febb6c2..f03064e 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -524,7 +524,7 @@ DSP_STATUS STRM_Open(struct NODE_OBJECT *hNode, u32 uDir, 
u32 uIndex,
struct WMD_DRV_INTERFACE *pIntfFxns;
u32 ulChnlId;
struct STRM_OBJECT *pStrm = NULL;
-   CHNL_MODE uMode;
+   short int uMode;
struct CHNL_ATTRS chnlAttrs;
DSP_STATUS status = DSP_SOK;
struct CMM_OBJECT *hCmmMgr = NULL;  /* Shared memory manager hndl */
diff --git a/drivers/dsp/bridge/wmd/chnl_sm.c b/drivers/dsp/bridge/wmd/chnl_sm.c
index ca5662d..5d3f71e 100644
--- a/drivers/dsp/bridge/wmd/chnl_sm.c
+++ b/drivers/dsp/bridge/wmd/chnl_sm.c
@@ -253,7 +253,7 @@ DSP_STATUS WMD_CHNL_CancelIO(struct CHNL_OBJECT *hChnl)
DSP_STATUS status = DSP_SOK;
struct CHNL_OBJECT *pChnl = (struct CHNL_OBJECT *)hChnl;
u32 iChnl = -1;
-   CHNL_MODE uMode;
+   short int chnlMode;
struct CHNL_IRP *pChirp;
struct CHNL_MGR *pChnlMgr = NULL;
 
@@ -483,7 +483,7 @@ DSP_STATUS WMD_CHNL_FlushIO(struct CHNL_OBJECT *hChnl, u32 
dwTimeOut)  {
DSP_STATUS status = DSP_SOK;
struct CHNL_OBJECT *pChnl = (struct CHNL_OBJECT *)hChnl;
-   CHNL_MODE uMode = -1;
+   short int chnlMode = -1;
struct CHNL_MGR *pChnlMgr;
struct CHNL_IOC chnlIOC;
/* Check args:  */
@@ -758,7 +758,7 @@ DSP_STATUS 

RE: [PATCH] DSPBRIDGE: Remove conditional check from the InputMsg function

2010-01-27 Thread Hebbar, Shivananda
 -Original Message-
 From: Ameya Palande [mailto:ameya.pala...@nokia.com] 
 Sent: Wednesday, January 27, 2010 3:44 AM
 To: Ramirez Luna, Omar
 Cc: linux-omap; Doyu Hiroshi (Nokia-D/Helsinki); Contreras Felipe (Nokia- 
 D/Helsinki); Menon, Nishanth; Hebbar, Shivananda
Subject: Re: [PATCH] DSPBRIDGE: Remove conditional check from the InputMsg 
function

Hi Shivananda,

On Wed, 2010-01-27 at 02:44 +0100, ext Omar Ramirez Luna wrote:
 From: Shivananda Hebbar x0heb...@ti.com
 
 This patch removes the conditional check which can result in
 message skip.
 
 Discovered-by: Bhavin Shah bs...@ti.com
 Signed-off-by: Shivananda Hebbar x0heb...@ti.com
 ---
  drivers/dsp/bridge/wmd/io_sm.c |5 +
  1 files changed, 1 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
 index 39b37a6..b2092a2 100644
 --- a/drivers/dsp/bridge/wmd/io_sm.c
 +++ b/drivers/dsp/bridge/wmd/io_sm.c
 @@ -1328,7 +1328,7 @@ static void InputMsg(struct IO_MGR *pIOMgr, struct 
 MSG_MGR *hMsgMgr)
   fInputEmpty = IO_GetValue(pIOMgr-hWmdContext, struct MSG, pCtrl,
bufEmpty);
   uMsgs = IO_GetValue(pIOMgr-hWmdContext, struct MSG, pCtrl, size);
 - if (fInputEmpty || uMsgs = hMsgMgr-uMaxMsgs)
 + if (fInputEmpty)
   goto func_end;
  
   pMsgInput = pIOMgr-pMsgInput;
 @@ -1356,9 +1356,6 @@ static void InputMsg(struct IO_MGR *pIOMgr, struct 
 MSG_MGR *hMsgMgr)
* input locations have been set up. If all nodes were
* cleaned up, hMsgMgr-uMaxMsgs should be 0.
*/
 - if (hMsgQueue  uMsgs  hMsgMgr-uMaxMsgs)
 - goto func_end;
 -
   while (hMsgQueue != NULL) {
   if (msg.dwId == hMsgQueue-dwId) {
   /* Found it */

Forgive me for the stupid question, but now since uMsgs =
hMsgMgr-uMaxMsgs condition is removed, what is the side effect of that?
At least I am not able to understand how it affects the logic just by
seeing your patch. I guess if you can modify the patch description to
reflect the logic behind this then it will be nice :)

I don't see any side effects with the removal of this conditional check.
Intention of the patch was to remove the redundant check on uMaxMsgs as the DSP 
side of the bridge code check will ensure that uMsgs can't exceed uMaxMsgs.
If you are ok with this explanation, I will update the description and resend 
it.

And the initial patch description was written with the intention that in case 
the uMsgs exceeds the uMaxMessages (), then we shouldn't discard it by 
returning from function but process it. 


Regards,
Shivananda


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH ] DSPBRIDGE:Remove conditional check from the InputMsg function

2009-12-29 Thread Hebbar, Shivananda
From 03b5f57849eda16fb659c4288ae2dc9a2d1582a9 Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Thu, 17 Dec 2009 17:00:22 -0600
Subject: [PATCH] DSPBRIDGE: Remove conditional check from the InputMsg function

This patch removes the conditional check which can result in
message skip.

Discovered-by: Bhavin Shah   bs...@ti.com
Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 drivers/dsp/bridge/wmd/io_sm.c |   13 ++---
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
index a6c8e31..5b7b004 100644
--- a/drivers/dsp/bridge/wmd/io_sm.c
+++ b/drivers/dsp/bridge/wmd/io_sm.c
@@ -1308,7 +1308,7 @@ static void InputMsg(struct IO_MGR *pIOMgr, struct 
MSG_MGR *hMsgMgr)
fInputEmpty = IO_GetValue(pIOMgr-hWmdContext, struct MSG, pCtrl,
 bufEmpty);
uMsgs = IO_GetValue(pIOMgr-hWmdContext, struct MSG, pCtrl, size);
-   if (fInputEmpty || uMsgs = hMsgMgr-uMaxMsgs)
+   if (fInputEmpty)
goto func_end;
 
pMsgInput = pIOMgr-pMsgInput;
@@ -1331,12 +1331,11 @@ static void InputMsg(struct IO_MGR *pIOMgr, struct 
MSG_MGR *hMsgMgr)
DBG_Trace(DBG_LEVEL7, InputMsg RECVD: dwCmd=0x%x dwArg1=0x%x 
 dwArg2=0x%x dwId=0x%x \n, msg.msg.dwCmd,
 msg.msg.dwArg1, msg.msg.dwArg2, msg.dwId);
-/*  Interrupt may occur before shared memory and message
-*  input locations have been set up. If all nodes were
-*  cleaned up, hMsgMgr-uMaxMsgs should be 0.  */
-   if (hMsgQueue  uMsgs  hMsgMgr-uMaxMsgs)
-   goto func_end;
-
+   /*
+* Interrupt may occur before shared memory and message
+* input locations have been set up. If all nodes were
+* cleaned up, hMsgMgr-uMaxMsgs should be 0.
+*/
while (hMsgQueue != NULL) {
if (msg.dwId == hMsgQueue-dwId) {
/* Found it */
-- 
1.6.0.4
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH ] DSPBRIDGE: Remove enum constants and replace with macros

2009-12-28 Thread Hebbar, Shivananda
From 794c183472e9c57e0fce98bac95b5402991e Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar x0heb...@ti.com
Date: Tue, 22 Dec 2009 16:03:20 -0600
Subject: [PATCH] DSPBRIDGE: Remove enum definitions and replace with macros

This patch removes unrelated enum constants and replaces it with
the macros

 Signed-off-by: Shivananda Hebbar x0heb...@ti.com
---
 arch/arm/plat-omap/include/dspbridge/_chnl_sm.h |   10 --
 arch/arm/plat-omap/include/dspbridge/cmm.h  |2 +-
 arch/arm/plat-omap/include/dspbridge/cmmdefs.h  |   20 +++-
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |   10 +++---
 arch/arm/plat-omap/include/dspbridge/io_sm.h|6 +++---
 drivers/dsp/bridge/hw/IPIAccInt.h   |   15 ---
 drivers/dsp/bridge/hw/hw_defs.h |   11 +--
 drivers/dsp/bridge/hw/hw_mmu.c  |4 ++--
 drivers/dsp/bridge/hw/hw_mmu.h  |7 ---
 drivers/dsp/bridge/hw/hw_prcm.c |4 ++--
 drivers/dsp/bridge/pmgr/cmm.c   |5 ++---
 drivers/dsp/bridge/wmd/_tiomap.h|   22 ++
 drivers/dsp/bridge/wmd/io_sm.c  |4 ++--
 13 files changed, 33 insertions(+), 87 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h 
b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
index 28af799..2cd046a 100644
--- a/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
+++ b/arch/arm/plat-omap/include/dspbridge/_chnl_sm.h
@@ -77,6 +77,10 @@
 #endif
 
 #define MAXOPPS 16
+#define SHM_CURROPP 0
+#define SHM_OPPINFO 1
+#define SHM_GETOPP  2  /* Get DSP requested OPP info */
+
 
 struct oppTableEntry {
 u32 voltage;
@@ -105,12 +109,6 @@ struct loadMonStruct {
 u32 predDspFreq;
 };
 
-   enum SHM_DESCTYPE {
-   SHM_CURROPP = 0,
-   SHM_OPPINFO = 1,
-   SHM_GETOPP = 2, /* Get DSP requested OPP info */
-   } ;
-
 /* Structure in shared between DSP and PC for communication.*/
struct SHM {
u32 dspFreeMask;/* Written by DSP, read by PC. */
diff --git a/arch/arm/plat-omap/include/dspbridge/cmm.h 
b/arch/arm/plat-omap/include/dspbridge/cmm.h
index 0df8b83..d98bffa 100644
--- a/arch/arm/plat-omap/include/dspbridge/cmm.h
+++ b/arch/arm/plat-omap/include/dspbridge/cmm.h
@@ -261,7 +261,7 @@
   unsigned int dwGPPBasePA,
   u32 ulSize,
   u32 dwDSPAddrOffset,
-  enum CMM_CNVTTYPE cFactor,
+  int  cFactor,
   unsigned int dwDSPBase,
   u32 ulDSPSize,
   u32 *pulSegId,
diff --git a/arch/arm/plat-omap/include/dspbridge/cmmdefs.h 
b/arch/arm/plat-omap/include/dspbridge/cmmdefs.h
index a779377..eeecf94 100644
--- a/arch/arm/plat-omap/include/dspbridge/cmmdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/cmmdefs.h
@@ -55,15 +55,10 @@
  *  For typical platforms:
  *  converted Address = PaDSP + ( cFactor * addressToConvert).
  */
-   enum CMM_CNVTTYPE {
-   CMM_SUBFROMDSPPA = -1,
-   /* PreOMAP is special case: not simple offset */
-   CMM_POMAPEMIF2DSPBUS = 0,
-   CMM_ADDTODSPPA = 1
-   } ;
 
-#define CMM_DEFLTDSPADDROFFSET  0
-#define CMM_DEFLTCONVFACTOR CMM_POMAPEMIF2DSPBUS /* PreOMAP DSPBUS-EMIF 
*/
+#define CMM_SUBFROMDSPPA -1
+#define CMM_ADDTODSPPA 1
+
 #define CMM_ALLSEGMENTS 0xFF   /* All SegIds */
 #define CMM_MAXGPPSEGS  1  /* Maximum # of SM segs */
 
@@ -120,15 +115,6 @@
CMM_PA2DSPPA = 3,   /* GPP Pa to DSP Pa */
CMM_DSPPA2PA = 4,   /* DSP Pa to GPP Pa */
} ;
-
-/*
- *  Used to map between device process virt addr and dsp addr.
- */
-   enum CMM_KERNMAPTYPE {
-   CMM_KERNVA2DSP = 0, /* Device process context to dsp address. */
-   CMM_DSP2KERNVA = 1, /* Dsp address to device process context. */
-   } ;
-
struct CMM_OBJECT;
struct CMM_XLATOROBJECT;
 
diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h 
b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index 3570171..63b7d5d 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -155,6 +155,9 @@
 
 #defineMAX_PROFILES 16
 
+/* DSP CHIP TYPE */
+#define DSPTYPE_64  0x99
+
 /* Types defined for 'Bridge API */
typedef u32 DSP_STATUS; /* API return code type */
 
@@ -451,13 +454,6 @@
u32 cbStruct;
u32 uTimeout;
} ;
-
-   enum chipTypes {
-   DSPTYPE_55 = 6,
-   IVA_ARM7 = 0x97,
-   DSPTYPE_64 = 0x99
-