Skip to contentSkip to conversation

trivial cleanups

PATCH Applied Omar Ramirez Luna 1 participant 10 messages Jan 15, 2010 – Jan 18, 2010 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover trivial cleanups

This is a small set of trivial cleanups piled up in the patch queue.

Higlights:
- New patch with contributors file.
- "Fix multiline macros to use do while" patch is dropped for rework.

Omar Ramirez Luna (10):
DSPBRIDGE: trivial license fix in tramp and tramp_table_c6000
DSPBRIDGE: contributors file
DSPBRIDGE: trivial file history cleanup for headers
DSPBRIDGE: trivial file history cleanup for driver sources
DSPBRIDGE: checkpatch - space required after comma
DSPBRIDGE: checkpatch - space required before open parenthesis
DSPBRIDGE: checkpatch spacing and indentation
DSPBRIDGE: Checkpatch - line over 80 characters
DSPBRIDGE: checkpatch - printk() should include KERN_ facility level
DSPBRIDGE: trivial cleanup for io_sm

 Documentation/tidspbridge/CONTRIBUTORS            |   70 ++
 arch/arm/plat-omap/include/dspbridge/_chnl_sm.h   |   46 +-
 arch/arm/plat-omap/include/dspbridge/_dcd.h       |   40 +-
 arch/arm/plat-omap/include/dspbridge/brddefs.h    |   18 +-
 arch/arm/plat-omap/include/dspbridge/cfg.h        |   50 +--
 arch/arm/plat-omap/include/dspbridge/cfgdefs.h    |   27 +-
 arch/arm/plat-omap/include/dspbridge/chnl.h       |   45 +-
 arch/arm/plat-omap/include/dspbridge/chnl_sm.h    |   30 +-
 arch/arm/plat-omap/include/dspbridge/chnldefs.h   |   26 +-
 arch/arm/plat-omap/include/dspbridge/chnlpriv.h   |   33 +-
 arch/arm/plat-omap/include/dspbridge/clk.h        |   11 +-
 arch/arm/plat-omap/include/dspbridge/cmm.h        |   66 +--
 arch/arm/plat-omap/include/dspbridge/cmmdefs.h    |   20 +-
 arch/arm/plat-omap/include/dspbridge/cod.h        |   58 +--
 arch/arm/plat-omap/include/dspbridge/dbc.h        |   32 +-
 arch/arm/plat-omap/include/dspbridge/dbdcd.h      |   26 +-
 arch/arm/plat-omap/include/dspbridge/dbdcddef.h   |   27 +-
 arch/arm/plat-omap/include/dspbridge/dbdefs.h     |   61 +--
 arch/arm/plat-omap/include/dspbridge/dbg.h        |   25 +-
 arch/arm/plat-omap/include/dspbridge/dbldefs.h    |   10 -
 arch/arm/plat-omap/include/dspbridge/dbll.h       |   15 +-
 arch/arm/plat-omap/include/dspbridge/dblldefs.h   |   11 -
 arch/arm/plat-omap/include/dspbridge/dbtype.h     |   21 +-
 arch/arm/plat-omap/include/dspbridge/dehdefs.h    |   14 +-
 arch/arm/plat-omap/include/dspbridge/dev.h        |   64 +--
 arch/arm/plat-omap/include/dspbridge/devdefs.h    |   15 +-
 arch/arm/plat-omap/include/dspbridge/disp.h       |   31 +-
 arch/arm/plat-omap/include/dspbridge/dispdefs.h   |   14 +-
 arch/arm/plat-omap/include/dspbridge/dmm.h        |   18 +-
 arch/arm/plat-omap/include/dspbridge/dpc.h        |   26 +-
 arch/arm/plat-omap/include/dspbridge/drv.h        |   48 +-
 arch/arm/plat-omap/include/dspbridge/drvdefs.h    |   13 +-
 arch/arm/plat-omap/include/dspbridge/dspdrv.h     |   33 +-
 arch/arm/plat-omap/include/dspbridge/errbase.h    |   37 +-
 arch/arm/plat-omap/include/dspbridge/gb.h         |   10 +-
 arch/arm/plat-omap/include/dspbridge/getsection.h |   21 +-
 arch/arm/plat-omap/include/dspbridge/gh.h         |    8 -
 arch/arm/plat-omap/include/dspbridge/gs.h         |   15 +-
 arch/arm/plat-omap/include/dspbridge/gt.h         |   27 +-
 arch/arm/plat-omap/include/dspbridge/host_os.h    |   10 -
 arch/arm/plat-omap/include/dspbridge/io.h         |   21 +-
 arch/arm/plat-omap/include/dspbridge/io_sm.h      |   44 +-
 arch/arm/plat-omap/include/dspbridge/iodefs.h     |   13 +-
 arch/arm/plat-omap/include/dspbridge/ldr.h        |   34 +-
 arch/arm/plat-omap/include/dspbridge/list.h       |   36 +-
 arch/arm/plat-omap/include/dspbridge/mbx_sh.h     |   25 +-
 arch/arm/plat-omap/include/dspbridge/mem.h        |   54 +--
 arch/arm/plat-omap/include/dspbridge/memdefs.h    |   16 +-
 arch/arm/plat-omap/include/dspbridge/mgr.h        |   32 +-
 arch/arm/plat-omap/include/dspbridge/mgrpriv.h    |   14 +-
 arch/arm/plat-omap/include/dspbridge/msg.h        |   24 +-
 arch/arm/plat-omap/include/dspbridge/msgdefs.h    |   15 +-
 arch/arm/plat-omap/include/dspbridge/nldr.h       |   29 +-
 arch/arm/plat-omap/include/dspbridge/nldrdefs.h   |   14 +-
 arch/arm/plat-omap/include/dspbridge/node.h       |   48 +-
 arch/arm/plat-omap/include/dspbridge/nodedefs.h   |   16 +-
 arch/arm/plat-omap/include/dspbridge/nodepriv.h   |   23 +-
 arch/arm/plat-omap/include/dspbridge/ntfy.h       |   22 +-
 arch/arm/plat-omap/include/dspbridge/proc.h       |   47 +-
 arch/arm/plat-omap/include/dspbridge/procpriv.h   |   13 +-
 arch/arm/plat-omap/include/dspbridge/pwr.h        |   19 -
 arch/arm/plat-omap/include/dspbridge/pwr_sh.h     |   12 +-
 arch/arm/plat-omap/include/dspbridge/reg.h        |   35 +-
 arch/arm/plat-omap/include/dspbridge/rmm.h        |   26 +-
 arch/arm/plat-omap/include/dspbridge/rms_sh.h     |   34 +-
 arch/arm/plat-omap/include/dspbridge/rmstypes.h   |   15 +-
 arch/arm/plat-omap/include/dspbridge/services.h   |   17 +-
 arch/arm/plat-omap/include/dspbridge/std.h        |   48 --
 arch/arm/plat-omap/include/dspbridge/strm.h       |   41 +-
 arch/arm/plat-omap/include/dspbridge/strmdefs.h   |   14 +-
 arch/arm/plat-omap/include/dspbridge/sync.h       |   40 +-
 arch/arm/plat-omap/include/dspbridge/utildefs.h   |   16 +-
 arch/arm/plat-omap/include/dspbridge/uuidutil.h   |   16 +-
 arch/arm/plat-omap/include/dspbridge/wcd.h        |   49 +-
 arch/arm/plat-omap/include/dspbridge/wcdioctl.h   |   52 +--
 arch/arm/plat-omap/include/dspbridge/wmd.h        |   57 +-
 arch/arm/plat-omap/include/dspbridge/wmdchnl.h    |   29 +-
 arch/arm/plat-omap/include/dspbridge/wmddeh.h     |   30 +-
 arch/arm/plat-omap/include/dspbridge/wmdio.h      |   24 +-
 arch/arm/plat-omap/include/dspbridge/wmdioctl.h   |   26 +-
 arch/arm/plat-omap/include/dspbridge/wmdmsg.h     |   27 +-
 drivers/dsp/bridge/dynload/doff.h                 |   17 +-
 drivers/dsp/bridge/dynload/module_list.h          |   82 +-
 drivers/dsp/bridge/dynload/params.h               |   23 +-
 drivers/dsp/bridge/dynload/reloc.c                |   29 +-
 drivers/dsp/bridge/dynload/tramp.c                |   18 +-
 drivers/dsp/bridge/dynload/tramp_table_c6000.c    |   18 +-
 drivers/dsp/bridge/gen/_gt_para.c                 |   24 +-
 drivers/dsp/bridge/gen/gb.c                       |   17 +-
 drivers/dsp/bridge/gen/gh.c                       |    5 -
 drivers/dsp/bridge/gen/gs.c                       |   17 +-
 drivers/dsp/bridge/gen/gt.c                       |   16 +-
 drivers/dsp/bridge/gen/uuidutil.c                 |   20 +-
 drivers/dsp/bridge/hw/GlobalTypes.h               |   16 +-
 drivers/dsp/bridge/hw/PRCMRegAcM.h                |   24 +-
 drivers/dsp/bridge/hw/hw_defs.h                   |   13 +-
 drivers/dsp/bridge/hw/hw_dspssC64P.c              |   13 +-
 drivers/dsp/bridge/hw/hw_dspssC64P.h              |   15 +-
 drivers/dsp/bridge/hw/hw_mbox.c                   |   13 +-
 drivers/dsp/bridge/hw/hw_mbox.h                   |   55 +-
 drivers/dsp/bridge/hw/hw_mmu.c                    |   17 +-
 drivers/dsp/bridge/hw/hw_mmu.h                    |   15 +-
 drivers/dsp/bridge/hw/hw_prcm.c                   |   12 +-
 drivers/dsp/bridge/hw/hw_prcm.h                   |   12 +-
 drivers/dsp/bridge/pmgr/chnl.c                    |   51 +--
 drivers/dsp/bridge/pmgr/chnlobj.h                 |   21 +-
 drivers/dsp/bridge/pmgr/cmm.c                     |  101 +--
 drivers/dsp/bridge/pmgr/cod.c                     |   51 +-
 drivers/dsp/bridge/pmgr/dbll.c                    |   65 +-
 drivers/dsp/bridge/pmgr/dev.c                     |  102 +---
 drivers/dsp/bridge/pmgr/dmm.c                     |   47 +-
 drivers/dsp/bridge/pmgr/io.c                      |   25 +-
 drivers/dsp/bridge/pmgr/ioobj.h                   |   19 +-
 drivers/dsp/bridge/pmgr/msg.c                     |   23 +-
 drivers/dsp/bridge/pmgr/msgobj.h                  |   19 +-
 drivers/dsp/bridge/pmgr/wcd.c                     |   80 +--
 drivers/dsp/bridge/rmgr/dbdcd.c                   |   56 +--
 drivers/dsp/bridge/rmgr/disp.c                    |   39 +-
 drivers/dsp/bridge/rmgr/drv.c                     |  102 +--
 drivers/dsp/bridge/rmgr/drv_interface.c           |   32 +-
 drivers/dsp/bridge/rmgr/drv_interface.h           |   12 -
 drivers/dsp/bridge/rmgr/dspdrv.c                  |   79 +--
 drivers/dsp/bridge/rmgr/mgr.c                     |   30 +-
 drivers/dsp/bridge/rmgr/nldr.c                    |   66 +--
 drivers/dsp/bridge/rmgr/node.c                    |  287 +++-----
 drivers/dsp/bridge/rmgr/proc.c                    |  102 +---
 drivers/dsp/bridge/rmgr/pwr.c                     |   19 +-
 drivers/dsp/bridge/rmgr/rmm.c                     |   14 -
 drivers/dsp/bridge/rmgr/strm.c                    |   49 +--
 drivers/dsp/bridge/services/cfg.c                 |   68 +--
 drivers/dsp/bridge/services/clk.c                 |   27 +-
 drivers/dsp/bridge/services/dbg.c                 |   35 +-
 drivers/dsp/bridge/services/dpc.c                 |   32 +-
 drivers/dsp/bridge/services/list.c                |   33 -
 drivers/dsp/bridge/services/mem.c                 |   40 +-
 drivers/dsp/bridge/services/ntfy.c                |   27 +-
 drivers/dsp/bridge/services/reg.c                 |   21 +-
 drivers/dsp/bridge/services/regsup.c              |   30 +-
 drivers/dsp/bridge/services/regsup.h              |    8 -
 drivers/dsp/bridge/services/services.c            |   20 +-
 drivers/dsp/bridge/services/sync.c                |   35 +-
 drivers/dsp/bridge/wmd/_cmm.h                     |   22 +-
 drivers/dsp/bridge/wmd/_deh.h                     |   13 +-
 drivers/dsp/bridge/wmd/_msg_sm.h                  |   21 +-
 drivers/dsp/bridge/wmd/_tiomap.h                  |   49 +-
 drivers/dsp/bridge/wmd/_tiomap_mmu.h              |   16 +-
 drivers/dsp/bridge/wmd/_tiomap_pwr.h              |   13 +-
 drivers/dsp/bridge/wmd/_tiomap_util.h             |   13 +-
 drivers/dsp/bridge/wmd/chnl_sm.c                  |   77 +--
 drivers/dsp/bridge/wmd/io_sm.c                    |  903 +++++++++++----------
 drivers/dsp/bridge/wmd/mmu_fault.c                |   19 +-
 drivers/dsp/bridge/wmd/mmu_fault.h                |   14 +-
 drivers/dsp/bridge/wmd/msg_sm.c                   |  107 +--
 drivers/dsp/bridge/wmd/tiomap3430.c               |   25 +-
 drivers/dsp/bridge/wmd/tiomap3430_pwr.c           |   17 +-
 drivers/dsp/bridge/wmd/tiomap_io.c                |   17 +-
 drivers/dsp/bridge/wmd/tiomap_io.h                |   14 +-
 drivers/dsp/bridge/wmd/ue_deh.c                   |   34 +-
 158 files changed, 1364 insertions(+), 4707 deletions(-)
 create mode 100644 Documentation/tidspbridge/CONTRIBUTORS
#1 lore raw

PATCH 1/10 DSPBRIDGE: trivial license fix in tramp and tramp_table_c6000

Seems that these files had a licensing mismatch, changing to GPL2.

---
 drivers/dsp/bridge/dynload/tramp.c             |   18 +++++++++++++-----
 drivers/dsp/bridge/dynload/tramp_table_c6000.c |   18 +++++++++++++-----
 2 files changed, 26 insertions(+), 10 deletions(-)
drivers/dsp/bridge/dynload/tramp.c +13 -5
index 8c725c7..c2fe02d 100644
@@ -1,11 +1,19 @@
 /*
- *  Copyright 2009 by Texas Instruments Incorporated.
- *  All rights reserved. Property of Texas Instruments Incorporated.
- *  Restricted rights to use, duplicate or disclose this code are
- *  granted through contract.
+ * tramp.c
  *
- *  @(#) DSP/BIOS Bridge
+ * DSP-BIOS Bridge driver support functions for TI OMAP processors.
+ *
+ * Copyright (C) 2009 Texas Instruments, Inc.
+ *
+ * This package is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
+
 #include "header.h"
 
 #if TMS32060
drivers/dsp/bridge/dynload/tramp_table_c6000.c +13 -5
index 1a7d974..acda513 100644
@@ -1,11 +1,19 @@
 /*
- *  Copyright 2009 by Texas Instruments Incorporated.
- *  All rights reserved. Property of Texas Instruments Incorporated.
- *  Restricted rights to use, duplicate or disclose this code are
- *  granted through contract.
+ * tramp_table_c6000.c
  *
- *  @(#) DSP/BIOS Bridge
+ * DSP-BIOS Bridge driver support functions for TI OMAP processors.
+ *
+ * Copyright (C) 2005-2006 Texas Instruments, Inc.
+ *
+ * This package is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
+
 #include "dload_internal.h"
 
 /*  These are defined in coff.h, but may not be available on all platforms
Signature · 1 line
1.6.2.4
#2 lore raw

PATCH 2/10 DSPBRIDGE: contributors file

This creates a new contributors file under Documentation/tidspbridge to acknowledge all the people working in DSP/Bridge project.

---
 Documentation/tidspbridge/CONTRIBUTORS |   70 ++++++++++++++++++++++++++++++++
 1 files changed, 70 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/tidspbridge/CONTRIBUTORS
Documentation/tidspbridge/CONTRIBUTORS new file +70 -0
new file mode 100644
index 0000000..d3977ad
@@ -0,0 +1,70 @@
+TI DSP/Bridge Driver - Contributors File
+
+The DSP/Bridge project wish to thank all of its contributors, current bridge
+driver is the result of the work of all of them. If any name is accidentally
+omitted, let us know by sending a mail to [email protected] or
[email protected].
+
+Please keep the following list in alphabetical order.
+
+	Suman Anna
+	Felipe Balbi
+	Phil Carmody
+	Felipe Contreras
+	Hiroshi Doyu
+	Seth Forshee
+	Mark Grosen
+	Ramesh Gupta G
+	Fernando Guzman Lugo
+	Axel Haslam
+	Janet Head
+	Hari Kanigeri
+	Tony Lindgren
+	Antonio Luna
+	Hari Nagalla
+	Ameya Palande
+	Gilbert Pitney
+	Omar Ramirez Luna
+	Ernesto Ramos
+	Chris Ring
+	Rebecca Schultz Zavin
+	Andy Shevchenko
+	Roman Tereshonkov
+	Armando Uribe de Leon
+	Nischal Varide
+	Wenbiao Wang
+
+The following list was taken from file Revision History, if you recognize your
+alias or did any contribution to the project please let us now, so we can
+proper credit your work.
+
+	ag
+	ap
+	cc
+	db
+	dh4
+	dr
+	hp
+	jg
+	kc
+	kln
+	kw
+	ge
+	gv
+	map
+	mf
+	mk
+	mr
+	nn
+	rajesh
+	rg
+	rr
+	rt
+	sb
+	sg
+	sh
+	sp
+	srid
+	swa
+	vp
+	ww
Signature · 1 line
1.6.2.4

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

PATCH 5/10 DSPBRIDGE: checkpatch - space required after comma

ERROR: space required after that ',' (ctx:VxV)

---
 drivers/dsp/bridge/hw/GlobalTypes.h |    4 ++--
 drivers/dsp/bridge/hw/PRCMRegAcM.h  |   24 ++++++++++++------------
 2 files changed, 14 insertions(+), 14 deletions(-)
drivers/dsp/bridge/hw/GlobalTypes.h +2 -2
index 6f54589..73a2d93 100644
@@ -101,7 +101,7 @@
  * DESCRIPTION: Returns a 32 bit value given a 16 bit lower value and a 16
  *		bit upper value
  */
-#define RETURN_32BITS_FROM_16LOWER_AND_16UPPER(lower16Bits,upper16Bits)\
+#define RETURN_32BITS_FROM_16LOWER_AND_16UPPER(lower16Bits, upper16Bits)\
     (((((u32)lower16Bits)  & LOWER_16BIT_MASK)) | \
      (((((u32)upper16Bits) & LOWER_16BIT_MASK) << UPPER_16BIT_SHIFT)))
 
@@ -111,7 +111,7 @@
  * DESCRIPTION:  Returns a 16 bit value given a 8 bit lower value and a 8
  *	       bit upper value
  */
-#define RETURN_16BITS_FROM_8LOWER_AND_8UPPER(lower8Bits,upper8Bits)\
+#define RETURN_16BITS_FROM_8LOWER_AND_8UPPER(lower8Bits, upper8Bits)\
     (((((u32)lower8Bits)  & LOWER_8BIT_MASK)) | \
      (((((u32)upper8Bits) & LOWER_8BIT_MASK) << UPPER_8BIT_OF16_SHIFT)))
 
drivers/dsp/bridge/hw/PRCMRegAcM.h +12 -12
index 280a812..4c9d732 100644
@@ -51,7 +51,7 @@
       __raw_readl(((u32)(baseAddress))+CM_ICLKEN_PER_OFFSET))
 
 
-#define CM_FCLKEN_PER_GPT5WriteRegister32(baseAddress,value)\
+#define CM_FCLKEN_PER_GPT5WriteRegister32(baseAddress, value)\
 {\
     const u32 offset = CM_FCLKEN_PER_OFFSET;\
     register u32 data = \
@@ -66,7 +66,7 @@
 }
 
 
-#define CM_FCLKEN_PER_GPT6WriteRegister32(baseAddress,value)\
+#define CM_FCLKEN_PER_GPT6WriteRegister32(baseAddress, value)\
 {\
     const u32 offset = CM_FCLKEN_PER_OFFSET;\
     register u32 data =\
@@ -81,7 +81,7 @@
 }
 
 
-#define CM_ICLKEN_PER_GPT5WriteRegister32(baseAddress,value)\
+#define CM_ICLKEN_PER_GPT5WriteRegister32(baseAddress, value)\
 {\
     const u32 offset = CM_ICLKEN_PER_OFFSET;\
     register u32 data = \
@@ -96,7 +96,7 @@
 }
 
 
-#define CM_ICLKEN_PER_GPT6WriteRegister32(baseAddress,value)\
+#define CM_ICLKEN_PER_GPT6WriteRegister32(baseAddress, value)\
 {\
     const u32 offset = CM_ICLKEN_PER_OFFSET;\
     register u32 data = \
@@ -116,7 +116,7 @@
       __raw_readl(((u32)(baseAddress))+CM_FCLKEN1_CORE_OFFSET))
 
 
-#define PRCMCM_FCLKEN1_COREEN_GPT8Write32(baseAddress,value)\
+#define PRCMCM_FCLKEN1_COREEN_GPT8Write32(baseAddress, value)\
 {\
     const u32 offset = PRCM_CM_FCLKEN1_CORE_OFFSET;\
     register u32 data = \
@@ -131,7 +131,7 @@
 }
 
 
-#define PRCMCM_FCLKEN1_COREEN_GPT7Write32(baseAddress,value)\
+#define PRCMCM_FCLKEN1_COREEN_GPT7Write32(baseAddress, value)\
 {\
     const u32 offset = PRCM_CM_FCLKEN1_CORE_OFFSET;\
     register u32 data = \
@@ -360,7 +360,7 @@
       PRCM_CM_CLKSEL1_PLL_APLLs_Clkin_OFFSET))
 
 
-#define CM_FCLKEN_IVA2EN_DSPWrite32(baseAddress,value)\
+#define CM_FCLKEN_IVA2EN_DSPWrite32(baseAddress, value)\
 {\
     const u32 offset = CM_FCLKEN_IVA2_OFFSET;\
     register u32 data = \
@@ -426,7 +426,7 @@
 }
 
 
-#define PRCMCM_CLKSEL_DSPSYNC_DSPWrite32(baseAddress,value)\
+#define PRCMCM_CLKSEL_DSPSYNC_DSPWrite32(baseAddress, value)\
 {\
     const u32 offset = PRCM_CM_CLKSEL_DSP_OFFSET;\
     register u32 data = \
@@ -514,7 +514,7 @@
       __raw_readl(((baseAddress))+PRCM_RM_RSTCTRL_DSP_OFFSET))
 
 
-#define PRM_RSTCTRL_IVA2RST1_DSPWrite32(baseAddress,value)\
+#define PRM_RSTCTRL_IVA2RST1_DSPWrite32(baseAddress, value)\
 {\
     const u32 offset = PRM_RSTCTRL_IVA2_OFFSET;\
     register u32 data =\
@@ -529,7 +529,7 @@
 }
 
 
-#define PRM_RSTCTRL_IVA2RST2_DSPWrite32(baseAddress,value)\
+#define PRM_RSTCTRL_IVA2RST2_DSPWrite32(baseAddress, value)\
 {\
     const u32 offset = PRM_RSTCTRL_IVA2_OFFSET;\
     register u32 data =\
@@ -544,7 +544,7 @@
 }
 
 
-#define PRM_RSTCTRL_IVA2RST3_DSPWrite32(baseAddress,value)\
+#define PRM_RSTCTRL_IVA2RST3_DSPWrite32(baseAddress, value)\
 {\
     const u32 offset = PRM_RSTCTRL_IVA2_OFFSET;\
     register u32 data =\
@@ -564,7 +564,7 @@
       __raw_readl(((baseAddress))+PRCM_RM_RSTST_DSP_OFFSET))
 
 
-#define PRCMRM_RSTST_DSPWriteRegister32(baseAddress,value)\
+#define PRCMRM_RSTST_DSPWriteRegister32(baseAddress, value)\
 {\
     const u32 offset = PRCM_RM_RSTST_DSP_OFFSET;\
     register u32 newValue = ((u32)(value));\
Signature · 1 line
1.6.2.4
#6 lore raw

PATCH 6/10 DSPBRIDGE: checkpatch - space required before open parenthesis

ERROR: space required before the open parenthesis '('

---
 drivers/dsp/bridge/pmgr/dev.c     |    2 +-
 drivers/dsp/bridge/services/dbg.c |    2 +-
 drivers/dsp/bridge/wmd/io_sm.c    |    4 ++--
 drivers/dsp/bridge/wmd/msg_sm.c   |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
drivers/dsp/bridge/pmgr/dev.c +1 -1
index a9cce95..5c5e056 100644
@@ -441,7 +441,7 @@ DSP_STATUS DEV_DestroyDevice(struct DEV_OBJECT *hDevObject)
 
 		/* Call the driver's WMD_DEV_Destroy() function: */
 		/* Require of DevDestroy */
-		if(pDevObject->hWmdContext) {
+		if (pDevObject->hWmdContext) {
 			status = (*pDevObject->intfFxns.pfnDevDestroy)
 				(pDevObject->hWmdContext);
 			pDevObject->hWmdContext = NULL;
drivers/dsp/bridge/services/dbg.c +1 -1
index bc57fa8..bc5c8cd 100644
@@ -33,7 +33,7 @@
 static struct GT_Mask DBG_debugMask = { NULL, NULL };	/* GT trace var. */
 #endif
 
-#if (defined(DEBUG) || defined (DDSP_DEBUG_PRODUCT)) && GT_TRACE
+#if (defined(DEBUG) || defined(DDSP_DEBUG_PRODUCT)) && GT_TRACE
 
 /*
  *  ======== DBG_Init ========
drivers/dsp/bridge/wmd/io_sm.c +2 -2
index 8cdc83e..45d90d1 100644
@@ -197,7 +197,7 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
 	 *  size of message buffer in shared memory is configurable in
 	 *  the base image.  */
 	DEV_GetWMDContext(hDevObject, &hWmdContext);
-	if(!hWmdContext) {
+	if (!hWmdContext) {
 		status = DSP_EHANDLE;
 		goto func_end;
 	}
@@ -1102,7 +1102,7 @@ func_end:
  */
 void IO_Schedule(struct IO_MGR *pIOMgr)
 {
-	if(!MEM_IsValidHandle(pIOMgr, IO_MGRSIGNATURE))
+	if (!MEM_IsValidHandle(pIOMgr, IO_MGRSIGNATURE))
 		return;
 
 	DPC_Schedule(pIOMgr->hDPC);
drivers/dsp/bridge/wmd/msg_sm.c +1 -1
index c29b64e..ad716ab 100644
@@ -65,7 +65,7 @@ DSP_STATUS WMD_MSG_Create(OUT struct MSG_MGR **phMsgMgr,
 		goto func_end;
 	}
 	DEV_GetIOMgr(hDevObject, &hIOMgr);
-	if(!hIOMgr) {
+	if (!hIOMgr) {
 		status = DSP_EPOINTER;
 		goto func_end;
 	}
Signature · 1 line
1.6.2.4
#7 lore raw

PATCH 7/10 DSPBRIDGE: checkpatch spacing and indentation

ERROR: code indent should use tabs where possible
WARNING: suspect code indent for conditional statements

---
 arch/arm/plat-omap/include/dspbridge/_chnl_sm.h |    2 +-
 arch/arm/plat-omap/include/dspbridge/chnlpriv.h |    2 +-
 arch/arm/plat-omap/include/dspbridge/dbdefs.h   |    6 +-
 arch/arm/plat-omap/include/dspbridge/io_sm.h    |    6 +-
 drivers/dsp/bridge/dynload/reloc.c              |   29 +-
 drivers/dsp/bridge/hw/hw_mbox.h                 |   44 +--
 drivers/dsp/bridge/pmgr/cod.c                   |    4 +-
 drivers/dsp/bridge/pmgr/dbll.c                  |   45 ++--
 drivers/dsp/bridge/rmgr/disp.c                  |    4 +-
 drivers/dsp/bridge/rmgr/drv.c                   |   24 +-
 drivers/dsp/bridge/rmgr/nldr.c                  |   28 +-
 drivers/dsp/bridge/rmgr/node.c                  |  207 ++++++------
 drivers/dsp/bridge/rmgr/proc.c                  |   14 +-
 drivers/dsp/bridge/services/cfg.c               |    8 +-
 drivers/dsp/bridge/services/clk.c               |    7 +-
 drivers/dsp/bridge/services/regsup.c            |   14 +-
 drivers/dsp/bridge/wmd/_tiomap.h                |   40 ++--
 drivers/dsp/bridge/wmd/chnl_sm.c                |    2 +-
 drivers/dsp/bridge/wmd/io_sm.c                  |  390 +++++++++++------------
 drivers/dsp/bridge/wmd/msg_sm.c                 |   75 +++---
 drivers/dsp/bridge/wmd/ue_deh.c                 |   15 +-
 21 files changed, 477 insertions(+), 489 deletions(-)
arch/arm/plat-omap/include/dspbridge/_chnl_sm.h +1 -1
index 33c2135..f22b2cb 100644
@@ -145,7 +145,7 @@ struct loadMonStruct {
 		struct SYNC_OBJECT *hSyncEvent;
 		/* Name of Sync event */
 		char szEventName[SYNC_MAXNAMELENGTH + 1];
-               u32 hProcess;   /* Process which created this channel */
+		u32 hProcess;   /* Process which created this channel */
 		u32 pCBArg;	/* Argument to use with callback */
 		struct LST_LIST *pIORequests;	/* List of IOR's to driver */
 		s32 cIOCs;	/* Number of IOC's in queue */
arch/arm/plat-omap/include/dspbridge/chnlpriv.h +1 -1
index 86fc468..2eadfa0 100644
@@ -83,7 +83,7 @@
 		u32 cPosition;	/* Total bytes transferred.        */
 		u32 cIOCs;	/* Number of IOCs in queue.               */
 		u32 cIOReqs;	/* Number of IO Requests in queue.        */
-               u32 hProcess;   /* Process owning this channel.     */
+		u32 hProcess;   /* Process owning this channel.     */
 		/*
 		 * Name of channel I/O completion event. Not required in Linux
 		 */
arch/arm/plat-omap/include/dspbridge/dbdefs.h +3 -3
index a2c707e..fe68cab 100644
@@ -21,9 +21,9 @@
 
 #include <linux/types.h>
 
-#include <dspbridge/dbtype.h>		/* GPP side type definitions           */
-#include <dspbridge/std.h>		/* DSP/BIOS type definitions           */
-#include <dspbridge/rms_sh.h>		/* Types shared between GPP and DSP    */
+#include <dspbridge/dbtype.h>		/* GPP side type definitions */
+#include <dspbridge/std.h>		/* DSP/BIOS type definitions */
+#include <dspbridge/rms_sh.h>		/* Types shared between GPP and DSP */
 
 #define PG_SIZE_4K 4096
 #define PG_MASK(pg_size) (~((pg_size)-1))
arch/arm/plat-omap/include/dspbridge/io_sm.h +3 -3
index b8f4fb7..77f9e25 100644
@@ -291,13 +291,13 @@
 
 	extern void IO_IntrDSP2(IN struct IO_MGR *pIOMgr, IN u16 wMbVal);
 
-       extern void IO_SM_init(void);
+	extern void IO_SM_init(void);
 
 /*
  *  ========PrintDspTraceBuffer ========
  *      Print DSP tracebuffer.
  */
-       extern DSP_STATUS PrintDspTraceBuffer(struct WMD_DEV_CONTEXT
-                                               *hWmdContext);
+	extern DSP_STATUS PrintDspTraceBuffer(struct WMD_DEV_CONTEXT
+						*hWmdContext);
 
 #endif				/* IOSM_ */
drivers/dsp/bridge/dynload/reloc.c +16 -13
index d4457c5..b9e2a9b 100644
@@ -195,20 +195,22 @@ void dload_relocate(struct dload_state *dlthis, TgtAU_t *data,
 		rx = HASH_L(rop_map2[rx]);
 		if (rx < 0) {
 #if TMS32060
-		switch (rp->r_type) {
-		case R_C60ALIGN:
-		case R_C60NOCMP:
-		case R_C60FPHEAD:
-		    /* Ignore these reloc types and return */
-		    break;
-		default:
-		    /* Unknown reloc type, print error and return */
-		    dload_error(dlthis, "Bad coff operator 0x%x", rp->r_type);
-	    }
+			switch (rp->r_type) {
+			case R_C60ALIGN:
+			case R_C60NOCMP:
+			case R_C60FPHEAD:
+				/* Ignore these reloc types and return */
+				break;
+			default:
+				/* Unknown reloc type, print error and return */
+				dload_error(dlthis, "Bad coff operator 0x%x",
+						rp->r_type);
+			}
 #else
-	    dload_error(dlthis, "Bad coff operator 0x%x", rp->r_type);
+			dload_error(dlthis, "Bad coff operator 0x%x",
+					rp->r_type);
 #endif
-	    return;
+			return;
 		}
 	}
 	rx = HASH_I(rop_map2[rx]);
@@ -216,7 +218,8 @@ void dload_relocate(struct dload_state *dlthis, TgtAU_t *data,
 	   && (rx < (sizeof(rop_info)/sizeof(uint_least16_t))) && (rx > 0)) {
 		reloc_action = rop_action[rx]; reloc_info = rop_info[rx];
 	} else {
-	    dload_error(dlthis, "Buffer Overflow - Array Index Out of Bounds");
+		dload_error(dlthis, "Buffer Overflow - Array Index Out "
+				"of Bounds");
 	}
 
 	/* Compute the relocation amount for the referenced symbol, if any */
drivers/dsp/bridge/hw/hw_mbox.h +16 -28

74 lines not on this page · raw message

drivers/dsp/bridge/pmgr/cod.c +2 -2
index 0b89371..bfbe107 100644
@@ -368,7 +368,7 @@ DSP_STATUS COD_GetBaseName(struct COD_MANAGER *hManager, char *pszName,
 	DBC_Require(pszName != NULL);
 
 	if (uSize <= COD_MAXPATHLENGTH)
-               strncpy(pszName, hManager->szZLFile, uSize);
+		strncpy(pszName, hManager->szZLFile, uSize);
 	else
 		status = DSP_EFAIL;
 
@@ -401,7 +401,7 @@ DSP_STATUS COD_GetEntry(struct COD_MANAGER *hManager, u32 *pulEntry)
  *      Get handle to the DBLL loader.
  */
 DSP_STATUS COD_GetLoader(struct COD_MANAGER *hManager,
-			       struct DBLL_TarObj **phLoader)
+				struct DBLL_TarObj **phLoader)
 {
 	DSP_STATUS status = DSP_SOK;
 
drivers/dsp/bridge/pmgr/dbll.c +23 -22

126 lines not on this page · raw message

drivers/dsp/bridge/rmgr/disp.c +2 -2
index 3b4286b..6ea15b4 100644
@@ -766,8 +766,8 @@ static DSP_STATUS FillStreamDef(RMS_WORD *pdwBuf, u32 *ptotal, u32 offset,
 		 *  1 from total.
 		 */
 		total += sizeof(struct RMS_StrmDef) / sizeof(RMS_WORD) - 1;
-               DBC_Require(strmDef.szDevice);
-               dwLength = strlen(strmDef.szDevice) + 1;
+		DBC_Require(strmDef.szDevice);
+		dwLength = strlen(strmDef.szDevice) + 1;
 
 		/* Number of RMS_WORDS needed to hold device name */
 		uNameLen = (dwLength + uCharsInRMSWord - 1) / uCharsInRMSWord;
drivers/dsp/bridge/rmgr/drv.c +12 -12
index 3a2642b..440bb91 100644
@@ -888,7 +888,7 @@ DSP_STATUS DRV_Init(void)
  *      Insert a DevObject into the list of Manager object.
  */
 DSP_STATUS DRV_InsertDevObject(struct DRV_OBJECT *hDRVObject,
-			       struct DEV_OBJECT *hDevObject)
+				struct DEV_OBJECT *hDevObject)
 {
 	DSP_STATUS status = DSP_SOK;
 	struct DRV_OBJECT *pDRVObject = (struct DRV_OBJECT *)hDRVObject;
@@ -919,7 +919,7 @@ DSP_STATUS DRV_InsertDevObject(struct DRV_OBJECT *hDRVObject,
  *      objects.
  */
 DSP_STATUS DRV_RemoveDevObject(struct DRV_OBJECT *hDRVObject,
-			       struct DEV_OBJECT *hDevObject)
+				struct DEV_OBJECT *hDevObject)
 {
 	DSP_STATUS status = DSP_EFAIL;
 	struct DRV_OBJECT *pDRVObject = (struct DRV_OBJECT *)hDRVObject;
@@ -1001,7 +1001,7 @@ DSP_STATUS DRV_RequestResources(u32 dwContext, u32 *pDevNodeString)
 		*pDevNodeString = 0;
 	}
 
-       if (!(strcmp((char *) dwContext, "TIOMAP1510"))) {
+	if (!(strcmp((char *) dwContext, "TIOMAP1510"))) {
 		GT_0trace(curTrace, GT_1CLASS,
 			  " Allocating resources for UMA \n");
 		status = RequestBridgeResourcesDSP(dwContext, DRV_ASSIGN);
@@ -1034,7 +1034,7 @@ DSP_STATUS DRV_ReleaseResources(u32 dwContext, struct DRV_OBJECT *hDrvObject)
 
 	GT_0trace(curTrace, GT_ENTER, "Entering DRV_Release Resources\n");
 
-       if (!(strcmp((char *)((struct DRV_EXT *)dwContext)->szString,
+	if (!(strcmp((char *)((struct DRV_EXT *)dwContext)->szString,
 	   "TIOMAP1510"))) {
 		GT_0trace(curTrace, GT_1CLASS,
 			 " Releasing DSP-Bridge resources \n");
@@ -1149,10 +1149,10 @@ static DSP_STATUS RequestBridgeResources(u32 dwContext, s32 bRequest)
 				iounmap(pResources->dwDmmuBase);
 			if (pResources->dwPerBase)
 				iounmap(pResources->dwPerBase);
-                       if (pResources->dwPerPmBase)
-                               iounmap((void *)pResources->dwPerPmBase);
-                       if (pResources->dwCorePmBase)
-                               iounmap((void *)pResources->dwCorePmBase);
+			if (pResources->dwPerPmBase)
+				iounmap((void *)pResources->dwPerPmBase);
+			if (pResources->dwCorePmBase)
+				iounmap((void *)pResources->dwCorePmBase);
 			if (pResources->dwSysCtrlBase) {
 				iounmap(pResources->dwSysCtrlBase);
 				/* don't set pResources->dwSysCtrlBase to null
@@ -1284,10 +1284,10 @@ static DSP_STATUS RequestBridgeResourcesDSP(u32 dwContext, s32 bRequest)
 							OMAP_DSP_MEM3_SIZE);
 		pResources->dwPerBase = ioremap(OMAP_PER_CM_BASE,
 							OMAP_PER_CM_SIZE);
-               pResources->dwPerPmBase = (u32)ioremap(OMAP_PER_PRM_BASE,
-                                                       OMAP_PER_PRM_SIZE);
-               pResources->dwCorePmBase = (u32)ioremap(OMAP_CORE_PRM_BASE,
-                                                       OMAP_CORE_PRM_SIZE);
+		pResources->dwPerPmBase = (u32)ioremap(OMAP_PER_PRM_BASE,
+							OMAP_PER_PRM_SIZE);
+		pResources->dwCorePmBase = (u32)ioremap(OMAP_CORE_PRM_BASE,
+							OMAP_CORE_PRM_SIZE);
 		pResources->dwDmmuBase = ioremap(OMAP_DMMU_BASE,
 							OMAP_DMMU_SIZE);
 		pResources->dwWdTimerDspBase = NULL;
drivers/dsp/bridge/rmgr/nldr.c +14 -14
index b28c3c4..5f0d4e1 100644
@@ -93,15 +93,15 @@
 #define FLAGBIT	 7	/* 7th bit is pref./req. flag */
 #define SEGMASK	 0x3f	/* Bits 0 - 5 */
 
-#define CREATEBIT       0	/* Create segid starts at bit 0 */
-#define DELETEBIT       8	/* Delete segid starts at bit 8 */
+#define CREATEBIT	0	/* Create segid starts at bit 0 */
+#define DELETEBIT	8	/* Delete segid starts at bit 8 */
 #define EXECUTEBIT      16	/* Execute segid starts at bit 16 */
 
 /*
  *  Masks that define memory type.  Must match defines in dynm.cdb.
  */
-#define DYNM_CODE       0x2
-#define DYNM_DATA       0x4
+#define DYNM_CODE	0x2
+#define DYNM_DATA	0x4
 #define DYNM_CODEDATA   (DYNM_CODE | DYNM_DATA)
 #define DYNM_INTERNAL   0x8
 #define DYNM_EXTERNAL   0x10
@@ -151,7 +151,7 @@
 	((uuid1).usData3 == (uuid2).usData3) && \
 	((uuid1).ucData4 == (uuid2).ucData4) && \
 	((uuid1).ucData5 == (uuid2).ucData5) && \
-       (strncmp((void *)(uuid1).ucData6, (void *)(uuid2).ucData6, 6)) == 0)
+	(strncmp((void *)(uuid1).ucData6, (void *)(uuid2).ucData6, 6)) == 0)
 
     /*
      *  ======== MemInfo ========
@@ -1006,9 +1006,9 @@ static DSP_STATUS AddOvlyInfo(void *handle, struct DBLL_SectInfo *sectInfo,
 	/* Find the node it belongs to */
 	for (i = 0; i < hNldr->nOvlyNodes; i++) {
 		pNodeName = hNldr->ovlyTable[i].pNodeName;
-               DBC_Require(pNodeName);
-               if (strncmp(pNodeName, pSectName + 1,
-                               strlen(pNodeName)) == 0) {
+		DBC_Require(pNodeName);
+		if (strncmp(pNodeName, pSectName + 1,
+				strlen(pNodeName)) == 0) {
 				/* Found the node */
 				break;
 		}
@@ -1022,14 +1022,14 @@ static DSP_STATUS AddOvlyInfo(void *handle, struct DBLL_SectInfo *sectInfo,
 
 	if (*pch) {
 		pch++;	/* Skip over the ':' */
-               if (strncmp(pch, PCREATE, strlen(PCREATE)) == 0) {
+		if (strncmp(pch, PCREATE, strlen(PCREATE)) == 0) {
 			status = AddOvlySect(hNldr, &hNldr->ovlyTable[i].
 				pCreateSects, sectInfo, &fExists, addr, nBytes);
 			if (DSP_SUCCEEDED(status) && !fExists)
 				hNldr->ovlyTable[i].nCreateSects++;
 
 		} else
-               if (strncmp(pch, PDELETE, strlen(PDELETE)) == 0) {
+		if (strncmp(pch, PDELETE, strlen(PDELETE)) == 0) {
 			status = AddOvlySect(hNldr, &hNldr->ovlyTable[i].
 					    pDeleteSects, sectInfo, &fExists,
 					    addr, nBytes);
@@ -1037,7 +1037,7 @@ static DSP_STATUS AddOvlyInfo(void *handle, struct DBLL_SectInfo *sectInfo,
 				hNldr->ovlyTable[i].nDeleteSects++;
 
 		} else
-               if (strncmp(pch, PEXECUTE, strlen(PEXECUTE)) == 0) {
+		if (strncmp(pch, PEXECUTE, strlen(PEXECUTE)) == 0) {
 			status = AddOvlySect(hNldr, &hNldr->ovlyTable[i].
 					    pExecuteSects, sectInfo, &fExists,
 					    addr, nBytes);
@@ -1087,14 +1087,14 @@ static DSP_STATUS AddOvlyNode(struct DSP_UUID *pUuid,
 		} else {
 			/* Add node to table */
 			hNldr->ovlyTable[hNldr->nNode].uuid = *pUuid;
-                       DBC_Require(objDef.objData.nodeObj.ndbProps.acName);
-                       uLen = strlen(objDef.objData.nodeObj.ndbProps.acName);
+			DBC_Require(objDef.objData.nodeObj.ndbProps.acName);
+			uLen = strlen(objDef.objData.nodeObj.ndbProps.acName);
 			pNodeName = objDef.objData.nodeObj.ndbProps.acName;
 			pBuf = MEM_Calloc(uLen + 1, MEM_PAGED);
 			if (pBuf == NULL) {
 				status = DSP_EMEMORY;
 			} else {
-                               strncpy(pBuf, pNodeName, uLen);
+				strncpy(pBuf, pNodeName, uLen);
 				hNldr->ovlyTable[hNldr->nNode].pNodeName = pBuf;
 				hNldr->nNode++;
 			}
drivers/dsp/bridge/rmgr/node.c +103 -104

402 lines not on this page · raw message

drivers/dsp/bridge/rmgr/proc.c +7 -7
index ad7da7f..9eae2f9 100644
@@ -287,8 +287,8 @@ static DSP_STATUS GetExecFile(struct CFG_DEVNODE *hDevNode,
 		return CFG_GetExecFile(hDevNode, size, execFile);
 	} else if (devType == IVA_UNIT) {
 		if (iva_img) {
-                       len = strlen(iva_img);
-                       strncpy(execFile, iva_img, len + 1);
+			len = strlen(iva_img);
+			strncpy(execFile, iva_img, len + 1);
 			return DSP_SOK;
 		}
 	}
@@ -529,8 +529,8 @@ DSP_STATUS PROC_Detach(struct PROCESS_CONTEXT *pr_ctxt)
  *      on a DSP processor.
  */
 DSP_STATUS PROC_EnumNodes(DSP_HPROCESSOR hProcessor, OUT DSP_HNODE *aNodeTab,
-               IN u32 uNodeTabSize, OUT u32 *puNumNodes,
-               OUT u32 *puAllocated)
+		IN u32 uNodeTabSize, OUT u32 *puNumNodes,
+		OUT u32 *puAllocated)
 {
 	DSP_STATUS status = DSP_EFAIL;
 	struct PROC_OBJECT *pProcObject = (struct PROC_OBJECT *)hProcessor;
@@ -1078,13 +1078,13 @@ DSP_STATUS PROC_Load(DSP_HPROCESSOR hProcessor, IN CONST s32 iArgc,
 				DBC_Assert(pProcObject->g_pszLastCoff == NULL);
 				/* Allocate memory for pszLastCoff */
 				pProcObject->g_pszLastCoff = MEM_Calloc(
-                                       (strlen((char *)aArgv[0]) + 1),
+					(strlen((char *)aArgv[0]) + 1),
 					MEM_PAGED);
 				/* If memory allocated, save COFF file name*/
 				if (pProcObject->g_pszLastCoff) {
-                                       strncpy(pProcObject->g_pszLastCoff,
+					strncpy(pProcObject->g_pszLastCoff,
 						(char *)aArgv[0],
-                                       (strlen((char *)aArgv[0]) + 1));
+						(strlen((char *)aArgv[0]) + 1));
 				}
 			}
 		}
drivers/dsp/bridge/services/cfg.c +4 -4
index 94a5fe2..72b7aae 100644
@@ -113,7 +113,7 @@ DSP_STATUS CFG_GetDevObject(struct CFG_DEVNODE *hDevNode, OUT u32 *pdwValue)
 	if (DSP_SUCCEEDED(status)) {
 
 		/* check the device string and then call the REG_SetValue*/
-               if (!(strcmp((char *)((struct DRV_EXT *)hDevNode)->szString,
+		if (!(strcmp((char *)((struct DRV_EXT *)hDevNode)->szString,
 							"TIOMAP1510"))) {
 			GT_0trace(CFG_debugMask, GT_1CLASS,
 				  "Fetching DSP Device from "
@@ -218,7 +218,7 @@ DSP_STATUS CFG_GetExecFile(struct CFG_DEVNODE *hDevNode, u32 ulBufSize,
 	}
 #endif
 	DBC_Ensure(((status == DSP_SOK) &&
-                 (strlen(pstrExecFile) <= ulBufSize)) || (status != DSP_SOK));
+		(strlen(pstrExecFile) <= ulBufSize)) || (status != DSP_SOK));
 	return status;
 }
 
@@ -349,11 +349,11 @@ DSP_STATUS CFG_SetDevObject(struct CFG_DEVNODE *hDevNode, u32 dwValue)
 	if (DSP_SUCCEEDED(status)) {
 		/* Store the WCD device object in the Registry */
 
-               if (!(strcmp((char *)hDevNode, "TIOMAP1510"))) {
+		if (!(strcmp((char *)hDevNode, "TIOMAP1510"))) {
 			GT_0trace(CFG_debugMask, GT_1CLASS,
 				  "Registering the DSP Device \n");
 			status = REG_SetValue("DEVICE_DSP", (u8 *)&dwValue,
-					      dwBuffSize);
+						dwBuffSize);
 		} else {
 			GT_0trace(CFG_debugMask, GT_6CLASS,
 				  "Failed to Register Device \n");
drivers/dsp/bridge/services/clk.c +4 -3
index f56b82d..c8de4e8 100644
@@ -225,8 +225,8 @@ DSP_STATUS CLK_Set_32KHz(IN enum SERVICES_ClkId clk_id)
 	pClk = SERVICES_Clks[clk_id].clk_handle;
 	if (pClk) {
 		if (!(clk_set_parent(pClk, pClkParent) == 0x0)) {
-		       GT_2trace(CLK_debugMask, GT_7CLASS, "CLK_Set_32KHz: "
-				"Failed to set to 32KHz %s, CLK dev id = %d\n",
+			GT_2trace(CLK_debugMask, GT_7CLASS, "CLK_Set_32KHz: "
+				"Failed to set to 32KHz %s, CLK dev id = %s\n",
 				SERVICES_Clks[clk_id].clk_name,
 				SERVICES_Clks[clk_id].id);
 			status = DSP_EFAIL;
@@ -328,7 +328,8 @@ s32 CLK_Get_UseCnt(IN enum SERVICES_ClkId clk_id)
 	pClk = SERVICES_Clks[clk_id].clk_handle;
 
 	if (pClk) {
-		useCount =  pClk->usecount; /* FIXME: usecount shouldn't be used */
+		/* FIXME: usecount shouldn't be used */
+		useCount = pClk->usecount;
 	} else {
 		GT_2trace(CLK_debugMask, GT_7CLASS,
 			 "CLK_GetRate: failed to get CLK %s, "
drivers/dsp/bridge/services/regsup.c +7 -7
index 5c2421b..4376b36 100644
@@ -129,7 +129,7 @@ DSP_STATUS regsupGetValue(char *valName, void *pBuf, u32 *dataSize)
 	/*  Need to search through the entries looking for the right one.  */
 	for (i = 0; i < pRegKey->numValueEntries; i++) {
 		/*  See if the name matches.  */
-               if (strncmp(pRegKey->values[i].name, valName,
+		if (strncmp(pRegKey->values[i].name, valName,
 		    BRIDGE_MAX_NAME_SIZE) == 0) {
 
 			/*  We have a match!  Copy out the data.  */
@@ -171,7 +171,7 @@ DSP_STATUS regsupSetValue(char *valName, void *pBuf, u32 dataSize)
 	/*  Need to search through the entries looking for the right one.  */
 	for (i = 0; i < pRegKey->numValueEntries; i++) {
 		/*  See if the name matches.  */
-               if (strncmp(pRegKey->values[i].name, valName,
+		if (strncmp(pRegKey->values[i].name, valName,
 		    BRIDGE_MAX_NAME_SIZE) == 0) {
 			/*  Make sure the new data size is the same.  */
 			if (dataSize != pRegKey->values[i].dataSize) {
@@ -247,16 +247,16 @@ DSP_STATUS regsupEnumValue(IN u32 dwIndex, IN CONST char *pstrKey,
 	/*  Need to search through the entries looking for the right one.  */
 	for (i = 0; i < pRegKey->numValueEntries; i++) {
 		/*  See if the name matches.  */
-               if ((strncmp(pRegKey->values[i].name, pstrKey,
+		if ((strncmp(pRegKey->values[i].name, pstrKey,
 		    dwKeyLen) == 0) && count++ == dwIndex) {
 			/*  We have a match!  Copy out the data.  */
 			memcpy(pstrData, pRegKey->values[i].pData,
 				pRegKey->values[i].dataSize);
 			/*  Get the size for the caller.  */
 			*pdwDataSize = pRegKey->values[i].dataSize;
-                       *pdwValueSize = strlen(&(pRegKey->
+			*pdwValueSize = strlen(&(pRegKey->
 						values[i].name[dwKeyLen]));
-                       strncpy(pstrValue,
+			strncpy(pstrValue,
 				    &(pRegKey->values[i].name[dwKeyLen]),
 				    *pdwValueSize + 1);
 			GT_3trace(REG_debugMask, GT_2CLASS,
@@ -285,7 +285,7 @@ DSP_STATUS regsupDeleteValue(IN CONST char *pstrValue)
 	for (i = 0; ((i < BRIDGE_MAX_NUM_REG_ENTRIES) &&
 	    (i < pRegKey->numValueEntries)); i++) {
 		/*  See if the name matches...  */
-               if (strncmp(pRegKey->values[i].name, pstrValue,
+		if (strncmp(pRegKey->values[i].name, pstrValue,
 		    BRIDGE_MAX_NAME_SIZE) == 0) {
 			/* We have a match!  Delete this key.  To delete a
 			 * key, we free all resources associated with this
@@ -301,7 +301,7 @@ DSP_STATUS regsupDeleteValue(IN CONST char *pstrValue)
 				pRegKey->values[i].pData = NULL;
 			} else {
 				/* move the last one here */
-                               strncpy(pRegKey->values[i].name, pRegKey->
+				strncpy(pRegKey->values[i].name, pRegKey->
 				    values[pRegKey->numValueEntries - 1].name,
 				    BRIDGE_MAX_NAME_SIZE);
 				pRegKey->values[i].dataSize =
drivers/dsp/bridge/wmd/_tiomap.h +20 -20
index 16eeeb3..4627822 100644
@@ -328,24 +328,24 @@ enum INTH_SensitiveEdge_t {
 /* This mini driver's device context: */
 struct WMD_DEV_CONTEXT {
 	struct DEV_OBJECT *hDevObject;	/* Handle to WCD device object. */
-	u32 dwDspBaseAddr;	/* Arm's API to DSP virtual base addr */
+	u32 dwDspBaseAddr; 		/* Arm's API to DSP virt base addr */
 	/*
 	 * DSP External memory prog address as seen virtually by the OS on
 	 * the host side.
 	 */
-	u32 dwDspExtBaseAddr;	/* See the comment above        */
-	u32 dwAPIRegBase;	/* API memory mapped registers  */
-	void __iomem *dwDSPMmuBase;	/* DSP MMU Mapped registers     */
-	u32 dwMailBoxBase;	/* Mail box mapped registers    */
-	u32 dwAPIClkBase;	/* CLK Registers                */
-	u32 dwDSPClkM2Base;	/* DSP Clock Module m2          */
-	u32 dwPublicRhea;	/* Pub Rhea                     */
-	u32 dwIntAddr;	/* MB INTR reg                  */
-	u32 dwTCEndianism;	/* TC Endianism register        */
-	u32 dwTestBase;	/* DSP MMU Mapped registers     */
-	u32 dwSelfLoop;	/* Pointer to the selfloop      */
-	u32 dwDSPStartAdd;	/* API Boot vector              */
-	u32 dwInternalSize;	/* Internal memory size         */
+	u32 dwDspExtBaseAddr;		/* See the comment above */
+	u32 dwAPIRegBase;		/* API mem map'd registers */
+	void __iomem *dwDSPMmuBase;	/* DSP MMU Mapped registers */
+	u32 dwMailBoxBase;		/* Mail box mapped registers */
+	u32 dwAPIClkBase;		/* CLK Registers */
+	u32 dwDSPClkM2Base;		/* DSP Clock Module m2 */
+	u32 dwPublicRhea;		/* Pub Rhea */
+	u32 dwIntAddr;			/* MB INTR reg */
+	u32 dwTCEndianism;		/* TC Endianism register */
+	u32 dwTestBase;			/* DSP MMU Mapped registers */
+	u32 dwSelfLoop;			/* Pointer to the selfloop */
+	u32 dwDSPStartAdd;		/* API Boot vector */
+	u32 dwInternalSize;		/* Internal memory size */
 
 	/*
 	 * Processor specific info is set when prog loaded and read from DCD.
@@ -353,14 +353,14 @@ struct WMD_DEV_CONTEXT {
 	 */
 	/* DMMU TLB entries */
 	struct WMDIOCTL_EXTPROC aTLBEntry[WMDIOCTL_NUMOFMMUTLB];
-	u32 dwBrdState;	/* Last known board state.      */
-	u32 ulIntMask;	/* int mask                     */
-	u16 ioBase;	/* Board I/O base               */
-	u32 numTLBEntries;	/* DSP MMU TLB entry counter    */
-	u32 fixedTLBEntries;	/* Fixed DSPMMU TLB entry count */
+	u32 dwBrdState;			/* Last known board state. */
+	u32 ulIntMask;			/* int mask */
+	u16 ioBase;			/* Board I/O base */
+	u32 numTLBEntries;		/* DSP MMU TLB entry counter */
+	u32 fixedTLBEntries;		/* Fixed DSPMMU TLB entry count */
 
 	/* TC Settings */
-	bool tcWordSwapOn;	/* Traffic Controller Word Swap */
+	bool tcWordSwapOn;		/* Traffic Controller Word Swap */
 	struct PgTableAttrs *pPtAttrs;
 	u32 uDspPerClks;
 } ;
drivers/dsp/bridge/wmd/chnl_sm.c +1 -1
index 7157eea..867792e 100644
@@ -861,7 +861,7 @@ DSP_STATUS WMD_CHNL_Open(OUT struct CHNL_OBJECT **phChnl,
 			pChnl->uMode = uMode;
 			pChnl->hUserEvent = hSyncEvent;	/* for Linux */
 			pChnl->hSyncEvent = hSyncEvent;
-                       /* get the process handle */
+			/* Get the process handle */
 			pChnl->hProcess = current->tgid;
 			pChnl->pCBArg = 0;
 			pChnl->cBytesMoved = 0;
drivers/dsp/bridge/wmd/io_sm.c +194 -196

521 lines not on this page · raw message

drivers/dsp/bridge/wmd/msg_sm.c +37 -38

144 lines not on this page · raw message

drivers/dsp/bridge/wmd/ue_deh.c +7 -8
index 7cd86d7..c480f62 100644
@@ -107,11 +107,11 @@ DSP_STATUS WMD_DEH_Create(OUT struct DEH_MGR **phDehMgr,
 			pDehMgr->errInfo.dwVal2 = 0L;
 			pDehMgr->errInfo.dwVal3 = 0L;
 			/* Install ISR function for DSP MMU fault */
-                       if ((request_irq(INT_DSP_MMU_IRQ, MMU_FaultIsr, 0,
-                                           "DspBridge\tiommu fault", (void *)pDehMgr)) == 0)
-                               status = DSP_SOK;
-                       else
-                               status = DSP_EFAIL;
+			if ((request_irq(INT_DSP_MMU_IRQ, MMU_FaultIsr, 0,
+			   "DspBridge\tiommu fault", (void *)pDehMgr)) == 0)
+				status = DSP_SOK;
+			else
+				status = DSP_EFAIL;
 		}
 	}
 	if (DSP_FAILED(status)) {
@@ -120,8 +120,7 @@ DSP_STATUS WMD_DEH_Create(OUT struct DEH_MGR **phDehMgr,
 		*phDehMgr = NULL;
 	} else {
 		*phDehMgr = (struct DEH_MGR *)pDehMgr;
-               DBG_Trace(DBG_LEVEL1, "ISR_IRQ Object 0x%x \n",
-                                        pDehMgr);
+		DBG_Trace(DBG_LEVEL1, "ISR_IRQ Object 0x%x \n", pDehMgr);
 	}
 	DBG_Trace(DBG_LEVEL1, "Exiting DEH_Create.\n");
 	return status;
@@ -144,7 +143,7 @@ DSP_STATUS WMD_DEH_Destroy(struct DEH_MGR *hDehMgr)
 		if (pDehMgr->hNtfy)
 			(void)NTFY_Delete(pDehMgr->hNtfy);
 		/* Disable DSP MMU fault */
-               free_irq(INT_DSP_MMU_IRQ, pDehMgr);
+		free_irq(INT_DSP_MMU_IRQ, pDehMgr);
 		(void)DPC_Destroy(pDehMgr->hMmuFaultDpc);
 		/* Deallocate the DEH manager object */
 		MEM_FreeObject(pDehMgr);
Signature · 1 line
1.6.2.4
#8 lore raw

PATCH 8/10 DSPBRIDGE: Checkpatch - line over 80 characters

WARNING: line over 80 characters

---
 arch/arm/plat-omap/include/dspbridge/dbdefs.h |    2 +-
 drivers/dsp/bridge/wmd/io_sm.c                |    3 ++-
 drivers/dsp/bridge/wmd/tiomap3430.c           |   11 +++++------
 3 files changed, 8 insertions(+), 8 deletions(-)
arch/arm/plat-omap/include/dspbridge/dbdefs.h +1 -1
index fe68cab..fc9fdc8 100644
@@ -556,7 +556,7 @@ bit 6 - MMU element size = 64bit (valid only for non mixed page entries)
 #define AUTOSTART	"AutoStart"		/* Statically load flag */
 #define CURRENTCONFIG	"CurrentConfig"		/* Current resources */
 #define SHMSIZE		"SHMSize"		/* Size of SHM reservd on MPU */
-#define TCWORDSWAP	"TCWordSwap"		/* Traffic Contoller Word Swap */
+#define TCWORDSWAP	"TCWordSwap"		/* Traffic Controller WordSwp */
 #define DSPRESOURCES	"DspTMSResources"	/* C55 DSP resurces on OMAP */
 
 #endif				/* DBDEFS_ */
drivers/dsp/bridge/wmd/io_sm.c +2 -1
index 8b7d221..e37d447 100644
@@ -1566,7 +1566,8 @@ static void OutputMsg(struct IO_MGR *pIOMgr, struct MSG_MGR *hMsgMgr)
 			IO_SetValue(pIOMgr->hWmdContext, struct MSG, pCtrl,
 				   postSWI, true);
 			/* Tell the DSP we have written the output. */
-			CHNLSM_InterruptDSP2(pIOMgr->hWmdContext, MBX_PCPY_CLASS);
+			CHNLSM_InterruptDSP2(pIOMgr->hWmdContext,
+						MBX_PCPY_CLASS);
 		}
 	}
 func_end:
drivers/dsp/bridge/wmd/tiomap3430.c +5 -6
index 2c1ec2f..4729ae5 100644
@@ -564,12 +564,11 @@ static DSP_STATUS WMD_BRD_Start(struct WMD_DEV_CONTEXT *hDevContext,
 
 		/* Enable the BIOS clock  */
 		(void)DEV_GetSymbol(pDevContext->hDevObject,
-					BRIDGEINIT_BIOSGPTIMER,
-				     &ulBiosGpTimer);
+				BRIDGEINIT_BIOSGPTIMER, &ulBiosGpTimer);
 		DBG_Trace(DBG_LEVEL7, "BIOS GPTimer : 0x%x\n", ulBiosGpTimer);
 		(void)DEV_GetSymbol(pDevContext->hDevObject,
 				BRIDGEINIT_LOADMON_GPTIMER,
-				     &ulLoadMonitorTimer);
+				&ulLoadMonitorTimer);
 		DBG_Trace(DBG_LEVEL7, "Load Monitor Timer : 0x%x\n",
 			  ulLoadMonitorTimer);
 	}
@@ -585,7 +584,7 @@ static DSP_STATUS WMD_BRD_Start(struct WMD_DEV_CONTEXT *hDevContext,
 
 			extClkId = uClkCmd & MBX_PM_CLK_IDMASK;
 			for (tmpIndex = 0; tmpIndex < MBX_PM_MAX_RESOURCES;
-				       tmpIndex++) {
+			     tmpIndex++) {
 				if (extClkId == BPWR_CLKID[tmpIndex]) {
 					clkIdIndex = tmpIndex;
 					break;
@@ -593,8 +592,8 @@ static DSP_STATUS WMD_BRD_Start(struct WMD_DEV_CONTEXT *hDevContext,
 			}
 
 			if (clkIdIndex < MBX_PM_MAX_RESOURCES)
-				status = CLK_Set_32KHz(
-						BPWR_Clks[clkIdIndex].funClk);
+				status =
+				    CLK_Set_32KHz(BPWR_Clks[clkIdIndex].funClk);
 			else
 				status = DSP_EFAIL;
 
Signature · 1 line
1.6.2.4
#9 lore raw

PATCH 9/10 DSPBRIDGE: checkpatch - printk() should include KERN_ facility level

WARNING: printk() should include KERN_ facility level

---
 arch/arm/plat-omap/include/dspbridge/dbc.h |    2 +-
 arch/arm/plat-omap/include/dspbridge/gt.h  |    2 +-
 drivers/dsp/bridge/gen/_gt_para.c          |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-omap/include/dspbridge/dbc.h +1 -1
index e9cb548..ac5d178 100644
@@ -36,7 +36,7 @@
 
 #define DBC_Assert(exp) \
     if (!(exp)) \
-	printk("%s, line %d: Assertion (" #exp ") failed.\n", \
+	pr_err("%s, line %d: Assertion (" #exp ") failed.\n", \
 	__FILE__, __LINE__)
 #define DBC_Require DBC_Assert	/* Function Precondition.  */
 #define DBC_Ensure  DBC_Assert	/* Function Postcondition. */
arch/arm/plat-omap/include/dspbridge/gt.h +1 -1
index b43b1e7..6082d15 100644
@@ -232,7 +232,7 @@ extern struct GT_Config _GT_params;
 
 #define GT_assert(mask, expr) \
 	(!(expr) ? \
-	    printk("assertion violation: %s, line %d\n", \
+	    pr_err("assertion violation: %s, line %d\n", \
 			    __FILE__, __LINE__), NULL : NULL)
 
 #define GT_config(config)     (_GT_params = *(config))
drivers/dsp/bridge/gen/_gt_para.c +1 -1
index 9f8246b..f676d3f 100644
@@ -77,7 +77,7 @@ static void error(char *fmt, ...)
 
 	va_end(va);
 
-	printk("ERROR: ");
+	pr_err("ERROR: ");
 	printk(fmt, arg1, arg2, arg3, arg4, arg5, arg6);
 
 #if defined(DEBUG) || defined(DDSP_DEBUG_PRODUCT)
Signature · 1 line
1.6.2.4
#10 lore raw

PATCH 10/10 DSPBRIDGE: trivial cleanup for io_sm

- Removed duplicate set of braces from if statement
- Placed braces for single (if or else) statements when their counter part is a multiline block.
- Reduce indentation
- Removed a preprocessor block statement affecting DSP trace buffer and reduced condition as MBX_DBG_CLASS and MBX_DBG_SYSPRINTF have the same value
- Fix multiline comments according to Documentation/CodingStyle

Functions comments will be addressed in a different patch.

---
 drivers/dsp/bridge/wmd/io_sm.c |  503 ++++++++++++++++++++++------------------
 1 files changed, 275 insertions(+), 228 deletions(-)
drivers/dsp/bridge/wmd/io_sm.c +275 -228
index e37d447..3a35378 100644
@@ -17,14 +17,14 @@
  */
 
 /*
- *  Channel Invariant:
- *      There is an important invariant condition which must be maintained per
- *      channel outside of WMD_CHNL_GetIOC() and IO_Dispatch(), violation of
- *      which may cause timeouts and/or failure of the SYNC_WaitOnEvent
- *      function.
+ * Channel Invariant:
+ * There is an important invariant condition which must be maintained per
+ * channel outside of WMD_CHNL_GetIOC() and IO_Dispatch(), violation of
+ * which may cause timeouts and/or failure of the SYNC_WaitOnEvent
+ * function.
  */
 
-/*  ----------------------------------- Host OS */
+/* Host OS */
 #include <dspbridge/host_os.h>
 #include <linux/workqueue.h>
 
@@ -33,11 +33,11 @@
 #include <dspbridge/dbdefs.h>
 #include <dspbridge/errbase.h>
 
-/*  ----------------------------------- Trace & Debug */
+/* Trace & Debug */
 #include <dspbridge/dbc.h>
 #include <dspbridge/dbg.h>
 
-/*  ----------------------------------- OS Adaptation Layer */
+/* Services Layer */
 #include <dspbridge/cfg.h>
 #include <dspbridge/dpc.h>
 #include <dspbridge/mem.h>
@@ -45,11 +45,11 @@
 #include <dspbridge/sync.h>
 #include <dspbridge/reg.h>
 
-/* ------------------------------------ Hardware Abstraction Layer */
+/* Hardware Abstraction Layer */
 #include <hw_defs.h>
 #include <hw_mmu.h>
 
-/*  ----------------------------------- Mini Driver */
+/* Mini Driver */
 #include <dspbridge/wmddeh.h>
 #include <dspbridge/wmdio.h>
 #include <dspbridge/wmdioctl.h>
@@ -57,25 +57,25 @@
 #include <tiomap_io.h>
 #include <_tiomap_pwr.h>
 
-/*  ----------------------------------- Platform Manager */
+/* Platform Manager */
 #include <dspbridge/cod.h>
 #include <dspbridge/dev.h>
 #include <dspbridge/chnl_sm.h>
 
-/*  ----------------------------------- Others */
+/* Others */
 #include <dspbridge/rms_sh.h>
 #include <dspbridge/mgr.h>
 #include <dspbridge/drv.h>
 #include "_cmm.h"
 
-/*  ----------------------------------- This */
+/* This */
 #include <dspbridge/io_sm.h>
 #include "_msg_sm.h"
 #include <dspbridge/gt.h>
 
-/*  ----------------------------------- Defines, Data Structures, Typedefs */
+/* Defines, Data Structures, Typedefs */
 #define OUTPUTNOTREADY  0xffff
-#define NOTENABLED      0xffff	/* channel(s) not enabled */
+#define NOTENABLED      0xffff	/* Channel(s) not enabled */
 
 #define EXTEND      "_EXT_END"
 
@@ -84,34 +84,34 @@
 
 #define MAX_PM_REQS 32
 
-/* IO Manager: only one created per board: */
+/* IO Manager: only one created per board */
 struct IO_MGR {
-	/* These four fields must be the first fields in a IO_MGR_ struct: */
-	u32 dwSignature; 	/* Used for object validation   */
-	struct WMD_DEV_CONTEXT *hWmdContext; 	/* WMD device context  */
+	/* These four fields must be the first fields in a IO_MGR_ struct */
+	u32 dwSignature; 	/* Used for object validation */
+	struct WMD_DEV_CONTEXT *hWmdContext; 	/* WMD device context */
 	struct WMD_DRV_INTERFACE *pIntfFxns; 	/* Function interface to WMD */
 	struct DEV_OBJECT *hDevObject; 	/* Device this board represents */
 
-	/* These fields initialized in WMD_IO_Create():    */
+	/* These fields initialized in WMD_IO_Create() */
 	struct CHNL_MGR *hChnlMgr;
-	struct SHM *pSharedMem; 	/* Shared Memory control	*/
-	u8 *pInput; 		/* Address of input channel     */
-	u8 *pOutput; 		/* Address of output channel    */
+	struct SHM *pSharedMem; 	/* Shared Memory control */
+	u8 *pInput; 		/* Address of input channel */
+	u8 *pOutput; 		/* Address of output channel */
 	struct MSG_MGR *hMsgMgr; 	/* Message manager */
 	struct MSG *pMsgInputCtrl; 	/* Msg control for from DSP messages */
 	struct MSG *pMsgOutputCtrl; 	/* Msg control for to DSP messages */
-	u8 *pMsgInput; 	/* Address of input messages    */
-	u8 *pMsgOutput; 	/* Address of output messages   */
+	u8 *pMsgInput; 	/* Address of input messages */
+	u8 *pMsgOutput; 	/* Address of output messages */
 	u32 uSMBufSize; 	/* Size of a shared memory I/O channel */
-	bool fSharedIRQ; 	/* Is this IRQ shared?	  */
-	struct DPC_OBJECT *hDPC; 	/* DPC object handle	    */
+	bool fSharedIRQ; 	/* Is this IRQ shared? */
+	struct DPC_OBJECT *hDPC; 	/* DPC object handle */
 	struct SYNC_CSOBJECT *hCSObj; 	/* Critical section object handle */
-	u32 uWordSize; 	/* Size in bytes of DSP word    */
-	u16 wIntrVal; 		/* interrupt value	      */
-	/* private extnd proc info; mmu setup */
+	u32 uWordSize; 	/* Size in bytes of DSP word */
+	u16 wIntrVal; 		/* Interrupt value */
+	/* Private extnd proc info; mmu setup */
 	struct MGR_PROCESSOREXTINFO extProcInfo;
-	struct CMM_OBJECT *hCmmMgr; 	/* Shared Mem Mngr	      */
-       struct work_struct io_workq;     /*workqueue */
+	struct CMM_OBJECT *hCmmMgr; 	/* Shared Mem Mngr */
+	struct work_struct io_workq;     /* workqueue */
 	u32 dQuePowerMbxVal[MAX_PM_REQS];
 	u32 iQuePowerHead;
 	u32 iQuePowerTail;
@@ -126,7 +126,7 @@ struct IO_MGR {
 #endif
 } ;
 
-/*  ----------------------------------- Function Prototypes */
+/* Function Prototypes */
 static void IO_DispatchChnl(IN struct IO_MGR *pIOMgr,
 			   IN OUT struct CHNL_OBJECT *pChnl, u32 iMode);
 static void IO_DispatchMsg(IN struct IO_MGR *pIOMgr, struct MSG_MGR *hMsgMgr);
@@ -150,7 +150,7 @@ static struct workqueue_struct *bridge_workqueue;
 void PrintDSPDebugTrace(struct IO_MGR *hIOMgr);
 #endif
 
-/* Bus Addr (cached kernel)*/
+/* Bus Addr (cached kernel) */
 static DSP_STATUS registerSHMSegs(struct IO_MGR *hIOMgr,
 				  struct COD_MANAGER *hCodMan,
 				  u32 dwGPPBasePA);
@@ -181,9 +181,9 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
 	struct CFG_HOSTRES hostRes;
 	struct CFG_DEVNODE *hDevNode;
 	struct CHNL_MGR *hChnlMgr;
-       static int ref_count;
+	static int ref_count;
 	u32 devType;
-	/* Check requirements:  */
+	/* Check requirements */
 	if (!phIOMgr || !pMgrAttrs || pMgrAttrs->uWordSize == 0) {
 		status = DSP_EHANDLE;
 		goto func_end;
@@ -193,26 +193,28 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
 		status = DSP_EHANDLE;
 		goto func_end;
 	}
-	 /*  Message manager will be created when a file is loaded, since
-	 *  size of message buffer in shared memory is configurable in
-	 *  the base image.  */
+	/*
+	 * Message manager will be created when a file is loaded, since
+	 * size of message buffer in shared memory is configurable in
+	 * the base image.
+	 */
 	DEV_GetWMDContext(hDevObject, &hWmdContext);
 	if (!hWmdContext) {
 		status = DSP_EHANDLE;
 		goto func_end;
 	}
 	DEV_GetDevType(hDevObject, &devType);
-	/*  DSP shared memory area will get set properly when
-	 *  a program is loaded. They are unknown until a COFF file is
-	 *  loaded. I chose the value -1 because it was less likely to be
-	 *  a valid address than 0.  */
+	/*
+	 * DSP shared memory area will get set properly when
+	 * a program is loaded. They are unknown until a COFF file is
+	 * loaded. I chose the value -1 because it was less likely to be
+	 * a valid address than 0.
+	 */
 	pSharedMem = (struct SHM *) -1;
 	if (DSP_FAILED(status))
 		goto func_cont;
 
-	/*
-	 * Create a Single Threaded Work Queue
-	 */
+	/* Create a Single Threaded Work Queue */
 	if (ref_count == 0)
 		bridge_workqueue = create_workqueue("bridge_work-queue");
 
@@ -220,13 +222,13 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
 		DBG_Trace(DBG_LEVEL1, "Workque Create failed 0x%d \n",
 						bridge_workqueue);
 
-	/* Allocate IO manager object: */
+	/* Allocate IO manager object */
 	MEM_AllocObject(pIOMgr, struct IO_MGR, IO_MGRSIGNATURE);
 	if (pIOMgr == NULL) {
 		status = DSP_EMEMORY;
 		goto func_cont;
 	}
-	/*Intializing Work Element*/
+	/* Intializing Work Element */
 	if (ref_count == 0) {
 		INIT_WORK(&pIOMgr->io_workq, (void *)IO_DispatchPM);
 		ref_count = 1;
@@ -234,7 +236,7 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
 		PREPARE_WORK(&pIOMgr->io_workq, (void *)IO_DispatchPM);
 	}
 
-	/* Initialize CHNL_MGR object:    */
+	/* Initialize CHNL_MGR object */
 #ifndef DSP_TRACEBUF_DISABLED
 	pIOMgr->pMsg = NULL;
 #endif
@@ -245,7 +247,7 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
 		status = SYNC_InitializeCS(&pIOMgr->hCSObj);
 
 	if (devType == DSP_UNIT) {
-		/* Create a DPC object: */
+		/* Create a DPC object */
 		status = DPC_Create(&pIOMgr->hDPC, IO_DPC, (void *)pIOMgr);
 		if (DSP_SUCCEEDED(status))
 			status = DEV_GetDevNode(hDevObject, &hDevNode);
@@ -263,7 +265,7 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
 		IO_DisableInterrupt(hWmdContext);
 		if (devType == DSP_UNIT) {
 			HW_MBOX_initSettings(hostRes.dwMboxBase);
-			/* Plug the channel ISR:. */
+			/* Plug the channel ISR */
 			if ((request_irq(INT_MAIL_MPU_IRQ, IO_ISR, 0,
 			  "DspBridge\tmailbox", (void *)pIOMgr)) == 0) {
 				status = DSP_SOK;
@@ -278,7 +280,7 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
 	}
 func_cont:
 	if (DSP_FAILED(status)) {
-		/* Cleanup: */
+		/* Cleanup */
 		WMD_IO_Destroy(pIOMgr);
 		*phIOMgr = NULL;
 	} else {
@@ -300,8 +302,7 @@ DSP_STATUS WMD_IO_Destroy(struct IO_MGR *hIOMgr)
 	DSP_STATUS status = DSP_SOK;
 	struct WMD_DEV_CONTEXT *hWmdContext;
 	if (MEM_IsValidHandle(hIOMgr, IO_MGRSIGNATURE)) {
-		/* Unplug IRQ:    */
-		/* Disable interrupts from the board:  */
+		/* Disable interrupts from the board */
 		status = DEV_GetWMDContext(hIOMgr->hDevObject, &hWmdContext);
 		if (DSP_SUCCEEDED(status))
 			(void)CHNLSM_DisableInterrupt(hWmdContext);
@@ -316,10 +317,11 @@ DSP_STATUS WMD_IO_Destroy(struct IO_MGR *hIOMgr)
 			MEM_Free(hIOMgr->pMsg);
 #endif
 		SYNC_DeleteCS(hIOMgr->hCSObj); 	/* Leak Fix. */
-		/* Free this IO manager object: */
+		/* Free this IO manager object */
 		MEM_FreeObject(hIOMgr);
-       } else
+	} else {
 		status = DSP_EHANDLE;
+	}
 
 	return status;
 }
@@ -373,7 +375,7 @@ DSP_STATUS WMD_IO_OnLoaded(struct IO_MGR *hIOMgr)
 	if (DSP_FAILED(status))
 		goto func_end;
 	hChnlMgr = hIOMgr->hChnlMgr;
-	 /*  The message manager is destroyed when the board is stopped.  */
+	/* The message manager is destroyed when the board is stopped. */
 	DEV_GetMsgMgr(hIOMgr->hDevObject, &hIOMgr->hMsgMgr);
 	hMsgMgr = hIOMgr->hMsgMgr;
 	if (!MEM_IsValidHandle(hChnlMgr, CHNL_MGRSIGNATURE) ||
@@ -400,7 +402,7 @@ DSP_STATUS WMD_IO_OnLoaded(struct IO_MGR *hIOMgr)
 	if (ulShmLimit <= ulShmBase) {
 		status = CHNL_E_INVALIDMEMBASE;
 	} else {
-		/* get total length in bytes */
+		/* Get total length in bytes */
 		ulShmLength = (ulShmLimit - ulShmBase + 1) * hIOMgr->uWordSize;
 		/* Calculate size of a PROCCOPY shared memory region */
 		DBG_Trace(DBG_LEVEL7,
@@ -420,12 +422,16 @@ func_cont1:
 			if (ulMsgLimit <= ulMsgBase) {
 				status = CHNL_E_INVALIDMEMBASE;
 			} else {
-				/* Length (bytes) of messaging part of shared
-				 * memory */
+				/*
+				 * Length (bytes) of messaging part of shared
+				 * memory.
+				 */
 				ulMsgLength = (ulMsgLimit - ulMsgBase + 1) *
 					      hIOMgr->uWordSize;
-				/* Total length (bytes) of shared memory:
-				 * chnl + msg */
+				/*
+				 * Total length (bytes) of shared memory:
+				 * chnl + msg.
+				 */
 				ulMemLength = ulShmLength + ulMsgLength;
 			}
 		} else {
@@ -444,19 +450,16 @@ func_cont1:
 #endif
 		if (DSP_FAILED(status))
 			status = CHNL_E_NOMEMMAP;
-
 	}
 	if (DSP_SUCCEEDED(status)) {
 		status = COD_GetSymValue(hCodMan, DYNEXTBASE, &ulDynExtBase);
 		if (DSP_FAILED(status))
 			status = CHNL_E_NOMEMMAP;
-
 	}
 	if (DSP_SUCCEEDED(status)) {
 		status = COD_GetSymValue(hCodMan, EXTEND, &ulExtEnd);
 		if (DSP_FAILED(status))
 			status = CHNL_E_NOMEMMAP;
-
 	}
 	if (DSP_SUCCEEDED(status)) {
 		/* Get memory reserved in host resources */
@@ -470,7 +473,7 @@ func_cont1:
 		ndx = 0;
 		ulGppPa = hostRes.dwMemPhys[1];
 		ulGppVa = hostRes.dwMemBase[1];
-		/* THIS IS THE VIRTUAL UNCACHED IOREMAPPED ADDRESS !!! */
+		/* This is the virtual uncached ioremapped address!!! */
 		/* Why can't we directly take the DSPVA from the symbols? */
 		ulDspVa = hIOMgr->extProcInfo.tyTlb[0].ulDspVirt;
 		ulSegSize = (ulShm0End - ulDspVa) * hIOMgr->uWordSize;
@@ -522,8 +525,10 @@ func_cont1:
 	mapAttrs |= DSP_MAPDONOTLOCK;
 
 	while (numBytes && DSP_SUCCEEDED(status)) {
-		/* To find the max. page size with which both PA & VA are
-		 * aligned */
+		/*
+		 * To find the max. page size with which both PA & VA are
+		 * aligned.
+		 */
 		allBits = paCurr | vaCurr;
 		DBG_Trace(DBG_LEVEL1, "allBits %x, paCurr %x, vaCurr %x, "
 			 "numBytes %x\n", allBits, paCurr, vaCurr, numBytes);
@@ -539,9 +544,11 @@ func_cont1:
 				vaCurr += pgSize[i];
 				gppVaCurr += pgSize[i];
 				numBytes -= pgSize[i];
-				/* Don't try smaller sizes. Hopefully we have
+				/*
+				 * Don't try smaller sizes. Hopefully we have
 				 * reached an address aligned to a bigger page
-				 * size*/
+				 * size.
+				 */
 				break;
 			}
 		}
@@ -550,13 +557,15 @@ func_cont1:
 	vaCurr += ulPadSize;
 	gppVaCurr += ulPadSize;
 
-	/* configure the TLB entries for the next cacheable segment */
+	/* Configure the TLB entries for the next cacheable segment */
 	numBytes = ulSegSize;
 	vaCurr = ulDspVa * hIOMgr->uWordSize;
 	allBits = 0x0;
 	while (numBytes && DSP_SUCCEEDED(status)) {
-		/* To find the max. page size with which both PA & VA are
-		 * aligned*/
+		/*
+		 * To find the max. page size with which both PA & VA are
+		 * aligned.
+		 */
 		allBits = paCurr | vaCurr;
 		DBG_Trace(DBG_LEVEL1, "allBits for Seg1 %x, paCurr %x, "
 			 "vaCurr %x, numBytes %x\n", allBits, paCurr, vaCurr,
@@ -566,11 +575,15 @@ func_cont1:
 			   !((allBits & (pgSize[i]-1)) == 0))
 				continue;
 			if (ndx < MAX_LOCK_TLB_ENTRIES) {
-				/* This is the physical address written to
-				 * DSP MMU */
+				/*
+				 * This is the physical address written to
+				 * DSP MMU.
+				 */
 				aEProc[ndx].ulGppPa = paCurr;
-				/* THIS IS THE VIRTUAL UNCACHED IOREMAPPED
-				 * ADDRESS!!! */
+				/*
+				 * This is the virtual uncached ioremapped
+				 * address!!!
+				 */
 				aEProc[ndx].ulGppVa = gppVaCurr;
 				aEProc[ndx].ulDspVa = vaCurr / hIOMgr->
 						      uWordSize;
@@ -603,14 +616,18 @@ func_cont1:
 			vaCurr += pgSize[i];
 			gppVaCurr += pgSize[i];
 			numBytes -= pgSize[i];
-			/* Don't try smaller sizes. Hopefully we have reached
-			 an address aligned to a bigger page size*/
+			/*
+			 * Don't try smaller sizes. Hopefully we have reached
+			 * an address aligned to a bigger page size.
+			 */
 			break;
 		}
 	}
 
-	 /* Copy remaining entries from CDB. All entries are 1 MB and should not
-	 * conflict with SHM entries on MPU or DSP side */
+	/*
+	 * Copy remaining entries from CDB. All entries are 1 MB and
+	 * should not conflict with SHM entries on MPU or DSP side.
+	 */
 	for (i = 3; i < 7 && ndx < WMDIOCTL_NUMOFMMUTLB &&
 	    DSP_SUCCEEDED(status); i++) {
 		if (hIOMgr->extProcInfo.tyTlb[i].ulGppPhys == 0)
@@ -637,8 +654,8 @@ func_cont1:
 				aEProc[ndx].ulGppPa = hIOMgr->extProcInfo.
 					tyTlb[i].ulGppPhys;
 				aEProc[ndx].ulGppVa = 0;
-				/* Can't convert, so set to zero*/
-				aEProc[ndx].ulSize = 0x100000; 	/* 1 MB*/
+				/* Can't convert, so set to zero */
+				aEProc[ndx].ulSize = 0x100000; 	/* 1 MB */
 				DBG_Trace(DBG_LEVEL1, "SHM MMU entry PA %x "
 					 "DSP_VA 0x%x\n", aEProc[ndx].ulGppPa,
 					aEProc[ndx].ulDspVa);
@@ -653,7 +670,7 @@ func_cont1:
 		}
 	}
 	if (i < 7 && DSP_SUCCEEDED(status)) {
-		/* All CDB entries could not be made*/
+		/* All CDB entries could not be made */
 		status = DSP_EFAIL;
 	}
 func_cont:
@@ -682,15 +699,19 @@ func_cont:
 			aEProc[i].ulGppVa = 0;
 			aEProc[i].ulSize = 0;
 		}
-		/* Set the SHM physical address entry (grayed out in CDB file)
+		/*
+		 * Set the SHM physical address entry (grayed out in CDB file)
 		 * to the virtual uncached ioremapped address of SHM reserved
-		 * on MPU */
+		 * on MPU.
+		 */
 		hIOMgr->extProcInfo.tyTlb[0].ulGppPhys = (ulGppVa + ulSeg1Size +
 							 ulPadSize);
 		DBG_Trace(DBG_LEVEL1, "*********extProcInfo *********%x \n",
 			  hIOMgr->extProcInfo.tyTlb[0].ulGppPhys);
-		/* Need SHM Phys addr. IO supports only one DSP for now:
-		 * uNumProcs=1 */
+		/*
+		 * Need SHM Phys addr. IO supports only one DSP for now:
+		 * uNumProcs = 1.
+		 */
 		if ((hIOMgr->extProcInfo.tyTlb[0].ulGppPhys == 0) ||
 		   (uNumProcs != 1)) {
 			status = CHNL_E_NOMEMMAP;
@@ -703,10 +724,12 @@ func_cont:
 			/* ulShmBase may not be at ulDspVa address */
 			ulShmBaseOffset = (ulShmBase - aEProc[0].ulDspVa) *
 			    hIOMgr->uWordSize;
-			 /* WMD_BRD_Ctrl() will set dev context dsp-mmu info. In
-			 *   _BRD_Start() the MMU will be re-programed with MMU
-			 *   DSPVa-GPPPa pair info while DSP is in a known
-			 *   (reset) state.  */
+			/*
+			 * WMD_BRD_Ctrl() will set dev context dsp-mmu info. In
+			 * _BRD_Start() the MMU will be re-programed with MMU
+			 * DSPVa-GPPPa pair info while DSP is in a known
+			 * (reset) state.
+			 */
 			if (!hIOMgr->pIntfFxns || !hIOMgr->hWmdContext)	{
 				status = DSP_EHANDLE;
 				goto func_end;
@@ -726,9 +749,9 @@ func_cont:
 			}
 			DBC_Assert(ulShmBase != 0);
 			if (DSP_SUCCEEDED(status)) {
+				/* Register SM */
 				status = registerSHMSegs(hIOMgr, hCodMan,
 					 aEProc[0].ulGppPa);
-				/* Register SM */
 			}
 		}
 	}
@@ -746,7 +769,7 @@ func_cont:
 			 "pSharedMem %p uSMBufSize %x sizeof(SHM) %x\n",
 			 hIOMgr->pSharedMem, hIOMgr->uSMBufSize,
 			 sizeof(struct SHM));
-		 /*  Set up Shared memory addresses for messaging. */
+		/* Set up Shared memory addresses for messaging. */
 		hIOMgr->pMsgInputCtrl = (struct MSG *)((u8 *)
 					hIOMgr->pSharedMem +
 					ulShmLength);
@@ -780,7 +803,6 @@ func_cont:
 				 &hIOMgr->ulTraceBufferBegin);
 			if (DSP_FAILED(status))
 				status = CHNL_E_NOMEMMAP;
-
 		}
 		hIOMgr->ulGPPReadPointer = hIOMgr->ulTraceBufferBegin =
 			(ulGppVa + ulSeg1Size + ulPadSize) +
@@ -791,7 +813,6 @@ func_cont:
 				 &hIOMgr->ulTraceBufferEnd);
 			if (DSP_FAILED(status))
 				status = CHNL_E_NOMEMMAP;
-
 		}
 		hIOMgr->ulTraceBufferEnd = (ulGppVa + ulSeg1Size + ulPadSize) +
 					   (hIOMgr->ulTraceBufferEnd - ulDspVa);
@@ -802,7 +823,6 @@ func_cont:
 				 &hIOMgr->ulTraceBufferCurrent);
 			if (DSP_FAILED(status))
 				status = CHNL_E_NOMEMMAP;
-
 		}
 		hIOMgr->ulTraceBufferCurrent = (ulGppVa + ulSeg1Size +
 						ulPadSize) + (hIOMgr->
@@ -851,7 +871,7 @@ void IO_CancelChnl(struct IO_MGR *hIOMgr, u32 ulChnl)
 		goto func_end;
 	sm = hIOMgr->pSharedMem;
 
-	/* Inform DSP that we have no more buffers on this channel:  */
+	/* Inform DSP that we have no more buffers on this channel */
 	IO_AndValue(pIOMgr->hWmdContext, struct SHM, sm, hostFreeMask,
 		   (~(1 << ulChnl)));
 
@@ -872,11 +892,11 @@ static void IO_DispatchChnl(IN struct IO_MGR *pIOMgr,
 
 	DBG_Trace(DBG_LEVEL3, "Entering IO_DispatchChnl \n");
 
-	/* See if there is any data available for transfer: */
+	/* See if there is any data available for transfer */
 	if (iMode != IO_SERVICE)
 		goto func_end;
 
-	/* Any channel will do for this mode: */
+	/* Any channel will do for this mode */
 	InputChnl(pIOMgr, pChnl, iMode);
 	OutputChnl(pIOMgr, pChnl, iMode);
 func_end:
@@ -894,7 +914,7 @@ static void IO_DispatchMsg(IN struct IO_MGR *pIOMgr, struct MSG_MGR *hMsgMgr)
 
 	DBG_Trace(DBG_LEVEL3, "Entering IO_DispatchMsg \n");
 
-	/*  We are performing both input and output processing. */
+	/* We are performing both input and output processing. */
 	InputMsg(pIOMgr, hMsgMgr);
 	OutputMsg(pIOMgr, hMsgMgr);
 func_end:
@@ -953,13 +973,11 @@ static void IO_DispatchPM(struct work_struct *work)
 					 *pArg);
 			}
 		}
-		/* increment the tail count here */
+		/* Increment the tail count here */
 		pIOMgr->iQuePowerTail++;
 		if (pIOMgr->iQuePowerTail >= MAX_PM_REQS)
 			pIOMgr->iQuePowerTail = 0;
-
 	}
-
 }
 
 /*
@@ -985,10 +1003,9 @@ void IO_DPC(IN OUT void *pRefData)
 	DBG_Trace(DBG_LEVEL7, "Entering IO_DPC(0x%x)\n", pRefData);
 	/* Check value of interrupt register to ensure it is a valid error */
 	if ((pIOMgr->wIntrVal > DEH_BASE) && (pIOMgr->wIntrVal < DEH_LIMIT)) {
-		/* notify DSP/BIOS exception */
+		/* Notify DSP/BIOS exception */
 		if (hDehMgr)
 			WMD_DEH_Notify(hDehMgr, DSP_SYSERROR, pIOMgr->wIntrVal);
-
 	}
 	IO_DispatchChnl(pIOMgr, NULL, IO_SERVICE);
 #ifdef CHNL_MESSAGES
@@ -996,21 +1013,15 @@ void IO_DPC(IN OUT void *pRefData)
 		IO_DispatchMsg(pIOMgr, pMsgMgr);
 #endif
 #ifndef DSP_TRACEBUF_DISABLED
-	if (pIOMgr->wIntrVal & MBX_DBG_CLASS) {
-		/* notify DSP Trace message */
-		if (pIOMgr->wIntrVal & MBX_DBG_SYSPRINTF)
-			PrintDSPDebugTrace(pIOMgr);
+	if (pIOMgr->wIntrVal & MBX_DBG_SYSPRINTF) {
+		/* Notify DSP Trace message */
+		PrintDSPDebugTrace(pIOMgr);
 	}
 #endif
-
-#ifndef DSP_TRACEBUF_DISABLED
-	PrintDSPDebugTrace(pIOMgr);
-#endif
 func_end:
 	return;
 }
 
-
 /*
  *  ======== IO_ISR ========
  *      Main interrupt handler for the shared memory IO manager.
@@ -1028,29 +1039,29 @@ irqreturn_t IO_ISR(int irq, IN void *pRefData)
 
 	/* Call WMD's CHNLSM_ISR() to see if interrupt is ours, and process. */
 	if (IO_CALLISR(hIOMgr->hWmdContext, &fSchedDPC, &hIOMgr->wIntrVal)) {
-		{
-			DBG_Trace(DBG_LEVEL3, "IO_ISR %x\n", hIOMgr->wIntrVal);
-			if (hIOMgr->wIntrVal & MBX_PM_CLASS) {
-				hIOMgr->dQuePowerMbxVal[hIOMgr->iQuePowerHead] =
-					hIOMgr->wIntrVal;
-				hIOMgr->iQuePowerHead++;
-				if (hIOMgr->iQuePowerHead >= MAX_PM_REQS)
-					hIOMgr->iQuePowerHead = 0;
-
-				queue_work(bridge_workqueue, &hIOMgr->io_workq);
-			}
-			if (hIOMgr->wIntrVal == MBX_DEH_RESET) {
-				DBG_Trace(DBG_LEVEL6, "*** DSP RESET ***\n");
-				hIOMgr->wIntrVal = 0;
-			} else if (fSchedDPC) {
-				/* PROC-COPY defer i/o  */
-				DPC_Schedule(hIOMgr->hDPC);
-			}
+		DBG_Trace(DBG_LEVEL3, "IO_ISR %x\n", hIOMgr->wIntrVal);
+		if (hIOMgr->wIntrVal & MBX_PM_CLASS) {
+			hIOMgr->dQuePowerMbxVal[hIOMgr->iQuePowerHead] =
+				hIOMgr->wIntrVal;
+			hIOMgr->iQuePowerHead++;
+			if (hIOMgr->iQuePowerHead >= MAX_PM_REQS)
+				hIOMgr->iQuePowerHead = 0;
+
+			queue_work(bridge_workqueue, &hIOMgr->io_workq);
+		}
+		if (hIOMgr->wIntrVal == MBX_DEH_RESET) {
+			DBG_Trace(DBG_LEVEL6, "*** DSP RESET ***\n");
+			hIOMgr->wIntrVal = 0;
+		} else if (fSchedDPC) {
+			/* PROC-COPY defer i/o */
+			DPC_Schedule(hIOMgr->hDPC);
 		}
-       } else
+	} else {
 		/* Ensure that, if WMD didn't claim it, the IRQ is shared. */
 		DBC_Ensure(hIOMgr->fSharedIRQ);
-       return IRQ_HANDLED;
+	}
+
+	return IRQ_HANDLED;
 }
 
 /*
@@ -1070,21 +1081,27 @@ void IO_RequestChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
 	pChnlMgr = pIOMgr->hChnlMgr;
 	sm = pIOMgr->pSharedMem;
 	if (iMode == IO_INPUT) {
-		/*  Assertion fires if CHNL_AddIOReq() called on a stream
-		 * which was cancelled, or attached to a dead board: */
+		/*
+		 * Assertion fires if CHNL_AddIOReq() called on a stream
+		 * which was cancelled, or attached to a dead board.
+		 */
 		DBC_Assert((pChnl->dwState == CHNL_STATEREADY) ||
 			  (pChnl->dwState == CHNL_STATEEOS));
-		/* Indicate to the DSP we have a buffer available for input: */
+		/* Indicate to the DSP we have a buffer available for input */
 		IO_OrValue(pIOMgr->hWmdContext, struct SHM, sm, hostFreeMask,
 			  (1 << pChnl->uId));
 		*pwMbVal = MBX_PCPY_CLASS;
 	} else if (iMode == IO_OUTPUT) {
-		/*  This assertion fails if CHNL_AddIOReq() was called on a
-		 * stream which was cancelled, or attached to a dead board: */
+		/*
+		 * This assertion fails if CHNL_AddIOReq() was called on a
+		 * stream which was cancelled, or attached to a dead board.
+		 */
 		DBC_Assert((pChnl->dwState & ~CHNL_STATEEOS) ==
 			  CHNL_STATEREADY);
-		/* Record the fact that we have a buffer available for
-		 * output: */
+		/*
+		 * Record the fact that we have a buffer available for
+		 * output.
+		 */
 		pChnlMgr->dwOutputMask |= (1 << pChnl->uId);
 	} else {
 		DBC_Assert(iMode); 	/* Shouldn't get here. */
@@ -1131,7 +1148,6 @@ static u32 FindReadyOutput(struct CHNL_MGR *pChnlMgr,
 				uRetval = id;
 				if (pChnl == NULL)
 					pChnlMgr->dwLastOutput = id;
-
 				break;
 			}
 			id = id + 1;
@@ -1164,7 +1180,7 @@ static void InputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
 
 	DBG_Trace(DBG_LEVEL3, "> InputChnl\n");
 
-	/* Attempt to perform input.... */
+	/* Attempt to perform input */
 	if (!IO_GetValue(pIOMgr->hWmdContext, struct SHM, sm, inputFull))
 		goto func_end;
 
@@ -1182,17 +1198,19 @@ static void InputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
 		if ((pChnl->dwState & ~CHNL_STATEEOS) == CHNL_STATEREADY) {
 			if (!pChnl->pIORequests)
 				goto func_end;
-			/* Get the I/O request, and attempt a transfer:  */
+			/* Get the I/O request, and attempt a transfer */
 			pChirp = (struct CHNL_IRP *)LST_GetHead(pChnl->
 				 pIORequests);
 			if (pChirp) {
 				pChnl->cIOReqs--;
 				if (pChnl->cIOReqs < 0)
 					goto func_end;
-				/* Ensure we don't overflow the client's
-				 * buffer: */
+				/*
+				 * Ensure we don't overflow the client's
+				 * buffer.
+				 */
 				uBytes = min(uBytes, pChirp->cBytes);
-				/* Transfer buffer from DSP side: */
+				/* Transfer buffer from DSP side */
 				uBytes = ReadData(pIOMgr->hWmdContext,
 						pChirp->pHostSysBuf,
 						pIOMgr->pInput, uBytes);
@@ -1204,24 +1222,30 @@ static void InputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
 					 "\n", *((RMS_WORD *)(pChirp->
 					 pHostSysBuf)));
 				if (uBytes == 0) {
-					/* This assertion fails if the DSP
+					/*
+					 * This assertion fails if the DSP
 					 * sends EOS more than once on this
-					 * channel: */
+					 * channel.
+					 */
 					if (pChnl->dwState & CHNL_STATEEOS)
 						goto func_end;
-					 /* Zero bytes indicates EOS. Update
-					  * IOC status for this chirp, and also
-					  * the channel state: */
+					/*
+					 * Zero bytes indicates EOS. Update
+					 * IOC status for this chirp, and also
+					 * the channel state.
+					 */
 					pChirp->status |= CHNL_IOCSTATEOS;
 					pChnl->dwState |= CHNL_STATEEOS;
-					/* Notify that end of stream has
-					 * occurred */
+					/*
+					 * Notify that end of stream has
+					 * occurred.
+					 */
 					NTFY_Notify(pChnl->hNtfy,
 						   DSP_STREAMDONE);
 					DBG_Trace(DBG_LEVEL7, "Input Chnl NTFY "
 						 "chnl = 0x%x\n", pChnl);
 				}
-				/* Tell DSP if no more I/O buffers available: */
+				/* Tell DSP if no more I/O buffers available */
 				if (!pChnl->pIORequests)
 					goto func_end;
 				if (LST_IsEmpty(pChnl->pIORequests)) {
@@ -1232,27 +1256,29 @@ static void InputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
 				fClearChnl = true;
 				fNotifyClient = true;
 			} else {
-				/* Input full for this channel, but we have no
+				/*
+				 * Input full for this channel, but we have no
 				 * buffers available.  The channel must be
 				 * "idling". Clear out the physical input
-				 * channel.  */
+				 * channel.
+				 */
 				fClearChnl = true;
 			}
 		} else {
-			/* Input channel cancelled:  clear input channel.  */
+			/* Input channel cancelled: clear input channel */
 			fClearChnl = true;
 		}
 	} else {
-		/* DPC fired after host closed channel: clear input channel. */
+		/* DPC fired after host closed channel: clear input channel */
 		fClearChnl = true;
 	}
 	if (fClearChnl) {
-		/* Indicate to the DSP we have read the input: */
+		/* Indicate to the DSP we have read the input */
 		IO_SetValue(pIOMgr->hWmdContext, struct SHM, sm, inputFull, 0);
 		CHNLSM_InterruptDSP2(pIOMgr->hWmdContext, MBX_PCPY_CLASS);
 	}
 	if (fNotifyClient) {
-		/* Notify client with IO completion record:  */
+		/* Notify client with IO completion record */
 		NotifyChnlComplete(pChnl, pChirp);
 	}
 func_end:
@@ -1276,7 +1302,7 @@ static void InputMsg(struct IO_MGR *pIOMgr, struct MSG_MGR *hMsgMgr)
 	u32 addr;
 
 	pCtrl = pIOMgr->pMsgInputCtrl;
-	/* Get the number of input messages to be read. */
+	/* Get the number of input messages to be read */
 	fInputEmpty = IO_GetValue(pIOMgr->hWmdContext, struct MSG, pCtrl,
 				 bufEmpty);
 	uMsgs = IO_GetValue(pIOMgr->hWmdContext, struct MSG, pCtrl, size);
@@ -1303,9 +1329,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.  */
+		/*
+		 * 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;
 
@@ -1313,15 +1341,18 @@ static void InputMsg(struct IO_MGR *pIOMgr, struct MSG_MGR *hMsgMgr)
 			if (msg.dwId == hMsgQueue->dwId) {
 				/* Found it */
 				if (msg.msg.dwCmd == RMS_EXITACK) {
-					/* The exit message does not get
-					 * queued */
-					/* Call the node exit notification */
-					/* Node handle */ /* status */
+					/*
+					 * Call the node exit notification.
+					 * The exit message does not get
+					 * queued.
+					 */
 					(*hMsgMgr->onExit)((HANDLE)hMsgQueue->
 						hArg, msg.msg.dwArg1);
 				} else {
-					/* Not an exit acknowledgement, queue
-					 * the message */
+					/*
+					 * Not an exit acknowledgement, queue
+					 * the message.
+					 */
 					if (!hMsgQueue->msgFreeList)
 						goto func_end;
 					pMsg = (struct MSG_FRAME *)LST_GetHead
@@ -1336,8 +1367,10 @@ static void InputMsg(struct IO_MGR *pIOMgr, struct MSG_MGR *hMsgMgr)
 						SYNC_SetEvent(hMsgQueue->
 							hSyncEvent);
 					} else {
-						/* No free frame to copy the
-						 * message into */
+						/*
+						 * No free frame to copy the
+						 * message into.
+						 */
 						DBG_Trace(DBG_LEVEL7, "NO FREE "
 							"MSG FRAMES, DISCARDING"
 							" MESSAGE\n");
@@ -1362,8 +1395,7 @@ static void InputMsg(struct IO_MGR *pIOMgr, struct MSG_MGR *hMsgMgr)
 		CHNLSM_InterruptDSP2(pIOMgr->hWmdContext, MBX_PCPY_CLASS);
 	}
 func_end:
-       return;
-
+	return;
 }
 
 /*
@@ -1380,18 +1412,20 @@ static void NotifyChnlComplete(struct CHNL_OBJECT *pChnl,
 	   !pChnl->pIOCompletions || !pChirp)
 		goto func_end;
 
-	 /*  Note: we signal the channel event only if the queue of IO
-	  *  completions is empty.  If it is not empty, the event is sure to be
-	  *  signalled by the only IO completion list consumer:
-	  *  WMD_CHNL_GetIOC().  */
+	/*
+	 * Note: we signal the channel event only if the queue of IO
+	 * completions is empty.  If it is not empty, the event is sure to be
+	 * signalled by the only IO completion list consumer:
+	 * WMD_CHNL_GetIOC().
+	 */
 	fSignalEvent = LST_IsEmpty(pChnl->pIOCompletions);
-	/* Enqueue the IO completion info for the client: */
+	/* Enqueue the IO completion info for the client */
 	LST_PutTail(pChnl->pIOCompletions, (struct LST_ELEM *) pChirp);
 	pChnl->cIOCs++;
 
 	if (pChnl->cIOCs > pChnl->cChirps)
 		goto func_end;
-	/* Signal the channel event (if not already set) that IO is complete: */
+	/* Signal the channel event (if not already set) that IO is complete */
 	if (fSignalEvent)
 		SYNC_SetEvent(pChnl->hSyncEvent);
 
@@ -1418,14 +1452,14 @@ static void OutputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
 	pChnlMgr = pIOMgr->hChnlMgr;
 	sm = pIOMgr->pSharedMem;
 	DBG_Trace(DBG_LEVEL3, "> OutputChnl\n");
-	/* Attempt to perform output: */
+	/* Attempt to perform output */
 	if (IO_GetValue(pIOMgr->hWmdContext, struct SHM, sm, outputFull))
 		goto func_end;
 
 	if (pChnl && !((pChnl->dwState & ~CHNL_STATEEOS) == CHNL_STATEREADY))
 		goto func_end;
 
-	/* Look to see if both a PC and DSP output channel are ready: */
+	/* Look to see if both a PC and DSP output channel are ready */
 	dwDspFMask = IO_GetValue(pIOMgr->hWmdContext, struct SHM, sm,
 				 dspFreeMask);
 	chnlId = FindReadyOutput(pChnlMgr, pChnl, (pChnlMgr->dwOutputMask &
@@ -1434,11 +1468,11 @@ static void OutputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
 		goto func_end;
 
 	pChnl = pChnlMgr->apChannel[chnlId];
-       if (!pChnl || !pChnl->pIORequests) {
-		/* Shouldn't get here: */
+	if (!pChnl || !pChnl->pIORequests) {
+		/* Shouldn't get here */
 		goto func_end;
 	}
-	/* Get the I/O request, and attempt a transfer:  */
+	/* Get the I/O request, and attempt a transfer */
 	pChirp = (struct CHNL_IRP *)LST_GetHead(pChnl->pIORequests);
 	if (!pChirp)
 		goto func_end;
@@ -1447,11 +1481,11 @@ static void OutputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
 	if (pChnl->cIOReqs < 0 || !pChnl->pIORequests)
 		goto func_end;
 
-	/* Record fact that no more I/O buffers available:  */
+	/* Record fact that no more I/O buffers available */
 	if (LST_IsEmpty(pChnl->pIORequests))
 		pChnlMgr->dwOutputMask &= ~(1 << chnlId);
 
-	/* Transfer buffer to DSP side: */
+	/* Transfer buffer to DSP side */
 	pChirp->cBytes = WriteData(pIOMgr->hWmdContext, pIOMgr->pOutput,
 			pChirp->pHostSysBuf, min(pIOMgr->uSMBufSize, pChirp->
 			cBytes));
@@ -1471,7 +1505,7 @@ static void OutputChnl(struct IO_MGR *pIOMgr, struct CHNL_OBJECT *pChnl,
 		   uWordSize);
 #endif
 	IO_SetValue(pIOMgr->hWmdContext, struct SHM, sm, outputFull, 1);
-	/* Indicate to the DSP we have written the output: */
+	/* Indicate to the DSP we have written the output */
 	CHNLSM_InterruptDSP2(pIOMgr->hWmdContext, MBX_PCPY_CLASS);
 	/* Notify client with IO completion record (keep EOS) */
 	pChirp->status &= CHNL_IOCSTATEOS;
@@ -1571,8 +1605,7 @@ static void OutputMsg(struct IO_MGR *pIOMgr, struct MSG_MGR *hMsgMgr)
 		}
 	}
 func_end:
-       return;
-
+	return;
 }
 
 /*
@@ -1594,8 +1627,10 @@ static DSP_STATUS registerSHMSegs(struct IO_MGR *hIOMgr,
 	u32 ulShmSegId0 = 0;
 	u32 dwOffset, dwGPPBaseVA, ulDSPSize;
 
-	/* Read address and size info for first SM region.*/
-	/* Get start of 1st SM Heap region */
+	/*
+	 * Read address and size info for first SM region.
+	 * Get start of 1st SM Heap region.
+	 */
 	status = COD_GetSymValue(hCodMan, SHM0_SHARED_BASE_SYM, &ulShm0_Base);
 	if (ulShm0_Base == 0) {
 		status = DSP_EFAIL;
@@ -1611,7 +1646,7 @@ static DSP_STATUS registerSHMSegs(struct IO_MGR *hIOMgr,
 			goto func_end;
 		}
 	}
-	/* start of Gpp reserved region */
+	/* Start of Gpp reserved region */
 	if (DSP_SUCCEEDED(status)) {
 		/* Get start and length of message part of shared memory */
 		status = COD_GetSymValue(hCodMan, SHM0_SHARED_RESERVED_BASE_SYM,
@@ -1640,27 +1675,29 @@ static DSP_STATUS registerSHMSegs(struct IO_MGR *hIOMgr,
 	}
 	/* Register new SM region(s) */
 	if (DSP_SUCCEEDED(status) && (ulShm0_End - ulShm0_Base) > 0) {
-		/* calc size (bytes) of SM the GPP can alloc from */
+		/* Calc size (bytes) of SM the GPP can alloc from */
 		ulRsrvdSize = (ulShm0_End - ulShm0_RsrvdStart + 1) * hIOMgr->
 			      uWordSize;
 		if (ulRsrvdSize <= 0) {
 			status = DSP_EFAIL;
 			goto func_end;
 		}
-		/* calc size of SM DSP can alloc from */
+		/* Calc size of SM DSP can alloc from */
 		ulDSPSize = (ulShm0_RsrvdStart - ulShm0_Base) * hIOMgr->
 			uWordSize;
 		if (ulDSPSize <= 0) {
 			status = DSP_EFAIL;
 			goto func_end;
 		}
-		/*  First TLB entry reserved for Bridge SM use.*/
+		/* First TLB entry reserved for Bridge SM use.*/
 		ulGppPhys = hIOMgr->extProcInfo.tyTlb[0].ulGppPhys;
-		/* get size in bytes */
+		/* Get size in bytes */
 		ulDspVirt = hIOMgr->extProcInfo.tyTlb[0].ulDspVirt * hIOMgr->
 			uWordSize;
-		 /* Calc byte offset used to convert GPP phys <-> DSP byte
-		  * address.*/
+		/*
+		 * Calc byte offset used to convert GPP phys <-> DSP byte
+		 * address.
+		 */
 		if (dwGPPBasePA > ulDspVirt)
 			dwOffset = dwGPPBasePA - ulDspVirt;
 		else
@@ -1670,15 +1707,19 @@ static DSP_STATUS registerSHMSegs(struct IO_MGR *hIOMgr,
 			status = DSP_EFAIL;
 			goto func_end;
 		}
-		/* calc Gpp phys base of SM region */
-		/* Linux - this is actually uncached kernel virtual address*/
+		/*
+		 * Calc Gpp phys base of SM region.
+		 * This is actually uncached kernel virtual address.
+		 */
 		dwGPPBaseVA = ulGppPhys + ulShm0_RsrvdStart * hIOMgr->uWordSize
 				- ulDspVirt;
-		/* calc Gpp phys base of SM region */
-		/* Linux - this is the physical address*/
+		/*
+		 * Calc Gpp phys base of SM region.
+		 * This is the physical address.
+		 */
 		dwGPPBasePA = dwGPPBasePA + ulShm0_RsrvdStart * hIOMgr->
 			      uWordSize - ulDspVirt;
-		 /* Register SM Segment 0.*/
+		/* Register SM Segment 0.*/
 		status = CMM_RegisterGPPSMSeg(hIOMgr->hCmmMgr, dwGPPBasePA,
 			 ulRsrvdSize, dwOffset, (dwGPPBasePA > ulDspVirt) ?
 			 CMM_ADDTODSPPA : CMM_SUBFROMDSPPA,
@@ -1688,7 +1729,7 @@ static DSP_STATUS registerSHMSegs(struct IO_MGR *hIOMgr,
 			DBG_Trace(DBG_LEVEL7, "ERROR - Failed to register SM "
 				 "Seg 0 \n");
 		}
-		/* first SM region is segId = 1 */
+		/* First SM region is segId = 1 */
 		if (ulShmSegId0 != 1)
 			status = DSP_EFAIL;
 	}
@@ -1712,7 +1753,7 @@ static u32 ReadData(struct WMD_DEV_CONTEXT *hDevContext, void *pDest,
  *      Copies buffers from the host side buffer to the shared memory.
  */
 static u32 WriteData(struct WMD_DEV_CONTEXT *hDevContext, void *pDest,
-		       void *pSrc, u32 uSize)
+			void *pSrc, u32 uSize)
 {
 	memcpy(pDest, pSrc, uSize);
 	return uSize;
@@ -1746,8 +1787,10 @@ DSP_STATUS IO_SHMsetting(IN struct IO_MGR *hIOMgr, IN enum SHM_DESCTYPE desc,
 			return DSP_EFAIL;
 		break;
 	case SHM_OPPINFO:
-		/* Update the shared memory with the voltage, frequency,
-				   min and max frequency values for an OPP */
+		/*
+		 * Update the shared memory with the voltage, frequency,
+		 * min and max frequency values for an OPP.
+		 */
 		for (i = 0; i <= dsp_max_opps; i++) {
 			hIOMgr->pSharedMem->oppTableStruct.oppPoint[i].voltage =
 				vdd1_dsp_freq[i][0];
@@ -1815,7 +1858,7 @@ void PrintDSPDebugTrace(struct IO_MGR *hIOMgr)
 {
 	u32 ulNewMessageLength = 0, ulGPPCurPointer;
 
-       GT_0trace(dsp_trace_mask, GT_ENTER, "Entering PrintDSPDebugTrace\n");
+	GT_0trace(dsp_trace_mask, GT_ENTER, "Entering PrintDSPDebugTrace\n");
 
 	while (true) {
 		/* Get the DSP current pointer */
@@ -1824,25 +1867,25 @@ void PrintDSPDebugTrace(struct IO_MGR *hIOMgr)
 				  hIOMgr->ulDspVa);
 
 		/* No new debug messages available yet */
-		if (ulGPPCurPointer == hIOMgr->ulGPPReadPointer)
+		if (ulGPPCurPointer == hIOMgr->ulGPPReadPointer) {
 			break;
-
-		/* Continuous data */
-		else if (ulGPPCurPointer > hIOMgr->ulGPPReadPointer) {
+		} else if (ulGPPCurPointer > hIOMgr->ulGPPReadPointer) {
+			/* Continuous data */
 			ulNewMessageLength = ulGPPCurPointer - hIOMgr->
 					     ulGPPReadPointer;
 
 			memcpy(hIOMgr->pMsg, (char *)hIOMgr->ulGPPReadPointer,
-			       ulNewMessageLength);
+				ulNewMessageLength);
 			hIOMgr->pMsg[ulNewMessageLength] = '\0';
-			/* Advance the GPP trace pointer to DSP current
-			 * pointer */
+			/*
+			 * Advance the GPP trace pointer to DSP current
+			 * pointer.
+			 */
 			hIOMgr->ulGPPReadPointer += ulNewMessageLength;
 			/* Print the trace messages */
 			GT_0trace(dsp_trace_mask, GT_1CLASS, hIOMgr->pMsg);
-		}
-		/* Handle trace buffer wraparound */
-		else if (ulGPPCurPointer < hIOMgr->ulGPPReadPointer) {
+		} else if (ulGPPCurPointer < hIOMgr->ulGPPReadPointer) {
+			/* Handle trace buffer wraparound */
 			memcpy(hIOMgr->pMsg, (char *)hIOMgr->ulGPPReadPointer,
 				hIOMgr->ulTraceBufferEnd -
 				hIOMgr->ulGPPReadPointer);
@@ -1855,8 +1898,10 @@ void PrintDSPDebugTrace(struct IO_MGR *hIOMgr)
 			hIOMgr->pMsg[hIOMgr->ulTraceBufferEnd -
 				hIOMgr->ulGPPReadPointer +
 				ulNewMessageLength] = '\0';
-			/* Advance the GPP trace pointer to DSP current
-			 * pointer */
+			/*
+			 * Advance the GPP trace pointer to DSP current
+			 * pointer.
+			 */
 			hIOMgr->ulGPPReadPointer = hIOMgr->ulTraceBufferBegin +
 						   ulNewMessageLength;
 			/* Print the trace messages */
@@ -1895,7 +1940,7 @@ static DSP_STATUS PackTraceBuffer(char *lpBuf, u32 nBytes, u32 ulNumWords)
 	u32 nCnt;
 	char thisChar;
 
-	/* tmp workspace, 1 KB longer than input buf */
+	/* Tmp workspace, 1 KB longer than input buf */
 	lpTmpBuf = MEM_Calloc((nBytes + ulNumWords), MEM_PAGED);
 	if (lpTmpBuf == NULL) {
 		DBG_Trace(DBG_LEVEL7, "PackTrace buffer:OutofMemory \n");
@@ -1911,8 +1956,10 @@ static DSP_STATUS PackTraceBuffer(char *lpBuf, u32 nBytes, u32 ulNumWords)
 			case '\0':      /* Skip null bytes */
 				break;
 			case '\n':      /* Convert \n to \r\n */
-				/* NOTE: do not reverse order; Some OS */
-				/* editors control doesn't understand "\n\r" */
+				/*
+				 * NOTE: do not reverse order; Some OS
+				 * editors control doesn't understand "\n\r"
+				 */
 				*lpTmpBuf++ = '\r';
 				*lpTmpBuf++ = '\n';
 				break;
@@ -1924,7 +1971,7 @@ static DSP_STATUS PackTraceBuffer(char *lpBuf, u32 nBytes, u32 ulNumWords)
 		*lpTmpBuf = '\0';    /* Make sure tmp buf is null terminated */
 		/* Cut output down to input buf size */
 		strncpy(lpBufStart, lpTmpStart, nBytes);
-		/*Make sure output is null terminated */
+		/* Make sure output is null terminated */
 		lpBufStart[nBytes - 1] = '\0';
 		MEM_Free(lpTmpStart);
 	}
@@ -1972,7 +2019,7 @@ DSP_STATUS PrintDspTraceBuffer(struct WMD_DEV_CONTEXT *hWmdContext)
 			"PrintDspTraceBuffer: Failed on DEV_GetCodMgr.\n");
 
 	if (DSP_SUCCEEDED(status)) {
-		/* Look for SYS_PUTCBEG/SYS_PUTCEND: */
+		/* Look for SYS_PUTCBEG/SYS_PUTCEND */
 		status = COD_GetSymValue(hCodMgr, COD_TRACEBEG, &ulTraceBegin);
 		GT_1trace(dsp_trace_mask, GT_2CLASS,
 			"PrintDspTraceBuffer: ulTraceBegin Value 0x%x\n",
Signature · 1 line
1.6.2.4
author Applied
#11 lore raw
In reply to Omar Ramirez Luna
Quoted 180 lines

From: Ramirez Luna, Omar on Friday, January 15, 2010 3:29 PM

This is a small set of trivial cleanups piled up in the patch queue.

Higlights:
- New patch with contributors file.
- "Fix multiline macros to use do while" patch is dropped for rework.

Omar Ramirez Luna (10):
DSPBRIDGE: trivial license fix in tramp and tramp_table_c6000
DSPBRIDGE: contributors file
DSPBRIDGE: trivial file history cleanup for headers
DSPBRIDGE: trivial file history cleanup for driver sources
DSPBRIDGE: checkpatch - space required after comma
DSPBRIDGE: checkpatch - space required before open parenthesis
DSPBRIDGE: checkpatch spacing and indentation
DSPBRIDGE: Checkpatch - line over 80 characters
DSPBRIDGE: checkpatch - printk() should include KERN_ facility level
DSPBRIDGE: trivial cleanup for io_sm

Documentation/tidspbridge/CONTRIBUTORS            |   70 ++
arch/arm/plat-omap/include/dspbridge/_chnl_sm.h   |   46 +-
arch/arm/plat-omap/include/dspbridge/_dcd.h       |   40 +-
arch/arm/plat-omap/include/dspbridge/brddefs.h    |   18 +-
arch/arm/plat-omap/include/dspbridge/cfg.h        |   50 +--
arch/arm/plat-omap/include/dspbridge/cfgdefs.h    |   27 +-
arch/arm/plat-omap/include/dspbridge/chnl.h       |   45 +-
arch/arm/plat-omap/include/dspbridge/chnl_sm.h    |   30 +-
arch/arm/plat-omap/include/dspbridge/chnldefs.h   |   26 +-
arch/arm/plat-omap/include/dspbridge/chnlpriv.h   |   33 +-
arch/arm/plat-omap/include/dspbridge/clk.h        |   11 +-
arch/arm/plat-omap/include/dspbridge/cmm.h        |   66 +--
arch/arm/plat-omap/include/dspbridge/cmmdefs.h    |   20 +-
arch/arm/plat-omap/include/dspbridge/cod.h        |   58 +--
arch/arm/plat-omap/include/dspbridge/dbc.h        |   32 +-
arch/arm/plat-omap/include/dspbridge/dbdcd.h      |   26 +-
arch/arm/plat-omap/include/dspbridge/dbdcddef.h   |   27 +-
arch/arm/plat-omap/include/dspbridge/dbdefs.h     |   61 +--
arch/arm/plat-omap/include/dspbridge/dbg.h        |   25 +-
arch/arm/plat-omap/include/dspbridge/dbldefs.h    |   10 -
arch/arm/plat-omap/include/dspbridge/dbll.h       |   15 +-
arch/arm/plat-omap/include/dspbridge/dblldefs.h   |   11 -
arch/arm/plat-omap/include/dspbridge/dbtype.h     |   21 +-
arch/arm/plat-omap/include/dspbridge/dehdefs.h    |   14 +-
arch/arm/plat-omap/include/dspbridge/dev.h        |   64 +--
arch/arm/plat-omap/include/dspbridge/devdefs.h    |   15 +-
arch/arm/plat-omap/include/dspbridge/disp.h       |   31 +-
arch/arm/plat-omap/include/dspbridge/dispdefs.h   |   14 +-
arch/arm/plat-omap/include/dspbridge/dmm.h        |   18 +-
arch/arm/plat-omap/include/dspbridge/dpc.h        |   26 +-
arch/arm/plat-omap/include/dspbridge/drv.h        |   48 +-
arch/arm/plat-omap/include/dspbridge/drvdefs.h    |   13 +-
arch/arm/plat-omap/include/dspbridge/dspdrv.h     |   33 +-
arch/arm/plat-omap/include/dspbridge/errbase.h    |   37 +-
arch/arm/plat-omap/include/dspbridge/gb.h         |   10 +-
arch/arm/plat-omap/include/dspbridge/getsection.h |   21 +-
arch/arm/plat-omap/include/dspbridge/gh.h         |    8 -
arch/arm/plat-omap/include/dspbridge/gs.h         |   15 +-
arch/arm/plat-omap/include/dspbridge/gt.h         |   27 +-
arch/arm/plat-omap/include/dspbridge/host_os.h    |   10 -
arch/arm/plat-omap/include/dspbridge/io.h         |   21 +-
arch/arm/plat-omap/include/dspbridge/io_sm.h      |   44 +-
arch/arm/plat-omap/include/dspbridge/iodefs.h     |   13 +-
arch/arm/plat-omap/include/dspbridge/ldr.h        |   34 +-
arch/arm/plat-omap/include/dspbridge/list.h       |   36 +-
arch/arm/plat-omap/include/dspbridge/mbx_sh.h     |   25 +-
arch/arm/plat-omap/include/dspbridge/mem.h        |   54 +--
arch/arm/plat-omap/include/dspbridge/memdefs.h    |   16 +-
arch/arm/plat-omap/include/dspbridge/mgr.h        |   32 +-
arch/arm/plat-omap/include/dspbridge/mgrpriv.h    |   14 +-
arch/arm/plat-omap/include/dspbridge/msg.h        |   24 +-
arch/arm/plat-omap/include/dspbridge/msgdefs.h    |   15 +-
arch/arm/plat-omap/include/dspbridge/nldr.h       |   29 +-
arch/arm/plat-omap/include/dspbridge/nldrdefs.h   |   14 +-
arch/arm/plat-omap/include/dspbridge/node.h       |   48 +-
arch/arm/plat-omap/include/dspbridge/nodedefs.h   |   16 +-
arch/arm/plat-omap/include/dspbridge/nodepriv.h   |   23 +-
arch/arm/plat-omap/include/dspbridge/ntfy.h       |   22 +-
arch/arm/plat-omap/include/dspbridge/proc.h       |   47 +-
arch/arm/plat-omap/include/dspbridge/procpriv.h   |   13 +-
arch/arm/plat-omap/include/dspbridge/pwr.h        |   19 -
arch/arm/plat-omap/include/dspbridge/pwr_sh.h     |   12 +-
arch/arm/plat-omap/include/dspbridge/reg.h        |   35 +-
arch/arm/plat-omap/include/dspbridge/rmm.h        |   26 +-
arch/arm/plat-omap/include/dspbridge/rms_sh.h     |   34 +-
arch/arm/plat-omap/include/dspbridge/rmstypes.h   |   15 +-
arch/arm/plat-omap/include/dspbridge/services.h   |   17 +-
arch/arm/plat-omap/include/dspbridge/std.h        |   48 --
arch/arm/plat-omap/include/dspbridge/strm.h       |   41 +-
arch/arm/plat-omap/include/dspbridge/strmdefs.h   |   14 +-
arch/arm/plat-omap/include/dspbridge/sync.h       |   40 +-
arch/arm/plat-omap/include/dspbridge/utildefs.h   |   16 +-
arch/arm/plat-omap/include/dspbridge/uuidutil.h   |   16 +-
arch/arm/plat-omap/include/dspbridge/wcd.h        |   49 +-
arch/arm/plat-omap/include/dspbridge/wcdioctl.h   |   52 +--
arch/arm/plat-omap/include/dspbridge/wmd.h        |   57 +-
arch/arm/plat-omap/include/dspbridge/wmdchnl.h    |   29 +-
arch/arm/plat-omap/include/dspbridge/wmddeh.h     |   30 +-
arch/arm/plat-omap/include/dspbridge/wmdio.h      |   24 +-
arch/arm/plat-omap/include/dspbridge/wmdioctl.h   |   26 +-
arch/arm/plat-omap/include/dspbridge/wmdmsg.h     |   27 +-
drivers/dsp/bridge/dynload/doff.h                 |   17 +-
drivers/dsp/bridge/dynload/module_list.h          |   82 +-
drivers/dsp/bridge/dynload/params.h               |   23 +-
drivers/dsp/bridge/dynload/reloc.c                |   29 +-
drivers/dsp/bridge/dynload/tramp.c                |   18 +-
drivers/dsp/bridge/dynload/tramp_table_c6000.c    |   18 +-
drivers/dsp/bridge/gen/_gt_para.c                 |   24 +-
drivers/dsp/bridge/gen/gb.c                       |   17 +-
drivers/dsp/bridge/gen/gh.c                       |    5 -
drivers/dsp/bridge/gen/gs.c                       |   17 +-
drivers/dsp/bridge/gen/gt.c                       |   16 +-
drivers/dsp/bridge/gen/uuidutil.c                 |   20 +-
drivers/dsp/bridge/hw/GlobalTypes.h               |   16 +-
drivers/dsp/bridge/hw/PRCMRegAcM.h                |   24 +-
drivers/dsp/bridge/hw/hw_defs.h                   |   13 +-
drivers/dsp/bridge/hw/hw_dspssC64P.c              |   13 +-
drivers/dsp/bridge/hw/hw_dspssC64P.h              |   15 +-
drivers/dsp/bridge/hw/hw_mbox.c                   |   13 +-
drivers/dsp/bridge/hw/hw_mbox.h                   |   55 +-
drivers/dsp/bridge/hw/hw_mmu.c                    |   17 +-
drivers/dsp/bridge/hw/hw_mmu.h                    |   15 +-
drivers/dsp/bridge/hw/hw_prcm.c                   |   12 +-
drivers/dsp/bridge/hw/hw_prcm.h                   |   12 +-
drivers/dsp/bridge/pmgr/chnl.c                    |   51 +--
drivers/dsp/bridge/pmgr/chnlobj.h                 |   21 +-
drivers/dsp/bridge/pmgr/cmm.c                     |  101 +--
drivers/dsp/bridge/pmgr/cod.c                     |   51 +-
drivers/dsp/bridge/pmgr/dbll.c                    |   65 +-
drivers/dsp/bridge/pmgr/dev.c                     |  102 +---
drivers/dsp/bridge/pmgr/dmm.c                     |   47 +-
drivers/dsp/bridge/pmgr/io.c                      |   25 +-
drivers/dsp/bridge/pmgr/ioobj.h                   |   19 +-
drivers/dsp/bridge/pmgr/msg.c                     |   23 +-
drivers/dsp/bridge/pmgr/msgobj.h                  |   19 +-
drivers/dsp/bridge/pmgr/wcd.c                     |   80 +--
drivers/dsp/bridge/rmgr/dbdcd.c                   |   56 +--
drivers/dsp/bridge/rmgr/disp.c                    |   39 +-
drivers/dsp/bridge/rmgr/drv.c                     |  102 +--
drivers/dsp/bridge/rmgr/drv_interface.c           |   32 +-
drivers/dsp/bridge/rmgr/drv_interface.h           |   12 -
drivers/dsp/bridge/rmgr/dspdrv.c                  |   79 +--
drivers/dsp/bridge/rmgr/mgr.c                     |   30 +-
drivers/dsp/bridge/rmgr/nldr.c                    |   66 +--
drivers/dsp/bridge/rmgr/node.c                    |  287 +++-----
drivers/dsp/bridge/rmgr/proc.c                    |  102 +---
drivers/dsp/bridge/rmgr/pwr.c                     |   19 +-
drivers/dsp/bridge/rmgr/rmm.c                     |   14 -
drivers/dsp/bridge/rmgr/strm.c                    |   49 +--
drivers/dsp/bridge/services/cfg.c                 |   68 +--
drivers/dsp/bridge/services/clk.c                 |   27 +-
drivers/dsp/bridge/services/dbg.c                 |   35 +-
drivers/dsp/bridge/services/dpc.c                 |   32 +-
drivers/dsp/bridge/services/list.c                |   33 -
drivers/dsp/bridge/services/mem.c                 |   40 +-
drivers/dsp/bridge/services/ntfy.c                |   27 +-
drivers/dsp/bridge/services/reg.c                 |   21 +-
drivers/dsp/bridge/services/regsup.c              |   30 +-
drivers/dsp/bridge/services/regsup.h              |    8 -
drivers/dsp/bridge/services/services.c            |   20 +-
drivers/dsp/bridge/services/sync.c                |   35 +-
drivers/dsp/bridge/wmd/_cmm.h                     |   22 +-
drivers/dsp/bridge/wmd/_deh.h                     |   13 +-
drivers/dsp/bridge/wmd/_msg_sm.h                  |   21 +-
drivers/dsp/bridge/wmd/_tiomap.h                  |   49 +-
drivers/dsp/bridge/wmd/_tiomap_mmu.h              |   16 +-
drivers/dsp/bridge/wmd/_tiomap_pwr.h              |   13 +-
drivers/dsp/bridge/wmd/_tiomap_util.h             |   13 +-
drivers/dsp/bridge/wmd/chnl_sm.c                  |   77 +--
drivers/dsp/bridge/wmd/io_sm.c                    |  903 +++++++++++----------
drivers/dsp/bridge/wmd/mmu_fault.c                |   19 +-
drivers/dsp/bridge/wmd/mmu_fault.h                |   14 +-
drivers/dsp/bridge/wmd/msg_sm.c                   |  107 +--
drivers/dsp/bridge/wmd/tiomap3430.c               |   25 +-
drivers/dsp/bridge/wmd/tiomap3430_pwr.c           |   17 +-
drivers/dsp/bridge/wmd/tiomap_io.c                |   17 +-
drivers/dsp/bridge/wmd/tiomap_io.h                |   14 +-
drivers/dsp/bridge/wmd/ue_deh.c                   |   34 +-
158 files changed, 1364 insertions(+), 4707 deletions(-)
Quoted 1 line

create mode 100644 Documentation/tidspbridge/CONTRIBUTORS

Pushed to dspbridge

- omar