1# SPDX-License-Identifier: GPL-2.0
2#
3# Makefile for camera drivers.
4#
5obj-$(CONFIG_INTEL_ATOMISP) += i2c/
6obj-$(CONFIG_VIDEO_ATOMISP) += atomisp.o
7obj-$(CONFIG_VIDEO_ATOMISP) += pci/atomisp_gmin_platform.o
8
9# While on staging, keep debug enabled
10DEFINES += -DDEBUG
11
12atomisp = $(srctree)/drivers/staging/media/atomisp/
13
14# SPDX-License-Identifier: GPL-2.0
15atomisp-objs += \
16	pci/atomisp_acc.o \
17	pci/atomisp_cmd.o \
18	pci/atomisp_compat_css20.o \
19	pci/atomisp_csi2.o \
20	pci/atomisp_drvfs.o \
21	pci/atomisp_file.o \
22	pci/atomisp_fops.o \
23	pci/atomisp_ioctl.o \
24	pci/atomisp_subdev.o \
25	pci/atomisp_tpg.o \
26	pci/atomisp_v4l2.o \
27	pci/sh_css_firmware.o \
28	pci/sh_css_host_data.o \
29	pci/sh_css_hrt.o \
30	pci/sh_css_metadata.o \
31	pci/sh_css_metrics.o \
32	pci/sh_css_mipi.o \
33	pci/sh_css_mmu.o \
34	pci/sh_css_morph.o \
35	pci/sh_css.o \
36	pci/sh_css_param_dvs.o \
37	pci/sh_css_param_shading.o \
38	pci/sh_css_params.o \
39	pci/sh_css_properties.o \
40	pci/sh_css_shading.o \
41	pci/sh_css_sp.o \
42	pci/sh_css_stream_format.o \
43	pci/sh_css_stream.o \
44	pci/sh_css_version.o \
45	pci/base/circbuf/src/circbuf.o \
46	pci/base/refcount/src/refcount.o \
47	pci/camera/pipe/src/pipe_binarydesc.o \
48	pci/camera/pipe/src/pipe_stagedesc.o \
49	pci/camera/pipe/src/pipe_util.o \
50	pci/camera/util/src/util.o \
51	pci/hmm/hmm_bo.o \
52	pci/hmm/hmm_dynamic_pool.o \
53	pci/hmm/hmm.o \
54	pci/hmm/hmm_reserved_pool.o \
55	pci/ia_css_device_access.o \
56	pci/isp/kernels/aa/aa_2/ia_css_aa2.host.o \
57	pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.o \
58	pci/isp/kernels/anr/anr_2/ia_css_anr2.host.o \
59	pci/isp/kernels/anr/anr_2/ia_css_anr2_table.host.o \
60	pci/isp/kernels/bh/bh_2/ia_css_bh.host.o \
61	pci/isp/kernels/bnlm/ia_css_bnlm.host.o \
62	pci/isp/kernels/bnr/bnr_1.0/ia_css_bnr.host.o \
63	pci/isp/kernels/bnr/bnr2_2/ia_css_bnr2_2.host.o \
64	pci/isp/kernels/cnr/cnr_1.0/ia_css_cnr.host.o \
65	pci/isp/kernels/cnr/cnr_2/ia_css_cnr2.host.o \
66	pci/isp/kernels/conversion/conversion_1.0/ia_css_conversion.host.o \
67	pci/isp/kernels/copy_output/copy_output_1.0/ia_css_copy_output.host.o \
68	pci/isp/kernels/crop/crop_1.0/ia_css_crop.host.o \
69	pci/isp/kernels/csc/csc_1.0/ia_css_csc.host.o \
70	pci/isp/kernels/ctc/ctc_1.0/ia_css_ctc.host.o \
71	pci/isp/kernels/ctc/ctc_1.0/ia_css_ctc_table.host.o \
72	pci/isp/kernels/ctc/ctc1_5/ia_css_ctc1_5.host.o \
73	pci/isp/kernels/ctc/ctc2/ia_css_ctc2.host.o \
74	pci/isp/kernels/de/de_1.0/ia_css_de.host.o \
75	pci/isp/kernels/de/de_2/ia_css_de2.host.o \
76	pci/isp/kernels/dpc2/ia_css_dpc2.host.o \
77	pci/isp/kernels/dp/dp_1.0/ia_css_dp.host.o \
78	pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.o \
79	pci/isp/kernels/eed1_8/ia_css_eed1_8.host.o \
80	pci/isp/kernels/fc/fc_1.0/ia_css_formats.host.o \
81	pci/isp/kernels/fpn/fpn_1.0/ia_css_fpn.host.o \
82	pci/isp/kernels/gc/gc_1.0/ia_css_gc.host.o \
83	pci/isp/kernels/gc/gc_1.0/ia_css_gc_table.host.o \
84	pci/isp/kernels/gc/gc_2/ia_css_gc2.host.o \
85	pci/isp/kernels/gc/gc_2/ia_css_gc2_table.host.o \
86	pci/isp/kernels/hdr/ia_css_hdr.host.o \
87	pci/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.o \
88	pci/isp/kernels/ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.o \
89	pci/isp/kernels/ipu2_io_ls/yuv444_io_ls/ia_css_yuv444_io.host.o \
90	pci/isp/kernels/iterator/iterator_1.0/ia_css_iterator.host.o \
91	pci/isp/kernels/macc/macc_1.0/ia_css_macc.host.o \
92	pci/isp/kernels/macc/macc_1.0/ia_css_macc_table.host.o \
93	pci/isp/kernels/macc/macc1_5/ia_css_macc1_5.host.o \
94	pci/isp/kernels/macc/macc1_5/ia_css_macc1_5_table.host.o \
95	pci/isp/kernels/norm/norm_1.0/ia_css_norm.host.o \
96	pci/isp/kernels/ob/ob_1.0/ia_css_ob.host.o \
97	pci/isp/kernels/ob/ob2/ia_css_ob2.host.o \
98	pci/isp/kernels/output/output_1.0/ia_css_output.host.o \
99	pci/isp/kernels/qplane/qplane_2/ia_css_qplane.host.o \
100	pci/isp/kernels/raw_aa_binning/raw_aa_binning_1.0/ia_css_raa.host.o \
101	pci/isp/kernels/raw/raw_1.0/ia_css_raw.host.o \
102	pci/isp/kernels/ref/ref_1.0/ia_css_ref.host.o \
103	pci/isp/kernels/s3a/s3a_1.0/ia_css_s3a.host.o \
104	pci/isp/kernels/sc/sc_1.0/ia_css_sc.host.o \
105	pci/isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.o \
106	pci/isp/kernels/sdis/sdis_2/ia_css_sdis2.host.o \
107	pci/isp/kernels/tdf/tdf_1.0/ia_css_tdf.host.o \
108	pci/isp/kernels/tnr/tnr_1.0/ia_css_tnr.host.o \
109	pci/isp/kernels/vf/vf_1.0/ia_css_vf.host.o \
110	pci/isp/kernels/wb/wb_1.0/ia_css_wb.host.o \
111	pci/isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.o \
112	pci/isp/kernels/xnr/xnr_1.0/ia_css_xnr_table.host.o \
113	pci/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.o \
114	pci/isp/kernels/ynr/ynr_1.0/ia_css_ynr.host.o \
115	pci/isp/kernels/ynr/ynr_2/ia_css_ynr2.host.o \
116	pci/mmu/isp_mmu.o \
117	pci/mmu/sh_mmu_mrfld.o \
118	pci/runtime/binary/src/binary.o \
119	pci/runtime/bufq/src/bufq.o \
120	pci/runtime/debug/src/ia_css_debug.o \
121	pci/runtime/eventq/src/eventq.o \
122	pci/runtime/event/src/event.o \
123	pci/runtime/frame/src/frame.o \
124	pci/runtime/ifmtr/src/ifmtr.o \
125	pci/runtime/inputfifo/src/inputfifo.o \
126	pci/runtime/isp_param/src/isp_param.o \
127	pci/runtime/isys/src/csi_rx_rmgr.o \
128	pci/runtime/isys/src/isys_dma_rmgr.o \
129	pci/runtime/isys/src/isys_init.o \
130	pci/runtime/isys/src/isys_stream2mmio_rmgr.o \
131	pci/runtime/isys/src/rx.o \
132	pci/runtime/isys/src/virtual_isys.o \
133	pci/runtime/pipeline/src/pipeline.o \
134	pci/runtime/queue/src/queue_access.o \
135	pci/runtime/queue/src/queue.o \
136	pci/runtime/rmgr/src/rmgr.o \
137	pci/runtime/rmgr/src/rmgr_vbuf.o \
138	pci/runtime/spctrl/src/spctrl.o \
139	pci/runtime/timer/src/timer.o \
140	pci/hive_isp_css_common/host/debug.o \
141	pci/hive_isp_css_common/host/dma.o \
142	pci/hive_isp_css_common/host/event_fifo.o \
143	pci/hive_isp_css_common/host/fifo_monitor.o \
144	pci/hive_isp_css_common/host/gdc.o \
145	pci/hive_isp_css_common/host/gp_device.o \
146	pci/hive_isp_css_common/host/gp_timer.o \
147	pci/hive_isp_css_common/host/hmem.o \
148	pci/hive_isp_css_common/host/input_formatter.o \
149	pci/hive_isp_css_common/host/input_system.o \
150	pci/hive_isp_css_common/host/irq.o \
151	pci/hive_isp_css_common/host/isp.o \
152	pci/hive_isp_css_common/host/mmu.o \
153	pci/hive_isp_css_common/host/sp.o \
154	pci/hive_isp_css_common/host/timed_ctrl.o \
155	pci/hive_isp_css_common/host/vmem.o \
156	pci/hive_isp_css_shared/host/tag.o \
157	pci/system_local.o \
158
159obj-byt = \
160	pci/css_2400_system/hive/ia_css_isp_configs.o \
161	pci/css_2400_system/hive/ia_css_isp_params.o \
162	pci/css_2400_system/hive/ia_css_isp_states.o \
163
164# These will be needed when clean merge CHT support nicely into the driver
165# Keep them here handy for when we get to that point
166#
167
168obj-cht = \
169	pci/css_2401_system/hive/ia_css_isp_configs.o \
170	pci/css_2401_system/hive/ia_css_isp_params.o \
171	pci/css_2401_system/hive/ia_css_isp_states.o \
172	pci/css_2401_system/host/csi_rx.o \
173	pci/css_2401_system/host/ibuf_ctrl.o \
174	pci/css_2401_system/host/isys_dma.o \
175	pci/css_2401_system/host/isys_irq.o \
176	pci/css_2401_system/host/isys_stream2mmio.o
177
178INCLUDES += \
179	-I$(atomisp)/ \
180	-I$(atomisp)/include/ \
181	-I$(atomisp)/include/hmm/ \
182	-I$(atomisp)/include/mmu/ \
183	-I$(atomisp)/pci/ \
184	-I$(atomisp)/pci/base/circbuf/interface/ \
185	-I$(atomisp)/pci/base/refcount/interface/ \
186	-I$(atomisp)/pci/camera/pipe/interface/ \
187	-I$(atomisp)/pci/camera/util/interface/ \
188	-I$(atomisp)/pci/hive_isp_css_common/ \
189	-I$(atomisp)/pci/hive_isp_css_common/host/ \
190	-I$(atomisp)/pci/hive_isp_css_include/ \
191	-I$(atomisp)/pci/hive_isp_css_include/device_access/ \
192	-I$(atomisp)/pci/hive_isp_css_include/host/ \
193	-I$(atomisp)/pci/hive_isp_css_shared/ \
194	-I$(atomisp)/pci/hive_isp_css_shared/host/ \
195	-I$(atomisp)/pci/isp/kernels/ \
196	-I$(atomisp)/pci/isp/kernels/aa/aa_2/ \
197	-I$(atomisp)/pci/isp/kernels/anr/anr_1.0/ \
198	-I$(atomisp)/pci/isp/kernels/anr/anr_2/ \
199	-I$(atomisp)/pci/isp/kernels/bh/bh_2/ \
200	-I$(atomisp)/pci/isp/kernels/bnlm/ \
201	-I$(atomisp)/pci/isp/kernels/bnr/ \
202	-I$(atomisp)/pci/isp/kernels/bnr/bnr_1.0/ \
203	-I$(atomisp)/pci/isp/kernels/bnr/bnr2_2/ \
204	-I$(atomisp)/pci/isp/kernels/cnr/ \
205	-I$(atomisp)/pci/isp/kernels/cnr/cnr_1.0/ \
206	-I$(atomisp)/pci/isp/kernels/cnr/cnr_2/ \
207	-I$(atomisp)/pci/isp/kernels/conversion/ \
208	-I$(atomisp)/pci/isp/kernels/conversion/conversion_1.0/ \
209	-I$(atomisp)/pci/isp/kernels/copy_output/ \
210	-I$(atomisp)/pci/isp/kernels/copy_output/copy_output_1.0/ \
211	-I$(atomisp)/pci/isp/kernels/crop/ \
212	-I$(atomisp)/pci/isp/kernels/crop/crop_1.0/ \
213	-I$(atomisp)/pci/isp/kernels/csc/ \
214	-I$(atomisp)/pci/isp/kernels/csc/csc_1.0/ \
215	-I$(atomisp)/pci/isp/kernels/ctc/ \
216	-I$(atomisp)/pci/isp/kernels/ctc/ctc_1.0/ \
217	-I$(atomisp)/pci/isp/kernels/ctc/ctc1_5/ \
218	-I$(atomisp)/pci/isp/kernels/ctc/ctc2/ \
219	-I$(atomisp)/pci/isp/kernels/de/ \
220	-I$(atomisp)/pci/isp/kernels/de/de_1.0/ \
221	-I$(atomisp)/pci/isp/kernels/de/de_2/ \
222	-I$(atomisp)/pci/isp/kernels/dp/ \
223	-I$(atomisp)/pci/isp/kernels/dpc2/ \
224	-I$(atomisp)/pci/isp/kernels/dp/dp_1.0/ \
225	-I$(atomisp)/pci/isp/kernels/dvs/ \
226	-I$(atomisp)/pci/isp/kernels/dvs/dvs_1.0/ \
227	-I$(atomisp)/pci/isp/kernels/eed1_8/ \
228	-I$(atomisp)/pci/isp/kernels/fc/ \
229	-I$(atomisp)/pci/isp/kernels/fc/fc_1.0/ \
230	-I$(atomisp)/pci/isp/kernels/fixedbds/ \
231	-I$(atomisp)/pci/isp/kernels/fixedbds/fixedbds_1.0/ \
232	-I$(atomisp)/pci/isp/kernels/fpn/ \
233	-I$(atomisp)/pci/isp/kernels/fpn/fpn_1.0/ \
234	-I$(atomisp)/pci/isp/kernels/gc/ \
235	-I$(atomisp)/pci/isp/kernels/gc/gc_1.0/ \
236	-I$(atomisp)/pci/isp/kernels/gc/gc_2/ \
237	-I$(atomisp)/pci/isp/kernels/hdr/ \
238	-I$(atomisp)/pci/isp/kernels/ipu2_io_ls/ \
239	-I$(atomisp)/pci/isp/kernels/ipu2_io_ls/ \
240	-I$(atomisp)/pci/isp/kernels/ipu2_io_ls/bayer_io_ls/ \
241	-I$(atomisp)/pci/isp/kernels/ipu2_io_ls/bayer_io_ls/ \
242	-I$(atomisp)/pci/isp/kernels/ipu2_io_ls/common/ \
243	-I$(atomisp)/pci/isp/kernels/ipu2_io_ls/common/ \
244	-I$(atomisp)/pci/isp/kernels/ipu2_io_ls/yuv444_io_ls/ \
245	-I$(atomisp)/pci/isp/kernels/ipu2_io_ls/yuv444_io_ls/ \
246	-I$(atomisp)/pci/isp/kernels/iterator/ \
247	-I$(atomisp)/pci/isp/kernels/iterator/iterator_1.0/ \
248	-I$(atomisp)/pci/isp/kernels/macc/ \
249	-I$(atomisp)/pci/isp/kernels/macc/macc_1.0/ \
250	-I$(atomisp)/pci/isp/kernels/macc/macc1_5/ \
251	-I$(atomisp)/pci/isp/kernels/norm/ \
252	-I$(atomisp)/pci/isp/kernels/norm/norm_1.0/ \
253	-I$(atomisp)/pci/isp/kernels/ob/ \
254	-I$(atomisp)/pci/isp/kernels/ob/ob_1.0/ \
255	-I$(atomisp)/pci/isp/kernels/ob/ob2/ \
256	-I$(atomisp)/pci/isp/kernels/output/ \
257	-I$(atomisp)/pci/isp/kernels/output/output_1.0/ \
258	-I$(atomisp)/pci/isp/kernels/qplane/ \
259	-I$(atomisp)/pci/isp/kernels/qplane/qplane_2/ \
260	-I$(atomisp)/pci/isp/kernels/raw/ \
261	-I$(atomisp)/pci/isp/kernels/raw_aa_binning/ \
262	-I$(atomisp)/pci/isp/kernels/raw_aa_binning/raw_aa_binning_1.0/ \
263	-I$(atomisp)/pci/isp/kernels/raw/raw_1.0/ \
264	-I$(atomisp)/pci/isp/kernels/ref/ \
265	-I$(atomisp)/pci/isp/kernels/ref/ref_1.0/ \
266	-I$(atomisp)/pci/isp/kernels/s3a/ \
267	-I$(atomisp)/pci/isp/kernels/s3a/s3a_1.0/ \
268	-I$(atomisp)/pci/isp/kernels/sc/ \
269	-I$(atomisp)/pci/isp/kernels/sc/sc_1.0/ \
270	-I$(atomisp)/pci/isp/kernels/sdis/ \
271	-I$(atomisp)/pci/isp/kernels/sdis/common/ \
272	-I$(atomisp)/pci/isp/kernels/sdis/sdis_1.0/ \
273	-I$(atomisp)/pci/isp/kernels/sdis/sdis_2/ \
274	-I$(atomisp)/pci/isp/kernels/tdf/ \
275	-I$(atomisp)/pci/isp/kernels/tdf/tdf_1.0/ \
276	-I$(atomisp)/pci/isp/kernels/tnr/ \
277	-I$(atomisp)/pci/isp/kernels/tnr/tnr_1.0/ \
278	-I$(atomisp)/pci/isp/kernels/tnr/tnr3/ \
279	-I$(atomisp)/pci/isp/kernels/uds/ \
280	-I$(atomisp)/pci/isp/kernels/uds/uds_1.0/ \
281	-I$(atomisp)/pci/isp/kernels/vf/ \
282	-I$(atomisp)/pci/isp/kernels/vf/vf_1.0/ \
283	-I$(atomisp)/pci/isp/kernels/wb/ \
284	-I$(atomisp)/pci/isp/kernels/wb/wb_1.0/ \
285	-I$(atomisp)/pci/isp/kernels/xnr/ \
286	-I$(atomisp)/pci/isp/kernels/xnr/xnr_1.0/ \
287	-I$(atomisp)/pci/isp/kernels/xnr/xnr_3.0/ \
288	-I$(atomisp)/pci/isp/kernels/ynr/ \
289	-I$(atomisp)/pci/isp/kernels/ynr/ynr_1.0/ \
290	-I$(atomisp)/pci/isp/kernels/ynr/ynr_2/ \
291	-I$(atomisp)/pci/isp/modes/interface/ \
292	-I$(atomisp)/pci/runtime/binary/interface/ \
293	-I$(atomisp)/pci/runtime/bufq/interface/ \
294	-I$(atomisp)/pci/runtime/debug/interface/ \
295	-I$(atomisp)/pci/runtime/event/interface/ \
296	-I$(atomisp)/pci/runtime/eventq/interface/ \
297	-I$(atomisp)/pci/runtime/frame/interface/ \
298	-I$(atomisp)/pci/runtime/ifmtr/interface/ \
299	-I$(atomisp)/pci/runtime/inputfifo/interface/ \
300	-I$(atomisp)/pci/runtime/isp_param/interface/ \
301	-I$(atomisp)/pci/runtime/isys/interface/ \
302	-I$(atomisp)/pci/runtime/isys/src/ \
303	-I$(atomisp)/pci/runtime/pipeline/interface/ \
304	-I$(atomisp)/pci/runtime/queue/interface/ \
305	-I$(atomisp)/pci/runtime/queue/src/ \
306	-I$(atomisp)/pci/runtime/rmgr/interface/ \
307	-I$(atomisp)/pci/runtime/spctrl/interface/ \
308	-I$(atomisp)/pci/runtime/tagger/interface/ \
309	-I$(atomisp)/pci/css_2400_system/hive/ \
310	-I$(atomisp)/pci/css_2401_system/ \
311	-I$(atomisp)/pci/css_2401_system/host/ \
312	-I$(atomisp)/pci/css_2401_system/hive/ \
313	-I$(atomisp)/pci/css_2401_system/hrt/
314
315DEFINES := -DHRT_HW -DHRT_ISP_CSS_CUSTOM_HOST -DHRT_USE_VIR_ADDRS -D__HOST__
316#DEFINES += -DUSE_DYNAMIC_BIN
317#DEFINES += -DISP_POWER_GATING
318#DEFINES += -DUSE_INTERRUPTS
319#DEFINES += -DUSE_SSSE3
320#DEFINES += -DPUNIT_CAMERA_BUSY
321#DEFINES += -DUSE_KMEM_CACHE
322
323ifeq ($(CONFIG_VIDEO_ATOMISP_ISP2401),y)
324atomisp-objs += \
325	$(obj-cht) \
326	pci/runtime/isys/src/ibuf_ctrl_rmgr.o
327DEFINES += -DISP2401 -DISP2401_NEW_INPUT_SYSTEM -DSYSTEM_hive_isp_css_2401_system
328else
329atomisp-objs += $(obj-byt)
330DEFINES += -DISP2400 -DSYSTEM_hive_isp_css_2400_system
331endif
332
333ccflags-y += $(INCLUDES) $(DEFINES) -fno-common
334