DSPBRIDGE: OSAL: Remove CSL
Subsystems (2)
PATCH 1/1 DSPBRIDGE: OSAL: Remove CSL
From: Andy Shevchenko <[email protected]>
Current DSP bridge driver still contains redudant pieces of CSL code. Get rid of it finally.
--- arch/arm/plat-omap/include/dspbridge/csl.h | 135 ---------------------- drivers/dsp/bridge/pmgr/chnl.c | 1 - drivers/dsp/bridge/pmgr/cod.c | 1 - drivers/dsp/bridge/pmgr/dbl.c | 34 ++++-- drivers/dsp/bridge/pmgr/dbll.c | 3 - drivers/dsp/bridge/rmgr/dbdcd.c | 1 - drivers/dsp/bridge/rmgr/disp.c | 1 - drivers/dsp/bridge/rmgr/drv.c | 1 - drivers/dsp/bridge/rmgr/drv_interface.c | 1 - drivers/dsp/bridge/rmgr/dspdrv.c | 1 - drivers/dsp/bridge/rmgr/nldr.c | 1 - drivers/dsp/bridge/rmgr/node.c | 1 - drivers/dsp/bridge/rmgr/proc.c | 1 - drivers/dsp/bridge/services/cfg.c | 1 - drivers/dsp/bridge/services/clk.c | 1 - drivers/dsp/bridge/services/csl.c | 173 ---------------------------- drivers/dsp/bridge/services/kfile.c | 1 - drivers/dsp/bridge/services/ntfy.c | 1 - drivers/dsp/bridge/services/reg.c | 1 - drivers/dsp/bridge/services/regsup.c | 1 - drivers/dsp/bridge/services/services.c | 10 +-- drivers/dsp/bridge/services/sync.c | 1 - drivers/dsp/bridge/wmd/chnl_sm.c | 1 - drivers/dsp/bridge/wmd/tiomap3430.c | 1 - drivers/dsp/bridge/wmd/ue_deh.c | 1 - 25 files changed, 23 insertions(+), 352 deletions(-) delete mode 100644 arch/arm/plat-omap/include/dspbridge/csl.h delete mode 100644 drivers/dsp/bridge/services/csl.c
arch/arm/plat-omap/include/dspbridge/csl.h deleted +0 -135
@@ -1,135 +0,0 @@ -/* -* csl.h -* -* DSP-BIOS Bridge driver support functions for TI OMAP processors. -* -* Copyright (C) 2008 Texas Instruments, Inc. -* -* This package is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/* -* ======== csl.h ======== -* Purpose: -* Platform independent C Standard library functions. -* -* Public Functions: -* CSL_AnsiToWchar -* CSL_ByteSwap -* CSL_Exit -* CSL_Init -* CSL_NumToAscii -* CSL_Strtok -* CSL_Strtokr -* CSL_WcharToAnsi -* -*! Revision History: -*! ================ -*! 07-Aug-2002 jeh: Added CSL_Strtokr(). -*! 21-Sep-2001 jeh: Added CSL_Strncmp. -*! 22-Nov-2000 map: Added CSL_Atoi and CSL_Strtok -*! 19-Nov-2000 kc: Added CSL_ByteSwap(). -*! 09-Nov-2000 kc: Added CSL_Strncat. -*! 29-Oct-1999 kc: Added CSL_Wstrlen(). -*! 20-Sep-1999 ag: Added CSL_Wchar2Ansi(). -*! 19-Jan-1998 cr: Code review cleanup (mostly documentation fixes). -*! 29-Dec-1997 cr: Changed CSL_lowercase to CSL_Uppercase, added -*! CSL_AnsiToWchar. -*! 30-Sep-1997 cr: Added explicit cdecl descriptors to fxn definitions. -*! 25-Jun-1997 cr: Added CSL_strcmp. -*! 12-Jun-1996 gp: Created. -*/ - -#ifndef CSL_ -#define CSL_ - -#include <dspbridge/host_os.h> - -/* -* ======== CSL_Exit ======== -* Purpose: -* Discontinue usage of the CSL module. -* Parameters: -* Returns: -* Requires: -* CSL initialized. -* Ensures: -* Resources acquired in CSL_Init(void) are freed. -*/ -extern void CSL_Exit (void ); - -/* -* ======== CSL_Init ======== -* Purpose: -* Initialize the CSL module's private state. -* Parameters: -* Returns: -* TRUE if initialized; FALSE if error occured. -* Requires: -* Ensures: -* A requirement for each of the other public CSL functions. -*/ -extern bool CSL_Init (void ); - -/* -* ======== CSL_NumToAscii ======== -* Purpose: -* Convert a 1 or 2 digit number to a 2 digit string. -* Parameters: -* pstrNumber: Buffer to store converted string. -* dwNum: Number to convert. -* Returns: -* Requires: -* pstrNumber must be able to hold at least three characters. -* Ensures: -* pstrNumber will be null terminated. -*/ - extern void CSL_NumToAscii(OUT char *pstrNumber, IN u32 dwNum); - - -/* -* ======== CSL_Strtok ======== -* Purpose: -* Tokenize a NULL terminated string -* Parameters: -* ptstrSrc: pointer to string. -* szSeparators: pointer to a string of seperators -* Returns: -* char * -* Requires: -* CSL initialized. -* ptstrSrc is a valid string pointer. -* szSeparators is a valid string pointer. -* Ensures: -*/ - extern char *CSL_Strtok(IN char *ptstrSrc, - IN CONST char *szSeparators); - -/* -* ======== CSL_Strtokr ======== -* Purpose: -* Re-entrant version of strtok. -* Parameters: -* pstrSrc: Pointer to string. May be NULL on subsequent calls. -* szSeparators: Pointer to a string of seperators -* ppstrCur: Location to store start of string for next call to -* to CSL_Strtokr. -* Returns: -* char * (the token) -* Requires: -* CSL initialized. -* szSeparators != NULL -* ppstrCur != NULL -* Ensures: -*/ - extern char *CSL_Strtokr(IN char *pstrSrc, - IN CONST char *szSeparators, - OUT char **ppstrCur); - -#endif /* CSL_ */
drivers/dsp/bridge/pmgr/chnl.c +0 -1
@@ -76,7 +76,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/dpc.h> #include <dspbridge/list.h> #include <dspbridge/mem.h>
drivers/dsp/bridge/pmgr/cod.c +0 -1
@@ -68,7 +68,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/kfile.h> #include <dspbridge/ldr.h> #include <dspbridge/mem.h>
drivers/dsp/bridge/pmgr/dbl.c +21 -13
@@ -48,7 +48,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> #include <dspbridge/kfile.h>
@@ -200,6 +199,15 @@ static DSP_STATUS readOvlySects(struct DBL_TargetObj *dbl,static DSP_STATUS readSymbols (struct DBL_TargetObj *dbl,struct DBL_LibraryObj *pdblLib); +/* Dumb version of atoi() */ +static int DBL_atoi (const char *s) +{ +int k =0 ; +while (*s && *s >='0' && *s <='9' ) + k =10 * k + (*s++ -'0' ); +return k; +} +/* * ======== DBL_close ======== * Purpose:
@@ -358,7 +366,7 @@ bool DBL_getAddr(struct DBL_LibraryObj *lib, char *name, "0x%x\n", lib, name, ppSym);for (i =0 ; i < lib->nSymbols; i++) { symbol = &lib->symbols[i]; -if (CSL_Strcmp (name, symbol->pSymName) ==0 ) { +if (strcmp (name, symbol->pSymName) ==0 ) {/* Found it */ *ppSym = &lib->symbols[i].sym; retVal = true;
@@ -405,8 +413,8 @@ bool DBL_getCAddr(struct DBL_LibraryObj *lib, char *name, " 0x%x\n", lib, name, ppSym);for (i =0 ; i < lib->nSymbols; i++) { symbol = &lib->symbols[i]; -if ((CSL_Strcmp (name, symbol->pSymName) ==0 ) || - (CSL_Strcmp (name, symbol->pSymName +1 ) ==0 && +if ((strcmp (name, symbol->pSymName) ==0 ) || + (strcmp (name, symbol->pSymName +1 ) ==0 && symbol->pSymName[0 ] =='_' )) {/* Found it */ *ppSym = &lib->symbols[i].sym;
@@ -468,7 +476,7 @@ DSP_STATUS DBL_getSect(struct DBL_LibraryObj *lib, char *name, u32 *pAddr,if (name[0 ] =='.' ) {/* Get DCD section size (address is 0, since it's a NOLOAD). */ for (i =0 ; i < pdblLib->nDCDSects; i++) { -if (CSL_Strcmp (pdblLib->dcdSects[i].sectHdr.name, +if (strcmp (pdblLib->dcdSects[i].sectHdr.name, name) ==0 ) { *pAddr =0 ; *pSize = pdblLib->dcdSects[i].sectHdr.size *
@@ -480,7 +488,7 @@ DSP_STATUS DBL_getSect(struct DBL_LibraryObj *lib, char *name, u32 *pAddr, }else {/* Check for overlay section */ for (i =0 ; i < pdblLib->nOvlySects; i++) { -if (CSL_Strcmp (pdblLib->ppOvlyData[i]->hdr.pName, +if (strcmp (pdblLib->ppOvlyData[i]->hdr.pName, name) ==0 ) {/* Address and size are meaningless */ *pAddr =0 ;
@@ -608,7 +616,7 @@ DSP_STATUS DBL_loadSect(struct DBL_LibraryObj *lib, char *sectName,/* Check for match of sect name in overlay table */ for (i =0 ; i < lib->nOvlySects; i++) { name = lib->ppOvlyData[i]->hdr.pName; -if (!CSL_Strncmp (name, sectName,CSL_Strlen (name))) { +if (!strncmp (name, sectName,strlen (name))) {/* Match found */ status =DSP_SOK ;break ;
@@ -621,8 +629,8 @@ DSP_STATUS DBL_loadSect(struct DBL_LibraryObj *lib, char *sectName,* If node overlay, phase will be encoded in name. If not node * overlay, set phase to NONE. */ - phase = (CSL_Strcmp (name, sectName)) ? -CSL_Atoi (sectName +CSL_Strlen (sectName) -1 ) :NONE ; + phase = (strcmp (name, sectName)) ? +DBL_atoi (sectName +strlen (sectName) -1 ) :NONE ;/* Get reference count of node phase to be loaded, offset into * overlay data array, and number of sections to overlay. */ switch (phase) {
@@ -848,7 +856,7 @@ DSP_STATUS DBL_readSect(struct DBL_LibraryObj *lib, char *name, char *pContent,/* Attempt to find match with DCD section names. */ for (i =0 ; i < pdblLib->nDCDSects; i++) { -if (CSL_Strcmp (pdblLib->dcdSects[i].sectHdr.name, name) ==0 ) { +if (strcmp (pdblLib->dcdSects[i].sectHdr.name, name) ==0 ) {/* Match found */ max = pdblLib->dcdSects[i].sectHdr.size * mauSize; max = (max > size) ? size : max;
@@ -922,7 +930,7 @@ DSP_STATUS DBL_unloadSect(struct DBL_LibraryObj *lib, char *sectName,/* Check for match of sect name in overlay table */ for (i =0 ; i < lib->nOvlySects; i++) { pName = lib->ppOvlyData[i]->hdr.pName; -if (!CSL_Strncmp (pName, sectName,CSL_Strlen (pName))) { +if (!strncmp (pName, sectName,strlen (pName))) {/* Match found */ status =DSP_SOK ;break ;
@@ -932,8 +940,8 @@ DSP_STATUS DBL_unloadSect(struct DBL_LibraryObj *lib, char *sectName,DBC_Assert (i < lib->nOvlySects); pOvlyData = lib->ppOvlyData[i];/* If node overlay, phase will be encoded in name. */ - phase = (CSL_Strcmp (pName, sectName)) ? -CSL_Atoi (sectName +CSL_Strlen (sectName) -1 ) :NONE ; + phase = (strcmp (pName, sectName)) ? +DBL_atoi (sectName +strlen (sectName) -1 ) :NONE ;switch (phase) {case NONE : nSects =numOtherSects (pOvlyData);
drivers/dsp/bridge/pmgr/dbll.c +0 -3
@@ -48,7 +48,6 @@#include <dspbridge/gh.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* Dynamic loader library interface */
@@ -339,7 +338,6 @@ void DBLL_exit(void)if (cRefs ==0 ) {MEM_Exit (); -CSL_Exit ();GH_exit ();#if GT_TRACE DBLL_debugMask.flags =NULL ;
@@ -496,7 +494,6 @@ bool DBLL_init(void)DBC_Assert (!DBLL_debugMask.flags);GT_create (&DBLL_debugMask,"DL" );/* "DL" for dbDL */ GH_init (); -CSL_Init (); retVal =MEM_Init ();if (!retVal)MEM_Exit ();
drivers/dsp/bridge/rmgr/dbdcd.c +0 -1
@@ -73,7 +73,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> #include <dspbridge/reg.h>
drivers/dsp/bridge/rmgr/disp.c +0 -1
@@ -62,7 +62,6 @@#include <dspbridge/dev.h> #include <dspbridge/mem.h> #include <dspbridge/sync.h> -#include <dspbridge/csl.h> /* ----------------------------------- Link Driver */ #include <dspbridge/wmd.h>
drivers/dsp/bridge/rmgr/drv.c +0 -1
@@ -104,7 +104,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/list.h> #include <dspbridge/mem.h> #include <dspbridge/reg.h>
drivers/dsp/bridge/rmgr/drv_interface.c +0 -1
@@ -76,7 +76,6 @@#include <dspbridge/services.h> #include <dspbridge/sync.h> #include <dspbridge/reg.h> -#include <dspbridge/csl.h> /* ----------------------------------- Platform Manager */ #include <dspbridge/wcdioctl.h>
drivers/dsp/bridge/rmgr/dspdrv.c +0 -1
@@ -105,7 +105,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/mem.h> #include <dspbridge/reg.h>
drivers/dsp/bridge/rmgr/nldr.c +0 -1
@@ -63,7 +63,6 @@#endif /* OS adaptation layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* Platform manager */
drivers/dsp/bridge/rmgr/node.c +0 -1
@@ -106,7 +106,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/list.h> #include <dspbridge/mem.h> #include <dspbridge/proc.h>
drivers/dsp/bridge/rmgr/proc.c +0 -1
@@ -114,7 +114,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/list.h> #include <dspbridge/mem.h> #include <dspbridge/ntfy.h>
drivers/dsp/bridge/services/cfg.c +0 -1
@@ -82,7 +82,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/reg.h> /* ----------------------------------- Others */
drivers/dsp/bridge/services/clk.c +0 -1
@@ -45,7 +45,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* ----------------------------------- This */
drivers/dsp/bridge/services/csl.c deleted +0 -173
173 lines not on this page · raw message
drivers/dsp/bridge/services/kfile.c +0 -1
@@ -54,7 +54,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* ----------------------------------- This */
drivers/dsp/bridge/services/ntfy.c +0 -1
@@ -52,7 +52,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/list.h> #include <dspbridge/mem.h> #include <dspbridge/sync.h>
drivers/dsp/bridge/services/reg.c +0 -1
@@ -46,7 +46,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* ----------------------------------- Others */
drivers/dsp/bridge/services/regsup.c +0 -1
@@ -43,7 +43,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/mem.h> -#include <dspbridge/csl.h> /* ----------------------------------- This */ #include <regsup.h>
drivers/dsp/bridge/services/services.c +2 -8
@@ -44,7 +44,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/dbg.h> #include <dspbridge/dpc.h> #include <dspbridge/kfile.h>
@@ -88,7 +87,6 @@ void SERVICES_Exit(void)KFILE_Exit ();DPC_Exit ();DBG_Exit (); -CSL_Exit ();CFG_Exit ();MEM_Exit ();
@@ -106,7 +104,7 @@ void SERVICES_Exit(void)bool SERVICES_Init (void ) {bool fInit = true; -bool fCFG, fCSL, fDBG, fDPC, fKFILE, fMEM; +bool fCFG, fDBG, fDPC, fKFILE, fMEM;bool fREG, fSYNC, fCLK, fNTFY;DBC_Require (cRefs >=0 );
@@ -123,7 +121,6 @@ bool SERVICES_Init(void) fMEM =MEM_Init (); fREG =REG_Init (); fCFG =CFG_Init (); - fCSL =CSL_Init (); fDBG =DBG_Init (); fDPC =DPC_Init (); fKFILE =KFILE_Init ();
@@ -131,7 +128,7 @@ bool SERVICES_Init(void) fCLK =CLK_Init (); fNTFY =NTFY_Init (); - fInit = fCFG && fCSL && fDBG && fDPC && fKFILE && + fInit = fCFG && fDBG && fDPC && fKFILE && fMEM && fREG && fSYNC && fCLK;if (!fInit) {
@@ -156,9 +153,6 @@ bool SERVICES_Init(void)if (fDBG)DBG_Exit (); -if (fCSL) -CSL_Exit (); -if (fCFG)CFG_Exit ();
drivers/dsp/bridge/services/sync.c +0 -1
@@ -60,7 +60,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* ----------------------------------- This */
drivers/dsp/bridge/wmd/chnl_sm.c +0 -1
@@ -128,7 +128,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/mem.h> #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/sync.h> /* ----------------------------------- Mini-Driver */
drivers/dsp/bridge/wmd/tiomap3430.c +0 -1
@@ -51,7 +51,6 @@#include <dspbridge/dbreg.h> #include <dspbridge/cfg.h> #include <dspbridge/drv.h> -#include <dspbridge/csl.h> #include <dspbridge/sync.h> /* ------------------------------------ Hardware Abstraction Layer */
drivers/dsp/bridge/wmd/ue_deh.c +0 -1
@@ -44,7 +44,6 @@#include <dspbridge/dbg.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/cfg.h> #include <dspbridge/dpc.h> #include <dspbridge/mem.h>
Signature · 1 line
1.5.6.5
From: Andy Shevchenko <[email protected]>
Subject: [PATCH] DSPBRIDGE: OSAL: Remove CSL
Date: Mon, 14 Sep 2009 15:43:49 +0200
Quoted 6 lines
From: Andy Shevchenko <[email protected]>
Current DSP bridge driver still contains redudant pieces of CSL code. Get rid of it finally.
Signed-off-by Andy Shevchenko <[email protected]>
Omar,
could you please take this in your bridge repo along with other floating patches if there's no problem?
PATCH v2 1/1 DSPBRIDGE: OSAL: Remove CSL
In reply to Andy ShevchenkoFrom: Andy Shevchenko <[email protected]>
Current DSP bridge driver still contains redudant pieces of CSL code. Get rid of it finally.
Change atoi(s) to the kernel's simple_strtol(s, NULL, 10).
--- arch/arm/plat-omap/include/dspbridge/csl.h | 135 ---------------------- drivers/dsp/bridge/Kbuild | 2 +- drivers/dsp/bridge/pmgr/chnl.c | 1 - drivers/dsp/bridge/pmgr/cod.c | 1 - drivers/dsp/bridge/pmgr/dbl.c | 32 +++-- drivers/dsp/bridge/pmgr/dbll.c | 3 - drivers/dsp/bridge/rmgr/dbdcd.c | 1 - drivers/dsp/bridge/rmgr/disp.c | 1 - drivers/dsp/bridge/rmgr/drv.c | 1 - drivers/dsp/bridge/rmgr/drv_interface.c | 1 - drivers/dsp/bridge/rmgr/dspdrv.c | 1 - drivers/dsp/bridge/rmgr/nldr.c | 1 - drivers/dsp/bridge/rmgr/node.c | 1 - drivers/dsp/bridge/rmgr/proc.c | 1 - drivers/dsp/bridge/services/cfg.c | 1 - drivers/dsp/bridge/services/clk.c | 1 - drivers/dsp/bridge/services/csl.c | 173 ---------------------------- drivers/dsp/bridge/services/kfile.c | 1 - drivers/dsp/bridge/services/ntfy.c | 1 - drivers/dsp/bridge/services/reg.c | 1 - drivers/dsp/bridge/services/regsup.c | 1 - drivers/dsp/bridge/services/services.c | 10 +-- drivers/dsp/bridge/services/sync.c | 1 - drivers/dsp/bridge/wmd/chnl_sm.c | 1 - drivers/dsp/bridge/wmd/tiomap3430.c | 1 - drivers/dsp/bridge/wmd/ue_deh.c | 1 - 26 files changed, 22 insertions(+), 353 deletions(-) delete mode 100644 arch/arm/plat-omap/include/dspbridge/csl.h delete mode 100644 drivers/dsp/bridge/services/csl.c
arch/arm/plat-omap/include/dspbridge/csl.h deleted +0 -135
@@ -1,135 +0,0 @@ -/* -* csl.h -* -* DSP-BIOS Bridge driver support functions for TI OMAP processors. -* -* Copyright (C) 2008 Texas Instruments, Inc. -* -* This package is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/* -* ======== csl.h ======== -* Purpose: -* Platform independent C Standard library functions. -* -* Public Functions: -* CSL_AnsiToWchar -* CSL_ByteSwap -* CSL_Exit -* CSL_Init -* CSL_NumToAscii -* CSL_Strtok -* CSL_Strtokr -* CSL_WcharToAnsi -* -*! Revision History: -*! ================ -*! 07-Aug-2002 jeh: Added CSL_Strtokr(). -*! 21-Sep-2001 jeh: Added CSL_Strncmp. -*! 22-Nov-2000 map: Added CSL_Atoi and CSL_Strtok -*! 19-Nov-2000 kc: Added CSL_ByteSwap(). -*! 09-Nov-2000 kc: Added CSL_Strncat. -*! 29-Oct-1999 kc: Added CSL_Wstrlen(). -*! 20-Sep-1999 ag: Added CSL_Wchar2Ansi(). -*! 19-Jan-1998 cr: Code review cleanup (mostly documentation fixes). -*! 29-Dec-1997 cr: Changed CSL_lowercase to CSL_Uppercase, added -*! CSL_AnsiToWchar. -*! 30-Sep-1997 cr: Added explicit cdecl descriptors to fxn definitions. -*! 25-Jun-1997 cr: Added CSL_strcmp. -*! 12-Jun-1996 gp: Created. -*/ - -#ifndef CSL_ -#define CSL_ - -#include <dspbridge/host_os.h> - -/* -* ======== CSL_Exit ======== -* Purpose: -* Discontinue usage of the CSL module. -* Parameters: -* Returns: -* Requires: -* CSL initialized. -* Ensures: -* Resources acquired in CSL_Init(void) are freed. -*/ -extern void CSL_Exit (void ); - -/* -* ======== CSL_Init ======== -* Purpose: -* Initialize the CSL module's private state. -* Parameters: -* Returns: -* TRUE if initialized; FALSE if error occured. -* Requires: -* Ensures: -* A requirement for each of the other public CSL functions. -*/ -extern bool CSL_Init (void ); - -/* -* ======== CSL_NumToAscii ======== -* Purpose: -* Convert a 1 or 2 digit number to a 2 digit string. -* Parameters: -* pstrNumber: Buffer to store converted string. -* dwNum: Number to convert. -* Returns: -* Requires: -* pstrNumber must be able to hold at least three characters. -* Ensures: -* pstrNumber will be null terminated. -*/ - extern void CSL_NumToAscii(OUT char *pstrNumber, IN u32 dwNum); - - -/* -* ======== CSL_Strtok ======== -* Purpose: -* Tokenize a NULL terminated string -* Parameters: -* ptstrSrc: pointer to string. -* szSeparators: pointer to a string of seperators -* Returns: -* char * -* Requires: -* CSL initialized. -* ptstrSrc is a valid string pointer. -* szSeparators is a valid string pointer. -* Ensures: -*/ - extern char *CSL_Strtok(IN char *ptstrSrc, - IN CONST char *szSeparators); - -/* -* ======== CSL_Strtokr ======== -* Purpose: -* Re-entrant version of strtok. -* Parameters: -* pstrSrc: Pointer to string. May be NULL on subsequent calls. -* szSeparators: Pointer to a string of seperators -* ppstrCur: Location to store start of string for next call to -* to CSL_Strtokr. -* Returns: -* char * (the token) -* Requires: -* CSL initialized. -* szSeparators != NULL -* ppstrCur != NULL -* Ensures: -*/ - extern char *CSL_Strtokr(IN char *pstrSrc, - IN CONST char *szSeparators, - OUT char **ppstrCur); - -#endif /* CSL_ */
drivers/dsp/bridge/Kbuild +1 -1
@@ -1,7 +1,7 @@ obj-$(CONFIG_MPU_BRIDGE) += bridgedriver.o libgen = gen/gb.o gen/gt.o gen/gs.o gen/gh.o gen/_gt_para.o gen/uuidutil.o -libservices = services/csl.o services/mem.o services/dpc.o \ +libservices = services/mem.o services/dpc.o \ services/kfile.o services/sync.o \ services/clk.o services/cfg.o services/reg.o \ services/regsup.o services/ntfy.o \
drivers/dsp/bridge/pmgr/chnl.c +0 -1
@@ -76,7 +76,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/dpc.h> #include <dspbridge/mem.h> #include <dspbridge/sync.h>
drivers/dsp/bridge/pmgr/cod.c +0 -1
@@ -68,7 +68,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/kfile.h> #include <dspbridge/ldr.h> #include <dspbridge/mem.h>
drivers/dsp/bridge/pmgr/dbl.c +19 -13
@@ -37,6 +37,7 @@/* ----------------------------------- Host OS */ #include <dspbridge/host_os.h> +#include <linux/kernel.h> /* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h>
@@ -48,7 +49,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> #include <dspbridge/kfile.h>
@@ -200,6 +200,12 @@ static DSP_STATUS readOvlySects(struct DBL_TargetObj *dbl,static DSP_STATUS readSymbols (struct DBL_TargetObj *dbl,struct DBL_LibraryObj *pdblLib); +/* atoi() */ +static inline int DBL_atoi (const char *s) +{ +return (int )simple_strtol (s,NULL ,10 ); +} +/* * ======== DBL_close ======== * Purpose:
@@ -358,7 +364,7 @@ bool DBL_getAddr(struct DBL_LibraryObj *lib, char *name, "0x%x\n", lib, name, ppSym);for (i =0 ; i < lib->nSymbols; i++) { symbol = &lib->symbols[i]; -if (CSL_Strcmp (name, symbol->pSymName) ==0 ) { +if (strcmp (name, symbol->pSymName) ==0 ) {/* Found it */ *ppSym = &lib->symbols[i].sym; retVal = true;
@@ -405,8 +411,8 @@ bool DBL_getCAddr(struct DBL_LibraryObj *lib, char *name, " 0x%x\n", lib, name, ppSym);for (i =0 ; i < lib->nSymbols; i++) { symbol = &lib->symbols[i]; -if ((CSL_Strcmp (name, symbol->pSymName) ==0 ) || - (CSL_Strcmp (name, symbol->pSymName +1 ) ==0 && +if ((strcmp (name, symbol->pSymName) ==0 ) || + (strcmp (name, symbol->pSymName +1 ) ==0 && symbol->pSymName[0 ] =='_' )) {/* Found it */ *ppSym = &lib->symbols[i].sym;
@@ -468,7 +474,7 @@ DSP_STATUS DBL_getSect(struct DBL_LibraryObj *lib, char *name, u32 *pAddr,if (name[0 ] =='.' ) {/* Get DCD section size (address is 0, since it's a NOLOAD). */ for (i =0 ; i < pdblLib->nDCDSects; i++) { -if (CSL_Strcmp (pdblLib->dcdSects[i].sectHdr.name, +if (strcmp (pdblLib->dcdSects[i].sectHdr.name, name) ==0 ) { *pAddr =0 ; *pSize = pdblLib->dcdSects[i].sectHdr.size *
@@ -480,7 +486,7 @@ DSP_STATUS DBL_getSect(struct DBL_LibraryObj *lib, char *name, u32 *pAddr, }else {/* Check for overlay section */ for (i =0 ; i < pdblLib->nOvlySects; i++) { -if (CSL_Strcmp (pdblLib->ppOvlyData[i]->hdr.pName, +if (strcmp (pdblLib->ppOvlyData[i]->hdr.pName, name) ==0 ) {/* Address and size are meaningless */ *pAddr =0 ;
@@ -608,7 +614,7 @@ DSP_STATUS DBL_loadSect(struct DBL_LibraryObj *lib, char *sectName,/* Check for match of sect name in overlay table */ for (i =0 ; i < lib->nOvlySects; i++) { name = lib->ppOvlyData[i]->hdr.pName; -if (!CSL_Strncmp (name, sectName,CSL_Strlen (name))) { +if (!strncmp (name, sectName,strlen (name))) {/* Match found */ status =DSP_SOK ;break ;
@@ -621,8 +627,8 @@ DSP_STATUS DBL_loadSect(struct DBL_LibraryObj *lib, char *sectName,* If node overlay, phase will be encoded in name. If not node * overlay, set phase to NONE. */ - phase = (CSL_Strcmp (name, sectName)) ? -CSL_Atoi (sectName +CSL_Strlen (sectName) -1 ) :NONE ; + phase = (strcmp (name, sectName)) ? +DBL_atoi (sectName +strlen (sectName) -1 ) :NONE ;/* Get reference count of node phase to be loaded, offset into * overlay data array, and number of sections to overlay. */ switch (phase) {
@@ -848,7 +854,7 @@ DSP_STATUS DBL_readSect(struct DBL_LibraryObj *lib, char *name, char *pContent,/* Attempt to find match with DCD section names. */ for (i =0 ; i < pdblLib->nDCDSects; i++) { -if (CSL_Strcmp (pdblLib->dcdSects[i].sectHdr.name, name) ==0 ) { +if (strcmp (pdblLib->dcdSects[i].sectHdr.name, name) ==0 ) {/* Match found */ max = pdblLib->dcdSects[i].sectHdr.size * mauSize; max = (max > size) ? size : max;
@@ -922,7 +928,7 @@ DSP_STATUS DBL_unloadSect(struct DBL_LibraryObj *lib, char *sectName,/* Check for match of sect name in overlay table */ for (i =0 ; i < lib->nOvlySects; i++) { pName = lib->ppOvlyData[i]->hdr.pName; -if (!CSL_Strncmp (pName, sectName,CSL_Strlen (pName))) { +if (!strncmp (pName, sectName,strlen (pName))) {/* Match found */ status =DSP_SOK ;break ;
@@ -932,8 +938,8 @@ DSP_STATUS DBL_unloadSect(struct DBL_LibraryObj *lib, char *sectName,DBC_Assert (i < lib->nOvlySects); pOvlyData = lib->ppOvlyData[i];/* If node overlay, phase will be encoded in name. */ - phase = (CSL_Strcmp (pName, sectName)) ? -CSL_Atoi (sectName +CSL_Strlen (sectName) -1 ) :NONE ; + phase = (strcmp (pName, sectName)) ? +DBL_atoi (sectName +strlen (sectName) -1 ) :NONE ;switch (phase) {case NONE : nSects =numOtherSects (pOvlyData);
drivers/dsp/bridge/pmgr/dbll.c +0 -3
@@ -48,7 +48,6 @@#include <dspbridge/gh.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* Dynamic loader library interface */
@@ -339,7 +338,6 @@ void DBLL_exit(void)if (cRefs ==0 ) {MEM_Exit (); -CSL_Exit ();GH_exit ();#if GT_TRACE DBLL_debugMask.flags =NULL ;
@@ -496,7 +494,6 @@ bool DBLL_init(void)DBC_Assert (!DBLL_debugMask.flags);GT_create (&DBLL_debugMask,"DL" );/* "DL" for dbDL */ GH_init (); -CSL_Init (); retVal =MEM_Init ();if (!retVal)MEM_Exit ();
drivers/dsp/bridge/rmgr/dbdcd.c +0 -1
@@ -73,7 +73,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> #include <dspbridge/reg.h>
drivers/dsp/bridge/rmgr/disp.c +0 -1
@@ -62,7 +62,6 @@#include <dspbridge/dev.h> #include <dspbridge/mem.h> #include <dspbridge/sync.h> -#include <dspbridge/csl.h> /* ----------------------------------- Link Driver */ #include <dspbridge/wmd.h>
drivers/dsp/bridge/rmgr/drv.c +0 -1
@@ -104,7 +104,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/list.h> #include <dspbridge/mem.h> #include <dspbridge/reg.h>
drivers/dsp/bridge/rmgr/drv_interface.c +0 -1
@@ -76,7 +76,6 @@#include <dspbridge/services.h> #include <dspbridge/sync.h> #include <dspbridge/reg.h> -#include <dspbridge/csl.h> /* ----------------------------------- Platform Manager */ #include <dspbridge/wcdioctl.h>
drivers/dsp/bridge/rmgr/dspdrv.c +0 -1
@@ -105,7 +105,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/mem.h> #include <dspbridge/reg.h>
drivers/dsp/bridge/rmgr/nldr.c +0 -1
@@ -63,7 +63,6 @@#endif /* OS adaptation layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* Platform manager */
drivers/dsp/bridge/rmgr/node.c +0 -1
@@ -106,7 +106,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/list.h> #include <dspbridge/mem.h> #include <dspbridge/proc.h>
drivers/dsp/bridge/rmgr/proc.c +0 -1
@@ -114,7 +114,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/list.h> #include <dspbridge/mem.h> #include <dspbridge/ntfy.h>
drivers/dsp/bridge/services/cfg.c +0 -1
@@ -82,7 +82,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/reg.h> /* ----------------------------------- Others */
drivers/dsp/bridge/services/clk.c +0 -1
@@ -45,7 +45,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* ----------------------------------- This */
drivers/dsp/bridge/services/csl.c deleted +0 -173
173 lines not on this page · raw message
drivers/dsp/bridge/services/kfile.c +0 -1
@@ -54,7 +54,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* ----------------------------------- This */
drivers/dsp/bridge/services/ntfy.c +0 -1
@@ -52,7 +52,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/list.h> #include <dspbridge/mem.h> #include <dspbridge/sync.h>
drivers/dsp/bridge/services/reg.c +0 -1
@@ -46,7 +46,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* ----------------------------------- Others */
drivers/dsp/bridge/services/regsup.c +0 -1
@@ -43,7 +43,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/mem.h> -#include <dspbridge/csl.h> /* ----------------------------------- This */ #include <regsup.h>
drivers/dsp/bridge/services/services.c +2 -8
@@ -44,7 +44,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/dbg.h> #include <dspbridge/dpc.h> #include <dspbridge/kfile.h>
@@ -87,7 +86,6 @@ void SERVICES_Exit(void)KFILE_Exit ();DPC_Exit ();DBG_Exit (); -CSL_Exit ();CFG_Exit ();MEM_Exit ();
@@ -105,7 +103,7 @@ void SERVICES_Exit(void)bool SERVICES_Init (void ) {bool fInit = true; -bool fCFG, fCSL, fDBG, fDPC, fKFILE, fMEM; +bool fCFG, fDBG, fDPC, fKFILE, fMEM;bool fREG, fSYNC, fCLK, fNTFY;DBC_Require (cRefs >=0 );
@@ -122,7 +120,6 @@ bool SERVICES_Init(void) fMEM =MEM_Init (); fREG =REG_Init (); fCFG =CFG_Init (); - fCSL =CSL_Init (); fDBG =DBG_Init (); fDPC =DPC_Init (); fKFILE =KFILE_Init ();
@@ -130,7 +127,7 @@ bool SERVICES_Init(void) fCLK =CLK_Init (); fNTFY =NTFY_Init (); - fInit = fCFG && fCSL && fDBG && fDPC && fKFILE && + fInit = fCFG && fDBG && fDPC && fKFILE && fMEM && fREG && fSYNC && fCLK;if (!fInit) {
@@ -155,9 +152,6 @@ bool SERVICES_Init(void)if (fDBG)DBG_Exit (); -if (fCSL) -CSL_Exit (); -if (fCFG)CFG_Exit ();
drivers/dsp/bridge/services/sync.c +0 -1
@@ -60,7 +60,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* ----------------------------------- This */
drivers/dsp/bridge/wmd/chnl_sm.c +0 -1
@@ -128,7 +128,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/mem.h> #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/sync.h> /* ----------------------------------- Mini-Driver */
drivers/dsp/bridge/wmd/tiomap3430.c +0 -1
@@ -51,7 +51,6 @@#include <dspbridge/dbreg.h> #include <dspbridge/cfg.h> #include <dspbridge/drv.h> -#include <dspbridge/csl.h> #include <dspbridge/sync.h> /* ------------------------------------ Hardware Abstraction Layer */
drivers/dsp/bridge/wmd/ue_deh.c +0 -1
@@ -44,7 +44,6 @@#include <dspbridge/dbg.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/cfg.h> #include <dspbridge/dpc.h> #include <dspbridge/mem.h>
Signature · 1 line
1.5.6.5
removing CSL (v3)
Hello.
This version is slightly improved (I drop out atoi() wrapper).
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v3 1/1 DSPBRIDGE: OSAL: Remove CSL
From: Andy Shevchenko <[email protected]>
Current DSP bridge driver still contains redudant pieces of CSL code. Get rid of it finally.
Change CSL_atoi(s) to the kernel's simple_strtol(s, NULL, 10) in place.
--- arch/arm/plat-omap/include/dspbridge/csl.h | 135 ---------------------- drivers/dsp/bridge/Kbuild | 2 +- drivers/dsp/bridge/pmgr/chnl.c | 1 - drivers/dsp/bridge/pmgr/cod.c | 1 - drivers/dsp/bridge/pmgr/dbl.c | 28 +++-- drivers/dsp/bridge/pmgr/dbll.c | 3 - drivers/dsp/bridge/rmgr/dbdcd.c | 1 - drivers/dsp/bridge/rmgr/disp.c | 1 - drivers/dsp/bridge/rmgr/drv.c | 1 - drivers/dsp/bridge/rmgr/drv_interface.c | 1 - drivers/dsp/bridge/rmgr/dspdrv.c | 1 - drivers/dsp/bridge/rmgr/nldr.c | 1 - drivers/dsp/bridge/rmgr/node.c | 1 - drivers/dsp/bridge/rmgr/proc.c | 1 - drivers/dsp/bridge/services/cfg.c | 1 - drivers/dsp/bridge/services/clk.c | 1 - drivers/dsp/bridge/services/csl.c | 173 ---------------------------- drivers/dsp/bridge/services/kfile.c | 1 - drivers/dsp/bridge/services/ntfy.c | 1 - drivers/dsp/bridge/services/reg.c | 1 - drivers/dsp/bridge/services/regsup.c | 1 - drivers/dsp/bridge/services/services.c | 10 +-- drivers/dsp/bridge/services/sync.c | 1 - drivers/dsp/bridge/wmd/chnl_sm.c | 1 - drivers/dsp/bridge/wmd/tiomap3430.c | 1 - drivers/dsp/bridge/wmd/ue_deh.c | 1 - 26 files changed, 18 insertions(+), 353 deletions(-) delete mode 100644 arch/arm/plat-omap/include/dspbridge/csl.h delete mode 100644 drivers/dsp/bridge/services/csl.c
arch/arm/plat-omap/include/dspbridge/csl.h deleted +0 -135
@@ -1,135 +0,0 @@ -/* -* csl.h -* -* DSP-BIOS Bridge driver support functions for TI OMAP processors. -* -* Copyright (C) 2008 Texas Instruments, Inc. -* -* This package is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -*/ - -/* -* ======== csl.h ======== -* Purpose: -* Platform independent C Standard library functions. -* -* Public Functions: -* CSL_AnsiToWchar -* CSL_ByteSwap -* CSL_Exit -* CSL_Init -* CSL_NumToAscii -* CSL_Strtok -* CSL_Strtokr -* CSL_WcharToAnsi -* -*! Revision History: -*! ================ -*! 07-Aug-2002 jeh: Added CSL_Strtokr(). -*! 21-Sep-2001 jeh: Added CSL_Strncmp. -*! 22-Nov-2000 map: Added CSL_Atoi and CSL_Strtok -*! 19-Nov-2000 kc: Added CSL_ByteSwap(). -*! 09-Nov-2000 kc: Added CSL_Strncat. -*! 29-Oct-1999 kc: Added CSL_Wstrlen(). -*! 20-Sep-1999 ag: Added CSL_Wchar2Ansi(). -*! 19-Jan-1998 cr: Code review cleanup (mostly documentation fixes). -*! 29-Dec-1997 cr: Changed CSL_lowercase to CSL_Uppercase, added -*! CSL_AnsiToWchar. -*! 30-Sep-1997 cr: Added explicit cdecl descriptors to fxn definitions. -*! 25-Jun-1997 cr: Added CSL_strcmp. -*! 12-Jun-1996 gp: Created. -*/ - -#ifndef CSL_ -#define CSL_ - -#include <dspbridge/host_os.h> - -/* -* ======== CSL_Exit ======== -* Purpose: -* Discontinue usage of the CSL module. -* Parameters: -* Returns: -* Requires: -* CSL initialized. -* Ensures: -* Resources acquired in CSL_Init(void) are freed. -*/ -extern void CSL_Exit (void ); - -/* -* ======== CSL_Init ======== -* Purpose: -* Initialize the CSL module's private state. -* Parameters: -* Returns: -* TRUE if initialized; FALSE if error occured. -* Requires: -* Ensures: -* A requirement for each of the other public CSL functions. -*/ -extern bool CSL_Init (void ); - -/* -* ======== CSL_NumToAscii ======== -* Purpose: -* Convert a 1 or 2 digit number to a 2 digit string. -* Parameters: -* pstrNumber: Buffer to store converted string. -* dwNum: Number to convert. -* Returns: -* Requires: -* pstrNumber must be able to hold at least three characters. -* Ensures: -* pstrNumber will be null terminated. -*/ - extern void CSL_NumToAscii(OUT char *pstrNumber, IN u32 dwNum); - - -/* -* ======== CSL_Strtok ======== -* Purpose: -* Tokenize a NULL terminated string -* Parameters: -* ptstrSrc: pointer to string. -* szSeparators: pointer to a string of seperators -* Returns: -* char * -* Requires: -* CSL initialized. -* ptstrSrc is a valid string pointer. -* szSeparators is a valid string pointer. -* Ensures: -*/ - extern char *CSL_Strtok(IN char *ptstrSrc, - IN CONST char *szSeparators); - -/* -* ======== CSL_Strtokr ======== -* Purpose: -* Re-entrant version of strtok. -* Parameters: -* pstrSrc: Pointer to string. May be NULL on subsequent calls. -* szSeparators: Pointer to a string of seperators -* ppstrCur: Location to store start of string for next call to -* to CSL_Strtokr. -* Returns: -* char * (the token) -* Requires: -* CSL initialized. -* szSeparators != NULL -* ppstrCur != NULL -* Ensures: -*/ - extern char *CSL_Strtokr(IN char *pstrSrc, - IN CONST char *szSeparators, - OUT char **ppstrCur); - -#endif /* CSL_ */
drivers/dsp/bridge/Kbuild +1 -1
@@ -1,7 +1,7 @@ obj-$(CONFIG_MPU_BRIDGE) += bridgedriver.o libgen = gen/gb.o gen/gt.o gen/gs.o gen/gh.o gen/_gt_para.o gen/uuidutil.o -libservices = services/csl.o services/mem.o services/dpc.o \ +libservices = services/mem.o services/dpc.o \ services/kfile.o services/sync.o \ services/clk.o services/cfg.o services/reg.o \ services/regsup.o services/ntfy.o \
drivers/dsp/bridge/pmgr/chnl.c +0 -1
@@ -76,7 +76,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/dpc.h> #include <dspbridge/mem.h> #include <dspbridge/sync.h>
drivers/dsp/bridge/pmgr/cod.c +0 -1
@@ -68,7 +68,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/kfile.h> #include <dspbridge/ldr.h> #include <dspbridge/mem.h>
drivers/dsp/bridge/pmgr/dbl.c +15 -13
@@ -37,6 +37,7 @@/* ----------------------------------- Host OS */ #include <dspbridge/host_os.h> +#include <linux/kernel.h> /* ----------------------------------- DSP/BIOS Bridge */ #include <dspbridge/std.h>
@@ -48,7 +49,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> #include <dspbridge/kfile.h>
@@ -358,7 +358,7 @@ bool DBL_getAddr(struct DBL_LibraryObj *lib, char *name, "0x%x\n", lib, name, ppSym);for (i =0 ; i < lib->nSymbols; i++) { symbol = &lib->symbols[i]; -if (CSL_Strcmp (name, symbol->pSymName) ==0 ) { +if (strcmp (name, symbol->pSymName) ==0 ) {/* Found it */ *ppSym = &lib->symbols[i].sym; retVal = true;
@@ -405,8 +405,8 @@ bool DBL_getCAddr(struct DBL_LibraryObj *lib, char *name, " 0x%x\n", lib, name, ppSym);for (i =0 ; i < lib->nSymbols; i++) { symbol = &lib->symbols[i]; -if ((CSL_Strcmp (name, symbol->pSymName) ==0 ) || - (CSL_Strcmp (name, symbol->pSymName +1 ) ==0 && +if ((strcmp (name, symbol->pSymName) ==0 ) || + (strcmp (name, symbol->pSymName +1 ) ==0 && symbol->pSymName[0 ] =='_' )) {/* Found it */ *ppSym = &lib->symbols[i].sym;
@@ -468,7 +468,7 @@ DSP_STATUS DBL_getSect(struct DBL_LibraryObj *lib, char *name, u32 *pAddr,if (name[0 ] =='.' ) {/* Get DCD section size (address is 0, since it's a NOLOAD). */ for (i =0 ; i < pdblLib->nDCDSects; i++) { -if (CSL_Strcmp (pdblLib->dcdSects[i].sectHdr.name, +if (strcmp (pdblLib->dcdSects[i].sectHdr.name, name) ==0 ) { *pAddr =0 ; *pSize = pdblLib->dcdSects[i].sectHdr.size *
@@ -480,7 +480,7 @@ DSP_STATUS DBL_getSect(struct DBL_LibraryObj *lib, char *name, u32 *pAddr, }else {/* Check for overlay section */ for (i =0 ; i < pdblLib->nOvlySects; i++) { -if (CSL_Strcmp (pdblLib->ppOvlyData[i]->hdr.pName, +if (strcmp (pdblLib->ppOvlyData[i]->hdr.pName, name) ==0 ) {/* Address and size are meaningless */ *pAddr =0 ;
@@ -608,7 +608,7 @@ DSP_STATUS DBL_loadSect(struct DBL_LibraryObj *lib, char *sectName,/* Check for match of sect name in overlay table */ for (i =0 ; i < lib->nOvlySects; i++) { name = lib->ppOvlyData[i]->hdr.pName; -if (!CSL_Strncmp (name, sectName,CSL_Strlen (name))) { +if (!strncmp (name, sectName,strlen (name))) {/* Match found */ status =DSP_SOK ;break ;
@@ -621,8 +621,9 @@ DSP_STATUS DBL_loadSect(struct DBL_LibraryObj *lib, char *sectName,* If node overlay, phase will be encoded in name. If not node * overlay, set phase to NONE. */ - phase = (CSL_Strcmp (name, sectName)) ? -CSL_Atoi (sectName +CSL_Strlen (sectName) -1 ) :NONE ; + phase = (strcmp (name, sectName)) ? +simple_strtol (sectName +strlen (sectName) -1 , +NULL ,10 ) :NONE ;/* Get reference count of node phase to be loaded, offset into * overlay data array, and number of sections to overlay. */ switch (phase) {
@@ -848,7 +849,7 @@ DSP_STATUS DBL_readSect(struct DBL_LibraryObj *lib, char *name, char *pContent,/* Attempt to find match with DCD section names. */ for (i =0 ; i < pdblLib->nDCDSects; i++) { -if (CSL_Strcmp (pdblLib->dcdSects[i].sectHdr.name, name) ==0 ) { +if (strcmp (pdblLib->dcdSects[i].sectHdr.name, name) ==0 ) {/* Match found */ max = pdblLib->dcdSects[i].sectHdr.size * mauSize; max = (max > size) ? size : max;
@@ -922,7 +923,7 @@ DSP_STATUS DBL_unloadSect(struct DBL_LibraryObj *lib, char *sectName,/* Check for match of sect name in overlay table */ for (i =0 ; i < lib->nOvlySects; i++) { pName = lib->ppOvlyData[i]->hdr.pName; -if (!CSL_Strncmp (pName, sectName,CSL_Strlen (pName))) { +if (!strncmp (pName, sectName,strlen (pName))) {/* Match found */ status =DSP_SOK ;break ;
@@ -932,8 +933,9 @@ DSP_STATUS DBL_unloadSect(struct DBL_LibraryObj *lib, char *sectName,DBC_Assert (i < lib->nOvlySects); pOvlyData = lib->ppOvlyData[i];/* If node overlay, phase will be encoded in name. */ - phase = (CSL_Strcmp (pName, sectName)) ? -CSL_Atoi (sectName +CSL_Strlen (sectName) -1 ) :NONE ; + phase = (strcmp (pName, sectName)) ? +simple_strtol (sectName +strlen (sectName) -1 , +NULL ,10 ) :NONE ;switch (phase) {case NONE : nSects =numOtherSects (pOvlyData);
drivers/dsp/bridge/pmgr/dbll.c +0 -3
@@ -48,7 +48,6 @@#include <dspbridge/gh.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* Dynamic loader library interface */
@@ -339,7 +338,6 @@ void DBLL_exit(void)if (cRefs ==0 ) {MEM_Exit (); -CSL_Exit ();GH_exit ();#if GT_TRACE DBLL_debugMask.flags =NULL ;
@@ -496,7 +494,6 @@ bool DBLL_init(void)DBC_Assert (!DBLL_debugMask.flags);GT_create (&DBLL_debugMask,"DL" );/* "DL" for dbDL */ GH_init (); -CSL_Init (); retVal =MEM_Init ();if (!retVal)MEM_Exit ();
drivers/dsp/bridge/rmgr/dbdcd.c +0 -1
@@ -73,7 +73,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> #include <dspbridge/reg.h>
drivers/dsp/bridge/rmgr/disp.c +0 -1
@@ -62,7 +62,6 @@#include <dspbridge/dev.h> #include <dspbridge/mem.h> #include <dspbridge/sync.h> -#include <dspbridge/csl.h> /* ----------------------------------- Link Driver */ #include <dspbridge/wmd.h>
drivers/dsp/bridge/rmgr/drv.c +0 -1
@@ -104,7 +104,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/list.h> #include <dspbridge/mem.h> #include <dspbridge/reg.h>
drivers/dsp/bridge/rmgr/drv_interface.c +0 -1
@@ -76,7 +76,6 @@#include <dspbridge/services.h> #include <dspbridge/sync.h> #include <dspbridge/reg.h> -#include <dspbridge/csl.h> /* ----------------------------------- Platform Manager */ #include <dspbridge/wcdioctl.h>
drivers/dsp/bridge/rmgr/dspdrv.c +0 -1
@@ -105,7 +105,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/mem.h> #include <dspbridge/reg.h>
drivers/dsp/bridge/rmgr/nldr.c +0 -1
@@ -63,7 +63,6 @@#endif /* OS adaptation layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* Platform manager */
drivers/dsp/bridge/rmgr/node.c +0 -1
@@ -106,7 +106,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/list.h> #include <dspbridge/mem.h> #include <dspbridge/proc.h>
drivers/dsp/bridge/rmgr/proc.c +0 -1
@@ -114,7 +114,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/list.h> #include <dspbridge/mem.h> #include <dspbridge/ntfy.h>
drivers/dsp/bridge/services/cfg.c +0 -1
@@ -82,7 +82,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/reg.h> /* ----------------------------------- Others */
drivers/dsp/bridge/services/clk.c +0 -1
@@ -45,7 +45,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* ----------------------------------- This */
drivers/dsp/bridge/services/csl.c deleted +0 -173
173 lines not on this page · raw message
drivers/dsp/bridge/services/kfile.c +0 -1
@@ -54,7 +54,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* ----------------------------------- This */
drivers/dsp/bridge/services/ntfy.c +0 -1
@@ -52,7 +52,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/list.h> #include <dspbridge/mem.h> #include <dspbridge/sync.h>
drivers/dsp/bridge/services/reg.c +0 -1
@@ -46,7 +46,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* ----------------------------------- Others */
drivers/dsp/bridge/services/regsup.c +0 -1
@@ -43,7 +43,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/mem.h> -#include <dspbridge/csl.h> /* ----------------------------------- This */ #include <regsup.h>
drivers/dsp/bridge/services/services.c +2 -8
@@ -44,7 +44,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/dbg.h> #include <dspbridge/dpc.h> #include <dspbridge/kfile.h>
@@ -87,7 +86,6 @@ void SERVICES_Exit(void)KFILE_Exit ();DPC_Exit ();DBG_Exit (); -CSL_Exit ();CFG_Exit ();MEM_Exit ();
@@ -105,7 +103,7 @@ void SERVICES_Exit(void)bool SERVICES_Init (void ) {bool fInit = true; -bool fCFG, fCSL, fDBG, fDPC, fKFILE, fMEM; +bool fCFG, fDBG, fDPC, fKFILE, fMEM;bool fREG, fSYNC, fCLK, fNTFY;DBC_Require (cRefs >=0 );
@@ -122,7 +120,6 @@ bool SERVICES_Init(void) fMEM =MEM_Init (); fREG =REG_Init (); fCFG =CFG_Init (); - fCSL =CSL_Init (); fDBG =DBG_Init (); fDPC =DPC_Init (); fKFILE =KFILE_Init ();
@@ -130,7 +127,7 @@ bool SERVICES_Init(void) fCLK =CLK_Init (); fNTFY =NTFY_Init (); - fInit = fCFG && fCSL && fDBG && fDPC && fKFILE && + fInit = fCFG && fDBG && fDPC && fKFILE && fMEM && fREG && fSYNC && fCLK;if (!fInit) {
@@ -155,9 +152,6 @@ bool SERVICES_Init(void)if (fDBG)DBG_Exit (); -if (fCSL) -CSL_Exit (); -if (fCFG)CFG_Exit ();
drivers/dsp/bridge/services/sync.c +0 -1
@@ -60,7 +60,6 @@#include <dspbridge/gt.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/mem.h> /* ----------------------------------- This */
drivers/dsp/bridge/wmd/chnl_sm.c +0 -1
@@ -128,7 +128,6 @@/* ----------------------------------- OS Adaptation Layer */ #include <dspbridge/mem.h> #include <dspbridge/cfg.h> -#include <dspbridge/csl.h> #include <dspbridge/sync.h> /* ----------------------------------- Mini-Driver */
drivers/dsp/bridge/wmd/tiomap3430.c +0 -1
@@ -51,7 +51,6 @@#include <dspbridge/dbreg.h> #include <dspbridge/cfg.h> #include <dspbridge/drv.h> -#include <dspbridge/csl.h> #include <dspbridge/sync.h> /* ------------------------------------ Hardware Abstraction Layer */
drivers/dsp/bridge/wmd/ue_deh.c +0 -1
@@ -44,7 +44,6 @@#include <dspbridge/dbg.h> /* ----------------------------------- OS Adaptation Layer */ -#include <dspbridge/csl.h> #include <dspbridge/cfg.h> #include <dspbridge/dpc.h> #include <dspbridge/mem.h>
Signature · 1 line
1.5.6.5