diff options
Diffstat (limited to 'drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c')
-rw-r--r-- | drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c b/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c index 4f0dcdfa13be..b4813cd50daa 100644 --- a/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c +++ b/drivers/staging/media/atomisp/pci/runtime/isys/src/rx.c @@ -20,7 +20,7 @@ #include "ia_css_irq.h" #include "sh_css_internal.h" -#if !defined(USE_INPUT_SYSTEM_VERSION_2401) +#if !defined(ISP2401) void ia_css_isys_rx_enable_all_interrupts(enum mipi_port_id port) { hrt_data bits = receiver_port_reg_load(RX0_ID, @@ -28,9 +28,7 @@ void ia_css_isys_rx_enable_all_interrupts(enum mipi_port_id port) _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX); bits |= (1U << _HRT_CSS_RECEIVER_IRQ_OVERRUN_BIT) | -#if defined(HAS_RX_VERSION_2) (1U << _HRT_CSS_RECEIVER_IRQ_INIT_TIMEOUT_BIT) | -#endif (1U << _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_ENTRY_BIT) | (1U << _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_EXIT_BIT) | (1U << _HRT_CSS_RECEIVER_IRQ_ERR_SOT_HS_BIT) | @@ -117,10 +115,8 @@ unsigned int ia_css_isys_rx_translate_irq_infos(unsigned int bits) if (bits & (1U << _HRT_CSS_RECEIVER_IRQ_OVERRUN_BIT)) infos |= IA_CSS_RX_IRQ_INFO_BUFFER_OVERRUN; -#if defined(HAS_RX_VERSION_2) if (bits & (1U << _HRT_CSS_RECEIVER_IRQ_INIT_TIMEOUT_BIT)) infos |= IA_CSS_RX_IRQ_INFO_INIT_TIMEOUT; -#endif if (bits & (1U << _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_ENTRY_BIT)) infos |= IA_CSS_RX_IRQ_INFO_ENTER_SLEEP_MODE; if (bits & (1U << _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_EXIT_BIT)) @@ -176,10 +172,8 @@ void ia_css_isys_rx_clear_irq_info(enum mipi_port_id port, /* MW: Why do we remap the receiver bitmap */ if (irq_infos & IA_CSS_RX_IRQ_INFO_BUFFER_OVERRUN) bits |= 1U << _HRT_CSS_RECEIVER_IRQ_OVERRUN_BIT; -#if defined(HAS_RX_VERSION_2) if (irq_infos & IA_CSS_RX_IRQ_INFO_INIT_TIMEOUT) bits |= 1U << _HRT_CSS_RECEIVER_IRQ_INIT_TIMEOUT_BIT; -#endif if (irq_infos & IA_CSS_RX_IRQ_INFO_ENTER_SLEEP_MODE) bits |= 1U << _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_ENTRY_BIT; if (irq_infos & IA_CSS_RX_IRQ_INFO_EXIT_SLEEP_MODE) @@ -215,7 +209,7 @@ void ia_css_isys_rx_clear_irq_info(enum mipi_port_id port, return; } -#endif /* #if !defined(USE_INPUT_SYSTEM_VERSION_2401) */ +#endif /* #if !defined(ISP2401) */ int ia_css_isys_convert_stream_format_to_mipi_format( enum atomisp_input_format input_format, @@ -317,7 +311,7 @@ int ia_css_isys_convert_stream_format_to_mipi_format( case ATOMISP_INPUT_FORMAT_EMBEDDED: *fmt_type = MIPI_FORMAT_EMBEDDED; break; -#ifndef USE_INPUT_SYSTEM_VERSION_2401 +#ifndef ISP2401 case ATOMISP_INPUT_FORMAT_RAW_16: /* This is not specified by Arasan, so we use * 17 for now. @@ -362,7 +356,7 @@ int ia_css_isys_convert_stream_format_to_mipi_format( return 0; } -#if defined(USE_INPUT_SYSTEM_VERSION_2401) +#if defined(ISP2401) static mipi_predictor_t sh_css_csi2_compression_type_2_mipi_predictor( enum ia_css_csi2_compression_type type) { @@ -382,7 +376,7 @@ static mipi_predictor_t sh_css_csi2_compression_type_2_mipi_predictor( int ia_css_isys_convert_compressed_format( struct ia_css_csi2_compression *comp, - struct input_system_cfg_s *cfg) + struct isp2401_input_system_cfg_s *cfg) { int err = 0; @@ -480,11 +474,10 @@ unsigned int ia_css_csi2_calculate_input_system_alignment( #endif -#if !defined(USE_INPUT_SYSTEM_VERSION_2401) +#if !defined(ISP2401) void ia_css_isys_rx_configure(const rx_cfg_t *config, const enum ia_css_input_mode input_mode) { -#if defined(HAS_RX_VERSION_2) bool port_enabled[N_MIPI_PORT_ID]; bool any_port_enabled = false; enum mipi_port_id port; @@ -580,9 +573,6 @@ void ia_css_isys_rx_configure(const rx_cfg_t *config, * INPUT_SYSTEM_CSI_RECEIVER_SELECT_BACKENG, 1); */ input_system_reg_store(INPUT_SYSTEM0_ID, 0x207, 1); -#else -#error "rx.c: RX version must be one of {RX_VERSION_2}" -#endif return; } @@ -598,4 +588,4 @@ void ia_css_isys_rx_disable(void) } return; } -#endif /* if !defined(USE_INPUT_SYSTEM_VERSION_2401) */ +#endif /* if !defined(ISP2401) */ |