• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
2#
3# This program is free software; you can redistribute it and/or
4# modify it under the terms of the GNU General Public License
5# as published by the Free Software Foundation; either version 2
6# of the License, or (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
16
17include $(SDK_DIR)/cfg.mak
18
19ifeq ($(CFG_PRODUCT_TYPE),linux)
20HISI_LINUX_ENV := ok
21ifneq ($(HISI_LINUX_ENV),ok)
22$(error "Please run 'source ./env.sh' before building!")
23endif
24endif
25#=============SDK_DIR======================================================================
26CFGS_DIR=${SDK_DIR}/configs
27PUB_DIR=${SDK_DIR}/pub
28SAMPLE_DIR=${SDK_DIR}/sample
29SCRIPTS_DIR=${SDK_DIR}/scripts
30SOURCE_DIR=${SDK_DIR}/source
31TOOLS_DIR=${SDK_DIR}/tools/linux
32TOOLCHAINS_DIR=${TOOLS_DIR}/toolchains
33CFG_HI_BASE_ENV=" SDK_DIR CFGS_DIR PUB_DIR SAMPLE_DIR SCRIPTS_DIR SOURCE_DIR TOOLS_DIR "
34TESTCODE_DIR=${SDK_DIR}/../TestCode
35PEACH_DIR=${SDK_DIR}/../Peach
36#=============SRC_DIR======================================================================
37MSP_DIR=${SOURCE_DIR}/msp
38COMPONENT_DIR=${SOURCE_DIR}/component
39PLUGIN_DIR=${SOURCE_DIR}/plugin
40ROOTFS_SRC_DIR=${SOURCE_DIR}/rootfs
41BOOT_DIR=${SOURCE_DIR}/boot
42SLAVEBOOT_DIR=${SOURCE_DIR}/slaveboot
43KERNEL_DIR=${SOURCE_DIR}/kernel
44COMMON_DIR=${SOURCE_DIR}/common
45ATF_DIR=${KERNEL_DIR}/atf-2.0
46HHEE_DIR=${SOURCE_DIR}/hhee
47CFG_HI_BASE_ENV+=" MSP_DIR COMPONET_DIR ROOTFS_SRC_DIR BOOT_DIR KERNEL_DIR COMMON_DIR PLUGIN_DIR "
48#=============TEE_DIR==================================================================
49TEE_DIR=${LINUX_DIR}/drivers/hisilicon/tee
50TEE_INCLUDE=${TEE_DIR}/tee_hisi/tzdriver
51TEE_DRV_INCLUDE := $(TEE_DIR)/tee_hisi/tzdriver
52ifeq ($(strip $(CFG_HI_ITRUSTEE_SUPPORT)), y)
53HI_TEE_OS_DIR   := $(SDK_DIR)/source/tee/core/itrustee5.0
54else
55HI_TEE_OS_DIR   := $(SDK_DIR)/source/tee/core/trustedcore
56endif
57HI_TEE_API_DIR  := $(SDK_DIR)/source/tee/api
58HI_TEE_DRV_DIR  := $(SDK_DIR)/source/tee/drv
59HI_TEE_TA_DIR   := $(SDK_DIR)/source/tee/ta
60#=============INCLUDE_DIR==================================================================
61MSP_UNF_INCLUDE=${MSP_DIR}/include
62MSP_API_INCLUDE=${MSP_DIR}/api/include
63MSP_DRV_INCLUDE=${MSP_DIR}/drv/include
64MSP_DRV_REG_INCLUDE=${MSP_DIR}/drv/include/reg_inc
65COMMON_UNF_INCLUDE=${COMMON_DIR}/include
66COMMON_API_INCLUDE=${COMMON_DIR}/api/include
67COMMON_DRV_INCLUDE=${COMMON_DIR}/drv/include
68CFG_HI_BASE_ENV+=" MSP_UNF_INCLUDE MSP_API_INCLUDE MSP_DRV_INCLUDE "
69CFG_HI_BASE_ENV+=" COMMON_UNF_INCLUDE COMMON_API_INCLUDE COMMON_DRV_INCLUDE "
70HI_BOARD_HEAD_FILE_DIR=${SDK_DIR}/source/custom/${CFG_HI_BOARD_NAME}
71#=============PUB_DIR======================================================================
72ROOTBOX_DIR=${PUB_DIR}/rootbox
73ROOTBOX_BIN_DIR=${ROOTBOX_DIR}/bin
74PEACH_INSTALL_DIR=$(PUB_DIR)/autotest/peach
75TESTCODE_INSTALL_DIR=$(PUB_DIR)/autotest/testcode
76IMAGE_DIR=${PUB_DIR}/image
77INCLUDE_DIR=${PUB_DIR}/include
78LIB_DIR=${PUB_DIR}/lib
79STATIC_LIB_DIR=${LIB_DIR}/static
80SHARED_LIB_DIR=${LIB_DIR}/share
81EXTERN_LIB_DIR=${LIB_DIR}/extern
82MODULE_DIR=${PUB_DIR}/kmod
83ROOTFS_DIR=${PUB_DIR}/rootfs
84BIN_DIR=${PUB_DIR}/bin
85APP_DIR=${PUB_DIR}/app
86CFG_HI_BASE_ENV+=" IMAGE_DIR INCLUDE_DIR LIB_DIR STATIC_LIB_DIR SHARED_LIB_DIR EXTERN_LIB_DIR "
87CFG_HI_BASE_ENV+=" MODULE_DIR ROOTFS_DIR ROOTBOX_DIR BIN_DIR APP_DIR ROOTBOX_DIR "
88#=============LINUX_DIR====================================================================
89LINUX_DIR=${KERNEL_DIR}/${CFG_HI_KERNEL_VERSION}
90CFG_HI_BASE_ENV+=" LINUX_DIR "
91
92#=============SERVER_UNTILS=================================================================
93SERVER_UNTILS_DIR=${TOOLS_DIR}/utils
94MKIMAGE=${SERVER_UNTILS_DIR}/mkimage
95MKBOOTARGS=$(SERVER_UNTILS_DIR)/mkbootargs-tool/mkbootargs
96MKCRAMFS=${SERVER_UNTILS_DIR}/mkfs.cramfs
97MKEXT2FS=${SERVER_UNTILS_DIR}/genext2fs
98MKEXT4FS=${SERVER_UNTILS_DIR}/make_ext4fs
99TUNE2FS=${SERVER_UNTILS_DIR}/tune2fs
100E2FSCK=${SERVER_UNTILS_DIR}/e2fsck
101MKSQUASHFS=${SERVER_UNTILS_DIR}/mksquashfs
102MKJFFS2=${SERVER_UNTILS_DIR}/mkfs.jffs2
103MKYAFFS=${SERVER_UNTILS_DIR}/mkyaffs2image610
104MKUBIIMG=${SERVER_UNTILS_DIR}/mkubiimg.sh
105FILECAP=${SERVER_UNTILS_DIR}/filecap
106SCP=${SERVER_UNTILS_DIR}/cp
107SRM=${SERVER_UNTILS_DIR}/rm
108CFG_HI_BASE_ENV+=" MKIMAGE MKCRAMFS MKEXT2FS TUNE2FS E2FSCK MKSQUASHFS MKJFFS2 FILECAP SCP SRM "
109#==============COMPILE TOOLS=================================================================
110CROSS_COMPILE=$(CFG_HI_TOOLCHAINS_NAME)-
111CFG_HI_BASE_ENV+=" CROSS_COMPILE "
112
113#==============LIB COMPILE OPTIONS================================================================
114#3. export CFG_HI_CFLAGS
115CFG_HI_CFLAGS :=
116CFG_HI_KMOD_CFLAGS :=
117CFG_HI_BOARD_CONFIGS :=
118CFG_HI_SEC_COMPILE_CFLAGS :=
119#include board config file:hi_board.h
120CFG_HI_CFLAGS += -I${HI_BOARD_HEAD_FILE_DIR}
121
122#201811280929 add -Werror to upgrade warning to error to implement 0 warning rule
123#CFG_HI_CFLAGS += -Werror
124CFG_HI_KMOD_CFLAGS += -Werror
125CFG_HI_KMOD_CFLAGS += -I$(srctree)/bounds_checking_function/include
126
127#==============SEC COMPILE OPTIONS================================================================
128CFG_HI_SEC_COMPILE_CFLAGS += -fstack-protector-all
129CFG_HI_SEC_COMPILE_CFLAGS += -fstack-protector-strong
130CFG_HI_SEC_COMPILE_CFLAGS += -fPIC
131CFG_HI_SEC_COMPILE_CFLAGS += --target=arm-linux-ohosmusl
132CFG_HI_SEC_COMPILE_CFLAGS += --sysroot=$(SYSROOT_PATH)
133CFG_HI_SEC_COMPILE_CFLAGS += -Wno-error=unused-command-line-argument
134#CFG_HI_SEC_COMPILE_CFLAGS += -fPIE
135
136#for Peach optimization
137#CFG_HI_CFLAGS += -DHI_PEACH_SUPPORT
138#CFG_HI_KMOD_CFLAGS += -DHI_PEACH_SUPPORT
139
140ifeq ($(CFG_HI_USER_DRV),y)
141CFG_HI_KMOD_CFLAGS += -DCFG_HI_USER_DRV
142endif
143
144ifeq ($(CFG_HI_ASAN_TEST_SUPPORT),y)
145CFG_ASAN_CFLAGS := -Wall -g -fsanitize=address -fsanitize=leak -fsanitize=undefined -O0 -fno-omit-frame-pointer
146CFG_HI_CFLAGS += $(CFG_ASAN_CFLAGS)
147endif
148
149#==============FPGA/ASIC VERSION CONTROL=====================================================
150#CFG_HI_FPGA := y
151
152ifeq (${CFG_CPU_ARCH_ARM64},y)
153#CFG_HI_CFLAGS+=-Wlong-long -Wformat -Wpointer-arith
154#CFG_HI_CFLAGS+=-Werror=pointer-to-int-cast
155CFG_HI_CFLAGS+=-DCONFIG_ARCH_LP64_MODE
156CFG_HI_KMOD_CFLAGS+=-DCONFIG_ARCH_LP64_MODE
157CFG_HI_BOARD_CONFIGS+=-DCONFIG_ARCH_LP64_MODE
158endif
159ifeq ($(CFG_HI_FPGA),y)
160CFG_HI_CFLAGS+=-march=armv7-a -mcpu=cortex-a9
161else
162CFG_HI_CFLAGS+=-march=armv7-a -mcpu=cortex-a9 -mfpu=vfpv3-d16
163endif
164
165CFG_HI_KMOD_CFLAGS +=-Wno-error=date-time
166CFG_HI_KMOD_CFLAGS +=-Wno-date-time
167ifeq ($(CFG_HI_OPTM_SIZE_SUPPORT),y)
168ifneq ($(CFG_HI_ASAN_TEST_SUPPORT),y)
169CFG_HI_CFLAGS += -Os
170endif
171CFG_HI_CFLAGS += -c -ffunction-sections -Wall -DUSE_AEC -D_GNU_SOURCE -D_XOPEN_SOURCE=600
172else
173ifneq ($(CFG_HI_ASAN_TEST_SUPPORT),y)
174CFG_HI_CFLAGS += -O2
175endif
176CFG_HI_CFLAGS += -c -Wall -DUSE_AEC -D_GNU_SOURCE -D_XOPEN_SOURCE=600
177endif
178
179ifndef CFG_HI_STATIC_LIB_ONLY
180CFG_HI_CFLAGS+= -fPIC
181endif
182
183#ifeq (${CFG_HI_MCE_SUPPORT},y)
184#CFG_HI_CFLAGS+=-DMCE_SUPPORT
185#endif
186
187ifeq ($(CFG_HI_MSP_BUILDIN),y)
188CFG_MSP_BUILDTYPE := y
189else
190CFG_MSP_BUILDTYPE := m
191endif
192
193## FPGA/ASIC VERSION CONTROL
194ifeq ($(CFG_HI_FPGA),y)
195CFG_HI_CFLAGS += -DHI_FPGA
196endif
197
198#CFG_HI_CFLAGS+= -I${MSP_UNF_INCLUDE} -I${MSP_API_INCLUDE} -I${MSP_DRV_INCLUDE} -I${COMMON_UNF_INCLUDE} -I${COMMON_API_INCLUDE} -I${COMMON_DRV_INCLUDE}
199CFG_HI_CFLAGS+= -DCHIP_TYPE_${CFG_HI_CHIP_TYPE} -D${CFG_HI_DDRC_CHANNEL_TYPE}
200
201## common and other modules will use hi_debug.h, which refers to the HI_LOG_LEVEL
202ifeq (y,$(CFG_HI_LOG_SUPPORT))
203CFG_HI_CFLAGS += -DHI_LOG_SUPPORT=1
204ifdef CFG_HI_LOG_LEVEL
205CFG_HI_CFLAGS += -DHI_LOG_LEVEL=$(CFG_HI_LOG_LEVEL)
206else
207CFG_HI_CFLAGS += -DHI_LOG_LEVEL=1
208endif
209ifeq (y,$(CFG_HI_LOG_NETWORK_SUPPORT))
210CFG_HI_CFLAGS += -DLOG_NETWORK_SUPPORT
211endif
212ifeq (y,$(CFG_HI_LOG_UDISK_SUPPORT))
213CFG_HI_CFLAGS += -DLOG_UDISK_SUPPORT
214endif
215else
216CFG_HI_CFLAGS += -DHI_LOG_SUPPORT=0
217endif
218ifeq (y,$(CFG_HI_UNIFIED_IMAGE_SUPPORT))
219CFG_HI_CFLAGS += -DHI_UNIFIED_IMAGE_SUPPORT
220endif
221ifeq (y,$(CFG_HI_PROC_SUPPORT))
222CFG_HI_CFLAGS += -DHI_PROC_SUPPORT=1
223else
224CFG_HI_CFLAGS += -DHI_PROC_SUPPORT=0
225endif
226ifeq (y,$(CFG_HI_FUZZ_TEST_SUPPORT))
227CFG_HI_CFLAGS += -DHI_FUZZ_TEST_SUPPORT
228endif
229ifeq (y,$(CFG_HI_SMMU_SUPPORT))
230CFG_HI_CFLAGS += -DHI_SMMU_SUPPORT
231endif
232ifeq (y,$(CFG_HI_HDR_SUPPORT))
233CFG_HI_CFLAGS += -DHI_HDR_SUPPORT
234endif
235## common api and msp_deubg will use these macro
236ifeq (y,$(CFG_HI_MEMMGR_SUPPORT))
237CFG_HI_CFLAGS += -DCMN_MMGR_SUPPORT
238endif
239
240ifeq (y,$(CFG_HI_VI_SUPPORT))
241CFG_HI_CFLAGS += -DHI_VI_SUPPORT
242endif
243
244ifeq (y,$(CFG_HI_RM_SUPPORT))
245CFG_HI_CFLAGS += -DHI_RM_SUPPORT
246endif
247
248ifeq (y,$(CFG_HI_VENC_SUPPORT))
249CFG_HI_CFLAGS += -DHI_VENC_SUPPORT
250endif
251ifeq (y,$(CFG_HI_HAEFFECT_SRS_SUPPORT))
252CFG_HI_CFLAGS += -DHI_HAEFFECT_SRS_SUPPORT
253endif
254ifeq (y,$(CFG_HI_HAEFFECT_DBX_SUPPORT))
255CFG_HI_CFLAGS += -DHI_HAEFFECT_DBX_SUPPORT
256endif
257ifeq (y,$(CFG_HI_HAEFFECT_DBX2_SUPPORT))
258CFG_HI_CFLAGS += -DHI_HAEFFECT_DBX2_SUPPORT
259endif
260ifeq (y,$(CFG_HI_HAEFFECT_SWS3D_SUPPORT))
261CFG_HI_CFLAGS += -DHI_HAEFFECT_SWS3D_SUPPORT
262endif
263ifeq ($(CFG_HI_HAEFFECT_SPECTRUM_SUPPORT),y)
264CFG_HI_CFLAGS += -DHI_HAEFFECT_SPECTRUM_SUPPORT
265endif
266ifeq (y,$(CFG_HI_HAEFFECT_BASE_SUPPORT))
267CFG_HI_CFLAGS += -DHI_HAEFFECT_BASE_SUPPORT
268endif
269ifeq (y,$(CFG_HI_HAEFFECT_CUSTOM1_SUPPORT))
270CFG_HI_CFLAGS += -DHI_HAEFFECT_CUSTOM1_SUPPORT
271endif
272ifeq (y,$(CFG_HI_HAEFFECT_KDE_SUPPORT))
273CFG_HI_CFLAGS += -DHI_HAEFFECT_KDE_SUPPORT
274endif
275ifeq (y,$(CFG_HI_TTS_SUPPORT))
276CFG_HI_CFLAGS += -DHI_TTS_SUPPORT
277endif
278ifeq (y,$(CFG_HI_SONIC_SUPPORT))
279CFG_HI_CFLAGS += -DHI_SONIC_SUPPORT
280endif
281ifeq (y,$(CFG_CUSTOM_PANELINDEX_IN_EEPROM))
282CFG_HI_CFLAGS += -DCUSTOM_PANELINDEX_IN_EEPROM
283endif
284
285ifeq ($(CFG_HI_ADVCA_SUPPORT),y)
286    CFG_HI_CFLAGS += -DHI_ADVCA_SUPPORT
287    CFG_HI_CFLAGS += -DHI_ADVCA_TYPE_$(CFG_HI_ADVCA_TYPE)
288
289    ifdef CFG_HI_ADVCA_FUNCTION
290        ifeq ($(CFG_HI_ADVCA_FUNCTION),FINAL)
291            CFG_HI_CFLAGS += -DHI_ADVCA_FUNCTION_RELEASE
292        else
293            CFG_HI_CFLAGS += -DHI_ADVCA_FUNCTION_$(CFG_HI_ADVCA_FUNCTION)
294        endif
295    endif
296
297    ifeq ($(CFG_HI_ADVCA_USE_EXT1_RSA_KEY),y)
298        CFG_HI_CFLAGS += -DHI_ADVCA_USE_EXT1_RSA_KEY
299    endif
300    ifeq ($(CFG_HI_ANTI_ROLL_BACK_SUPPORT),y)
301        CFG_HI_CFLAGS += -DHI_ANTI_ROLL_BACK_SUPPORT
302    endif
303
304endif
305
306ifeq ($(CFG_HI_TVP_SUPPORT),y)
307CFG_HI_CFLAGS += -DHI_TEE_SUPPORT
308endif
309
310#=============KERNEL MODULE COMPILE OPTIONS=====================================================
311
312CFG_HI_KMOD_CFLAGS += -I${HI_BOARD_HEAD_FILE_DIR}
313
314CFG_HI_KMOD_CFLAGS += -DCHIP_TYPE_${CFG_HI_CHIP_TYPE} -D${CFG_HI_DDRC_CHANNEL_TYPE}
315
316## FPGA/ASIC VERSION CONTROL
317ifeq ($(CFG_HI_FPGA),y)
318CFG_HI_KMOD_CFLAGS += -DHI_FPGA
319endif
320
321AT := @
322
323ifeq ($(CFG_HI_SMMU_SUPPORT),y)
324CFG_HI_KMOD_CFLAGS += -DHI_SMMU_SUPPORT
325endif
326
327ifeq ($(CFG_HI_HDR_SUPPORT),y)
328CFG_HI_KMOD_CFLAGS += -DHI_HDR_SUPPORT
329endif
330
331ifeq ($(CFG_HI_KEYLED_CT1642_KERNEL_SUPPORT),y)
332CFG_HI_KMOD_CFLAGS += -DHI_KEYLED_CT1642_KERNEL_SUPPORT
333endif
334
335ifeq ($(CFG_HI_MCE_SUPPORT),y)
336CFG_HI_KMOD_CFLAGS += -DHI_MCE_SUPPORT
337endif
338
339ifeq ($(CFG_HI_GPIOI2C_SUPPORT),y)
340CFG_HI_KMOD_CFLAGS += -DHI_GPIOI2C_SUPPORT
341endif
342
343ifeq ($(CFG_HI_VPSS_4K_BYPASS),y)
344CFG_HI_KMOD_CFLAGS += -DHI_VPSS_4K_BYPASS
345endif
346## common and other modules will use drv_mem_ext.h, which refer to the CMN_MMGR_SUPPORT
347ifeq (y,$(CFG_HI_MEMMGR_SUPPORT))
348CFG_HI_KMOD_CFLAGS += -DCMN_MMGR_SUPPORT
349endif
350
351## common and other modules will use hi_debug.h, which refers to the HI_LOG_LEVEL
352ifeq (y,$(CFG_HI_LOG_SUPPORT))
353CFG_HI_KMOD_CFLAGS += -DHI_LOG_SUPPORT=1
354ifdef CFG_HI_LOG_LEVEL
355CFG_HI_KMOD_CFLAGS += -DHI_LOG_LEVEL=$(CFG_HI_LOG_LEVEL)
356else
357CFG_HI_KMOD_CFLAGS += -DHI_LOG_LEVEL=1
358endif
359else
360CFG_HI_KMOD_CFLAGS += -DHI_LOG_SUPPORT=0
361endif
362ifeq (y,$(CFG_HI_PROC_SUPPORT))
363CFG_HI_KMOD_CFLAGS += -DHI_PROC_SUPPORT=1
364else
365CFG_HI_KMOD_CFLAGS += -DHI_PROC_SUPPORT=0
366endif
367
368ifeq ($(CFG_HI_LOADER_APPLOADER),y)
369CFG_HI_KMOD_CFLAGS += -DHI_LOADER_APPLOADER
370endif
371
372ifeq ($(CFG_HI_LOADER_RECOVERY),y)
373CFG_HI_KMOD_CFLAGS += -DHI_LOADER_RECOVERY
374endif
375
376ifeq ($(CFG_HI_KEYLED_SUPPORT),y)
377CFG_HI_KMOD_CFLAGS += -DHI_KEYLED_SUPPORT
378endif
379
380ifeq ($(CFG_HI_HDMI_SUPPORT_HDCP),y)
381CFG_HI_KMOD_CFLAGS += -DHI_HDCP_SUPPORT
382endif
383
384ifeq ($(CFG_HI_SCI_SUPPORT),y)
385CFG_HI_KMOD_CFLAGS += -DHI_SCI_SUPPORT
386endif
387
388ifeq ($(CFG_HI_VI_SUPPORT),y)
389CFG_HI_KMOD_CFLAGS += -DHI_VI_SUPPORT
390endif
391
392ifeq ($(CFG_HI_PVR_SUPPORT),y)
393CFG_HI_KMOD_CFLAGS += -DHI_PVR_SUPPORT
394endif
395
396ifeq ($(CFG_HI_VENC_SUPPORT),y)
397CFG_HI_KMOD_CFLAGS += -DHI_VENC_SUPPORT
398endif
399
400ifeq ($(CFG_HI_AENC_SUPPORT),y)
401CFG_HI_KMOD_CFLAGS += -DHI_AENC_SUPPORT
402endif
403
404ifeq ($(CFG_HI_SND_AMP_SUPPORT),y)
405CFG_HI_KMOD_CFLAGS += -DHI_SND_AMP_SUPPORT
406endif
407
408ifeq ($(CFG_HI_BOOT_MUSIC_SUPPORT),y)
409CFG_HI_KMOD_CFLAGS += -DHI_BOOT_MUSIC_SUPPORT
410CFG_HI_CFLAGS 	   += -DHI_BOOT_MUSIC_SUPPORT
411endif
412
413ifeq ($(CFG_V553_DTB_DIFF),y)
414CFG_HI_KMOD_CFLAGS += -DHI3751V553_SUPPORT
415CFG_HI_CFLAGS 	   += -DHI3751V553_SUPPORT
416endif
417
418ifeq ($(CFG_HI_ADVCA_SUPPORT),y)
419    CFG_HI_KMOD_CFLAGS += -DHI_ADVCA_SUPPORT
420    CFG_HI_KMOD_CFLAGS += -DHI_ADVCA_TYPE_$(CFG_HI_ADVCA_TYPE)
421
422    ifdef CFG_HI_ADVCA_FUNCTION
423        ifeq ($(CFG_HI_ADVCA_FUNCTION),FINAL)
424            CFG_HI_KMOD_CFLAGS += -DHI_ADVCA_FUNCTION_RELEASE
425        else
426            CFG_HI_KMOD_CFLAGS += -DHI_ADVCA_FUNCTION_$(CFG_HI_ADVCA_FUNCTION)
427        endif
428    endif
429endif
430
431ifeq ($(CFG_HI_TVP_SUPPORT),y)
432CFG_HI_KMOD_CFLAGS += -DHI_TEE_SUPPORT
433CFG_HI_KMOD_CFLAGS += -DHI_TVP_SUPPORT
434endif
435#=============BOARD CONFIGURATION OPTIONS=====================================================
436
437CFG_HI_BOARD_CONFIGS += -I${HI_BOARD_HEAD_FILE_DIR} -D${CFG_HI_DDRC_CHANNEL_TYPE}
438
439## FPGA/ASIC VERSION CONTROL
440ifeq ($(CFG_HI_FPGA),y)
441CFG_HI_BOARD_CONFIGS += -DHI_FPGA
442endif
443
444#=============TUNER BASIC ATTRIBUTE OPTIONS===================
445CFG_HI_BOARD_CONFIGS += -DHI_TUNER_NUMBER=$(CFG_HI_TUNER_NUMBER)
446
447CFG_HI_BOARD_CONFIGS += -DHI_TUNER0_ID=0
448
449ifeq ($(CFG_HI_TUNER_SIGNAL_CAB),y)
450CFG_HI_BOARD_CONFIGS += -DHI_TUNER_SIGNAL_TYPE=0
451endif
452ifeq ($(CFG_HI_TUNER_SIGNAL_SAT),y)
453CFG_HI_BOARD_CONFIGS += -DHI_TUNER_SIGNAL_TYPE=1
454endif
455ifeq ($(CFG_HI_TUNER_SIGNAL_DVB_T),y)
456CFG_HI_BOARD_CONFIGS += -DHI_TUNER_SIGNAL_TYPE=2
457endif
458ifeq ($(CFG_HI_TUNER_SIGNAL_DVB_T2),y)
459CFG_HI_BOARD_CONFIGS += -DHI_TUNER_SIGNAL_TYPE=3
460endif
461ifeq ($(CFG_HI_TUNER_SIGNAL_ISDB_T),y)
462CFG_HI_BOARD_CONFIGS += -DHI_TUNER_SIGNAL_TYPE=4
463endif
464ifeq ($(CFG_HI_TUNER_SIGNAL_ATSC_T),y)
465CFG_HI_BOARD_CONFIGS += -DHI_TUNER_SIGNAL_TYPE=5
466endif
467ifeq ($(CFG_HI_TUNER_SIGNAL_DTMB),y)
468CFG_HI_BOARD_CONFIGS += -DHI_TUNER_SIGNAL_TYPE=6
469endif
470ifeq ($(CFG_HI_TUNER_SIGNAL_J83B),y)
471CFG_HI_BOARD_CONFIGS += -DHI_TUNER_SIGNAL_TYPE=7
472endif
473
474ifeq (${CFG_HI_TUNER_DEV_TYPE_XG_3BL},y)
475CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=0
476endif
477ifeq (${CFG_HI_TUNER_DEV_TYPE_CD1616},y)
478CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=1
479endif
480ifeq (${CFG_HI_TUNER_DEV_TYPE_ALPS_TDAE},y)
481CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=2
482endif
483ifeq (${CFG_HI_TUNER_DEV_TYPE_TDCC},y)
484CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=3
485endif
486ifeq (${CFG_HI_TUNER_DEV_TYPE_TDA18250},y)
487CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=4
488endif
489ifeq (${CFG_HI_TUNER_DEV_TYPE_CD1616_DOUBLE},y)
490CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=5
491endif
492ifeq (${CFG_HI_TUNER_DEV_TYPE_MT2081},y)
493CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=6
494endif
495ifeq (${CFG_HI_TUNER_DEV_TYPE_TMX7070X},y)
496CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=7
497endif
498ifeq (${CFG_HI_TUNER_DEV_TYPE_R820C},y)
499CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=8
500endif
501ifeq (${CFG_HI_TUNER_DEV_TYPE_MXL203},y)
502CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=9
503endif
504ifeq (${CFG_HI_TUNER_DEV_TYPE_AV2011},y)
505CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=10
506endif
507ifeq (${CFG_HI_TUNER_DEV_TYPE_SHARP7903},y)
508CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=11
509endif
510ifeq (${CFG_HI_TUNER_DEV_TYPE_MXL101},y)
511CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=12
512endif
513ifeq (${CFG_HI_TUNER_DEV_TYPE_MXL603},y)
514CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=13
515endif
516ifeq (${CFG_HI_TUNER_DEV_TYPE_IT9170},y)
517CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=14
518endif
519ifeq (${CFG_HI_TUNER_DEV_TYPE_IT9133},y)
520CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=15
521endif
522ifeq (${CFG_HI_TUNER_DEV_TYPE_TDA6651},y)
523CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=16
524endif
525ifeq (${CFG_HI_TUNER_DEV_TYPE_TDA18250B},y)
526CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=17
527endif
528ifeq (${CFG_HI_TUNER_DEV_TYPE_M88TS2022},y)
529CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=18
530endif
531ifeq (${CFG_HI_TUNER_DEV_TYPE_RDA5815},y)
532CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=19
533endif
534ifeq (${CFG_HI_TUNER_DEV_TYPE_MXL254},y)
535CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=20
536endif
537ifeq (${CFG_HI_TUNER_DEV_TYPE_CXD2861},y)
538CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=21
539endif
540ifeq (${CFG_HI_TUNER_DEV_TYPE_TDA18273},y)
541CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=22
542endif
543ifeq (${CFG_HI_TUNER_DEV_TYPE_TDA18275},y)
544CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=23
545endif
546ifeq (${CFG_HI_TUNER_DEV_TYPE_R840},y)
547CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=24
548endif
549ifeq (${CFG_HI_TUNER_DEV_TYPE_MXL661},y)
550CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=25
551endif
552ifeq (${CFG_HI_TUNER_DEV_TYPE_MXL601},y)
553CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=26
554endif
555ifeq (${CFG_HI_TUNER_DEV_TYPE_TDA18275A},y)
556CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=27
557endif
558ifeq (${CFG_HI_TUNER_DEV_TYPE_SI2151},y)
559CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=28
560endif
561ifeq (${CFG_HI_TUNER_DEV_TYPE_R842},y)
562CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=29
563endif
564ifeq (${CFG_HI_TUNER_DEV_TYPE_AV2018},y)
565CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=30
566endif
567ifeq (${CFG_HI_TUNER_DEV_TYPE_ATBM2040},y)
568CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=31
569endif
570ifeq (${CFG_HI_TUNER_DEV_TYPE_ATBM253},y)
571CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=32
572endif
573ifeq (${CFG_HI_TUNER_DEV_TYPE_RT710},y)
574CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TYPE=33
575endif
576
577ifneq (${CFG_HI_TUNER_DEV_ADDR},)
578CFG_HI_BOARD_CONFIGS += -DHI_TUNER_DEV_ADDR=${CFG_HI_TUNER_DEV_ADDR}
579else
580CFG_HI_BOARD_CONFIGS += -DHI_TUNER_DEV_ADDR=0xc6
581endif
582
583ifeq (${CFG_HI_DEMOD_DEV_TYPE_NONE},y)
584CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=0
585endif
586ifeq (${CFG_HI_DEMOD_DEV_TYPE_3130I},y)
587CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=256
588endif
589ifeq (${CFG_HI_DEMOD_DEV_TYPE_3130E},y)
590CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=257
591endif
592ifeq (${CFG_HI_DEMOD_DEV_TYPE_J83B},y)
593CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=258
594endif
595ifeq (${CFG_HI_DEMOD_DEV_TYPE_AVL6211},y)
596CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=259
597endif
598ifeq (${CFG_HI_DEMOD_DEV_TYPE_MXL101},y)
599CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=260
600endif
601ifeq (${CFG_HI_DEMOD_DEV_TYPE_MN88472},y)
602CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=261
603endif
604ifeq (${CFG_HI_DEMOD_DEV_TYPE_IT9170},y)
605CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=262
606endif
607ifeq (${CFG_HI_DEMOD_DEV_TYPE_IT9133},y)
608CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=263
609endif
610ifeq (${CFG_HI_DEMOD_DEV_TYPE_3136},y)
611CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=264
612endif
613ifeq (${CFG_HI_DEMOD_DEV_TYPE_3136I},y)
614CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=265
615endif
616ifeq (${CFG_HI_DEMOD_DEV_TYPE_MXL254},y)
617CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=266
618endif
619ifeq (${CFG_HI_DEMOD_DEV_TYPE_CXD2837},y)
620CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=267
621endif
622ifeq (${CFG_HI_DEMOD_DEV_TYPE_TDA8296I},y)
623CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=268
624endif
625ifeq (${CFG_HI_DEMOD_DEV_TYPE_ATBM8878},y)
626CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=269
627endif
628ifeq (${CFG_HI_DEMOD_DEV_TYPE_HIDTV100},y)
629CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=270
630endif
631ifeq (${CFG_HI_DEMOD_DEV_TYPE_ATBM7823},y)
632CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=272
633endif
634ifeq (${CFG_HI_DEMOD_DEV_TYPE_HI3137},y)
635CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=273
636endif
637ifeq (${CFG_HI_DEMOD_DEV_TYPE_SI2180},y)
638CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=274
639endif
640ifeq (${CFG_HI_DEMOD_DEV_TYPE_HIDTV200},y)
641CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=275
642endif
643ifeq (${HI_UNF_DEMOD_DEV_TYPE_HD2312A},y)
644CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=276
645endif
646ifeq (${CFG_HI_DEMOD_DEV_TYPE_ATBM783X},y)
647CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=277
648endif
649ifeq (${CFG_HI_DEMOD_DEV_TYPE_HI3138},y)
650CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=278
651endif
652ifeq (${CFG_HI_DEMOD_DEV_TYPE_HIDTV210},y)
653CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=279
654endif
655ifeq (${CFG_HI_DEMOD_DEV_TYPE_ATBM888X},y)
656CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TYPE=280
657endif
658
659ifneq (${CFG_HI_DEMOD_DEV_ADDR},)
660CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_DEV_ADDR=${CFG_HI_DEMOD_DEV_ADDR}
661else
662CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_DEV_ADDR=0xb6
663endif
664
665ifeq (${CFG_HI_DEMOD_TS_DEFAULT},y)
666CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TS_MODE=0
667endif
668ifeq (${CFG_HI_DEMOD_TS_PARALLEL_MODE_A},y)
669CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TS_MODE=1
670endif
671ifeq (${CFG_HI_DEMOD_TS_PARALLEL_MODE_B},y)
672CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TS_MODE=2
673endif
674ifeq (${CFG_HI_DEMOD_TS_SERIAL},y)
675CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TS_MODE=3
676endif
677ifeq (${CFG_HI_DEMOD_TS_SERIAL_50},y)
678CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TS_MODE=4
679endif
680ifeq (${CFG_HI_DEMOD_TS_SERIAL_2BIT},y)
681CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_TS_MODE=5
682endif
683
684ifneq (${CFG_HI_DEMOD_I2C_CHANNEL},)
685CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_I2C_CHANNEL=${CFG_HI_DEMOD_I2C_CHANNEL}
686else
687CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_I2C_CHANNEL=1
688endif
689
690ifneq (${CFG_HI_DEMOD_RESET_GPIO},)
691CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_RESET_GPIO=${CFG_HI_DEMOD_RESET_GPIO}
692else
693CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_RESET_GPIO=0
694endif
695
696ifneq (${CFG_HI_DEMUX_PORT},)
697CFG_HI_BOARD_CONFIGS += -DHI_DEMUX_PORT=${CFG_HI_DEMUX_PORT}
698else
699CFG_HI_BOARD_CONFIGS += -DHI_DEMUX_PORT=0
700endif
701
702#=============TUNER SATELLITE ATTRIBUTE OPTIONS===================
703ifneq (${CFG_HI_DEMOD_REF_CLOCK},)
704CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_REF_CLOCK=${CFG_HI_DEMOD_REF_CLOCK}
705else
706CFG_HI_BOARD_CONFIGS += -DHI_DEMOD_REF_CLOCK=24000
707endif
708
709ifneq (${CFG_HI_TUNER_MAX_LPF},)
710CFG_HI_BOARD_CONFIGS += -DHI_TUNER_MAX_LPF=${CFG_HI_TUNER_MAX_LPF}
711else
712CFG_HI_BOARD_CONFIGS += -DHI_TUNER_MAX_LPF=34
713endif
714
715ifneq (${CFG_HI_TUNER_I2C_CLOCK},)
716CFG_HI_BOARD_CONFIGS += -DHI_TUNER_I2C_CLOCK=${CFG_HI_TUNER_I2C_CLOCK}
717else
718CFG_HI_BOARD_CONFIGS += -DHI_TUNER_I2C_CLOCK=400
719endif
720
721ifeq (${CFG_HI_TUNER_RFAGC_INVERT},y)
722CFG_HI_BOARD_CONFIGS += -DHI_TUNER_RFAGC=0
723endif
724ifeq (${CFG_HI_TUNER_RFAGC_NORMAL},y)
725CFG_HI_BOARD_CONFIGS += -DHI_TUNER_RFAGC=1
726endif
727
728ifeq (${CFG_HI_TUNER_IQSPECTRUM_NORMAL},y)
729CFG_HI_BOARD_CONFIGS += -DHI_TUNER_IQSPECTRUM=0
730endif
731ifeq (${CFG_HI_TUNER_IQSPECTRUM_INVERT},y)
732CFG_HI_BOARD_CONFIGS += -DHI_TUNER_IQSPECTRUM=1
733endif
734
735ifeq (${CFG_HI_TUNER_TSCLK_POLAR_FALLING},y)
736CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TSCLK_POLAR=0
737endif
738ifeq (${CFG_HI_TUNER_TSCLK_POLAR_RISING},y)
739CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TSCLK_POLAR=1
740endif
741
742ifeq (${CFG_HI_TUNER_TS_FORMAT_TS},y)
743CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TS_FORMAT=0
744endif
745ifeq (${CFG_HI_TUNER_TS_FORMAT_TSP},y)
746CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TS_FORMAT=1
747endif
748
749ifeq (${CFG_HI_TUNER_TS_SERIAL_PIN_0},y)
750CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TS_SERIAL_PIN=0
751endif
752ifeq (${CFG_HI_TUNER_TS_SERIAL_PIN_7},y)
753CFG_HI_BOARD_CONFIGS += -DHI_TUNER_TS_SERIAL_PIN=1
754endif
755
756ifeq (${CFG_HI_TUNER_DISEQCWAVE_NORMAL},y)
757CFG_HI_BOARD_CONFIGS += -DHI_TUNER_DISEQCWAVE=0
758endif
759ifeq (${CFG_HI_TUNER_DISEQCWAVE_ENVELOPE},y)
760CFG_HI_BOARD_CONFIGS += -DHI_TUNER_DISEQCWAVE=1
761endif
762
763ifeq (${CFG_HI_LNBCTRL_DEV_TYPE_NONE},y)
764CFG_HI_BOARD_CONFIGS += -DHI_LNBCTRL_DEV_TYPE=0
765endif
766ifeq (${CFG_HI_LNBCTRL_DEV_TYPE_MPS8125},y)
767CFG_HI_BOARD_CONFIGS += -DHI_LNBCTRL_DEV_TYPE=1
768endif
769ifeq (${CFG_HI_LNBCTRL_DEV_TYPE_ISL9492},y)
770CFG_HI_BOARD_CONFIGS += -DHI_LNBCTRL_DEV_TYPE=2
771endif
772ifeq (${CFG_HI_LNBCTRL_DEV_TYPE_TPS65233},y)
773CFG_HI_BOARD_CONFIGS += -DHI_LNBCTRL_DEV_TYPE=3
774endif
775ifeq (${CFG_HI_LNBCTRL_DEV_TYPE_LNBH25},y)
776CFG_HI_BOARD_CONFIGS += -DHI_LNBCTRL_DEV_TYPE=4
777endif
778ifeq (${CFG_HI_LNBCTRL_DEV_TYPE_STI8036},y)
779CFG_HI_BOARD_CONFIGS += -DHI_LNBCTRL_DEV_TYPE=5
780endif
781
782ifneq (${CFG_HI_LNBCTRL_DEV_ADDR},)
783CFG_HI_BOARD_CONFIGS += -DHI_LNBCTRL_DEV_ADDR=${CFG_HI_LNBCTRL_DEV_ADDR}
784else
785CFG_HI_BOARD_CONFIGS += -DHI_LNBCTRL_DEV_ADDR=0x0
786endif
787
788#=============TUNER TSOUT OPTIONS===================
789ifeq (${CFG_HI_TUNER_OUTPUT_PIN0_TSDAT0},y)
790CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN0=0
791endif
792ifeq (${CFG_HI_TUNER_OUTPUT_PIN0_TSDAT1},y)
793CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN0=1
794endif
795ifeq (${CFG_HI_TUNER_OUTPUT_PIN0_TSDAT2},y)
796CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN0=2
797endif
798ifeq (${CFG_HI_TUNER_OUTPUT_PIN0_TSDAT3},y)
799CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN0=3
800endif
801ifeq (${CFG_HI_TUNER_OUTPUT_PIN0_TSDAT4},y)
802CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN0=4
803endif
804ifeq (${CFG_HI_TUNER_OUTPUT_PIN0_TSDAT5},y)
805CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN0=5
806endif
807ifeq (${CFG_HI_TUNER_OUTPUT_PIN0_TSDAT6},y)
808CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN0=6
809endif
810ifeq (${CFG_HI_TUNER_OUTPUT_PIN0_TSDAT7},y)
811CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN0=7
812endif
813ifeq (${CFG_HI_TUNER_OUTPUT_PIN0_TSVLD},y)
814CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN0=8
815endif
816ifeq (${CFG_HI_TUNER_OUTPUT_PIN0_TSSYNC},y)
817CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN0=9
818endif
819ifeq (${CFG_HI_TUNER_OUTPUT_PIN0_TSERR},y)
820CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN0=10
821endif
822
823ifeq (${CFG_HI_TUNER_OUTPUT_PIN1_TSDAT0},y)
824CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN1=0
825endif
826ifeq (${CFG_HI_TUNER_OUTPUT_PIN1_TSDAT1},y)
827CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN1=1
828endif
829ifeq (${CFG_HI_TUNER_OUTPUT_PIN1_TSDAT2},y)
830CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN1=2
831endif
832ifeq (${CFG_HI_TUNER_OUTPUT_PIN1_TSDAT3},y)
833CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN1=3
834endif
835ifeq (${CFG_HI_TUNER_OUTPUT_PIN1_TSDAT4},y)
836CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN1=4
837endif
838ifeq (${CFG_HI_TUNER_OUTPUT_PIN1_TSDAT5},y)
839CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN1=5
840endif
841ifeq (${CFG_HI_TUNER_OUTPUT_PIN1_TSDAT6},y)
842CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN1=6
843endif
844ifeq (${CFG_HI_TUNER_OUTPUT_PIN1_TSDAT7},y)
845CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN1=7
846endif
847ifeq (${CFG_HI_TUNER_OUTPUT_PIN1_TSVLD},y)
848CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN1=8
849endif
850ifeq (${CFG_HI_TUNER_OUTPUT_PIN1_TSSYNC},y)
851CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN1=9
852endif
853ifeq (${CFG_HI_TUNER_OUTPUT_PIN1_TSERR},y)
854CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN1=10
855endif
856
857ifeq (${CFG_HI_TUNER_OUTPUT_PIN2_TSDAT0},y)
858CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN2=0
859endif
860ifeq (${CFG_HI_TUNER_OUTPUT_PIN2_TSDAT1},y)
861CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN2=1
862endif
863ifeq (${CFG_HI_TUNER_OUTPUT_PIN2_TSDAT2},y)
864CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN2=2
865endif
866ifeq (${CFG_HI_TUNER_OUTPUT_PIN2_TSDAT3},y)
867CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN2=3
868endif
869ifeq (${CFG_HI_TUNER_OUTPUT_PIN2_TSDAT4},y)
870CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN2=4
871endif
872ifeq (${CFG_HI_TUNER_OUTPUT_PIN2_TSDAT5},y)
873CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN2=5
874endif
875ifeq (${CFG_HI_TUNER_OUTPUT_PIN2_TSDAT6},y)
876CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN2=6
877endif
878ifeq (${CFG_HI_TUNER_OUTPUT_PIN2_TSDAT7},y)
879CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN2=7
880endif
881ifeq (${CFG_HI_TUNER_OUTPUT_PIN2_TSVLD},y)
882CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN2=8
883endif
884ifeq (${CFG_HI_TUNER_OUTPUT_PIN2_TSSYNC},y)
885CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN2=9
886endif
887ifeq (${CFG_HI_TUNER_OUTPUT_PIN2_TSERR},y)
888CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN2=10
889endif
890
891ifeq (${CFG_HI_TUNER_OUTPUT_PIN3_TSDAT0},y)
892CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN3=0
893endif
894ifeq (${CFG_HI_TUNER_OUTPUT_PIN3_TSDAT1},y)
895CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN3=1
896endif
897ifeq (${CFG_HI_TUNER_OUTPUT_PIN3_TSDAT2},y)
898CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN3=2
899endif
900ifeq (${CFG_HI_TUNER_OUTPUT_PIN3_TSDAT3},y)
901CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN3=3
902endif
903ifeq (${CFG_HI_TUNER_OUTPUT_PIN3_TSDAT4},y)
904CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN3=4
905endif
906ifeq (${CFG_HI_TUNER_OUTPUT_PIN3_TSDAT5},y)
907CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN3=5
908endif
909ifeq (${CFG_HI_TUNER_OUTPUT_PIN3_TSDAT6},y)
910CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN3=6
911endif
912ifeq (${CFG_HI_TUNER_OUTPUT_PIN3_TSDAT7},y)
913CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN3=7
914endif
915ifeq (${CFG_HI_TUNER_OUTPUT_PIN3_TSVLD},y)
916CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN3=8
917endif
918ifeq (${CFG_HI_TUNER_OUTPUT_PIN3_TSSYNC},y)
919CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN3=9
920endif
921ifeq (${CFG_HI_TUNER_OUTPUT_PIN3_TSERR},y)
922CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN3=10
923endif
924
925ifeq (${CFG_HI_TUNER_OUTPUT_PIN4_TSDAT0},y)
926CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN4=0
927endif
928ifeq (${CFG_HI_TUNER_OUTPUT_PIN4_TSDAT1},y)
929CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN4=1
930endif
931ifeq (${CFG_HI_TUNER_OUTPUT_PIN4_TSDAT2},y)
932CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN4=2
933endif
934ifeq (${CFG_HI_TUNER_OUTPUT_PIN4_TSDAT3},y)
935CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN4=3
936endif
937ifeq (${CFG_HI_TUNER_OUTPUT_PIN4_TSDAT4},y)
938CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN4=4
939endif
940ifeq (${CFG_HI_TUNER_OUTPUT_PIN4_TSDAT5},y)
941CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN4=5
942endif
943ifeq (${CFG_HI_TUNER_OUTPUT_PIN4_TSDAT6},y)
944CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN4=6
945endif
946ifeq (${CFG_HI_TUNER_OUTPUT_PIN4_TSDAT7},y)
947CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN4=7
948endif
949ifeq (${CFG_HI_TUNER_OUTPUT_PIN4_TSVLD},y)
950CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN4=8
951endif
952ifeq (${CFG_HI_TUNER_OUTPUT_PIN4_TSSYNC},y)
953CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN4=9
954endif
955ifeq (${CFG_HI_TUNER_OUTPUT_PIN4_TSERR},y)
956CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN4=10
957endif
958
959ifeq (${CFG_HI_TUNER_OUTPUT_PIN5_TSDAT0},y)
960CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN5=0
961endif
962ifeq (${CFG_HI_TUNER_OUTPUT_PIN5_TSDAT1},y)
963CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN5=1
964endif
965ifeq (${CFG_HI_TUNER_OUTPUT_PIN5_TSDAT2},y)
966CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN5=2
967endif
968ifeq (${CFG_HI_TUNER_OUTPUT_PIN5_TSDAT3},y)
969CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN5=3
970endif
971ifeq (${CFG_HI_TUNER_OUTPUT_PIN5_TSDAT4},y)
972CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN5=4
973endif
974ifeq (${CFG_HI_TUNER_OUTPUT_PIN5_TSDAT5},y)
975CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN5=5
976endif
977ifeq (${CFG_HI_TUNER_OUTPUT_PIN5_TSDAT6},y)
978CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN5=6
979endif
980ifeq (${CFG_HI_TUNER_OUTPUT_PIN5_TSDAT7},y)
981CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN5=7
982endif
983ifeq (${CFG_HI_TUNER_OUTPUT_PIN5_TSVLD},y)
984CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN5=8
985endif
986ifeq (${CFG_HI_TUNER_OUTPUT_PIN5_TSSYNC},y)
987CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN5=9
988endif
989ifeq (${CFG_HI_TUNER_OUTPUT_PIN5_TSERR},y)
990CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN5=10
991endif
992
993ifeq (${CFG_HI_TUNER_OUTPUT_PIN6_TSDAT0},y)
994CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN6=0
995endif
996ifeq (${CFG_HI_TUNER_OUTPUT_PIN6_TSDAT1},y)
997CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN6=1
998endif
999ifeq (${CFG_HI_TUNER_OUTPUT_PIN6_TSDAT2},y)
1000CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN6=2
1001endif
1002ifeq (${CFG_HI_TUNER_OUTPUT_PIN6_TSDAT3},y)
1003CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN6=3
1004endif
1005ifeq (${CFG_HI_TUNER_OUTPUT_PIN6_TSDAT4},y)
1006CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN6=4
1007endif
1008ifeq (${CFG_HI_TUNER_OUTPUT_PIN6_TSDAT5},y)
1009CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN6=5
1010endif
1011ifeq (${CFG_HI_TUNER_OUTPUT_PIN6_TSDAT6},y)
1012CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN6=6
1013endif
1014ifeq (${CFG_HI_TUNER_OUTPUT_PIN6_TSDAT7},y)
1015CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN6=7
1016endif
1017ifeq (${CFG_HI_TUNER_OUTPUT_PIN6_TSVLD},y)
1018CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN6=8
1019endif
1020ifeq (${CFG_HI_TUNER_OUTPUT_PIN6_TSSYNC},y)
1021CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN6=9
1022endif
1023ifeq (${CFG_HI_TUNER_OUTPUT_PIN6_TSERR},y)
1024CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN6=10
1025endif
1026
1027ifeq (${CFG_HI_TUNER_OUTPUT_PIN7_TSDAT0},y)
1028CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN7=0
1029endif
1030ifeq (${CFG_HI_TUNER_OUTPUT_PIN7_TSDAT1},y)
1031CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN7=1
1032endif
1033ifeq (${CFG_HI_TUNER_OUTPUT_PIN7_TSDAT2},y)
1034CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN7=2
1035endif
1036ifeq (${CFG_HI_TUNER_OUTPUT_PIN7_TSDAT3},y)
1037CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN7=3
1038endif
1039ifeq (${CFG_HI_TUNER_OUTPUT_PIN7_TSDAT4},y)
1040CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN7=4
1041endif
1042ifeq (${CFG_HI_TUNER_OUTPUT_PIN7_TSDAT5},y)
1043CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN7=5
1044endif
1045ifeq (${CFG_HI_TUNER_OUTPUT_PIN7_TSDAT6},y)
1046CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN7=6
1047endif
1048ifeq (${CFG_HI_TUNER_OUTPUT_PIN7_TSDAT7},y)
1049CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN7=7
1050endif
1051ifeq (${CFG_HI_TUNER_OUTPUT_PIN7_TSVLD},y)
1052CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN7=8
1053endif
1054ifeq (${CFG_HI_TUNER_OUTPUT_PIN7_TSSYNC},y)
1055CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN7=9
1056endif
1057ifeq (${CFG_HI_TUNER_OUTPUT_PIN7_TSERR},y)
1058CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN7=10
1059endif
1060
1061ifeq (${CFG_HI_TUNER_OUTPUT_PIN8_TSDAT0},y)
1062CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN8=0
1063endif
1064ifeq (${CFG_HI_TUNER_OUTPUT_PIN8_TSDAT1},y)
1065CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN8=1
1066endif
1067ifeq (${CFG_HI_TUNER_OUTPUT_PIN8_TSDAT2},y)
1068CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN8=2
1069endif
1070ifeq (${CFG_HI_TUNER_OUTPUT_PIN8_TSDAT3},y)
1071CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN8=3
1072endif
1073ifeq (${CFG_HI_TUNER_OUTPUT_PIN8_TSDAT4},y)
1074CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN8=4
1075endif
1076ifeq (${CFG_HI_TUNER_OUTPUT_PIN8_TSDAT5},y)
1077CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN8=5
1078endif
1079ifeq (${CFG_HI_TUNER_OUTPUT_PIN8_TSDAT6},y)
1080CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN8=6
1081endif
1082ifeq (${CFG_HI_TUNER_OUTPUT_PIN8_TSDAT7},y)
1083CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN8=7
1084endif
1085ifeq (${CFG_HI_TUNER_OUTPUT_PIN8_TSVLD},y)
1086CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN8=8
1087endif
1088ifeq (${CFG_HI_TUNER_OUTPUT_PIN8_TSSYNC},y)
1089CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN8=9
1090endif
1091ifeq (${CFG_HI_TUNER_OUTPUT_PIN8_TSERR},y)
1092CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN8=10
1093endif
1094
1095ifeq (${CFG_HI_TUNER_OUTPUT_PIN9_TSDAT0},y)
1096CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN9=0
1097endif
1098ifeq (${CFG_HI_TUNER_OUTPUT_PIN9_TSDAT1},y)
1099CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN9=1
1100endif
1101ifeq (${CFG_HI_TUNER_OUTPUT_PIN9_TSDAT2},y)
1102CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN9=2
1103endif
1104ifeq (${CFG_HI_TUNER_OUTPUT_PIN9_TSDAT3},y)
1105CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN9=3
1106endif
1107ifeq (${CFG_HI_TUNER_OUTPUT_PIN9_TSDAT4},y)
1108CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN9=4
1109endif
1110ifeq (${CFG_HI_TUNER_OUTPUT_PIN9_TSDAT5},y)
1111CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN9=5
1112endif
1113ifeq (${CFG_HI_TUNER_OUTPUT_PIN9_TSDAT6},y)
1114CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN9=6
1115endif
1116ifeq (${CFG_HI_TUNER_OUTPUT_PIN9_TSDAT7},y)
1117CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN9=7
1118endif
1119ifeq (${CFG_HI_TUNER_OUTPUT_PIN9_TSVLD},y)
1120CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN9=8
1121endif
1122ifeq (${CFG_HI_TUNER_OUTPUT_PIN9_TSSYNC},y)
1123CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN9=9
1124endif
1125ifeq (${CFG_HI_TUNER_OUTPUT_PIN9_TSERR},y)
1126CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN9=10
1127endif
1128
1129ifeq (${CFG_HI_TUNER_OUTPUT_PIN10_TSDAT0},y)
1130CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN10=0
1131endif
1132ifeq (${CFG_HI_TUNER_OUTPUT_PIN10_TSDAT1},y)
1133CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN10=1
1134endif
1135ifeq (${CFG_HI_TUNER_OUTPUT_PIN10_TSDAT2},y)
1136CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN10=2
1137endif
1138ifeq (${CFG_HI_TUNER_OUTPUT_PIN10_TSDAT3},y)
1139CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN10=3
1140endif
1141ifeq (${CFG_HI_TUNER_OUTPUT_PIN10_TSDAT4},y)
1142CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN10=4
1143endif
1144ifeq (${CFG_HI_TUNER_OUTPUT_PIN10_TSDAT5},y)
1145CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN10=5
1146endif
1147ifeq (${CFG_HI_TUNER_OUTPUT_PIN10_TSDAT6},y)
1148CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN10=6
1149endif
1150ifeq (${CFG_HI_TUNER_OUTPUT_PIN10_TSDAT7},y)
1151CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN10=7
1152endif
1153ifeq (${CFG_HI_TUNER_OUTPUT_PIN10_TSVLD},y)
1154CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN10=8
1155endif
1156ifeq (${CFG_HI_TUNER_OUTPUT_PIN10_TSSYNC},y)
1157CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN10=9
1158endif
1159ifeq (${CFG_HI_TUNER_OUTPUT_PIN10_TSERR},y)
1160CFG_HI_BOARD_CONFIGS += -DHI_TUNER_OUTPUT_PIN10=10
1161endif
1162
1163ifeq ($(CFG_HI_TUNER1_SIGNAL_TYPE), cable)
1164CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_SIGNAL_TYPE=0
1165endif
1166ifeq ($(CFG_HI_TUNER1_SIGNAL_TYPE), dvbt)
1167CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_SIGNAL_TYPE=2
1168endif
1169ifeq ($(CFG_HI_TUNER1_SIGNAL_TYPE), dvbt2)
1170CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_SIGNAL_TYPE=3
1171endif
1172
1173ifeq ($(CFG_HI_TUNER1_DEV_TYPE), xg_3bl)
1174CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=0
1175endif
1176ifeq ($(CFG_HI_TUNER1_DEV_TYPE), cd1616)
1177CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=1
1178endif
1179ifeq ($(CFG_HI_TUNER1_DEV_TYPE), alps_tdae)
1180CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=2
1181endif
1182ifeq ($(CFG_HI_TUNER1_DEV_TYPE), tdcc)
1183CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=3
1184endif
1185ifeq ($(CFG_HI_TUNER1_DEV_TYPE), tda18250)
1186CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=4
1187endif
1188ifeq ($(CFG_HI_TUNER1_DEV_TYPE), cd1616_double)
1189CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=5
1190endif
1191ifeq ($(CFG_HI_TUNER1_DEV_TYPE), mt2081)
1192CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=6
1193endif
1194ifeq ($(CFG_HI_TUNER1_DEV_TYPE), tmx7070x)
1195CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=7
1196endif
1197ifeq ($(CFG_HI_TUNER1_DEV_TYPE), r820c)
1198CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=8
1199endif
1200ifeq ($(CFG_HI_TUNER1_DEV_TYPE), mxl203)
1201CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=9
1202endif
1203ifeq ($(CFG_HI_TUNER1_DEV_TYPE), av2011)
1204CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=10
1205endif
1206ifeq ($(CFG_HI_TUNER1_DEV_TYPE), sharp7903)
1207CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=11
1208endif
1209ifeq ($(CFG_HI_TUNER1_DEV_TYPE), mxl101)
1210CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=12
1211endif
1212ifeq ($(CFG_HI_TUNER1_DEV_TYPE), mxl603)
1213CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=13
1214endif
1215ifeq ($(CFG_HI_TUNER1_DEV_TYPE), it9170)
1216CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=14
1217endif
1218ifeq ($(CFG_HI_TUNER1_DEV_TYPE), it9133)
1219CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=15
1220endif
1221ifeq ($(CFG_HI_TUNER1_DEV_TYPE), tda6651)
1222CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=16
1223endif
1224ifeq ($(CFG_HI_TUNER1_DEV_TYPE), tda18250b)
1225CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=17
1226endif
1227ifeq ($(CFG_HI_TUNER1_DEV_TYPE), m88ts2022)
1228CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=18
1229endif
1230ifeq ($(CFG_HI_TUNER1_DEV_TYPE), rda5815)
1231CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=19
1232endif
1233ifeq ($(CFG_HI_TUNER1_DEV_TYPE), mxl661)
1234CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=25
1235endif
1236ifeq ($(CFG_HI_TUNER1_DEV_TYPE), si2151)
1237CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=28
1238endif
1239ifeq ($(CFG_HI_TUNER1_DEV_TYPE), r842)
1240CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_TYPE=29
1241endif
1242
1243CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_DEV_ADDR=${CFG_HI_TUNER1_DEV_ADDR}
1244
1245ifeq (${CFG_HI_DEMOD1_DEV_TYPE}, none)
1246CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TYPE=0
1247endif
1248ifeq (${CFG_HI_DEMOD1_DEV_TYPE}, 3130i)
1249CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TYPE=256
1250endif
1251ifeq (${CFG_HI_DEMOD1_DEV_TYPE}, 3130e)
1252CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TYPE=257
1253endif
1254ifeq (${CFG_HI_DEMOD1_DEV_TYPE}, j83b)
1255CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TYPE=258
1256endif
1257ifeq (${CFG_HI_DEMOD1_DEV_TYPE}, avl6211)
1258CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TYPE=259
1259endif
1260ifeq (${CFG_HI_DEMOD1_DEV_TYPE}, mxl101)
1261CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TYPE=260
1262endif
1263ifeq (${CFG_HI_DEMOD1_DEV_TYPE}, mn88472)
1264CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TYPE=261
1265endif
1266ifeq (${CFG_HI_DEMOD1_DEV_TYPE}, it9170)
1267CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TYPE=262
1268endif
1269ifeq (${CFG_HI_DEMOD1_DEV_TYPE}, it9133)
1270CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TYPE=263
1271endif
1272ifeq (${CFG_HI_DEMOD1_DEV_TYPE}, 3136)
1273CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TYPE=264
1274endif
1275ifeq (${CFG_HI_DEMOD1_DEV_TYPE}, 3136i)
1276CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TYPE=265
1277endif
1278ifeq (${CFG_HI_DEMOD1_DEV_TYPE}, 3137)
1279CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TYPE=273
1280endif
1281ifeq (${CFG_HI_DEMOD1_DEV_TYPE}, 3138)
1282CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TYPE=274
1283endif
1284
1285CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_DEV_ADDR=${CFG_HI_DEMOD1_DEV_ADDR}
1286
1287ifeq (${CFG_HI_DEMOD1_TS_MODE}, parallel_a)
1288CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TS_MODE=1
1289endif
1290ifeq (${CFG_HI_DEMOD1_TS_MODE}, parallel_b)
1291CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TS_MODE=2
1292endif
1293ifeq (${CFG_HI_DEMOD1_TS_MODE}, serial)
1294CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TS_MODE=3
1295endif
1296ifeq (${CFG_HI_DEMOD1_TS_MODE}, serial_50)
1297CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TS_MODE=4
1298endif
1299ifeq (${CFG_HI_DEMOD1_TS_MODE}, serial_2bit)
1300CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_TS_MODE=5
1301endif
1302
1303CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_I2C_CHANNEL=${CFG_HI_DEMOD1_I2C_CHANNEL}
1304
1305CFG_HI_BOARD_CONFIGS += -DHI_DEMOD1_RESET_GPIO=${CFG_HI_DEMOD1_RESET_GPIO}
1306
1307CFG_HI_BOARD_CONFIGS += -DHI_DEMUX1_PORT=${CFG_HI_DEMUX1_PORT}
1308
1309#=============TUNER1 TSOUT OPTIONS===================
1310ifeq (${CFG_HI_TUNER1_OUTPUT_PIN0_TSDAT0},y)
1311CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN0=0
1312endif
1313ifeq (${CFG_HI_TUNER1_OUTPUT_PIN0_TSDAT1},y)
1314CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN0=1
1315endif
1316ifeq (${CFG_HI_TUNER1_OUTPUT_PIN0_TSDAT2},y)
1317CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN0=2
1318endif
1319ifeq (${CFG_HI_TUNER1_OUTPUT_PIN0_TSDAT3},y)
1320CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN0=3
1321endif
1322ifeq (${CFG_HI_TUNER1_OUTPUT_PIN0_TSDAT4},y)
1323CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN0=4
1324endif
1325ifeq (${CFG_HI_TUNER1_OUTPUT_PIN0_TSDAT5},y)
1326CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN0=5
1327endif
1328ifeq (${CFG_HI_TUNER1_OUTPUT_PIN0_TSDAT6},y)
1329CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN0=6
1330endif
1331ifeq (${CFG_HI_TUNER1_OUTPUT_PIN0_TSDAT7},y)
1332CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN0=7
1333endif
1334ifeq (${CFG_HI_TUNER1_OUTPUT_PIN0_TSVLD},y)
1335CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN0=8
1336endif
1337ifeq (${CFG_HI_TUNER1_OUTPUT_PIN0_TSSYNC},y)
1338CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN0=9
1339endif
1340ifeq (${CFG_HI_TUNER1_OUTPUT_PIN0_TSERR},y)
1341CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN0=10
1342endif
1343
1344ifeq (${CFG_HI_TUNER1_OUTPUT_PIN1_TSDAT0},y)
1345CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN1=0
1346endif
1347ifeq (${CFG_HI_TUNER1_OUTPUT_PIN1_TSDAT1},y)
1348CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN1=1
1349endif
1350ifeq (${CFG_HI_TUNER1_OUTPUT_PIN1_TSDAT2},y)
1351CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN1=2
1352endif
1353ifeq (${CFG_HI_TUNER1_OUTPUT_PIN1_TSDAT3},y)
1354CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN1=3
1355endif
1356ifeq (${CFG_HI_TUNER1_OUTPUT_PIN1_TSDAT4},y)
1357CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN1=4
1358endif
1359ifeq (${CFG_HI_TUNER1_OUTPUT_PIN1_TSDAT5},y)
1360CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN1=5
1361endif
1362ifeq (${CFG_HI_TUNER1_OUTPUT_PIN1_TSDAT6},y)
1363CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN1=6
1364endif
1365ifeq (${CFG_HI_TUNER1_OUTPUT_PIN1_TSDAT7},y)
1366CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN1=7
1367endif
1368ifeq (${CFG_HI_TUNER1_OUTPUT_PIN1_TSVLD},y)
1369CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN1=8
1370endif
1371ifeq (${CFG_HI_TUNER1_OUTPUT_PIN1_TSSYNC},y)
1372CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN1=9
1373endif
1374ifeq (${CFG_HI_TUNER1_OUTPUT_PIN1_TSERR},y)
1375CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN1=10
1376endif
1377
1378ifeq (${CFG_HI_TUNER1_OUTPUT_PIN2_TSDAT0},y)
1379CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN2=0
1380endif
1381ifeq (${CFG_HI_TUNER1_OUTPUT_PIN2_TSDAT1},y)
1382CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN2=1
1383endif
1384ifeq (${CFG_HI_TUNER1_OUTPUT_PIN2_TSDAT2},y)
1385CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN2=2
1386endif
1387ifeq (${CFG_HI_TUNER1_OUTPUT_PIN2_TSDAT3},y)
1388CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN2=3
1389endif
1390ifeq (${CFG_HI_TUNER1_OUTPUT_PIN2_TSDAT4},y)
1391CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN2=4
1392endif
1393ifeq (${CFG_HI_TUNER1_OUTPUT_PIN2_TSDAT5},y)
1394CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN2=5
1395endif
1396ifeq (${CFG_HI_TUNER1_OUTPUT_PIN2_TSDAT6},y)
1397CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN2=6
1398endif
1399ifeq (${CFG_HI_TUNER1_OUTPUT_PIN2_TSDAT7},y)
1400CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN2=7
1401endif
1402ifeq (${CFG_HI_TUNER1_OUTPUT_PIN2_TSVLD},y)
1403CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN2=8
1404endif
1405ifeq (${CFG_HI_TUNER1_OUTPUT_PIN2_TSSYNC},y)
1406CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN2=9
1407endif
1408ifeq (${CFG_HI_TUNER1_OUTPUT_PIN2_TSERR},y)
1409CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN2=10
1410endif
1411
1412ifeq (${CFG_HI_TUNER1_OUTPUT_PIN3_TSDAT0},y)
1413CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN3=0
1414endif
1415ifeq (${CFG_HI_TUNER1_OUTPUT_PIN3_TSDAT1},y)
1416CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN3=1
1417endif
1418ifeq (${CFG_HI_TUNER1_OUTPUT_PIN3_TSDAT2},y)
1419CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN3=2
1420endif
1421ifeq (${CFG_HI_TUNER1_OUTPUT_PIN3_TSDAT3},y)
1422CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN3=3
1423endif
1424ifeq (${CFG_HI_TUNER1_OUTPUT_PIN3_TSDAT4},y)
1425CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN3=4
1426endif
1427ifeq (${CFG_HI_TUNER1_OUTPUT_PIN3_TSDAT5},y)
1428CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN3=5
1429endif
1430ifeq (${CFG_HI_TUNER1_OUTPUT_PIN3_TSDAT6},y)
1431CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN3=6
1432endif
1433ifeq (${CFG_HI_TUNER1_OUTPUT_PIN3_TSDAT7},y)
1434CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN3=7
1435endif
1436ifeq (${CFG_HI_TUNER1_OUTPUT_PIN3_TSVLD},y)
1437CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN3=8
1438endif
1439ifeq (${CFG_HI_TUNER1_OUTPUT_PIN3_TSSYNC},y)
1440CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN3=9
1441endif
1442ifeq (${CFG_HI_TUNER1_OUTPUT_PIN3_TSERR},y)
1443CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN3=10
1444endif
1445
1446ifeq (${CFG_HI_TUNER1_OUTPUT_PIN4_TSDAT0},y)
1447CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN4=0
1448endif
1449ifeq (${CFG_HI_TUNER1_OUTPUT_PIN4_TSDAT1},y)
1450CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN4=1
1451endif
1452ifeq (${CFG_HI_TUNER1_OUTPUT_PIN4_TSDAT2},y)
1453CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN4=2
1454endif
1455ifeq (${CFG_HI_TUNER1_OUTPUT_PIN4_TSDAT3},y)
1456CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN4=3
1457endif
1458ifeq (${CFG_HI_TUNER1_OUTPUT_PIN4_TSDAT4},y)
1459CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN4=4
1460endif
1461ifeq (${CFG_HI_TUNER1_OUTPUT_PIN4_TSDAT5},y)
1462CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN4=5
1463endif
1464ifeq (${CFG_HI_TUNER1_OUTPUT_PIN4_TSDAT6},y)
1465CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN4=6
1466endif
1467ifeq (${CFG_HI_TUNER1_OUTPUT_PIN4_TSDAT7},y)
1468CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN4=7
1469endif
1470ifeq (${CFG_HI_TUNER1_OUTPUT_PIN4_TSVLD},y)
1471CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN4=8
1472endif
1473ifeq (${CFG_HI_TUNER1_OUTPUT_PIN4_TSSYNC},y)
1474CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN4=9
1475endif
1476ifeq (${CFG_HI_TUNER1_OUTPUT_PIN4_TSERR},y)
1477CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN4=10
1478endif
1479
1480ifeq (${CFG_HI_TUNER1_OUTPUT_PIN5_TSDAT0},y)
1481CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN5=0
1482endif
1483ifeq (${CFG_HI_TUNER1_OUTPUT_PIN5_TSDAT1},y)
1484CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN5=1
1485endif
1486ifeq (${CFG_HI_TUNER1_OUTPUT_PIN5_TSDAT2},y)
1487CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN5=2
1488endif
1489ifeq (${CFG_HI_TUNER1_OUTPUT_PIN5_TSDAT3},y)
1490CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN5=3
1491endif
1492ifeq (${CFG_HI_TUNER1_OUTPUT_PIN5_TSDAT4},y)
1493CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN5=4
1494endif
1495ifeq (${CFG_HI_TUNER1_OUTPUT_PIN5_TSDAT5},y)
1496CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN5=5
1497endif
1498ifeq (${CFG_HI_TUNER1_OUTPUT_PIN5_TSDAT6},y)
1499CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN5=6
1500endif
1501ifeq (${CFG_HI_TUNER1_OUTPUT_PIN5_TSDAT7},y)
1502CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN5=7
1503endif
1504ifeq (${CFG_HI_TUNER1_OUTPUT_PIN5_TSVLD},y)
1505CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN5=8
1506endif
1507ifeq (${CFG_HI_TUNER1_OUTPUT_PIN5_TSSYNC},y)
1508CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN5=9
1509endif
1510ifeq (${CFG_HI_TUNER1_OUTPUT_PIN5_TSERR},y)
1511CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN5=10
1512endif
1513
1514ifeq (${CFG_HI_TUNER1_OUTPUT_PIN6_TSDAT0},y)
1515CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN6=0
1516endif
1517ifeq (${CFG_HI_TUNER1_OUTPUT_PIN6_TSDAT1},y)
1518CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN6=1
1519endif
1520ifeq (${CFG_HI_TUNER1_OUTPUT_PIN6_TSDAT2},y)
1521CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN6=2
1522endif
1523ifeq (${CFG_HI_TUNER1_OUTPUT_PIN6_TSDAT3},y)
1524CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN6=3
1525endif
1526ifeq (${CFG_HI_TUNER1_OUTPUT_PIN6_TSDAT4},y)
1527CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN6=4
1528endif
1529ifeq (${CFG_HI_TUNER1_OUTPUT_PIN6_TSDAT5},y)
1530CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN6=5
1531endif
1532ifeq (${CFG_HI_TUNER1_OUTPUT_PIN6_TSDAT6},y)
1533CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN6=6
1534endif
1535ifeq (${CFG_HI_TUNER1_OUTPUT_PIN6_TSDAT7},y)
1536CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN6=7
1537endif
1538ifeq (${CFG_HI_TUNER1_OUTPUT_PIN6_TSVLD},y)
1539CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN6=8
1540endif
1541ifeq (${CFG_HI_TUNER1_OUTPUT_PIN6_TSSYNC},y)
1542CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN6=9
1543endif
1544ifeq (${CFG_HI_TUNER1_OUTPUT_PIN6_TSERR},y)
1545CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN6=10
1546endif
1547
1548ifeq (${CFG_HI_TUNER1_OUTPUT_PIN7_TSDAT0},y)
1549CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN7=0
1550endif
1551ifeq (${CFG_HI_TUNER1_OUTPUT_PIN7_TSDAT1},y)
1552CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN7=1
1553endif
1554ifeq (${CFG_HI_TUNER1_OUTPUT_PIN7_TSDAT2},y)
1555CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN7=2
1556endif
1557ifeq (${CFG_HI_TUNER1_OUTPUT_PIN7_TSDAT3},y)
1558CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN7=3
1559endif
1560ifeq (${CFG_HI_TUNER1_OUTPUT_PIN7_TSDAT4},y)
1561CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN7=4
1562endif
1563ifeq (${CFG_HI_TUNER1_OUTPUT_PIN7_TSDAT5},y)
1564CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN7=5
1565endif
1566ifeq (${CFG_HI_TUNER1_OUTPUT_PIN7_TSDAT6},y)
1567CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN7=6
1568endif
1569ifeq (${CFG_HI_TUNER1_OUTPUT_PIN7_TSDAT7},y)
1570CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN7=7
1571endif
1572ifeq (${CFG_HI_TUNER1_OUTPUT_PIN7_TSVLD},y)
1573CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN7=8
1574endif
1575ifeq (${CFG_HI_TUNER1_OUTPUT_PIN7_TSSYNC},y)
1576CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN7=9
1577endif
1578ifeq (${CFG_HI_TUNER1_OUTPUT_PIN7_TSERR},y)
1579CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN7=10
1580endif
1581
1582ifeq (${CFG_HI_TUNER1_OUTPUT_PIN8_TSDAT0},y)
1583CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN8=0
1584endif
1585ifeq (${CFG_HI_TUNER1_OUTPUT_PIN8_TSDAT1},y)
1586CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN8=1
1587endif
1588ifeq (${CFG_HI_TUNER1_OUTPUT_PIN8_TSDAT2},y)
1589CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN8=2
1590endif
1591ifeq (${CFG_HI_TUNER1_OUTPUT_PIN8_TSDAT3},y)
1592CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN8=3
1593endif
1594ifeq (${CFG_HI_TUNER1_OUTPUT_PIN8_TSDAT4},y)
1595CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN8=4
1596endif
1597ifeq (${CFG_HI_TUNER1_OUTPUT_PIN8_TSDAT5},y)
1598CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN8=5
1599endif
1600ifeq (${CFG_HI_TUNER1_OUTPUT_PIN8_TSDAT6},y)
1601CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN8=6
1602endif
1603ifeq (${CFG_HI_TUNER1_OUTPUT_PIN8_TSDAT7},y)
1604CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN8=7
1605endif
1606ifeq (${CFG_HI_TUNER1_OUTPUT_PIN8_TSVLD},y)
1607CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN8=8
1608endif
1609ifeq (${CFG_HI_TUNER1_OUTPUT_PIN8_TSSYNC},y)
1610CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN8=9
1611endif
1612ifeq (${CFG_HI_TUNER1_OUTPUT_PIN8_TSERR},y)
1613CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN8=10
1614endif
1615
1616ifeq (${CFG_HI_TUNER1_OUTPUT_PIN9_TSDAT0},y)
1617CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN9=0
1618endif
1619ifeq (${CFG_HI_TUNER1_OUTPUT_PIN9_TSDAT1},y)
1620CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN9=1
1621endif
1622ifeq (${CFG_HI_TUNER1_OUTPUT_PIN9_TSDAT2},y)
1623CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN9=2
1624endif
1625ifeq (${CFG_HI_TUNER1_OUTPUT_PIN9_TSDAT3},y)
1626CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN9=3
1627endif
1628ifeq (${CFG_HI_TUNER1_OUTPUT_PIN9_TSDAT4},y)
1629CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN9=4
1630endif
1631ifeq (${CFG_HI_TUNER1_OUTPUT_PIN9_TSDAT5},y)
1632CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN9=5
1633endif
1634ifeq (${CFG_HI_TUNER1_OUTPUT_PIN9_TSDAT6},y)
1635CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN9=6
1636endif
1637ifeq (${CFG_HI_TUNER1_OUTPUT_PIN9_TSDAT7},y)
1638CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN9=7
1639endif
1640ifeq (${CFG_HI_TUNER1_OUTPUT_PIN9_TSVLD},y)
1641CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN9=8
1642endif
1643ifeq (${CFG_HI_TUNER1_OUTPUT_PIN9_TSSYNC},y)
1644CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN9=9
1645endif
1646ifeq (${CFG_HI_TUNER1_OUTPUT_PIN9_TSERR},y)
1647CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN9=10
1648endif
1649
1650ifeq (${CFG_HI_TUNER1_OUTPUT_PIN10_TSDAT0},y)
1651CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN10=0
1652endif
1653ifeq (${CFG_HI_TUNER1_OUTPUT_PIN10_TSDAT1},y)
1654CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN10=1
1655endif
1656ifeq (${CFG_HI_TUNER1_OUTPUT_PIN10_TSDAT2},y)
1657CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN10=2
1658endif
1659ifeq (${CFG_HI_TUNER1_OUTPUT_PIN10_TSDAT3},y)
1660CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN10=3
1661endif
1662ifeq (${CFG_HI_TUNER1_OUTPUT_PIN10_TSDAT4},y)
1663CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN10=4
1664endif
1665ifeq (${CFG_HI_TUNER1_OUTPUT_PIN10_TSDAT5},y)
1666CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN10=5
1667endif
1668ifeq (${CFG_HI_TUNER1_OUTPUT_PIN10_TSDAT6},y)
1669CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN10=6
1670endif
1671ifeq (${CFG_HI_TUNER1_OUTPUT_PIN10_TSDAT7},y)
1672CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN10=7
1673endif
1674ifeq (${CFG_HI_TUNER1_OUTPUT_PIN10_TSVLD},y)
1675CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN10=8
1676endif
1677ifeq (${CFG_HI_TUNER1_OUTPUT_PIN10_TSSYNC},y)
1678CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN10=9
1679endif
1680ifeq (${CFG_HI_TUNER1_OUTPUT_PIN10_TSERR},y)
1681CFG_HI_BOARD_CONFIGS += -DHI_TUNER1_OUTPUT_PIN10=10
1682endif
1683
1684#=============DISEQC DEVICE OPTIONS===================
1685ifeq (${CFG_HI_DISEQC_SUPPORT},y)
1686CFG_HI_BOARD_CONFIGS += -DDISEQC_SUPPORT
1687endif
1688
1689ifeq (${CFG_HI_UNICABLE_SUPPORT},y)
1690CFG_HI_BOARD_CONFIGS += -DUNICABLE_SUPPORT
1691endif
1692
1693ifeq (${CFG_HI_UNICABLE2_SUPPORT},y)
1694CFG_HI_BOARD_CONFIGS += -DUNICABLE2_SUPPORT
1695endif
1696
1697#=============DAC CONFIGURATION OPTIONS===================
1698ifneq (${CFG_HI_DAC_CVBS},)
1699CFG_HI_BOARD_CONFIGS += -DHI_DAC_CVBS=${CFG_HI_DAC_CVBS}
1700else
1701CFG_HI_BOARD_CONFIGS += -DHI_DAC_CVBS=3
1702endif
1703ifneq (${CFG_HI_DAC_YPBPR_Y},)
1704CFG_HI_BOARD_CONFIGS += -DHI_DAC_YPBPR_Y=${CFG_HI_DAC_YPBPR_Y}
1705else
1706CFG_HI_BOARD_CONFIGS += -DHI_DAC_YPBPR_Y=1
1707endif
1708ifneq (${CFG_HI_DAC_YPBPR_PB},)
1709CFG_HI_BOARD_CONFIGS += -DHI_DAC_YPBPR_PB=${CFG_HI_DAC_YPBPR_PB}
1710else
1711CFG_HI_BOARD_CONFIGS += -DHI_DAC_YPBPR_PB=0
1712endif
1713ifneq (${CFG_HI_DAC_YPBPR_PR},)
1714CFG_HI_BOARD_CONFIGS += -DHI_DAC_YPBPR_PR=${CFG_HI_DAC_YPBPR_PR}
1715else
1716CFG_HI_BOARD_CONFIGS += -DHI_DAC_YPBPR_PR=2
1717endif
1718
1719ifneq (${CFG_HI_SND_MUTECTL_GPIO},)
1720CFG_HI_BOARD_CONFIGS += -DHI_SND_MUTECTL_GPIO=${CFG_HI_DAC_SVIDEO_C}
1721else
1722CFG_HI_BOARD_CONFIGS += -DHI_SND_MUTECTL_GPIO=0x39
1723endif
1724
1725#=============SCI CONFIGURATION OPTIONS===================
1726ifeq (${CFG_HI_SCI_CLK_MODE_CMOS},y)
1727CFG_HI_BOARD_CONFIGS += -DHI_SCI_CLK_MODE=0
1728endif
1729ifeq (${CFG_HI_SCI_CLK_MODE_OD},y)
1730CFG_HI_BOARD_CONFIGS += -DHI_SCI_CLK_MODE=1
1731endif
1732
1733ifeq (${CFG_HI_SCI_VCCEN_MODE_CMOS},y)
1734CFG_HI_BOARD_CONFIGS += -DHI_SCI_VCCEN_MODE=0
1735endif
1736ifeq (${CFG_HI_SCI_VCCEN_MODE_OD},y)
1737CFG_HI_BOARD_CONFIGS += -DHI_SCI_VCCEN_MODE=1
1738endif
1739
1740ifeq (${CFG_HI_SCI_RESET_MODE_CMOS},y)
1741CFG_HI_BOARD_CONFIGS += -DHI_SCI_RESET_MODE=0
1742endif
1743ifeq (${CFG_HI_SCI_RESET_MODE_OD},y)
1744CFG_HI_BOARD_CONFIGS += -DHI_SCI_RESET_MODE=1
1745endif
1746
1747ifeq (${CFG_HI_SCI_VCCEN_LOW},y)
1748CFG_HI_BOARD_CONFIGS += -DHI_SCI_VCCEN_LEVEL=0
1749endif
1750ifeq (${CFG_HI_SCI_VCCEN_HIGH},y)
1751CFG_HI_BOARD_CONFIGS += -DHI_SCI_VCCEN_LEVEL=1
1752endif
1753
1754ifeq (${CFG_HI_SCI_DETECT_LOW},y)
1755CFG_HI_BOARD_CONFIGS += -DHI_SCI_DETECT_LEVEL=0
1756endif
1757ifeq (${CFG_HI_SCI_DETECT_HIGH},y)
1758CFG_HI_BOARD_CONFIGS += -DHI_SCI_DETECT_LEVEL=1
1759endif
1760
1761#=============MEMC CONFIGURATION OPTIONS===================
1762ifeq (y,$(CFG_HI_MEMC_SUPPORT))
1763CFG_HI_CFLAGS += -DHI_MEMC_SUPPORT
1764CFG_HI_KMOD_CFLAGS += -DHI_MEMC_SUPPORT
1765endif
1766ifeq (y,$(CFG_HI_MEMC_ME_SUPPORT))
1767CFG_HI_CFLAGS += -DHI_MEMC_ME_SUPPORT
1768CFG_HI_KMOD_CFLAGS += -DHI_MEMC_ME_SUPPORT
1769endif
1770ifeq (y,$(CFG_HI_MEMC_FI_SUPPORT))
1771CFG_HI_CFLAGS += -DHI_MEMC_FI_SUPPORT
1772CFG_HI_KMOD_CFLAGS += -DHI_MEMC_FI_SUPPORT
1773endif
1774
1775
1776