media: atomisp: Compile the object codes for a generic driver
authorKate Hsuan <hpa@redhat.com>
Thu, 13 Jul 2023 10:02:29 +0000 (12:02 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Wed, 27 Sep 2023 07:40:03 +0000 (09:40 +0200)
Since a generic driver should support every type of atomisp, all the
codes need to be compiled. The ISP2401 flag controls the Makefile to build
the binary file for ISP2400 and ISP2401. Therefore, this section of
Makefile should be removed allowing all the necessary codes can be built.
Moreover, some parts of "removing #ifdef ISP2401" works are related to it
so they were also removed here.

Link: https://lore.kernel.org/r/20230713100231.308923-10-hpa@redhat.com
Signed-off-by: Kate Hsuan <hpa@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/Makefile
drivers/staging/media/atomisp/pci/runtime/isys/interface/ia_css_isys.h
drivers/staging/media/atomisp/pci/runtime/isys/interface/ia_css_isys_comm.h
drivers/staging/media/atomisp/pci/runtime/isys/src/csi_rx_rmgr.c
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_dma_rmgr.c
drivers/staging/media/atomisp/pci/runtime/isys/src/isys_stream2mmio_rmgr.c
drivers/staging/media/atomisp/pci/runtime/isys/src/virtual_isys.c

index 38b37012410980c16643bcc5a11ca9cfa8f89e9b..dcf469bf1cb42f97ee26940468035080c376fe2a 100644 (file)
@@ -150,13 +150,8 @@ atomisp-objs += \
        pci/hive_isp_css_common/host/timed_ctrl.o \
        pci/hive_isp_css_common/host/vmem.o \
        pci/hive_isp_css_shared/host/tag.o \
-       pci/system_local.o
-
-# These will be needed when clean merge CHT support nicely into the driver
-# Keep them here handy for when we get to that point
-#
-
-obj-cht = \
+       pci/system_local.o \
+       pci/runtime/isys/src/ibuf_ctrl_rmgr.o \
        pci/css_2401_system/host/csi_rx.o \
        pci/css_2401_system/host/ibuf_ctrl.o \
        pci/css_2401_system/host/isys_dma.o \
@@ -307,9 +302,6 @@ DEFINES := -DHRT_HW -DHRT_ISP_CSS_CUSTOM_HOST -DHRT_USE_VIR_ADDRS -D__HOST__
 #DEFINES += -DUSE_KMEM_CACHE
 
 ifeq ($(CONFIG_VIDEO_ATOMISP_ISP2401),y)
-atomisp-objs += \
-       $(obj-cht) \
-       pci/runtime/isys/src/ibuf_ctrl_rmgr.o
 DEFINES += -DISP2401
 endif
 
index 711a321e9a3f19940394e73f79dd24144ed531e3..d067b9fc43c7959c25614c11ccf70c0e255ecd24 100644 (file)
 #include <system_global.h>
 #include "ia_css_isys_comm.h"
 
-#ifdef ISP2401
 /**
  * Virtual Input System. (Input System 2401)
  */
 typedef isp2401_input_system_cfg_t     ia_css_isys_descr_t;
 /* end of Virtual Input System */
-#endif
+
 
 input_system_err_t ia_css_isys_init(void);
 void ia_css_isys_uninit(void);
 enum mipi_port_id ia_css_isys_port_to_mipi_port(
     enum mipi_port_id api_port);
 
-#if defined(ISP2401)
 
 /**
  * @brief Register one (virtual) stream. This is used to track when all
@@ -74,9 +72,7 @@ int ia_css_isys_convert_compressed_format(
     struct isp2401_input_system_cfg_s *cfg);
 unsigned int ia_css_csi2_calculate_input_system_alignment(
     enum atomisp_input_format fmt_type);
-#endif
 
-#if !defined(ISP2401)
 /* CSS Receiver */
 void ia_css_isys_rx_configure(
     const rx_cfg_t *config,
@@ -93,7 +89,6 @@ void ia_css_isys_rx_clear_irq_info(enum mipi_port_id port,
                                   unsigned int irq_infos);
 unsigned int ia_css_isys_rx_translate_irq_infos(unsigned int bits);
 
-#endif /* #if !defined(ISP2401) */
 
 /* @brief Translate format and compression to format type.
  *
@@ -111,7 +106,6 @@ int ia_css_isys_convert_stream_format_to_mipi_format(
     mipi_predictor_t compression,
     unsigned int *fmt_type);
 
-#ifdef ISP2401
 /**
  * Virtual Input System. (Input System 2401)
  */
@@ -178,6 +172,5 @@ void ia_css_isys_stream2mmio_sid_rmgr_release(
     stream2mmio_sid_ID_t       *sid);
 
 /* end of Virtual Input System */
-#endif
 
 #endif                         /* __IA_CSS_ISYS_H__ */
index d80ef42c7a642b52d7aa6c5b2d7c36c36437a01a..784afc82c8d2f9ef1d01b83f9d4b713ad4d25aaa 100644 (file)
@@ -19,7 +19,6 @@
 #include <type_support.h>
 #include <input_system.h>
 
-#ifdef ISP2401
 #include <platform_support.h>          /* inline */
 #include <input_system_global.h>
 #include <ia_css_stream_public.h>      /* IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH */
@@ -50,5 +49,4 @@ static inline uint32_t ia_css_isys_generate_stream_id(
        return sp_thread_id * IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH + stream_id;
 }
 
-#endif  /* ISP2401*/
 #endif  /*_IA_CSS_ISYS_COMM_H */
index 3fc9fed1e516d0a67498c5579aea01b6cf46d276..881036c67baf626821f80ce6b01a44f1e44d19ca 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "system_global.h"
 
-#ifdef ISP2401
 
 #include "assert_support.h"
 #include "platform_support.h"
@@ -165,4 +164,3 @@ int ia_css_isys_csi_rx_unregister_stream(
        }
        return retval;
 }
-#endif
index 261c6460e9705f8fc0483fa11c0d0dcfbff69dd4..4df0a9188ee66e7f89147c806b196d08e18dce7a 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "system_global.h"
 
-#ifdef ISP2401
 
 #include "assert_support.h"
 #include "platform_support.h"
@@ -85,4 +84,3 @@ void ia_css_isys_dma_channel_rmgr_release(
                }
        }
 }
-#endif
index fb0cb183f701799880e9b46f12d849512cf339f0..b6be63746c3eed83d4d83429039fd2d9f084f059 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "system_global.h"
 
-#ifdef ISP2401
 
 #include "assert_support.h"
 #include "platform_support.h"
@@ -87,4 +86,3 @@ void ia_css_isys_stream2mmio_sid_rmgr_release(
                }
        }
 }
-#endif
index def8a0b1d2ec15e03c49b3759f754ded7ded1cdd..269a81190577822e84ec475dbc7c5d1b8b29b87d 100644 (file)
@@ -17,7 +17,6 @@
 
 #include "system_global.h"
 
-#ifdef ISP2401
 
 #include "ia_css_isys.h"
 #include "ia_css_debug.h"
@@ -866,4 +865,3 @@ static csi_mipi_packet_type_t get_csi_mipi_packet_type(
 }
 
 /* end of Private Methods */
-#endif