diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-23 11:33:12 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-03 14:54:20 -0700 |
commit | 197105a5349d69fff902149cbe7fe7475561d69a (patch) | |
tree | 90f61b5efb012389e549414dbf1a3d82e3b88cce /drivers | |
parent | 541a8bde90068471e9fc26cfe4c5fcb11dcd751b (diff) |
Staging: epl: unwind rest of _LINUX_ #ifdefs
All the non-Linux #defines are now resolved, so remove
the board/system type defines as they are not needed anymore.
Cc: Daniel Krueger <daniel.krueger@systec-electronic.com>
Cc: Ronald Sieber <Ronald.Sieber@systec-electronic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/epl/Debug.h | 21 | ||||
-rw-r--r-- | drivers/staging/epl/EplAmi.h | 5 | ||||
-rw-r--r-- | drivers/staging/epl/EplInc.h | 8 | ||||
-rw-r--r-- | drivers/staging/epl/EplObjDef.h | 8 | ||||
-rw-r--r-- | drivers/staging/epl/EplPdok.c | 25 | ||||
-rw-r--r-- | drivers/staging/epl/global.h | 112 |
6 files changed, 1 insertions, 178 deletions
diff --git a/drivers/staging/epl/Debug.h b/drivers/staging/epl/Debug.h index 2761606b688..35f784c82d2 100644 --- a/drivers/staging/epl/Debug.h +++ b/drivers/staging/epl/Debug.h @@ -628,7 +628,7 @@ // The macro DEBUG_DUMP_DATA() can be used with the same debug-levels to dump // out data bytes. Function DumpData() has to be included. // NOTE: DUMP_DATA has to be defined in project settings. -#if (!defined (NDEBUG) && defined (DUMP_DATA)) || (DEV_SYSTEM == _DEV_WIN32_) +#if (!defined (NDEBUG) && defined (DUMP_DATA)) #ifdef __cplusplus extern "C" { @@ -654,24 +654,6 @@ extern "C" { // deleted from compiler (in release version too). #if !defined (NDEBUG) || defined (DEBUG_KEEP_ASSERT) -#if (DEV_SYSTEM == _DEV_WIN32_) - - // For WIN32 process will be killed after closing message box. - -#define DEBUG_ASSERT0(expr,str) if (!(expr ) && ((DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT)!=0)) { \ - MessageBox (NULL, \ - "Assertion failed: line " __LINE__ " file " __FILE__ \ - "\n -> " str "\n"); \ - ExitProcess (-1); } - -#define DEBUG_ASSERT1(expr,str,p1) if (!(expr ) && ((DEBUG_GLB_LVL() & DEBUG_LVL_ASSERT)!=0)) { \ - MessageBox (NULL, \ - "Assertion failed: line " __LINE__ " file " __FILE__ \ - "\n -> " str "\n"); \ - ExitProcess (-1); } - -#else - // For microcontrollers process will be stopped using endless loop. #define DEBUG_ASSERT0(expr,str) if (!(expr )) { \ @@ -687,7 +669,6 @@ extern "C" { " -> 0x%08lX\n", __LINE__, __FILE__, str, (DWORD) p1); \ while (1); } -#endif #else diff --git a/drivers/staging/epl/EplAmi.h b/drivers/staging/epl/EplAmi.h index 296b0200e1f..f5754d14997 100644 --- a/drivers/staging/epl/EplAmi.h +++ b/drivers/staging/epl/EplAmi.h @@ -86,11 +86,6 @@ #ifndef _EPLAMI_H_ #define _EPLAMI_H_ -#if ((DEV_SYSTEM & _DEV_64BIT_SUPPORT_) == 0) -// #ifdef USE_VAR64 -#error 'ERROR: development system does not support 64 bit operations!' -// #endif -#endif //--------------------------------------------------------------------------- // types diff --git a/drivers/staging/epl/EplInc.h b/drivers/staging/epl/EplInc.h index 77f93d14416..5addab4981c 100644 --- a/drivers/staging/epl/EplInc.h +++ b/drivers/staging/epl/EplInc.h @@ -241,16 +241,8 @@ typedef struct { //--------------------------------------------------------------------------- // definitions for DLL export -#if ((DEV_SYSTEM == _DEV_WIN32_) || (DEV_SYSTEM == _DEV_WIN_CE_)) && defined (COP_LIB) - -#define EPLDLLEXPORT __declspec (dllexport) - -#else - #define EPLDLLEXPORT -#endif - // ============================================================================ // common debug macros // ============================================================================ diff --git a/drivers/staging/epl/EplObjDef.h b/drivers/staging/epl/EplObjDef.h index 4a6fac56ef6..89d6f00645f 100644 --- a/drivers/staging/epl/EplObjDef.h +++ b/drivers/staging/epl/EplObjDef.h @@ -96,17 +96,9 @@ // To prevent unused memory in subindex tables we need this macro. // But not all compilers support to preset the last struct value followed by a comma. // Compilers which does not support a comma after last struct value has to place in a dummy subindex. -#if ((DEV_SYSTEM & _DEV_COMMA_EXT_) != 0) - -#define EPL_OBD_END_SUBINDEX() -#define EPL_OBD_MAX_ARRAY_SUBENTRIES 2 - -#else - #define EPL_OBD_END_SUBINDEX() {0,0,0,NULL,NULL} #define EPL_OBD_MAX_ARRAY_SUBENTRIES 3 -#endif //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- diff --git a/drivers/staging/epl/EplPdok.c b/drivers/staging/epl/EplPdok.c index 15999b4f575..3b253ffee3b 100644 --- a/drivers/staging/epl/EplPdok.c +++ b/drivers/staging/epl/EplPdok.c @@ -73,11 +73,6 @@ #include "kernel/EplEventk.h" #include "kernel/EplObdk.h" -#if (DEV_SYSTEM == _DEV_GNU_CF548X_) -#include "plccore.h" -#define PDO_LED 0x08 -#endif - #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_PDOK)) != 0) #if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_DLLK)) == 0) @@ -226,11 +221,6 @@ tEplKernel EplPdokCbPdoReceived(tEplFrameInfo * pFrameInfo_p) tEplKernel Ret = kEplSuccessful; tEplEvent Event; -#if (DEV_SYSTEM == _DEV_GNU_CF548X_) - // reset LED -// MCF_GPIO_PODR_PCIBG &= ~PDO_LED; // Level -#endif - Event.m_EventSink = kEplEventSinkPdok; Event.m_EventType = kEplEventTypePdoRx; // limit copied data to size of PDO (because from some CNs the frame is larger than necessary) @@ -238,11 +228,6 @@ tEplKernel EplPdokCbPdoReceived(tEplFrameInfo * pFrameInfo_p) Event.m_pArg = pFrameInfo_p->m_pFrame; Ret = EplEventkPost(&Event); -#if (DEV_SYSTEM == _DEV_GNU_CF548X_) - // set LED -// MCF_GPIO_PODR_PCIBG |= PDO_LED; // Level -#endif - return Ret; } @@ -269,22 +254,12 @@ tEplKernel EplPdokCbPdoTransmitted(tEplFrameInfo * pFrameInfo_p) tEplKernel Ret = kEplSuccessful; tEplEvent Event; -#if (DEV_SYSTEM == _DEV_GNU_CF548X_) - // reset LED - MCF_GPIO_PODR_PCIBG &= ~PDO_LED; // Level -#endif - Event.m_EventSink = kEplEventSinkPdok; Event.m_EventType = kEplEventTypePdoTx; Event.m_uiSize = sizeof(tEplFrameInfo); Event.m_pArg = pFrameInfo_p; Ret = EplEventkPost(&Event); -#if (DEV_SYSTEM == _DEV_GNU_CF548X_) - // set LED - MCF_GPIO_PODR_PCIBG |= PDO_LED; // Level -#endif - return Ret; } diff --git a/drivers/staging/epl/global.h b/drivers/staging/epl/global.h index a27bde92917..3a987db81cc 100644 --- a/drivers/staging/epl/global.h +++ b/drivers/staging/epl/global.h @@ -22,118 +22,6 @@ #ifndef _GLOBAL_H_ #define _GLOBAL_H_ -//--------------------------------------------------------------------------- -// elements of defines for development system -//--------------------------------------------------------------------------- - -// these defines are necessary to check some of characteristics of the development system -#define _DEV_BIGEND_ 0x80000000L // big endian (motorolla format) -#define _DEV_ALIGNMENT_4_ 0x00400000L // the CPU needs alignment of 4 bytes -#define _DEV_ONLY_INT_MAIN_ 0x00004000L // the compiler needs "int main(int)" instead of "void main(void)" -#define _DEV_COMMA_EXT_ 0x00002000L // support of last comma in struct predefinition -#define _DEV_64BIT_SUPPORT_ 0x00001000L // support of 64 bit operations -#define _DEV_BIT64_ 0x00000400L // count of bits: 64 bit -#define _DEV_BIT32_ 0x00000300L // 32 bit -#define _DEV_BIT16_ 0x00000200L // 16 bit -#define _DEV_BIT8_ 0x00000100L // 8 bit -#define _DEV_RVCT_ARM_ 0x0000001CL // RealView ARM -#define _DEV_RENESASM32C 0x0000001BL // compiler from: Renesas -#define _DEV_GNUC_MIPS2_ 0x0000001AL // GNU for MIPS2 -#define _DEV_MPLAB_C30_ 0x00000019L // MPLAB C30 for Microchip dsPIC33F series -#define _DEV_GNUC_TC_ 0x00000018L // GNU for Infineon TriCore -#define _DEV_GNUC_X86_ 0x00000017L // GNU for I386 -#define _DEV_IAR_ARM_ 0x00000016L // ARM IAR C/C++ Compiler -#define _DEV_PARADGM_X86 0x00000015L // Paradigm C/C++ for Beck 1x3 -#define _DEV_GNUC_CF_ 0x00000014L // GNU for Coldfire -#define _DEV_KEIL_ARM_ 0x00000013L // Keil ARM -#define _DEV_MSEVC_ 0x00000012L // Microsoft embedded Visual C/C++ -#define _DEV_HIGHTEC_GNUC_X86_ 0x00000011L // Hightec elf386 gcc -#define _DEV_MSVC_RTX_ 0x00000010L // VC600 + RTX -#define _DEV_MSVC_V1_5_ 0x0000000FL // Microsoft Visual C/C++ V1.5 -#define _DEV_GNUC_ARM7_ 0x0000000EL // GNU Compiler gcc for ARM7 -#define _DEV_METROWERKS_CW_ 0x0000000DL // Metrowerks Code Warrior -#define _DEV_MITSUBISHIM16C_ 0x0000000CL //compiler from: Mitsubishi -#define _DEV_GNUC_C16X_ 0x0000000BL // GNU Compiler gcc166 for Infineon C16x -#define _DEV_LINUX_GCC_ 0x0000000AL // Linux GNU Compiler gcc -#define _DEV_GNUC_MPC5X5 0x00000009L // GNU for Motorola PPC5x5 -#define _DEV_TASKINGM16C_ 0x00000008L // Tasking for Mitsubishi M16C -#define _DEV_FUJITSU_ 0x00000007L // Fujitsu -#define _DEV_TASKING8_ 0x00000006L // Tasking 8051 -#define _DEV_TASKING16_ 0x00000005L // Tasking 166 -#define _DEV_KEIL8_ 0x00000004L // Keil C51 -#define _DEV_KEIL16_ 0x00000003L // Keil C166 -#define _DEV_BORLANDC_ 0x00000002L // Borland C/C++ -#define _DEV_MSVC16_ 0x00000001L // Microsoft Visual C/C++ -#define _DEV_MSVC32_ 0x00000000L // Microsoft Visual C/C++ - -// these defines can be used to mask previous elements -#define _DEV_MASK_COMPILER 0x000000FFL -#define _DEV_MASK_BITCOUNT 0x00000F00L -#define _DEV_MASK_ADDSUPPORT 0x0000F000L -#define _DEV_MASK_ALIGNMENT 0x00F00000L - -//--------------------------------------------------------------------------- -// defines for development system (DEV_SYSTEM) including previous elements -//--------------------------------------------------------------------------- - -#define _DEV_WIN16_ (_DEV_BIT16_ | _DEV_MSVC16_ ) -#define _DEV_WIN32_ (_DEV_BIT32_ | _DEV_MSVC32_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) -#define _DEV_MSVC_DOS_ (_DEV_BIT32_ | _DEV_MSVC_V1_5_ ) -#define _DEV_BORLAND_DOS_ (_DEV_BIT32_ | _DEV_BORLANDC_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) -#define _DEV_KEIL_C51X_ (_DEV_BIT8_ | _DEV_KEIL8_ | _DEV_BIGEND_ | _DEV_COMMA_EXT_) // at least C51 version 7.05 supports comma extension -#define _DEV_KEIL_C16X_ (_DEV_BIT16_ | _DEV_KEIL16_ | _DEV_COMMA_EXT_) // at least C166 version 5.03 supports comma extension -#define _DEV_TASKING_C51X_ (_DEV_BIT8_ | _DEV_TASKING8_ | _DEV_BIGEND_) -#define _DEV_TASKING_C16X_ (_DEV_BIT16_ | _DEV_TASKING16_ ) -#define _DEV_FUJITSU_F590_ (_DEV_BIT8_ | _DEV_FUJITSU_ | _DEV_COMMA_EXT_) // softune is not able to support 64 bit variables QWORD !!! -//f.j.29.04.03 M16C kann effektiv mit Bytes umgehen -//#define _DEV_TASKING_M16C_ (_DEV_BIT16_ | _DEV_TASKINGM16C_ ) -#define _DEV_TASKING_M16C_ (_DEV_BIT8_ | _DEV_TASKINGM16C_ ) -#define _DEV_MITSUBISHI_M16C_ (_DEV_BIT8_ | _DEV_MITSUBISHIM16C_ ) -#define _DEV_GNU_MPC5X5_ (_DEV_BIT32_ | _DEV_GNUC_MPC5X5| _DEV_BIGEND_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) -#define _DEV_LINUX_ (_DEV_BIT32_ | _DEV_LINUX_GCC_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) -#define _DEV_GNU_C16X_ (_DEV_BIT16_ | _DEV_GNUC_C16X_ ) //| _DEV_COMMA_EXT_) -#define _DEV_MCW_MPC5X5_ (_DEV_BIT32_ | _DEV_METROWERKS_CW_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) -#define _DEV_GNU_ARM7_ (_DEV_BIT32_ | _DEV_GNUC_ARM7_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) -#define _DEV_WIN32_RTX_ (_DEV_BIT32_ | _DEV_MSVC_RTX_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) -#define _DEV_HIGHTEC_X86_ (_DEV_BIT32_ | _DEV_HIGHTEC_GNUC_X86_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) -#define _DEV_WIN_CE_ (_DEV_BIT32_ | _DEV_MSEVC_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) -#define _DEV_KEIL_CARM_ (_DEV_BIT32_ | _DEV_KEIL_ARM_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) -#define _DEV_IAR_CARM_ (_DEV_BIT32_ | _DEV_IAR_ARM_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) -#define _DEV_RVCT_CARM_ (_DEV_BIT32_ | _DEV_RVCT_ARM_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) -#define _DEV_MCW_MCF5XXX_ (_DEV_BIT32_ | _DEV_METROWERKS_CW_ ) //| _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) -#define _DEV_GNU_CF5282_ (_DEV_BIT32_ | _DEV_GNUC_CF_ | _DEV_BIGEND_) -#define _DEV_PAR_BECK1X3_ (_DEV_BIT16_ | _DEV_PARADGM_X86) -#define _DEV_GNU_CF548X_ (_DEV_BIT32_ | _DEV_GNUC_CF_ | _DEV_BIGEND_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_) -#define _DEV_GNU_I386_ (_DEV_BIT32_ | _DEV_GNUC_X86_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) -#define _DEV_GNU_TRICORE_ (_DEV_BIT32_ | _DEV_GNUC_TC_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_ | _DEV_ALIGNMENT_4_) -#define _DEV_MPLAB_DSPIC33F_ (_DEV_BIT16_ | _DEV_MPLAB_C30_ ) //| _DEV_COMMA_EXT_) -#define _DEV_GNU_MIPSEL_ (_DEV_BIT32_ | _DEV_GNUC_MIPS2_ | _DEV_BIGEND_ | _DEV_64BIT_SUPPORT_ | _DEV_COMMA_EXT_ | _DEV_ONLY_INT_MAIN_) - -#define _DEV_RENESAS_M32C_ (_DEV_BIT32_ | _DEV_RENESASM32C) - -//--------------------------------------------------------------------------- -// usefull macros -//--------------------------------------------------------------------------- - -#define CHECK_IF_ONLY_INT_MAIN() (DEV_SYSTEM & _DEV_ONLY_INT_MAIN_) -#define CHECK_MEMORY_ALINMENT() (DEV_SYSTEM & _DEV_MASK_ALIGNMENT) - -//--------------------------------------------------------------------------- -// defines for target system (TARGET_SYSTEM) -//--------------------------------------------------------------------------- -#define _LINUX_ 1 - -//--------------------------------------------------------------------------- -// definitions for function inlining -//--------------------------------------------------------------------------- - -#define LINUX_SYSTEM // define 'LINUX_SYSTEM' uniform for all Linux based systems - // r.d.: We will need an other solution here! There are two sections here which do check the preproc-definitions: - // LINUX and __linux__ . The first one was Linux for PC, the second one is this section for embedded Linux (MCF5xxx). - // But Linux for PC does not need the definitions for embedded Linux. - -#define TARGET_SYSTEM _LINUX_ // Linux definition -#define DEV_SYSTEM _DEV_LINUX_ #ifndef QWORD #define QWORD long long int |