Commit 39bc26e4 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: atomisp: unify INPUT error return type

There is a typedef for INPUT errors. This is different between
ISP2401 and ISP2400. Place both at the same struct, at the
global header file.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 9842fa16
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#define _IBUF_CNTRL_DMA_SYNC_WAIT_FOR_SYNC 1 #define _IBUF_CNTRL_DMA_SYNC_WAIT_FOR_SYNC 1
#define _IBUF_CNTRL_DMA_SYNC_FSM_WAIT_FOR_ACK (0x3 << 1) #define _IBUF_CNTRL_DMA_SYNC_FSM_WAIT_FOR_ACK (0x3 << 1)
typedef struct ib_buffer_s ib_buffer_t;
struct ib_buffer_s { struct ib_buffer_s {
u32 start_addr; /* start address of the buffer in the u32 start_addr; /* start address of the buffer in the
* "input-buffer hardware block" * "input-buffer hardware block"
...@@ -42,6 +41,7 @@ struct ib_buffer_s { ...@@ -42,6 +41,7 @@ struct ib_buffer_s {
u32 stride; /* stride per buffer line (in bytes) */ u32 stride; /* stride per buffer line (in bytes) */
u32 lines; /* lines in the buffer */ u32 lines; /* lines in the buffer */
}; };
typedef struct ib_buffer_s ib_buffer_t;
typedef struct ibuf_ctrl_cfg_s ibuf_ctrl_cfg_t; typedef struct ibuf_ctrl_cfg_s ibuf_ctrl_cfg_t;
struct ibuf_ctrl_cfg_s { struct ibuf_ctrl_cfg_s {
......
...@@ -32,15 +32,15 @@ ...@@ -32,15 +32,15 @@
static const ib_buffer_t IB_BUFFER_NULL = {0, 0, 0 }; static const ib_buffer_t IB_BUFFER_NULL = {0, 0, 0 };
static input_system_error_t input_system_configure_channel( static input_system_err_t input_system_configure_channel(
const channel_cfg_t channel); const channel_cfg_t channel);
static input_system_error_t input_system_configure_channel_sensor( static input_system_err_t input_system_configure_channel_sensor(
const channel_cfg_t channel); const channel_cfg_t channel);
static input_system_error_t input_buffer_configuration(void); static input_system_err_t input_buffer_configuration(void);
static input_system_error_t configuration_to_registers(void); static input_system_err_t configuration_to_registers(void);
static void receiver_rst(const rx_ID_t ID); static void receiver_rst(const rx_ID_t ID);
static void input_system_network_rst(const input_system_ID_t ID); static void input_system_network_rst(const input_system_ID_t ID);
...@@ -65,17 +65,17 @@ static void input_system_network_configure( ...@@ -65,17 +65,17 @@ static void input_system_network_configure(
const input_system_network_cfg_t *const cfg); const input_system_network_cfg_t *const cfg);
// MW: CSI is previously named as "rx" short for "receiver" // MW: CSI is previously named as "rx" short for "receiver"
static input_system_error_t set_csi_cfg( static input_system_err_t set_csi_cfg(
csi_cfg_t *const lhs, csi_cfg_t *const lhs,
const csi_cfg_t *const rhs, const csi_cfg_t *const rhs,
input_system_config_flags_t *const flags); input_system_config_flags_t *const flags);
static input_system_error_t set_source_type( static input_system_err_t set_source_type(
input_system_source_t *const lhs, input_system_source_t *const lhs,
const input_system_source_t rhs, const input_system_source_t rhs,
input_system_config_flags_t *const flags); input_system_config_flags_t *const flags);
static input_system_error_t input_system_multiplexer_cfg( static input_system_err_t input_system_multiplexer_cfg(
input_system_multiplex_t *const lhs, input_system_multiplex_t *const lhs,
const input_system_multiplex_t rhs, const input_system_multiplex_t rhs,
input_system_config_flags_t *const flags); input_system_config_flags_t *const flags);
...@@ -848,7 +848,7 @@ static void input_system_network_rst(const input_system_ID_t ID) ...@@ -848,7 +848,7 @@ static void input_system_network_rst(const input_system_ID_t ID)
} }
// Function that resets current configuration. // Function that resets current configuration.
input_system_error_t input_system_configuration_reset(void) input_system_err_t input_system_configuration_reset(void)
{ {
unsigned int i; unsigned int i;
...@@ -890,10 +890,10 @@ input_system_error_t input_system_configuration_reset(void) ...@@ -890,10 +890,10 @@ input_system_error_t input_system_configuration_reset(void)
// MW: Comments are good, but doxygen is required, place it at the declaration // MW: Comments are good, but doxygen is required, place it at the declaration
// Function that appends the channel to current configuration. // Function that appends the channel to current configuration.
static input_system_error_t input_system_configure_channel( static input_system_err_t input_system_configure_channel(
const channel_cfg_t channel) const channel_cfg_t channel)
{ {
input_system_error_t error = INPUT_SYSTEM_ERR_NO_ERROR; input_system_err_t error = INPUT_SYSTEM_ERR_NO_ERROR;
// Check if channel is not already configured. // Check if channel is not already configured.
if (config.ch_flags[channel.ch_id] & INPUT_SYSTEM_CFG_FLAG_SET) { if (config.ch_flags[channel.ch_id] & INPUT_SYSTEM_CFG_FLAG_SET) {
return INPUT_SYSTEM_ERR_CHANNEL_ALREADY_SET; return INPUT_SYSTEM_ERR_CHANNEL_ALREADY_SET;
...@@ -948,7 +948,7 @@ static input_system_error_t input_system_configure_channel( ...@@ -948,7 +948,7 @@ static input_system_error_t input_system_configure_channel(
} }
// Function that partitions input buffer space with determining addresses. // Function that partitions input buffer space with determining addresses.
static input_system_error_t input_buffer_configuration(void) static input_system_err_t input_buffer_configuration(void)
{ {
u32 current_address = 0; u32 current_address = 0;
u32 unallocated_memory = IB_CAPACITY_IN_WORDS; u32 unallocated_memory = IB_CAPACITY_IN_WORDS;
...@@ -1236,7 +1236,7 @@ static void input_system_network_configure( ...@@ -1236,7 +1236,7 @@ static void input_system_network_configure(
return; return;
} }
static input_system_error_t configuration_to_registers(void) static input_system_err_t configuration_to_registers(void)
{ {
input_system_network_cfg_t input_system_network_cfg; input_system_network_cfg_t input_system_network_cfg;
int i; int i;
...@@ -1335,10 +1335,10 @@ static input_system_error_t configuration_to_registers(void) ...@@ -1335,10 +1335,10 @@ static input_system_error_t configuration_to_registers(void)
} }
// Function that applies the whole configuration. // Function that applies the whole configuration.
input_system_error_t input_system_configuration_commit(void) input_system_err_t input_system_configuration_commit(void)
{ {
// The last configuration step is to configure the input buffer. // The last configuration step is to configure the input buffer.
input_system_error_t error = input_buffer_configuration(); input_system_err_t error = input_buffer_configuration();
if (error != INPUT_SYSTEM_ERR_NO_ERROR) { if (error != INPUT_SYSTEM_ERR_NO_ERROR) {
return error; return error;
...@@ -1357,7 +1357,7 @@ input_system_error_t input_system_configuration_commit(void) ...@@ -1357,7 +1357,7 @@ input_system_error_t input_system_configuration_commit(void)
// FIFO // FIFO
input_system_error_t input_system_csi_fifo_channel_cfg( input_system_err_t input_system_csi_fifo_channel_cfg(
u32 ch_id, u32 ch_id,
input_system_csi_port_t port, input_system_csi_port_t port,
backend_channel_cfg_t backend_ch, backend_channel_cfg_t backend_ch,
...@@ -1380,7 +1380,7 @@ input_system_error_t input_system_csi_fifo_channel_cfg( ...@@ -1380,7 +1380,7 @@ input_system_error_t input_system_csi_fifo_channel_cfg(
return input_system_configure_channel(channel); return input_system_configure_channel(channel);
} }
input_system_error_t input_system_csi_fifo_channel_with_counting_cfg( input_system_err_t input_system_csi_fifo_channel_with_counting_cfg(
u32 ch_id, u32 ch_id,
u32 nof_frames, u32 nof_frames,
input_system_csi_port_t port, input_system_csi_port_t port,
...@@ -1411,7 +1411,7 @@ input_system_error_t input_system_csi_fifo_channel_with_counting_cfg( ...@@ -1411,7 +1411,7 @@ input_system_error_t input_system_csi_fifo_channel_with_counting_cfg(
// SRAM // SRAM
input_system_error_t input_system_csi_sram_channel_cfg( input_system_err_t input_system_csi_sram_channel_cfg(
u32 ch_id, u32 ch_id,
input_system_csi_port_t port, input_system_csi_port_t port,
backend_channel_cfg_t backend_ch, backend_channel_cfg_t backend_ch,
...@@ -1443,7 +1443,7 @@ input_system_error_t input_system_csi_sram_channel_cfg( ...@@ -1443,7 +1443,7 @@ input_system_error_t input_system_csi_sram_channel_cfg(
//XMEM //XMEM
// Collects all parameters and puts them in channel_cfg_t. // Collects all parameters and puts them in channel_cfg_t.
input_system_error_t input_system_csi_xmem_channel_cfg( input_system_err_t input_system_csi_xmem_channel_cfg(
u32 ch_id, u32 ch_id,
input_system_csi_port_t port, input_system_csi_port_t port,
backend_channel_cfg_t backend_ch, backend_channel_cfg_t backend_ch,
...@@ -1475,7 +1475,7 @@ input_system_error_t input_system_csi_xmem_channel_cfg( ...@@ -1475,7 +1475,7 @@ input_system_error_t input_system_csi_xmem_channel_cfg(
return input_system_configure_channel(channel); return input_system_configure_channel(channel);
} }
input_system_error_t input_system_csi_xmem_acquire_only_channel_cfg( input_system_err_t input_system_csi_xmem_acquire_only_channel_cfg(
u32 ch_id, u32 ch_id,
u32 nof_frames, u32 nof_frames,
input_system_csi_port_t port, input_system_csi_port_t port,
...@@ -1502,7 +1502,7 @@ input_system_error_t input_system_csi_xmem_acquire_only_channel_cfg( ...@@ -1502,7 +1502,7 @@ input_system_error_t input_system_csi_xmem_acquire_only_channel_cfg(
return input_system_configure_channel(channel); return input_system_configure_channel(channel);
} }
input_system_error_t input_system_csi_xmem_capture_only_channel_cfg( input_system_err_t input_system_csi_xmem_capture_only_channel_cfg(
u32 ch_id, u32 ch_id,
u32 nof_frames, u32 nof_frames,
input_system_csi_port_t port, input_system_csi_port_t port,
...@@ -1535,7 +1535,7 @@ input_system_error_t input_system_csi_xmem_capture_only_channel_cfg( ...@@ -1535,7 +1535,7 @@ input_system_error_t input_system_csi_xmem_capture_only_channel_cfg(
// Non - CSI // Non - CSI
input_system_error_t input_system_prbs_channel_cfg( input_system_err_t input_system_prbs_channel_cfg(
u32 ch_id, u32 ch_id,
u32 nof_frames,//not used yet u32 nof_frames,//not used yet
u32 seed, u32 seed,
...@@ -1564,7 +1564,7 @@ input_system_error_t input_system_prbs_channel_cfg( ...@@ -1564,7 +1564,7 @@ input_system_error_t input_system_prbs_channel_cfg(
return input_system_configure_channel(channel); return input_system_configure_channel(channel);
} }
input_system_error_t input_system_tpg_channel_cfg( input_system_err_t input_system_tpg_channel_cfg(
u32 ch_id, u32 ch_id,
u32 nof_frames,//not used yet u32 nof_frames,//not used yet
u32 x_mask, u32 x_mask,
...@@ -1601,7 +1601,7 @@ input_system_error_t input_system_tpg_channel_cfg( ...@@ -1601,7 +1601,7 @@ input_system_error_t input_system_tpg_channel_cfg(
} }
// MW: Don't use system specific names, (even in system specific files) "cfg2400" -> cfg // MW: Don't use system specific names, (even in system specific files) "cfg2400" -> cfg
input_system_error_t input_system_gpfifo_channel_cfg( input_system_err_t input_system_gpfifo_channel_cfg(
u32 ch_id, u32 ch_id,
u32 nof_frames, //not used yet u32 nof_frames, //not used yet
...@@ -1625,11 +1625,11 @@ input_system_error_t input_system_gpfifo_channel_cfg( ...@@ -1625,11 +1625,11 @@ input_system_error_t input_system_gpfifo_channel_cfg(
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// Fills the parameters to config.csi_value[port] // Fills the parameters to config.csi_value[port]
static input_system_error_t input_system_configure_channel_sensor( static input_system_err_t input_system_configure_channel_sensor(
const channel_cfg_t channel) const channel_cfg_t channel)
{ {
const u32 port = channel.source_cfg.csi_cfg.csi_port; const u32 port = channel.source_cfg.csi_cfg.csi_port;
input_system_error_t status = INPUT_SYSTEM_ERR_NO_ERROR; input_system_err_t status = INPUT_SYSTEM_ERR_NO_ERROR;
input_system_multiplex_t mux; input_system_multiplex_t mux;
...@@ -1711,7 +1711,7 @@ static input_system_error_t input_system_configure_channel_sensor( ...@@ -1711,7 +1711,7 @@ static input_system_error_t input_system_configure_channel_sensor(
} }
// Test flags and set structure. // Test flags and set structure.
static input_system_error_t set_source_type( static input_system_err_t set_source_type(
input_system_source_t *const lhs, input_system_source_t *const lhs,
const input_system_source_t rhs, const input_system_source_t rhs,
input_system_config_flags_t *const flags) input_system_config_flags_t *const flags)
...@@ -1747,7 +1747,7 @@ static input_system_error_t set_source_type( ...@@ -1747,7 +1747,7 @@ static input_system_error_t set_source_type(
} }
// Test flags and set structure. // Test flags and set structure.
static input_system_error_t set_csi_cfg( static input_system_err_t set_csi_cfg(
csi_cfg_t *const lhs, csi_cfg_t *const lhs,
const csi_cfg_t *const rhs, const csi_cfg_t *const rhs,
input_system_config_flags_t *const flags) input_system_config_flags_t *const flags)
...@@ -1814,7 +1814,7 @@ static input_system_error_t set_csi_cfg( ...@@ -1814,7 +1814,7 @@ static input_system_error_t set_csi_cfg(
} }
// Test flags and set structure. // Test flags and set structure.
static input_system_error_t input_system_multiplexer_cfg( static input_system_err_t input_system_multiplexer_cfg(
input_system_multiplex_t *const lhs, input_system_multiplex_t *const lhs,
const input_system_multiplex_t rhs, const input_system_multiplex_t rhs,
input_system_config_flags_t *const flags) input_system_config_flags_t *const flags)
......
...@@ -4,8 +4,30 @@ ...@@ -4,8 +4,30 @@
* (c) 2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org> * (c) 2020 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
*/ */
#ifndef __INPUT_SYSTEM_GLOBAL_H_INCLUDED__
#define __INPUT_SYSTEM_GLOBAL_H_INCLUDED__
typedef enum {
INPUT_SYSTEM_ERR_NO_ERROR = 0,
/* ISP2401 */
INPUT_SYSTEM_ERR_CREATE_CHANNEL_FAIL,
INPUT_SYSTEM_ERR_CONFIGURE_CHANNEL_FAIL,
INPUT_SYSTEM_ERR_OPEN_CHANNEL_FAIL,
INPUT_SYSTEM_ERR_TRANSFER_FAIL,
INPUT_SYSTEM_ERR_CREATE_INPUT_PORT_FAIL,
INPUT_SYSTEM_ERR_CONFIGURE_INPUT_PORT_FAIL,
INPUT_SYSTEM_ERR_OPEN_INPUT_PORT_FAIL,
/* ISP2400 */
INPUT_SYSTEM_ERR_GENERIC,
INPUT_SYSTEM_ERR_CHANNEL_ALREADY_SET,
INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE,
INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED,
} input_system_err_t;
#ifdef ISP2401 #ifdef ISP2401
# include "isp2401_input_system_global.h" # include "isp2401_input_system_global.h"
#else #else
# include "isp2400_input_system_global.h" # include "isp2400_input_system_global.h"
#endif #endif
#endif /* __INPUT_SYSTEM_GLOBAL_H_INCLUDED__ */
...@@ -13,11 +13,6 @@ ...@@ -13,11 +13,6 @@
* more details. * more details.
*/ */
#ifndef __INPUT_SYSTEM_GLOBAL_H_INCLUDED__
#define __INPUT_SYSTEM_GLOBAL_H_INCLUDED__
#define IS_INPUT_SYSTEM_VERSION_2
#include <type_support.h> #include <type_support.h>
//CSI reveiver has 3 ports. //CSI reveiver has 3 ports.
...@@ -152,5 +147,3 @@ typedef enum { ...@@ -152,5 +147,3 @@ typedef enum {
} input_system_cfg_flag_t; } input_system_cfg_flag_t;
typedef u32 input_system_config_flags_t; typedef u32 input_system_config_flags_t;
#endif /* __INPUT_SYSTEM_GLOBAL_H_INCLUDED__ */
...@@ -33,15 +33,6 @@ ...@@ -33,15 +33,6 @@
#include "isp_acquisition_defs.h" #include "isp_acquisition_defs.h"
#include "input_system_ctrl_defs.h" #include "input_system_ctrl_defs.h"
typedef enum {
INPUT_SYSTEM_ERR_NO_ERROR = 0,
INPUT_SYSTEM_ERR_GENERIC,
INPUT_SYSTEM_ERR_CHANNEL_ALREADY_SET,
INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE,
INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED,
N_INPUT_SYSTEM_ERR
} input_system_error_t;
typedef enum { typedef enum {
INPUT_SYSTEM_PORT_A = 0, INPUT_SYSTEM_PORT_A = 0,
INPUT_SYSTEM_PORT_B, INPUT_SYSTEM_PORT_B,
......
...@@ -251,11 +251,11 @@ STORAGE_CLASS_INPUT_SYSTEM_H hrt_data input_system_sub_system_reg_load( ...@@ -251,11 +251,11 @@ STORAGE_CLASS_INPUT_SYSTEM_H hrt_data input_system_sub_system_reg_load(
// Function that resets current configuration. // Function that resets current configuration.
// remove the argument since it should be private. // remove the argument since it should be private.
input_system_error_t input_system_configuration_reset(void); input_system_err_t input_system_configuration_reset(void);
// Function that commits current configuration. // Function that commits current configuration.
// remove the argument since it should be private. // remove the argument since it should be private.
input_system_error_t input_system_configuration_commit(void); input_system_err_t input_system_configuration_commit(void);
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// //
...@@ -269,14 +269,14 @@ input_system_error_t input_system_configuration_commit(void); ...@@ -269,14 +269,14 @@ input_system_error_t input_system_configuration_commit(void);
// FIFO channel config function user // FIFO channel config function user
input_system_error_t input_system_csi_fifo_channel_cfg( input_system_err_t input_system_csi_fifo_channel_cfg(
u32 ch_id, u32 ch_id,
input_system_csi_port_t port, input_system_csi_port_t port,
backend_channel_cfg_t backend_ch, backend_channel_cfg_t backend_ch,
target_cfg2400_t target target_cfg2400_t target
); );
input_system_error_t input_system_csi_fifo_channel_with_counting_cfg( input_system_err_t input_system_csi_fifo_channel_with_counting_cfg(
u32 ch_id, u32 ch_id,
u32 nof_frame, u32 nof_frame,
input_system_csi_port_t port, input_system_csi_port_t port,
...@@ -288,7 +288,7 @@ input_system_error_t input_system_csi_fifo_channel_with_counting_cfg( ...@@ -288,7 +288,7 @@ input_system_error_t input_system_csi_fifo_channel_with_counting_cfg(
// SRAM channel config function user // SRAM channel config function user
input_system_error_t input_system_csi_sram_channel_cfg( input_system_err_t input_system_csi_sram_channel_cfg(
u32 ch_id, u32 ch_id,
input_system_csi_port_t port, input_system_csi_port_t port,
backend_channel_cfg_t backend_ch, backend_channel_cfg_t backend_ch,
...@@ -299,7 +299,7 @@ input_system_error_t input_system_csi_sram_channel_cfg( ...@@ -299,7 +299,7 @@ input_system_error_t input_system_csi_sram_channel_cfg(
//XMEM channel config function user //XMEM channel config function user
input_system_error_t input_system_csi_xmem_channel_cfg( input_system_err_t input_system_csi_xmem_channel_cfg(
u32 ch_id, u32 ch_id,
input_system_csi_port_t port, input_system_csi_port_t port,
backend_channel_cfg_t backend_ch, backend_channel_cfg_t backend_ch,
...@@ -311,7 +311,7 @@ input_system_error_t input_system_csi_xmem_channel_cfg( ...@@ -311,7 +311,7 @@ input_system_error_t input_system_csi_xmem_channel_cfg(
uint32_t nof_xmem_buffers uint32_t nof_xmem_buffers
); );
input_system_error_t input_system_csi_xmem_capture_only_channel_cfg( input_system_err_t input_system_csi_xmem_capture_only_channel_cfg(
u32 ch_id, u32 ch_id,
u32 nof_frames, u32 nof_frames,
input_system_csi_port_t port, input_system_csi_port_t port,
...@@ -322,7 +322,7 @@ input_system_error_t input_system_csi_xmem_capture_only_channel_cfg( ...@@ -322,7 +322,7 @@ input_system_error_t input_system_csi_xmem_capture_only_channel_cfg(
target_cfg2400_t target target_cfg2400_t target
); );
input_system_error_t input_system_csi_xmem_acquire_only_channel_cfg( input_system_err_t input_system_csi_xmem_acquire_only_channel_cfg(
u32 ch_id, u32 ch_id,
u32 nof_frames, u32 nof_frames,
input_system_csi_port_t port, input_system_csi_port_t port,
...@@ -334,7 +334,7 @@ input_system_error_t input_system_csi_xmem_acquire_only_channel_cfg( ...@@ -334,7 +334,7 @@ input_system_error_t input_system_csi_xmem_acquire_only_channel_cfg(
// Non - CSI channel config function user // Non - CSI channel config function user
input_system_error_t input_system_prbs_channel_cfg( input_system_err_t input_system_prbs_channel_cfg(
u32 ch_id, u32 ch_id,
u32 nof_frames, u32 nof_frames,
u32 seed, u32 seed,
...@@ -345,7 +345,7 @@ input_system_error_t input_system_prbs_channel_cfg( ...@@ -345,7 +345,7 @@ input_system_error_t input_system_prbs_channel_cfg(
target_cfg2400_t target target_cfg2400_t target
); );
input_system_error_t input_system_tpg_channel_cfg( input_system_err_t input_system_tpg_channel_cfg(
u32 ch_id, u32 ch_id,
u32 nof_frames,//not used yet u32 nof_frames,//not used yet
u32 x_mask, u32 x_mask,
...@@ -360,7 +360,7 @@ input_system_error_t input_system_tpg_channel_cfg( ...@@ -360,7 +360,7 @@ input_system_error_t input_system_tpg_channel_cfg(
target_cfg2400_t target target_cfg2400_t target
); );
input_system_error_t input_system_gpfifo_channel_cfg( input_system_err_t input_system_gpfifo_channel_cfg(
u32 ch_id, u32 ch_id,
u32 nof_frames, u32 nof_frames,
target_cfg2400_t target target_cfg2400_t target
......
...@@ -13,11 +13,6 @@ ...@@ -13,11 +13,6 @@
* more details. * more details.
*/ */
#ifndef __INPUT_SYSTEM_GLOBAL_H_INCLUDED__
#define __INPUT_SYSTEM_GLOBAL_H_INCLUDED__
#define IS_INPUT_SYSTEM_VERSION_VERSION_2401
/* CSI reveiver has 3 ports. */ /* CSI reveiver has 3 ports. */
#define N_CSI_PORTS (3) #define N_CSI_PORTS (3)
...@@ -41,18 +36,6 @@ ...@@ -41,18 +36,6 @@
#define INPUT_SYSTEM_N_STREAM_ID 6 /* maximum number of simultaneous #define INPUT_SYSTEM_N_STREAM_ID 6 /* maximum number of simultaneous
virtual channels supported*/ virtual channels supported*/
typedef enum {
INPUT_SYSTEM_ERR_NO_ERROR = 0,
INPUT_SYSTEM_ERR_CREATE_CHANNEL_FAIL,
INPUT_SYSTEM_ERR_CONFIGURE_CHANNEL_FAIL,
INPUT_SYSTEM_ERR_OPEN_CHANNEL_FAIL,
INPUT_SYSTEM_ERR_TRANSFER_FAIL,
INPUT_SYSTEM_ERR_CREATE_INPUT_PORT_FAIL,
INPUT_SYSTEM_ERR_CONFIGURE_INPUT_PORT_FAIL,
INPUT_SYSTEM_ERR_OPEN_INPUT_PORT_FAIL,
N_INPUT_SYSTEM_ERR
} input_system_err_t;
typedef enum { typedef enum {
INPUT_SYSTEM_SOURCE_TYPE_UNDEFINED = 0, INPUT_SYSTEM_SOURCE_TYPE_UNDEFINED = 0,
INPUT_SYSTEM_SOURCE_TYPE_SENSOR, INPUT_SYSTEM_SOURCE_TYPE_SENSOR,
...@@ -203,5 +186,3 @@ struct virtual_input_system_stream_cfg_s { ...@@ -203,5 +186,3 @@ struct virtual_input_system_stream_cfg_s {
#define NUM_OF_LINES_PER_BUF 2 #define NUM_OF_LINES_PER_BUF 2
#define LINES_OF_ISP_INPUT_BUF (NUM_OF_INPUT_BUF * NUM_OF_LINES_PER_BUF) #define LINES_OF_ISP_INPUT_BUF (NUM_OF_INPUT_BUF * NUM_OF_LINES_PER_BUF)
#define ISP_INPUT_BUF_STRIDE SH_CSS_MAX_SENSOR_WIDTH #define ISP_INPUT_BUF_STRIDE SH_CSS_MAX_SENSOR_WIDTH
#endif /* __INPUT_SYSTEM_GLOBAL_H_INCLUDED__ */
...@@ -24,8 +24,6 @@ ...@@ -24,8 +24,6 @@
#include "isys_stream2mmio.h" #include "isys_stream2mmio.h"
#include "isys_irq.h" #include "isys_irq.h"
typedef input_system_err_t input_system_error_t;
typedef enum { typedef enum {
MIPI_FORMAT_SHORT1 = 0x08, MIPI_FORMAT_SHORT1 = 0x08,
MIPI_FORMAT_SHORT2, MIPI_FORMAT_SHORT2,
......
...@@ -32,7 +32,7 @@ typedef input_system_cfg_t ia_css_isys_descr_t; ...@@ -32,7 +32,7 @@ typedef input_system_cfg_t ia_css_isys_descr_t;
/* end of Virtual Input System */ /* end of Virtual Input System */
#endif #endif
input_system_error_t ia_css_isys_init(void); input_system_err_t ia_css_isys_init(void);
void ia_css_isys_uninit(void); void ia_css_isys_uninit(void);
enum mipi_port_id ia_css_isys_port_to_mipi_port( enum mipi_port_id ia_css_isys_port_to_mipi_port(
enum mipi_port_id api_port); enum mipi_port_id api_port);
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#endif #endif
#if !defined(ISP2401) #if !defined(ISP2401)
input_system_error_t ia_css_isys_init(void) input_system_err_t ia_css_isys_init(void)
{ {
backend_channel_cfg_t backend_ch0; backend_channel_cfg_t backend_ch0;
backend_channel_cfg_t backend_ch1; backend_channel_cfg_t backend_ch1;
...@@ -32,7 +32,7 @@ input_system_error_t ia_css_isys_init(void) ...@@ -32,7 +32,7 @@ input_system_error_t ia_css_isys_init(void)
target_cfg2400_t targetC; target_cfg2400_t targetC;
u32 acq_mem_region_size = 24; u32 acq_mem_region_size = 24;
u32 acq_nof_mem_regions = 2; u32 acq_nof_mem_regions = 2;
input_system_error_t error = INPUT_SYSTEM_ERR_NO_ERROR; input_system_err_t error = INPUT_SYSTEM_ERR_NO_ERROR;
memset(&backend_ch0, 0, sizeof(backend_channel_cfg_t)); memset(&backend_ch0, 0, sizeof(backend_channel_cfg_t));
memset(&backend_ch1, 0, sizeof(backend_channel_cfg_t)); memset(&backend_ch1, 0, sizeof(backend_channel_cfg_t));
...@@ -87,7 +87,7 @@ input_system_error_t ia_css_isys_init(void) ...@@ -87,7 +87,7 @@ input_system_error_t ia_css_isys_init(void)
return error; return error;
} }
#elif defined(ISP2401) #elif defined(ISP2401)
input_system_error_t ia_css_isys_init(void) input_system_err_t ia_css_isys_init(void)
{ {
ia_css_isys_csi_rx_lut_rmgr_init(); ia_css_isys_csi_rx_lut_rmgr_init();
ia_css_isys_ibuf_rmgr_init(); ia_css_isys_ibuf_rmgr_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment