From: H Hartley Sweeten Date: Fri, 1 May 2015 21:58:29 +0000 (-0700) Subject: staging: comedi: ni_mio_common: open code the M-Series GPCT register offsets X-Git-Tag: v4.2-rc1~88^2~757 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a9752d81a636ccd01f473ee8c85b8a05f06a92b;p=platform%2Fkernel%2Flinux-exynos.git staging: comedi: ni_mio_common: open code the M-Series GPCT register offsets Remove the enum m_series_register_offsets values that are only used in the lookup tables for the GPCT to STC register mapping and just open code the values. Having the extra level of indirection does not add any additional clarity and it gets rid of some of the CamelCase symbols. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index ce7bcd2..4aa45e0 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -3766,20 +3766,20 @@ static const struct mio_regmap ni_gpct_to_stc_regmap[] = { [NITIO_G1_LOADB] = { G_Load_B_Register(1), 4 }, [NITIO_G0_INPUT_SEL] = { G_Input_Select_Register(0), 2 }, [NITIO_G1_INPUT_SEL] = { G_Input_Select_Register(1), 2 }, - [NITIO_G0_CNT_MODE] = { M_Offset_G0_Counting_Mode, 2 }, - [NITIO_G1_CNT_MODE] = { M_Offset_G1_Counting_Mode, 2 }, - [NITIO_G0_GATE2] = { M_Offset_G0_Second_Gate, 2 }, - [NITIO_G1_GATE2] = { M_Offset_G1_Second_Gate, 2 }, + [NITIO_G0_CNT_MODE] = { 0x1b0, 2 }, /* M-Series only */ + [NITIO_G1_CNT_MODE] = { 0x1b2, 2 }, /* M-Series only */ + [NITIO_G0_GATE2] = { 0x1b4, 2 }, /* M-Series only */ + [NITIO_G1_GATE2] = { 0x1b6, 2 }, /* M-Series only */ [NITIO_G01_STATUS] = { G_Status_Register, 2 }, [NITIO_G01_RESET] = { Joint_Reset_Register, 2 }, [NITIO_G01_STATUS1] = { Joint_Status_1_Register, 2 }, [NITIO_G01_STATUS2] = { Joint_Status_2_Register, 2 }, - [NITIO_G0_DMA_CFG] = { M_Offset_G0_DMA_Config, 2 }, - [NITIO_G1_DMA_CFG] = { M_Offset_G1_DMA_Config, 2 }, - [NITIO_G0_DMA_STATUS] = { M_Offset_G0_DMA_Status, 2 }, - [NITIO_G1_DMA_STATUS] = { M_Offset_G1_DMA_Status, 2 }, - [NITIO_G0_ABZ] = { M_Offset_G0_MSeries_ABZ, 2 }, - [NITIO_G1_ABZ] = { M_Offset_G1_MSeries_ABZ, 2 }, + [NITIO_G0_DMA_CFG] = { 0x1b8, 2 }, /* M-Series only */ + [NITIO_G1_DMA_CFG] = { 0x1ba, 2 }, /* M-Series only */ + [NITIO_G0_DMA_STATUS] = { 0x1b8, 2 }, /* M-Series only */ + [NITIO_G1_DMA_STATUS] = { 0x1ba, 2 }, /* M-Series only */ + [NITIO_G0_ABZ] = { 0x1c0, 2 }, /* M-Series only */ + [NITIO_G1_ABZ] = { 0x1c2, 2 }, /* M-Series only */ [NITIO_G0_INT_ACK] = { Interrupt_A_Ack_Register, 2 }, [NITIO_G1_INT_ACK] = { Interrupt_B_Ack_Register, 2 }, [NITIO_G0_STATUS] = { AI_Status_1_Register, 2 }, diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h index 9a1946e..69e710f 100644 --- a/drivers/staging/comedi/drivers/ni_stc.h +++ b/drivers/staging/comedi/drivers/ni_stc.h @@ -947,16 +947,6 @@ enum m_series_register_offsets { M_Offset_RTSI_Filter = 0xb4, M_Offset_SCXI_Legacy_Compatibility = 0xbc, M_Offset_RTSI_Shared_MUX = 0x1a2, - M_Offset_G0_Counting_Mode = 0x1b0, - M_Offset_G1_Counting_Mode = 0x1b2, - M_Offset_G0_Second_Gate = 0x1b4, - M_Offset_G1_Second_Gate = 0x1b6, - M_Offset_G0_DMA_Config = 0x1b8, /* write */ - M_Offset_G0_DMA_Status = 0x1b8, /* read */ - M_Offset_G1_DMA_Config = 0x1ba, /* write */ - M_Offset_G1_DMA_Status = 0x1ba, /* read */ - M_Offset_G0_MSeries_ABZ = 0x1c0, - M_Offset_G1_MSeries_ABZ = 0x1c2, M_Offset_Clock_and_Fout2 = 0x1c4, M_Offset_PLL_Control = 0x1c6, M_Offset_PLL_Status = 0x1c8,