From: H Hartley Sweeten Date: Wed, 24 Jul 2013 18:12:35 +0000 (-0700) Subject: staging: comedi: addi_apci_1710: separate from addi_common.h X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c1f00be048c10763c7fad230bc6141b3538ef2d6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: comedi: addi_apci_1710: separate from addi_common.h Move the necessary bits from addi_common.h to remove it's dependency and make this driver standalone. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi_apci_1710.c b/drivers/staging/comedi/drivers/addi_apci_1710.c index 3035b2aa20cb..9157ac50815e 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1710.c +++ b/drivers/staging/comedi/drivers/addi_apci_1710.c @@ -1,5 +1,6 @@ #include #include +#include #include @@ -7,7 +8,146 @@ #include "comedi_fc.h" #include "amcc_s5933.h" -#include "addi-data/addi_common.h" +#define APCI1710_SAVE_INTERRUPT 1 + +union str_ModuleInfo { + /* Incremental counter infos */ + struct { + union { + struct { + unsigned char b_ModeRegister1; + unsigned char b_ModeRegister2; + unsigned char b_ModeRegister3; + unsigned char b_ModeRegister4; + } s_ByteModeRegister; + unsigned int dw_ModeRegister1_2_3_4; + } s_ModeRegister; + + struct { + unsigned int b_IndexInit:1; + unsigned int b_CounterInit:1; + unsigned int b_ReferenceInit:1; + unsigned int b_IndexInterruptOccur:1; + unsigned int b_CompareLogicInit:1; + unsigned int b_FrequencyMeasurementInit:1; + unsigned int b_FrequencyMeasurementEnable:1; + } s_InitFlag; + + } s_SiemensCounterInfo; + + /* SSI infos */ + struct { + unsigned char b_SSIProfile; + unsigned char b_PositionTurnLength; + unsigned char b_TurnCptLength; + unsigned char b_SSIInit; + } s_SSICounterInfo; + + /* TTL I/O infos */ + struct { + unsigned char b_TTLInit; + unsigned char b_PortConfiguration[4]; + } s_TTLIOInfo; + + /* Digital I/O infos */ + struct { + unsigned char b_DigitalInit; + unsigned char b_ChannelAMode; + unsigned char b_ChannelBMode; + unsigned char b_OutputMemoryEnabled; + unsigned int dw_OutputMemory; + } s_DigitalIOInfo; + + /* 82X54 timer infos */ + struct { + struct { + unsigned char b_82X54Init; + unsigned char b_InputClockSelection; + unsigned char b_InputClockLevel; + unsigned char b_OutputLevel; + unsigned char b_HardwareGateLevel; + unsigned int dw_ConfigurationWord; + } s_82X54TimerInfo[3]; + unsigned char b_InterruptMask; + } s_82X54ModuleInfo; + + /* Chronometer infos */ + struct { + unsigned char b_ChronoInit; + unsigned char b_InterruptMask; + unsigned char b_PCIInputClock; + unsigned char b_TimingUnit; + unsigned char b_CycleMode; + double d_TimingInterval; + unsigned int dw_ConfigReg; + } s_ChronoModuleInfo; + + /* Pulse encoder infos */ + struct { + struct { + unsigned char b_PulseEncoderInit; + } s_PulseEncoderInfo[4]; + unsigned int dw_SetRegister; + unsigned int dw_ControlRegister; + unsigned int dw_StatusRegister; + } s_PulseEncoderModuleInfo; + + /* Tor conter infos */ + struct { + struct { + unsigned char b_TorCounterInit; + unsigned char b_TimingUnit; + unsigned char b_InterruptEnable; + double d_TimingInterval; + unsigned int ul_RealTimingInterval; + } s_TorCounterInfo[2]; + unsigned char b_PCIInputClock; + } s_TorCounterModuleInfo; + + /* PWM infos */ + struct { + struct { + unsigned char b_PWMInit; + unsigned char b_TimingUnit; + unsigned char b_InterruptEnable; + double d_LowTiming; + double d_HighTiming; + unsigned int ul_RealLowTiming; + unsigned int ul_RealHighTiming; + } s_PWMInfo[2]; + unsigned char b_ClockSelection; + } s_PWMModuleInfo; + + /* CDA infos */ + struct { + unsigned char b_CDAEnable; + unsigned char b_FctSelection; + } s_CDAModuleInfo; +}; + +struct addi_private { + /* Pointer to the current process */ + struct task_struct *tsk_Current; + + struct { + unsigned int ui_Address; + unsigned char b_BoardVersion; + unsigned int dw_MolduleConfiguration[4]; + } s_BoardInfos; + + struct { + unsigned int ul_InterruptOccur; + unsigned int ui_Read; + unsigned int ui_Write; + struct { + unsigned char b_OldModuleMask; + unsigned int ul_OldInterruptMask; + unsigned int ul_OldCounterLatchValue; + } s_FIFOInterruptParameters[APCI1710_SAVE_INTERRUPT]; + } s_InterruptParameters; + + union str_ModuleInfo s_ModuleInfo[4]; +}; static void fpu_begin(void) {