Loading drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/isp2400_mamoiada_params.h +0 −4 Original line number Diff line number Diff line Loading @@ -177,11 +177,7 @@ #define _isp_ceil_div(a,b) (((a)+(b)-1)/(b)) #ifdef C_RUN #define ISP_VEC_ALIGN (_isp_ceil_div(ISP_VEC_WIDTH, 64)*8) #else #define ISP_VEC_ALIGN ISP_VMEM_ALIGN #endif /* HRT specific vector support */ #define isp2400_mamoiada_vector_alignment ISP_VEC_ALIGN Loading drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/var.h +0 −25 Original line number Diff line number Diff line Loading @@ -44,29 +44,6 @@ #define HRT_HOST_TYPE(cell_type) HRTCAT(hrt_host_type_of_, cell_type) #define HRT_INT_TYPE(type) HRTCAT(hrt_int_type_of_, type) #ifdef C_RUN #ifdef C_RUN_DYNAMIC_LINK_PROGRAMS extern void *csim_processor_get_crun_symbol(hive_proc_id p, const char *sym); #define _hrt_cell_get_crun_symbol(cell,sym) csim_processor_get_crun_symbol(cell,HRTSTR(sym)) #define _hrt_cell_get_crun_indexed_symbol(cell,sym) csim_processor_get_crun_symbol(cell,HRTSTR(sym)) #else #define _hrt_cell_get_crun_symbol(cell,sym) (&sym) #define _hrt_cell_get_crun_indexed_symbol(cell,sym) (sym) #endif // C_RUN_DYNAMIC_LINK_PROGRAMS #define hrt_scalar_store(cell, type, var, data) \ ((*(HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_symbol(cell,var)) = (data)) #define hrt_scalar_load(cell, type, var) \ ((*(HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_symbol(cell,var))) #define hrt_indexed_store(cell, type, array, index, data) \ ((((HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_indexed_symbol(cell,array))[index]) = (data)) #define hrt_indexed_load(cell, type, array, index) \ (((HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_indexed_symbol(cell,array))[index]) #else /* C_RUN */ #define hrt_scalar_store(cell, type, var, data) \ HRTCAT(hrt_mem_store_,HRT_TYPE_BITS(cell, type))(\ cell, \ Loading @@ -93,7 +70,5 @@ extern void *csim_processor_get_crun_symbol(hive_proc_id p, const char *sym); HRTCAT(HIVE_MEM_,array), \ (HRTCAT(HIVE_ADDR_,array))+((index)*HRT_TYPE_BYTES(cell, type)))) #endif /* C_RUN */ #endif /* _HRT_VAR_H */ #endif drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/isp.c +0 −19 Original line number Diff line number Diff line Loading @@ -98,51 +98,32 @@ return; } /* ISP functions to control the ISP state from the host, even in crun. */ #ifdef C_RUN volatile uint32_t isp_sleeping[N_ISP_ID] = { 0 }; /* Sleeping state per ISP */ volatile uint32_t isp_ready [N_ISP_ID] = { 1 }; /* Ready state per ISP */ #endif /* Inspect readiness of an ISP indexed by ID */ unsigned isp_is_ready(isp_ID_t ID) { assert (ID < N_ISP_ID); #ifdef C_RUN return isp_ready[ID]; #else return isp_ctrl_getbit(ID, ISP_SC_REG, ISP_IDLE_BIT); #endif } /* Inspect sleeping of an ISP indexed by ID */ unsigned isp_is_sleeping(isp_ID_t ID) { assert (ID < N_ISP_ID); #ifdef C_RUN return isp_sleeping[ID]; #else return isp_ctrl_getbit(ID, ISP_SC_REG, ISP_SLEEPING_BIT); #endif } /* To be called by the host immediately before starting ISP ID. */ void isp_start(isp_ID_t ID) { assert (ID < N_ISP_ID); #ifdef C_RUN isp_ready[ID] = 0; #endif } /* Wake up ISP ID. */ void isp_wake(isp_ID_t ID) { assert (ID < N_ISP_ID); #ifdef C_RUN isp_sleeping[ID] = 0; #else isp_ctrl_setbit(ID, ISP_SC_REG, ISP_START_BIT); hrt_sleep(); #endif } drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/isp_private.h +4 −16 Original line number Diff line number Diff line Loading @@ -21,10 +21,6 @@ #include "isp_public.h" #ifdef C_RUN #include <string.h> /* memcpy() */ #endif #include "device_access.h" #include "assert_support.h" Loading Loading @@ -95,9 +91,7 @@ STORAGE_CLASS_ISP_C void isp_dmem_store( { assert(ID < N_ISP_ID); assert(ISP_DMEM_BASE[ID] != (hrt_address)-1); #ifdef C_RUN memcpy((void *)addr, data, size); #elif !defined(HRT_MEMORY_ACCESS) #if !defined(HRT_MEMORY_ACCESS) ia_css_device_store(ISP_DMEM_BASE[ID] + addr, data, size); #else hrt_master_port_store(ISP_DMEM_BASE[ID] + addr, data, size); Loading @@ -113,9 +107,7 @@ STORAGE_CLASS_ISP_C void isp_dmem_load( { assert(ID < N_ISP_ID); assert(ISP_DMEM_BASE[ID] != (hrt_address)-1); #ifdef C_RUN memcpy(data, (void *)addr, size); #elif !defined(HRT_MEMORY_ACCESS) #if !defined(HRT_MEMORY_ACCESS) ia_css_device_load(ISP_DMEM_BASE[ID] + addr, data, size); #else hrt_master_port_load(ISP_DMEM_BASE[ID] + addr, data, size); Loading @@ -131,9 +123,7 @@ STORAGE_CLASS_ISP_C void isp_dmem_store_uint32( assert(ID < N_ISP_ID); assert(ISP_DMEM_BASE[ID] != (hrt_address)-1); (void)ID; #ifdef C_RUN *(uint32_t *)addr = data; #elif !defined(HRT_MEMORY_ACCESS) #if !defined(HRT_MEMORY_ACCESS) ia_css_device_store_uint32(ISP_DMEM_BASE[ID] + addr, data); #else hrt_master_port_store_32(ISP_DMEM_BASE[ID] + addr, data); Loading @@ -148,9 +138,7 @@ STORAGE_CLASS_ISP_C uint32_t isp_dmem_load_uint32( assert(ID < N_ISP_ID); assert(ISP_DMEM_BASE[ID] != (hrt_address)-1); (void)ID; #ifdef C_RUN return *(uint32_t *)addr; #elif !defined(HRT_MEMORY_ACCESS) #if !defined(HRT_MEMORY_ACCESS) return ia_css_device_load_uint32(ISP_DMEM_BASE[ID] + addr); #else return hrt_master_port_uload_32(ISP_DMEM_BASE[ID] + addr); Loading drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/sp_local.h +0 −23 Original line number Diff line number Diff line Loading @@ -44,30 +44,7 @@ struct sp_stall_s { bool icache_master; }; #ifdef C_RUN #include "hive_isp_css_sp_hrt.h" #define sp_address_of(var) _hrt_cell_get_crun_indexed_symbol(SP, var) #ifdef C_RUN_DYNAMIC_LINK_PROGRAMS #ifndef DUMMY_HRT_SYSMEM_FUNCTIONS #define DUMMY_HRT_SYSMEM_FUNCTIONS /* These two inline functions prevent gcc from generating compiler warnings * about unused static functions. */ static inline void * dummy__hrt_sysmem_ident_address(hive_device_id mem, const char *sym) { return __hrt_sysmem_ident_address(mem, sym); } static inline void dummy_hrt_sysmem_map_var(hive_mem_id mem, const char *ident, volatile void *native_address, unsigned int size) { _hrt_sysmem_map_var(mem, ident, native_address, size); } #endif /* DUMMY_HRT_SYSMEM_FUNCTIONS */ #endif /* C_RUN */ #else #define sp_address_of(var) (HIVE_ADDR_ ## var) #endif /* * deprecated Loading Loading
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/isp2400_mamoiada_params.h +0 −4 Original line number Diff line number Diff line Loading @@ -177,11 +177,7 @@ #define _isp_ceil_div(a,b) (((a)+(b)-1)/(b)) #ifdef C_RUN #define ISP_VEC_ALIGN (_isp_ceil_div(ISP_VEC_WIDTH, 64)*8) #else #define ISP_VEC_ALIGN ISP_VMEM_ALIGN #endif /* HRT specific vector support */ #define isp2400_mamoiada_vector_alignment ISP_VEC_ALIGN Loading
drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2400_system/hrt/var.h +0 −25 Original line number Diff line number Diff line Loading @@ -44,29 +44,6 @@ #define HRT_HOST_TYPE(cell_type) HRTCAT(hrt_host_type_of_, cell_type) #define HRT_INT_TYPE(type) HRTCAT(hrt_int_type_of_, type) #ifdef C_RUN #ifdef C_RUN_DYNAMIC_LINK_PROGRAMS extern void *csim_processor_get_crun_symbol(hive_proc_id p, const char *sym); #define _hrt_cell_get_crun_symbol(cell,sym) csim_processor_get_crun_symbol(cell,HRTSTR(sym)) #define _hrt_cell_get_crun_indexed_symbol(cell,sym) csim_processor_get_crun_symbol(cell,HRTSTR(sym)) #else #define _hrt_cell_get_crun_symbol(cell,sym) (&sym) #define _hrt_cell_get_crun_indexed_symbol(cell,sym) (sym) #endif // C_RUN_DYNAMIC_LINK_PROGRAMS #define hrt_scalar_store(cell, type, var, data) \ ((*(HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_symbol(cell,var)) = (data)) #define hrt_scalar_load(cell, type, var) \ ((*(HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_symbol(cell,var))) #define hrt_indexed_store(cell, type, array, index, data) \ ((((HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_indexed_symbol(cell,array))[index]) = (data)) #define hrt_indexed_load(cell, type, array, index) \ (((HRT_HOST_TYPE(type)*)_hrt_cell_get_crun_indexed_symbol(cell,array))[index]) #else /* C_RUN */ #define hrt_scalar_store(cell, type, var, data) \ HRTCAT(hrt_mem_store_,HRT_TYPE_BITS(cell, type))(\ cell, \ Loading @@ -93,7 +70,5 @@ extern void *csim_processor_get_crun_symbol(hive_proc_id p, const char *sym); HRTCAT(HIVE_MEM_,array), \ (HRTCAT(HIVE_ADDR_,array))+((index)*HRT_TYPE_BYTES(cell, type)))) #endif /* C_RUN */ #endif /* _HRT_VAR_H */ #endif
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/isp.c +0 −19 Original line number Diff line number Diff line Loading @@ -98,51 +98,32 @@ return; } /* ISP functions to control the ISP state from the host, even in crun. */ #ifdef C_RUN volatile uint32_t isp_sleeping[N_ISP_ID] = { 0 }; /* Sleeping state per ISP */ volatile uint32_t isp_ready [N_ISP_ID] = { 1 }; /* Ready state per ISP */ #endif /* Inspect readiness of an ISP indexed by ID */ unsigned isp_is_ready(isp_ID_t ID) { assert (ID < N_ISP_ID); #ifdef C_RUN return isp_ready[ID]; #else return isp_ctrl_getbit(ID, ISP_SC_REG, ISP_IDLE_BIT); #endif } /* Inspect sleeping of an ISP indexed by ID */ unsigned isp_is_sleeping(isp_ID_t ID) { assert (ID < N_ISP_ID); #ifdef C_RUN return isp_sleeping[ID]; #else return isp_ctrl_getbit(ID, ISP_SC_REG, ISP_SLEEPING_BIT); #endif } /* To be called by the host immediately before starting ISP ID. */ void isp_start(isp_ID_t ID) { assert (ID < N_ISP_ID); #ifdef C_RUN isp_ready[ID] = 0; #endif } /* Wake up ISP ID. */ void isp_wake(isp_ID_t ID) { assert (ID < N_ISP_ID); #ifdef C_RUN isp_sleeping[ID] = 0; #else isp_ctrl_setbit(ID, ISP_SC_REG, ISP_START_BIT); hrt_sleep(); #endif }
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/isp_private.h +4 −16 Original line number Diff line number Diff line Loading @@ -21,10 +21,6 @@ #include "isp_public.h" #ifdef C_RUN #include <string.h> /* memcpy() */ #endif #include "device_access.h" #include "assert_support.h" Loading Loading @@ -95,9 +91,7 @@ STORAGE_CLASS_ISP_C void isp_dmem_store( { assert(ID < N_ISP_ID); assert(ISP_DMEM_BASE[ID] != (hrt_address)-1); #ifdef C_RUN memcpy((void *)addr, data, size); #elif !defined(HRT_MEMORY_ACCESS) #if !defined(HRT_MEMORY_ACCESS) ia_css_device_store(ISP_DMEM_BASE[ID] + addr, data, size); #else hrt_master_port_store(ISP_DMEM_BASE[ID] + addr, data, size); Loading @@ -113,9 +107,7 @@ STORAGE_CLASS_ISP_C void isp_dmem_load( { assert(ID < N_ISP_ID); assert(ISP_DMEM_BASE[ID] != (hrt_address)-1); #ifdef C_RUN memcpy(data, (void *)addr, size); #elif !defined(HRT_MEMORY_ACCESS) #if !defined(HRT_MEMORY_ACCESS) ia_css_device_load(ISP_DMEM_BASE[ID] + addr, data, size); #else hrt_master_port_load(ISP_DMEM_BASE[ID] + addr, data, size); Loading @@ -131,9 +123,7 @@ STORAGE_CLASS_ISP_C void isp_dmem_store_uint32( assert(ID < N_ISP_ID); assert(ISP_DMEM_BASE[ID] != (hrt_address)-1); (void)ID; #ifdef C_RUN *(uint32_t *)addr = data; #elif !defined(HRT_MEMORY_ACCESS) #if !defined(HRT_MEMORY_ACCESS) ia_css_device_store_uint32(ISP_DMEM_BASE[ID] + addr, data); #else hrt_master_port_store_32(ISP_DMEM_BASE[ID] + addr, data); Loading @@ -148,9 +138,7 @@ STORAGE_CLASS_ISP_C uint32_t isp_dmem_load_uint32( assert(ID < N_ISP_ID); assert(ISP_DMEM_BASE[ID] != (hrt_address)-1); (void)ID; #ifdef C_RUN return *(uint32_t *)addr; #elif !defined(HRT_MEMORY_ACCESS) #if !defined(HRT_MEMORY_ACCESS) return ia_css_device_load_uint32(ISP_DMEM_BASE[ID] + addr); #else return hrt_master_port_uload_32(ISP_DMEM_BASE[ID] + addr); Loading
drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/sp_local.h +0 −23 Original line number Diff line number Diff line Loading @@ -44,30 +44,7 @@ struct sp_stall_s { bool icache_master; }; #ifdef C_RUN #include "hive_isp_css_sp_hrt.h" #define sp_address_of(var) _hrt_cell_get_crun_indexed_symbol(SP, var) #ifdef C_RUN_DYNAMIC_LINK_PROGRAMS #ifndef DUMMY_HRT_SYSMEM_FUNCTIONS #define DUMMY_HRT_SYSMEM_FUNCTIONS /* These two inline functions prevent gcc from generating compiler warnings * about unused static functions. */ static inline void * dummy__hrt_sysmem_ident_address(hive_device_id mem, const char *sym) { return __hrt_sysmem_ident_address(mem, sym); } static inline void dummy_hrt_sysmem_map_var(hive_mem_id mem, const char *ident, volatile void *native_address, unsigned int size) { _hrt_sysmem_map_var(mem, ident, native_address, size); } #endif /* DUMMY_HRT_SYSMEM_FUNCTIONS */ #endif /* C_RUN */ #else #define sp_address_of(var) (HIVE_ADDR_ ## var) #endif /* * deprecated Loading