-
Notifications
You must be signed in to change notification settings - Fork 43
/
base.mak
executable file
·4154 lines (3857 loc) · 127 KB
/
base.mak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
CFG_HI_SDK_VERSION="HiSTBLinuxV100R005C00SPC050_20170731"
ifeq ($(SDK_CFGFILE),)
SDK_CFGFILE=cfg.mak
endif
include $(SDK_DIR)/$(SDK_CFGFILE)
ifeq ($(CFG_PRODUCT_TYPE),linux)
ifneq ($(HISI_LINUX_ENV),ok)
$(error "Please run 'source ./env.sh' before building!")
endif
endif
#=============SDK_DIR======================================================================
HI_CONFIGS_DIR := $(SDK_DIR)/configs
HI_SCRIPTS_DIR := $(SDK_DIR)/scripts
HI_HAL_DIR := $(SDK_DIR)/source/component/hal
HI_TOOLS_DIR := $(SDK_DIR)/tools/linux/utils
ifneq ($(ANDROID_BUILD),y)
OPEN_SOURCE_DIR=$(SDK_DIR)/third_party/open_source
PLATFORM_DIR=$(SDK_DIR)/platform
HIDOLPHIN_DIR=$(PLATFORM_DIR)/hidolphin
endif
ifneq ($(CFG_HI_OUT_DIR),)
HI_OUT_DIR := $(SDK_DIR)/out/$(CFG_HI_CHIP_TYPE)/$(CFG_HI_OUT_DIR)
saved-output := $(HI_OUT_DIR)
$(shell [ -d $(HI_OUT_DIR) ] || mkdir -p $(HI_OUT_DIR))
HI_OUT_DIR := $(shell cd $(HI_OUT_DIR) && /bin/pwd)
$(if $(HI_OUT_DIR),,$(error output directory "$(saved-output)" does not exist))
endif
#=============SRC_DIR======================================================================
SOURCE_DIR := $(SDK_DIR)/source
COMMON_DIR := $(SOURCE_DIR)/common
MSP_DIR := $(SOURCE_DIR)/msp
COMPONENT_DIR := $(SOURCE_DIR)/component
SAMPLE_DIR := $(SDK_DIR)/sample
KERNEL_SRC_DIR := $(SOURCE_DIR)/kernel/$(CFG_HI_KERNEL_VERSION)
ifneq ($(ANDROID_BUILD),y)
PLUGIN_DIR := $(SOURCE_DIR)/plugin
ROOTFS_SRC_DIR := $(SOURCE_DIR)/rootfs
BOOT_DIR := $(SOURCE_DIR)/boot
KERNEL_DIR := $(SOURCE_DIR)/kernel
ifeq ($(CFG_HI_CPU_ARCH),arm64)
OBJ_NAME := obj64
else
OBJ_NAME := obj
endif
ifeq ($(CFG_HI_USER_SPACE_ALL_LIB),y)
HI_USER_SPACE_LIB := y
HI_USER_SPACE_LIB64 := y
else ifeq ($(CFG_HI_USER_SPACE_LIB64),y)
HI_USER_SPACE_LIB64 := y
else
HI_USER_SPACE_LIB := y
endif
ifeq ($(CFG_HI_CHIP_TYPE), hi3796mv200)
ifneq ($(findstring $(CFG_HI_ADVCA_TYPE), NAGRA IRDETO),)
HI_ADVANCED_CHIP := y
endif
endif
ifeq ($(HI_OUT_DIR),)
LINUX_DIR := $(KERNEL_SRC_DIR)
FIP_OUT_DIR := $(KERNEL_DIR)/arm-trusted-firmware
HI_INCLUDE_DIR := $(SDK_DIR)/pub/include
HI_INSTALL_DIR := $(SDK_DIR)/pub
else
LINUX_DIR := $(HI_OUT_DIR)/$(OBJ_NAME)/$(subst $(SDK_DIR)/,,$(KERNEL_SRC_DIR))
FIP_OUT_DIR := $(HI_OUT_DIR)/$(OBJ_NAME)/$(subst $(SDK_DIR)/,,$(KERNEL_DIR)/arm-trusted-firmware)
HI_INCLUDE_DIR := $(HI_OUT_DIR)/include
HI_INSTALL_DIR := $(HI_OUT_DIR)
HI_ROOTFS_DIR := $(HI_OUT_DIR)/obj/rootfs
endif
endif
#=============INCLUDE_DIR==================================================================
MSP_UNF_INCLUDE := $(MSP_DIR)/include
MSP_API_INCLUDE := $(MSP_DIR)/api/include
MSP_DRV_INCLUDE := $(MSP_DIR)/drv/include
COMMON_UNF_INCLUDE := $(COMMON_DIR)/include
COMMON_API_INCLUDE := $(COMMON_DIR)/api/include
COMMON_DRV_INCLUDE := $(COMMON_DIR)/drv/include
#=============HI_OUT_DIR======================================================================
HI_PREBUILTS_DIR := $(HI_CONFIGS_DIR)/$(CFG_HI_CHIP_TYPE)/prebuilts
HI_IMAGE_DIR := $(HI_INSTALL_DIR)/image
HI_SPI_IMAGE_DIR := $(HI_IMAGE_DIR)/spi_image
HI_NAND_IMAGE_DIR := $(HI_IMAGE_DIR)/nand_image
HI_EMMC_IMAGE_DIR := $(HI_IMAGE_DIR)/emmc_image
HI_SPI_EMMC_IMAGE_DIR := $(HI_IMAGE_DIR)/spi_emmc_image
HI_SPI_NAND_IMAGE_DIR := $(HI_IMAGE_DIR)/spi_nand_image
HI_MODULE_DIR := $(HI_INSTALL_DIR)/kmod
HI_ROOTBOX_DIR := $(HI_INSTALL_DIR)/rootbox
HI_LIB_DIR := $(HI_INSTALL_DIR)/lib
HI_STATIC_LIB_DIR := $(HI_LIB_DIR)/static
HI_SHARED_LIB_DIR := $(HI_LIB_DIR)/share
HI_EXTERN_LIB_DIR := $(HI_LIB_DIR)/extern
HI_LIB64_DIR := $(HI_INSTALL_DIR)/lib64
HI_STATIC_LIB64_DIR := $(HI_LIB64_DIR)/static
HI_SHARED_LIB64_DIR := $(HI_LIB64_DIR)/share
HI_EXTERN_LIB64_DIR := $(HI_LIB64_DIR)/extern
#=============TEE_DIR==================================================================
HI_TEE_OS_DIR := $(SDK_DIR)/source/tee/core/trustedcore
HI_TEE_API_DIR := $(SDK_DIR)/source/tee/api
HI_TEE_DRV_DIR := $(SDK_DIR)/source/tee/drv
HI_TEE_TA_DIR := $(SDK_DIR)/source/tee/ta
TEE_API_INCLUDE := $(HI_TEE_OS_DIR)/libteec/inc
TEE_DRV_INCLUDE := $(KERNEL_SRC_DIR)/drivers/hisilicon/tee/tee_hisi/tzdriver
#=============TEE cfg===================================================================
ifneq ($(findstring $(CFG_HI_CHIP_TYPE), hi3796mv200),)
CFG_HI_TEE_RESERVED_MEM=y
CFG_HI_TEE_RESERVED_MEM_ADDR=0x8000000
CFG_HI_TEE_RESERVED_MEM_SIZE=0x5800000
CFG_HI_BL31_SIZE=2097152
endif
#=============TOOL CHAINS===================================================================
HI_TOOLCHAINS_DIR := $(SDK_DIR)/tools/linux/toolchains
ifeq ($(CFG_HI_ARM_TOOLCHAINS_NAME),arm-histbv300-linux)
CFG_HI_ARM_TOOLCHAINS_NAME := arm-histbv310-linux
endif
ifneq ($(CFG_HI_AARCH64_TOOLCHAINS_NAME),)
HI_KERNEL_TOOLCHAINS_NAME := $(CFG_HI_AARCH64_TOOLCHAINS_NAME)
else
HI_KERNEL_TOOLCHAINS_NAME := $(CFG_HI_ARM_TOOLCHAINS_NAME)
endif
ifneq ($(ANDROID_BUILD),y)
ifeq ($(KERNELRELEASE),)
AR=$(CFG_HI_ARM_TOOLCHAINS_NAME)-ar
AS=$(CFG_HI_ARM_TOOLCHAINS_NAME)-as
LD=$(CFG_HI_ARM_TOOLCHAINS_NAME)-ld
CPP=$(CFG_HI_ARM_TOOLCHAINS_NAME)-cpp
CC=$(CFG_HI_ARM_TOOLCHAINS_NAME)-gcc
NM=$(CFG_HI_ARM_TOOLCHAINS_NAME)-nm
STRIP=$(CFG_HI_ARM_TOOLCHAINS_NAME)-strip
OBJCOPY=$(CFG_HI_ARM_TOOLCHAINS_NAME)-objcopy
OBJDUMP=$(CFG_HI_ARM_TOOLCHAINS_NAME)-objdump
CFG_HI_BASE_ENV+=" AR AS LD CPP CC NM STRIP OBJCOPY OBJDUMP "
endif
endif
#=============SERVER_UNTILS=================================================================
ifneq ($(ANDROID_BUILD),y)
MKIMAGE := mkimage
MKBOOTARGS := mkbootargs
MKBOOTIMG := mkbootimg
MKCRAMFS := mkfs.cramfs
MKEXT4FS := make_ext4fs
MKSQUASHFS := mksquashfs
MKJFFS2 := mkfs.jffs2
MKYAFFS := mkyaffs
MKUBIIMG := mkubiimg.sh
FILECAP := filecap
CFG_HI_BASE_ENV+=" MKIMAGE MKBOOTIMG MKCRAMFS MKSQUASHFS MKJFFS2 FILECAP"
endif
#==============LIB COMPILE OPTIONS================================================================
AT := @
ifeq ($(CFG_ARM_HISTBV320_LINUX),y)
FLOAT_OPTIONS := -mfloat-abi=hard -mfpu=vfpv3-d16
else
FLOAT_OPTIONS := -mfloat-abi=softfp -mfpu=vfpv3-d16
endif
CFG_HI_CFLAGS :=
ifeq ($(CFG_HI_NVR_SUPPORT),y)
CFG_HI_CFLAGS += -DHI_NVR_SUPPORT
endif
ifeq ($(CFG_HI_SMMU_SUPPORT),y)
CFG_HI_CFLAGS += -DHI_SMMU_SUPPORT
endif
ifeq ($(CFG_HI_HDR_SUPPORT),y)
CFG_HI_CFLAGS += -DHI_HDR_SUPPORT
ifeq ($CFG_HI_HDR_DOLBYVISION_SUPPORT),y)
CFG_HI_CFLAGS += -DHI_HDR_DOLBYVISION_SUPPORT
endif
endif
ifneq ($(ANDROID_BUILD),y)
ifneq ($(findstring $(CFG_HI_CHIP_TYPE), hi3798mv100 hi3796mv100 hi3716dv100),)
CFG_HI_CFLAGS += -mcpu=cortex-a7
else ifneq ($(findstring $(CFG_HI_CHIP_TYPE), hi3798cv200 hi3798mv200 hi3798mv300 hi3798mv200_a hi3796mv200),)
CFG_HI_CFLAGS += -mcpu=cortex-a53
else
CFG_HI_CFLAGS += -mcpu=cortex-a9
endif
ifneq ($(findstring $(CFG_HI_CHIP_TYPE), hi3716mv410 hi3716mv420),)
ifeq ($(CFG_HI_ADVCA_TYPE),NAGRA)
CFG_HI_CFLAGS += -DNOCS3_0_SUPPORT
endif
endif
ifndef CFG_HI_ADVCA_FUNCTION
RULEFILE=$(ROOTFS_SRC_DIR)/scripts/attr_rule/rulelist_noca.txt
else
CFG_HI_CFLAGS += -fstack-protector --param ssp-buffer-size=4
CFG_HI_CFLAGS += -Wformat -Wformat-security -g0 -s
CFG_HI_CFLAGS += -Wl,-z,relro
ifeq ($(CFG_HI_ADVCA_SANDBOX_SUPPORT),y)
SANDBOX_TYPE := $(shell echo $(CFG_HI_ADVCA_SANDBOX_TYPE) | tr "[A-Z]" "[a-z]")
endif
ifeq ($(CFG_HI_LOADER_APPLOADER),y)
RULEFILE=$(ROOTFS_SRC_DIR)/scripts/attr_rule/rulelist_ca_apploader_$(SANDBOX_TYPE).txt
else
RULEFILE=$(ROOTFS_SRC_DIR)/scripts/attr_rule/rulelist_ca_system_$(SANDBOX_TYPE).txt
endif
endif
RULEDBG=0
CFG_HI_CFLAGS += -Werror -Wall -D_GNU_SOURCE -D_XOPEN_SOURCE=600
ifeq ($(CFG_HI_OPTM_SIZE_SUPPORT),y)
CFG_HI_CFLAGS += -Os -ffunction-sections
else
CFG_HI_CFLAGS += -O2
endif
ifndef CFG_HI_STATIC_LIB_ONLY
CFG_HI_CFLAGS += -fPIC
endif
ifeq ($(CFG_HI_MSP_BUILDIN),y)
HI_DRV_BUILDTYPE := y
else
HI_DRV_BUILDTYPE := m
endif
endif
CFG_HI_CFLAGS += -DCHIP_TYPE_$(CFG_HI_CHIP_TYPE) -DSDK_VERSION=$(CFG_HI_SDK_VERSION)
## common and other modules will use hi_debug.h, which refers to the HI_LOG_LEVEL
ifeq ($(CFG_HI_LOG_SUPPORT),y)
CFG_HI_CFLAGS += -DHI_LOG_SUPPORT=1
ifdef CFG_HI_LOG_LEVEL
CFG_HI_CFLAGS += -DHI_LOG_LEVEL=$(CFG_HI_LOG_LEVEL)
else
CFG_HI_CFLAGS += -DHI_LOG_LEVEL=1
endif
ifeq ($(CFG_HI_LOG_NETWORK_SUPPORT),y)
CFG_HI_CFLAGS += -DLOG_NETWORK_SUPPORT
endif
ifeq ($(CFG_HI_LOG_UDISK_SUPPORT),y)
CFG_HI_CFLAGS += -DLOG_UDISK_SUPPORT
endif
else
CFG_HI_CFLAGS += -DHI_LOG_SUPPORT=0
endif
ifeq ($(CFG_HI_PROC_SUPPORT),y)
CFG_HI_CFLAGS += -DHI_PROC_SUPPORT=1
else
CFG_HI_CFLAGS += -DHI_PROC_SUPPORT=0
endif
ifeq ($(CFG_HI_HDMI_SUPPORT_1_4),y)
CFG_HI_CFLAGS += -DHI_HDMI_SUPPORT_1_4
else ifeq ($(CFG_HI_HDMI_SUPPORT_2_0),y)
CFG_HI_CFLAGS += -DHI_HDMI_SUPPORT_2_0
endif
ifeq ($(CFG_HI_PVR_SUPPORT),y)
CFG_HI_CFLAGS += -DHI_PVR_SUPPORT
endif
ifeq ($(CFG_HI_VI_SUPPORT),y)
CFG_HI_CFLAGS += -DHI_VI_SUPPORT
endif
ifeq ($(CFG_HI_VENC_SUPPORT),y)
CFG_HI_CFLAGS += -DHI_VENC_SUPPORT
endif
ifeq ($(CFG_HI_PQ_V3_0),y)
CFG_HI_CFLAGS += -DHI_PQ_V3_0
endif
ifeq ($(CFG_HI_PQ_V4_0),y)
CFG_HI_CFLAGS += -DHI_PQ_V4_0
endif
ifeq ($(CFG_HI_ADVCA_SUPPORT),y)
CFG_HI_CFLAGS += -DHI_ADVCA_SUPPORT
CFG_HI_CFLAGS += -DHI_ADVCA_TYPE_$(CFG_HI_ADVCA_TYPE)
ifdef CFG_HI_ADVCA_FUNCTION
CFG_HI_CFLAGS += -DHI_ADVCA_FUNCTION_$(CFG_HI_ADVCA_FUNCTION)
ifeq ($(CFG_HI_ADVCA_VMX3RD_SUPPORT),y)
CFG_HI_CFLAGS += -DHI_ADVCA_VMX3RD_SUPPORT
endif
endif
ifeq ($(CFG_HI_ADVCA_VERIFY_ENABLE),y)
CFG_HI_CFLAGS += -DHI_ADVCA_VERIFY_ENABLE
endif
ifeq ($(CFG_HI_ADVCA_USE_EXT1_RSA_KEY),y)
CFG_HI_CFLAGS += -DHI_ADVCA_USE_EXT1_RSA_KEY
endif
endif
ifeq ($(CFG_HI_TEE_SUPPORT),y)
CFG_HI_CFLAGS += -DHI_TEE_SUPPORT
endif
#=============KERNEL MODULE COMPILE OPTIONS=====================================================
CFG_HI_KMOD_CFLAGS := -Werror
CFG_HI_KMOD_CFLAGS += -DCHIP_TYPE_$(CFG_HI_CHIP_TYPE) -DSDK_VERSION=$(CFG_HI_SDK_VERSION)
ifdef CFG_HI_ADVCA_FUNCTION
CFG_HI_KMOD_CFLAGS += -fstack-protector --param ssp-buffer-size=4
CFG_HI_KMOD_CFLAGS += -Wformat -Wformat-security -g0 -s
CFG_HI_KMOD_CFLAGS += -Wl,-z,relro
endif
ifeq ($(CFG_HI_NVR_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_NVR_SUPPORT
endif
ifeq ($(findstring fpga, $(CFG_HI_BOOT_REG_NAME)), fpga)
CFG_HI_KMOD_CFLAGS += -DHI_FPGA_SUPPORT
endif
ifeq ($(CFG_HI_SMMU_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_SMMU_SUPPORT
endif
ifeq ($(CFG_HI_HDR_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_HDR_SUPPORT
ifeq ($CFG_HI_HDR_DOLBYVISION_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_HDR_DOLBYVISION_SUPPORT
endif
endif
ifeq ($(CFG_HI_KEYLED_CT1642_KERNEL_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_KEYLED_CT1642_KERNEL_SUPPORT
endif
ifeq ($(CFG_HI_MCE_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_MCE_SUPPORT
endif
ifeq ($(CFG_HI_GPIOI2C_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_GPIOI2C_SUPPORT
endif
## common and other modules will use hi_debug.h, which refers to the HI_LOG_LEVEL
ifeq ($(CFG_HI_LOG_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_LOG_SUPPORT=1
ifdef CFG_HI_LOG_LEVEL
CFG_HI_KMOD_CFLAGS += -DHI_LOG_LEVEL=$(CFG_HI_LOG_LEVEL)
else
CFG_HI_KMOD_CFLAGS += -DHI_LOG_LEVEL=1
endif
else
CFG_HI_KMOD_CFLAGS += -DHI_LOG_SUPPORT=0
endif
ifeq ($(CFG_HI_PROC_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_PROC_SUPPORT=1
else
CFG_HI_KMOD_CFLAGS += -DHI_PROC_SUPPORT=0
endif
ifeq ($(CFG_HI_DEMUX_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_DEMUX_SUPPORT
endif
ifeq ($(CFG_HI_HDMI_SUPPORT_1_4),y)
CFG_HI_KMOD_CFLAGS += -DHI_HDMI_SUPPORT_1_4
else ifeq ($(CFG_HI_HDMI_SUPPORT_2_0),y)
CFG_HI_KMOD_CFLAGS += -DHI_HDMI_SUPPORT_2_0
endif
ifeq ($(CFG_HI_GFX2D_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_GFX2D_SUPPORT
endif
ifeq ($(CFG_HI_LOADER_APPLOADER),y)
CFG_HI_KMOD_CFLAGS += -DHI_LOADER_APPLOADER
endif
ifeq ($(CFG_HI_KEYLED_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_KEYLED_SUPPORT
endif
ifeq ($(CFG_HI_HDMI_SUPPORT_HDCP),y)
CFG_HI_KMOD_CFLAGS += -DHI_HDCP_SUPPORT
endif
ifeq ($(CFG_HI_SCI_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_SCI_SUPPORT
endif
ifeq ($(CFG_HI_PVR_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_PVR_SUPPORT
endif
ifeq ($(CFG_HI_VI_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_VI_SUPPORT
endif
ifeq ($(CFG_HI_VENC_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_VENC_SUPPORT
endif
ifeq ($(CFG_HI_AENC_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_AENC_SUPPORT
endif
ifeq ($(CFG_HI_ADAC_SLIC_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_ADAC_SLIC_SUPPORT
endif
ifeq ($(CFG_HI_PQ_V3_0),y)
CFG_HI_KMOD_CFLAGS += -DHI_PQ_V3_0
endif
ifeq ($(CFG_HI_PQ_V4_0),y)
CFG_HI_KMOD_CFLAGS += -DHI_PQ_V4_0
endif
ifneq ($(findstring $(CFG_HI_CHIP_TYPE), hi3716mv410 hi3716mv420),)
ifeq ($(CFG_HI_ADVCA_TYPE),NAGRA)
CFG_HI_KMOD_CFLAGS += -DNOCS3_0_SUPPORT
endif
endif
ifeq ($(CFG_HI_ADVCA_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_ADVCA_SUPPORT
CFG_HI_KMOD_CFLAGS += -DHI_ADVCA_TYPE_$(CFG_HI_ADVCA_TYPE)
ifdef CFG_HI_ADVCA_FUNCTION
CFG_HI_KMOD_CFLAGS += -DHI_ADVCA_FUNCTION_$(CFG_HI_ADVCA_FUNCTION)
ifeq ($(CFG_HI_ADVCA_VMX3RD_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_ADVCA_VMX3RD_SUPPORT
endif
endif
endif
ifeq ($(CFG_HI_TEE_SUPPORT),y)
CFG_HI_KMOD_CFLAGS += -DHI_TEE_SUPPORT
endif
#=============BOARD CONFIGURATION OPTIONS=====================================================
CFG_HI_BOARD_CONFIGS :=
ifneq ($(CFG_HI_DAC_CVBS),)
CFG_HI_BOARD_CONFIGS += -DHI_DAC_CVBS=$(CFG_HI_DAC_CVBS)
endif
ifneq ($(CFG_HI_DAC_YPBPR_Y),)
CFG_HI_BOARD_CONFIGS += -DHI_DAC_YPBPR_Y=$(CFG_HI_DAC_YPBPR_Y)
endif
ifneq ($(CFG_HI_DAC_YPBPR_PB),)
CFG_HI_BOARD_CONFIGS += -DHI_DAC_YPBPR_PB=$(CFG_HI_DAC_YPBPR_PB)
endif
ifneq ($(CFG_HI_DAC_YPBPR_PR),)
CFG_HI_BOARD_CONFIGS += -DHI_DAC_YPBPR_PR=$(CFG_HI_DAC_YPBPR_PR)
endif
ifneq ($(CFG_HI_SND_MUTECTL_GPIO),)
CFG_HI_BOARD_CONFIGS += -DHI_SND_MUTECTL_GPIO=$(CFG_HI_DAC_SVIDEO_C)
else
CFG_HI_BOARD_CONFIGS += -DHI_SND_MUTECTL_GPIO=0x39
endif
#=============SCI CONFIGURATION OPTIONS===================
ifeq ($(CFG_HI_SCI_CLK_MODE_CMOS),y)
CFG_HI_BOARD_CONFIGS += -DHI_SCI_CLK_MODE=0
endif
ifeq ($(CFG_HI_SCI_CLK_MODE_OD),y)
CFG_HI_BOARD_CONFIGS += -DHI_SCI_CLK_MODE=1
endif
ifeq ($(CFG_HI_SCI_VCCEN_MODE_CMOS),y)
CFG_HI_BOARD_CONFIGS += -DHI_SCI_VCCEN_MODE=0
endif
ifeq ($(CFG_HI_SCI_VCCEN_MODE_OD),y)
CFG_HI_BOARD_CONFIGS += -DHI_SCI_VCCEN_MODE=1
endif
ifeq ($(CFG_HI_SCI_RESET_MODE_CMOS),y)
CFG_HI_BOARD_CONFIGS += -DHI_SCI_RESET_MODE=0
endif
ifeq ($(CFG_HI_SCI_RESET_MODE_OD),y)
CFG_HI_BOARD_CONFIGS += -DHI_SCI_RESET_MODE=1
endif
ifeq ($(CFG_HI_SCI_VCCEN_LOW),y)
CFG_HI_BOARD_CONFIGS += -DHI_SCI_VCCEN_LEVEL=0
endif
ifeq ($(CFG_HI_SCI_VCCEN_HIGH),y)
CFG_HI_BOARD_CONFIGS += -DHI_SCI_VCCEN_LEVEL=1
endif
ifeq ($(CFG_HI_SCI_DETECT_LOW),y)
CFG_HI_BOARD_CONFIGS += -DHI_SCI_DETECT_LEVEL=0
endif
ifeq ($(CFG_HI_SCI_DETECT_HIGH),y)
CFG_HI_BOARD_CONFIGS += -DHI_SCI_DETECT_LEVEL=1
endif
#===============================================DEMUX PORT CONFIG==========================================
CFG_HI_BOARD_CONFIGS += -DHI_TSI_port_NUMBER=$(CFG_HI_TSI_NUMBER)
CFG_HI_BOARD_CONFIGS += -DHI_TSO_PORT_NUMBER=$(CFG_HI_TSO_NUMBER)
#=============DEMUX IF0 PORT CONFIG===================
#--------------Port type-------------------
ifeq ($(CFG_HI_IF_TYPE),parallel_burst)
CFG_HI_BOARD_CONFIGS += -DHI_IF0_TYPE=0
endif
ifeq ($(CFG_HI_IF_TYPE),parallel_valid)
CFG_HI_BOARD_CONFIGS += -DHI_IF0_TYPE=1
endif
ifeq ($(CFG_HI_IF_TYPE),parallel_nosync_188)
CFG_HI_BOARD_CONFIGS += -DHI_IF0_TYPE=2
endif
ifeq ($(CFG_HI_IF_TYPE),parallel_nosync_204)
CFG_HI_BOARD_CONFIGS += -DHI_IF0_TYPE=3
endif
ifeq ($(CFG_HI_IF_TYPE),parallel_nosync_188_204)
CFG_HI_BOARD_CONFIGS += -DHI_IF0_TYPE=4
endif
ifeq ($(CFG_HI_IF_TYPE),serial)
CFG_HI_BOARD_CONFIGS += -DHI_IF0_TYPE=5
endif
ifeq ($(CFG_HI_IF_TYPE),serial2bit)
CFG_HI_BOARD_CONFIGS += -DHI_IF0_TYPE=7
endif
ifeq ($(CFG_HI_IF_TYPE),serial_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_IF0_TYPE=8
endif
ifeq ($(CFG_HI_IF_TYPE),serial2bit_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_IF0_TYPE=9
endif
#-------------Bit Selector-------------------
ifeq ($(CFG_HI_IF_BIT_SELECTOR),0)
CFG_HI_BOARD_CONFIGS += -DHI_IF0_BIT_SELECTOR=0
endif
ifeq ($(CFG_HI_IF_BIT_SELECTOR),1)
CFG_HI_BOARD_CONFIGS += -DHI_IF0_BIT_SELECTOR=1
endif
#=============DEMUX TSI0 PORT CONFIG===================
#--------------Port type-------------------
ifeq ($(CFG_HI_TSI0_TYPE),parallel_burst)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_TYPE=0
endif
ifeq ($(CFG_HI_TSI0_TYPE),parallel_valid)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_TYPE=1
endif
ifeq ($(CFG_HI_TSI0_TYPE),parallel_nosync_188)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_TYPE=2
endif
ifeq ($(CFG_HI_TSI0_TYPE),parallel_nosync_204)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_TYPE=3
endif
ifeq ($(CFG_HI_TSI0_TYPE),parallel_nosync_188_204)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_TYPE=4
endif
ifeq ($(CFG_HI_TSI0_TYPE),serial)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_TYPE=5
endif
ifeq ($(CFG_HI_TSI0_TYPE),serial2bit)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_TYPE=7
endif
ifeq ($(CFG_HI_TSI0_TYPE),serial_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_TYPE=8
endif
ifeq ($(CFG_HI_TSI0_TYPE),serial2bit_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_TYPE=9
endif
#--------------CLK Phase-------------------
ifeq ($(CFG_HI_TSI0_CLK_PHASE_REVERSE),0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_CLK_PHASE_REVERSE=0
endif
ifeq ($(CFG_HI_TSI0_CLK_PHASE_REVERSE),1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_CLK_PHASE_REVERSE=1
endif
#-------------Bit Selector-------------------
ifeq ($(CFG_HI_TSI0_BIT_SELECTOR),0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_BIT_SELECTOR=0
endif
ifeq ($(CFG_HI_TSI0_BIT_SELECTOR),1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_BIT_SELECTOR=1
endif
#-------------Clock Use-------------------
ifeq ($(CFG_HI_TSI0_SERIAL_SHARE_CLK),tsi0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_SERIAL_SHARE_CLK=0x20
endif
ifeq ($(CFG_HI_TSI0_SERIAL_SHARE_CLK),tsi1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_SERIAL_SHARE_CLK=0x21
endif
ifeq ($(CFG_HI_TSI0_SERIAL_SHARE_CLK),tsi2)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_SERIAL_SHARE_CLK=0x22
endif
ifeq ($(CFG_HI_TSI0_SERIAL_SHARE_CLK),tsi3)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_SERIAL_SHARE_CLK=0x23
endif
ifeq ($(CFG_HI_TSI0_SERIAL_SHARE_CLK),tsi4)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_SERIAL_SHARE_CLK=0x24
endif
ifeq ($(CFG_HI_TSI0_SERIAL_SHARE_CLK),tsi5)
CFG_HI_BOARD_CONFIGS += -DHI_TSI0_SERIAL_SHARE_CLK=0x25
endif
#=============DEMUX TSI10 PORT CONFIG===================
#--------------Port type-------------------
ifeq ($(CFG_HI_TSI1_TYPE),parallel_burst)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_TYPE=0
endif
ifeq ($(CFG_HI_TSI1_TYPE),parallel_valid)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_TYPE=1
endif
ifeq ($(CFG_HI_TSI1_TYPE),parallel_nosync_188)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_TYPE=2
endif
ifeq ($(CFG_HI_TSI1_TYPE),parallel_nosync_204)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_TYPE=3
endif
ifeq ($(CFG_HI_TSI1_TYPE),parallel_nosync_188_204)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_TYPE=4
endif
ifeq ($(CFG_HI_TSI1_TYPE),serial)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_TYPE=5
endif
ifeq ($(CFG_HI_TSI1_TYPE),serial2bit)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_TYPE=7
endif
ifeq ($(CFG_HI_TSI1_TYPE),serial_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_TYPE=8
endif
ifeq ($(CFG_HI_TSI1_TYPE),serial2bit_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_TYPE=9
endif
#--------------CLK Phase-------------------
ifeq ($(CFG_HI_TSI1_CLK_PHASE_REVERSE),0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_CLK_PHASE_REVERSE=0
endif
ifeq ($(CFG_HI_TSI1_CLK_PHASE_REVERSE),1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_CLK_PHASE_REVERSE=1
endif
#-------------Bit Selector-------------------
ifeq ($(CFG_HI_TSI1_BIT_SELECTOR),0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_BIT_SELECTOR=0
endif
ifeq ($(CFG_HI_TSI1_BIT_SELECTOR),1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_BIT_SELECTOR=1
endif
#-------------Clock Use-------------------
ifeq ($(CFG_HI_TSI1_SERIAL_SHARE_CLK),tsi0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_SERIAL_SHARE_CLK=0x20
endif
ifeq ($(CFG_HI_TSI1_SERIAL_SHARE_CLK),tsi1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_SERIAL_SHARE_CLK=0x21
endif
ifeq ($(CFG_HI_TSI1_SERIAL_SHARE_CLK),tsi2)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_SERIAL_SHARE_CLK=0x22
endif
ifeq ($(CFG_HI_TSI1_SERIAL_SHARE_CLK),tsi3)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_SERIAL_SHARE_CLK=0x23
endif
ifeq ($(CFG_HI_TSI1_SERIAL_SHARE_CLK),tsi4)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_SERIAL_SHARE_CLK=0x24
endif
ifeq ($(CFG_HI_TSI1_SERIAL_SHARE_CLK),tsi5)
CFG_HI_BOARD_CONFIGS += -DHI_TSI1_SERIAL_SHARE_CLK=0x25
endif
#=============DEMUX TSI2 PORT CONFIG===================
#--------------Port type-------------------
ifeq ($(CFG_HI_TSI2_TYPE),parallel_burst)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_TYPE=0
endif
ifeq ($(CFG_HI_TSI2_TYPE),parallel_valid)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_TYPE=1
endif
ifeq ($(CFG_HI_TSI2_TYPE),parallel_nosync_188)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_TYPE=2
endif
ifeq ($(CFG_HI_TSI2_TYPE),parallel_nosync_204)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_TYPE=3
endif
ifeq ($(CFG_HI_TSI2_TYPE),parallel_nosync_188_204)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_TYPE=4
endif
ifeq ($(CFG_HI_TSI2_TYPE),serial)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_TYPE=5
endif
ifeq ($(CFG_HI_TSI2_TYPE),serial2bit)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_TYPE=7
endif
ifeq ($(CFG_HI_TSI2_TYPE),serial_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_TYPE=8
endif
ifeq ($(CFG_HI_TSI2_TYPE),serial2bit_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_TYPE=9
endif
#--------------CLK Phase-------------------
ifeq ($(CFG_HI_TSI2_CLK_PHASE_REVERSE),0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_CLK_PHASE_REVERSE=0
endif
ifeq ($(CFG_HI_TSI2_CLK_PHASE_REVERSE),1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_CLK_PHASE_REVERSE=1
endif
#-------------Bit Selector-------------------
ifeq ($(CFG_HI_TSI2_BIT_SELECTOR),0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_BIT_SELECTOR=0
endif
ifeq ($(CFG_HI_TSI2_BIT_SELECTOR),1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_BIT_SELECTOR=1
endif
#-------------Clock Use-------------------
ifeq ($(CFG_HI_TSI2_SERIAL_SHARE_CLK),tsi0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_SERIAL_SHARE_CLK=0x20
endif
ifeq ($(CFG_HI_TSI2_SERIAL_SHARE_CLK),tsi1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_SERIAL_SHARE_CLK=0x21
endif
ifeq ($(CFG_HI_TSI2_SERIAL_SHARE_CLK),tsi2)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_SERIAL_SHARE_CLK=0x22
endif
ifeq ($(CFG_HI_TSI2_SERIAL_SHARE_CLK),tsi3)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_SERIAL_SHARE_CLK=0x23
endif
ifeq ($(CFG_HI_TSI2_SERIAL_SHARE_CLK),tsi4)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_SERIAL_SHARE_CLK=0x24
endif
ifeq ($(CFG_HI_TSI2_SERIAL_SHARE_CLK),tsi5)
CFG_HI_BOARD_CONFIGS += -DHI_TSI2_SERIAL_SHARE_CLK=0x25
endif
#=============DEMUX TSI3 PORT CONFIG===================
#--------------Port type-------------------
ifeq ($(CFG_HI_TSI3_TYPE),parallel_burst)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_TYPE=0
endif
ifeq ($(CFG_HI_TSI3_TYPE),parallel_valid)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_TYPE=1
endif
ifeq ($(CFG_HI_TSI3_TYPE),parallel_nosync_188)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_TYPE=2
endif
ifeq ($(CFG_HI_TSI3_TYPE),parallel_nosync_204)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_TYPE=3
endif
ifeq ($(CFG_HI_TSI3_TYPE),parallel_nosync_188_204)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_TYPE=4
endif
ifeq ($(CFG_HI_TSI3_TYPE),serial)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_TYPE=5
endif
ifeq ($(CFG_HI_TSI3_TYPE),serial2bit)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_TYPE=7
endif
ifeq ($(CFG_HI_TSI3_TYPE),serial_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_TYPE=8
endif
ifeq ($(CFG_HI_TSI3_TYPE),serial2bit_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_TYPE=9
endif
#--------------CLK Phase-------------------
ifeq ($(CFG_HI_TSI3_CLK_PHASE_REVERSE),0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_CLK_PHASE_REVERSE=0
endif
ifeq ($(CFG_HI_TSI3_CLK_PHASE_REVERSE),1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_CLK_PHASE_REVERSE=1
endif
#-------------Bit Selector-------------------
ifeq ($(CFG_HI_TSI3_BIT_SELECTOR),0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_BIT_SELECTOR=0
endif
ifeq ($(CFG_HI_TSI3_BIT_SELECTOR),1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_BIT_SELECTOR=1
endif
#-------------Clock Use-------------------
ifeq ($(CFG_HI_TSI3_SERIAL_SHARE_CLK),tsi0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_SERIAL_SHARE_CLK=0x20
endif
ifeq ($(CFG_HI_TSI3_SERIAL_SHARE_CLK),tsi1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_SERIAL_SHARE_CLK=0x21
endif
ifeq ($(CFG_HI_TSI3_SERIAL_SHARE_CLK),tsi2)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_SERIAL_SHARE_CLK=0x22
endif
ifeq ($(CFG_HI_TSI3_SERIAL_SHARE_CLK),tsi3)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_SERIAL_SHARE_CLK=0x23
endif
ifeq ($(CFG_HI_TSI3_SERIAL_SHARE_CLK),tsi4)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_SERIAL_SHARE_CLK=0x24
endif
ifeq ($(CFG_HI_TSI3_SERIAL_SHARE_CLK),tsi5)
CFG_HI_BOARD_CONFIGS += -DHI_TSI3_SERIAL_SHARE_CLK=0x25
endif
#=============DEMUX TSI4 PORT CONFIG===================
#--------------Port type-------------------
ifeq ($(CFG_HI_TSI4_TYPE),parallel_burst)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_TYPE=0
endif
ifeq ($(CFG_HI_TSI4_TYPE),parallel_valid)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_TYPE=1
endif
ifeq ($(CFG_HI_TSI4_TYPE),parallel_nosync_188)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_TYPE=2
endif
ifeq ($(CFG_HI_TSI4_TYPE),parallel_nosync_204)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_TYPE=3
endif
ifeq ($(CFG_HI_TSI4_TYPE),parallel_nosync_188_204)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_TYPE=4
endif
ifeq ($(CFG_HI_TSI4_TYPE),serial)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_TYPE=5
endif
ifeq ($(CFG_HI_TSI4_TYPE),serial2bit)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_TYPE=7
endif
ifeq ($(CFG_HI_TSI4_TYPE),serial_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_TYPE=8
endif
ifeq ($(CFG_HI_TSI4_TYPE),serial2bit_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_TYPE=9
endif
#--------------CLK Phase-------------------
ifeq ($(CFG_HI_TSI4_CLK_PHASE_REVERSE),0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_CLK_PHASE_REVERSE=0
endif
ifeq ($(CFG_HI_TSI4_CLK_PHASE_REVERSE),1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_CLK_PHASE_REVERSE=1
endif
#-------------Bit Selector-------------------
ifeq ($(CFG_HI_TSI4_BIT_SELECTOR),0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_BIT_SELECTOR=0
endif
ifeq ($(CFG_HI_TSI4_BIT_SELECTOR),1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_BIT_SELECTOR=1
endif
#-------------Clock Use-------------------
ifeq ($(CFG_HI_TSI4_SERIAL_SHARE_CLK),tsi0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_SERIAL_SHARE_CLK=0x20
endif
ifeq ($(CFG_HI_TSI4_SERIAL_SHARE_CLK),tsi1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_SERIAL_SHARE_CLK=0x21
endif
ifeq ($(CFG_HI_TSI4_SERIAL_SHARE_CLK),tsi2)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_SERIAL_SHARE_CLK=0x22
endif
ifeq ($(CFG_HI_TSI4_SERIAL_SHARE_CLK),tsi3)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_SERIAL_SHARE_CLK=0x23
endif
ifeq ($(CFG_HI_TSI4_SERIAL_SHARE_CLK),tsi4)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_SERIAL_SHARE_CLK=0x24
endif
ifeq ($(CFG_HI_TSI4_SERIAL_SHARE_CLK),tsi5)
CFG_HI_BOARD_CONFIGS += -DHI_TSI4_SERIAL_SHARE_CLK=0x25
endif
#=============DEMUX TSI5 PORT CONFIG===================
#--------------Port type-------------------
ifeq ($(CFG_HI_TSI5_TYPE),parallel_burst)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_TYPE=0
endif
ifeq ($(CFG_HI_TSI5_TYPE),parallel_valid)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_TYPE=1
endif
ifeq ($(CFG_HI_TSI5_TYPE),parallel_nosync_188)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_TYPE=2
endif
ifeq ($(CFG_HI_TSI5_TYPE),parallel_nosync_204)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_TYPE=3
endif
ifeq ($(CFG_HI_TSI5_TYPE),parallel_nosync_188_204)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_TYPE=4
endif
ifeq ($(CFG_HI_TSI5_TYPE),serial)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_TYPE=5
endif
ifeq ($(CFG_HI_TSI5_TYPE),serial2bit)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_TYPE=7
endif
ifeq ($(CFG_HI_TSI5_TYPE),serial_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_TYPE=8
endif
ifeq ($(CFG_HI_TSI5_TYPE),serial2bit_nosync)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_TYPE=9
endif
#--------------CLK Phase-------------------
ifeq ($(CFG_HI_TSI5_CLK_PHASE_REVERSE),0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_CLK_PHASE_REVERSE=0
endif
ifeq ($(CFG_HI_TSI5_CLK_PHASE_REVERSE),1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_CLK_PHASE_REVERSE=1
endif
#-------------Bit Selector-------------------
ifeq ($(CFG_HI_TSI5_BIT_SELECTOR),0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_BIT_SELECTOR=0
endif
ifeq ($(CFG_HI_TSI5_BIT_SELECTOR),1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_BIT_SELECTOR=1
endif
#-------------Clock Use-------------------
ifeq ($(CFG_HI_TSI5_SERIAL_SHARE_CLK),tsi0)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_SERIAL_SHARE_CLK=0x20
endif
ifeq ($(CFG_HI_TSI5_SERIAL_SHARE_CLK),tsi1)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_SERIAL_SHARE_CLK=0x21
endif
ifeq ($(CFG_HI_TSI5_SERIAL_SHARE_CLK),tsi2)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_SERIAL_SHARE_CLK=0x22
endif
ifeq ($(CFG_HI_TSI5_SERIAL_SHARE_CLK),tsi3)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_SERIAL_SHARE_CLK=0x23
endif
ifeq ($(CFG_HI_TSI5_SERIAL_SHARE_CLK),tsi4)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_SERIAL_SHARE_CLK=0x24
endif
ifeq ($(CFG_HI_TSI5_SERIAL_SHARE_CLK),tsi5)
CFG_HI_BOARD_CONFIGS += -DHI_TSI5_SERIAL_SHARE_CLK=0x25
endif
#=============DEMUX TSO0 PORT CONFIG===================
#--------------clk frequency-------------------
ifeq ($(CFG_HI_TSO0_CLK_100M),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO0_CLK=0
endif
ifeq ($(CFG_HI_TSO0_CLK_150M),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO0_CLK=1
endif
ifeq ($(CFG_HI_TSO0_CLK_1200M),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO0_CLK=3
endif
ifeq ($(CFG_HI_TSO0_CLK_1500M),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO0_CLK=4
endif
#--------------clk mode-------------------
ifeq ($(CFG_HI_TSO0_CLK_MODE_NORMAL),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO0_CLK_MODE=0
endif
ifeq ($(HI_TSO0_CLK_MODE_JITTER),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO0_CLK_MODE=1
endif
#----------------------valid------------------
ifeq ($(CFG_HI_TSO0_VALID_ACTIVE_OUTPUT),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO0_VALID_MODE=0
endif
ifeq ($(HI_TSO0_VALID_ACTIVE_HIGH),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO0_VALID_MODE=1
endif
#-----------serial or parallel------------------
ifeq ($(CFG_HI_TSO0_PARALLEL),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO0_SERIAL=0
endif
ifeq ($(CFG_HI_TSO0_SERIAL),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO0_SERIAL=1
endif
#----------------------bit selector--------------
ifeq ($(CFG_HI_TSO0_SERIAL_BIT_0),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO0_BIT_SELECTOR=0
endif
ifeq ($(CFG_HI_TSO0_SERIAL_BIT_7),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO0_BIT_SELECTOR=7
endif
#=============DEMUX TSO1 PORT CONFIG===================
#--------------clk frequency-------------------
ifeq ($(CFG_HI_TSO1_CLK_100M),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO1_CLK=0
endif
ifeq ($(CFG_HI_TSO1_CLK_150M),y)
CFG_HI_BOARD_CONFIGS += -DHI_TSO1_CLK=1
endif