aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/dream/camera/msm_vfe8x_proc.h
blob: 91828569a4d7be300c70b5ea1ddf0c102c9bdb64 (plain) (blame)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
/*
 * Copyright (C) 2008-2009 QUALCOMM Incorporated.
 */

#ifndef __MSM_VFE8X_REG_H__
#define __MSM_VFE8X_REG_H__

#include <mach/msm_iomap.h>
#include <mach/camera.h>
#include "msm_vfe8x.h"

/* at start of camif,  bit 1:0 = 0x01:enable
 * image data capture at frame boundary. */
#define CAMIF_COMMAND_START  0x00000005

/* bit 2= 0x1:clear the CAMIF_STATUS register
 * value. */
#define CAMIF_COMMAND_CLEAR  0x00000004

/* at stop of vfe pipeline, for now it is assumed
 * that camif will stop at any time. Bit 1:0 = 0x10:
 * disable image data capture immediately. */
#define CAMIF_COMMAND_STOP_IMMEDIATELY  0x00000002

/* at stop of vfe pipeline, for now it is assumed
 * that camif will stop at any time. Bit 1:0 = 0x00:
 * disable image data capture at frame boundary */
#define CAMIF_COMMAND_STOP_AT_FRAME_BOUNDARY  0x00000000

/* to halt axi bridge */
#define AXI_HALT  0x00000001

/* clear the halt bit. */
#define AXI_HALT_CLEAR  0x00000000

/* reset the pipeline when stop command is issued.
 * (without reset the register.) bit 26-31 = 0,
 * domain reset, bit 0-9 = 1 for module reset, except
 * register module. */
#define VFE_RESET_UPON_STOP_CMD  0x000003ef

/* reset the pipeline when reset command.
 * bit 26-31 = 0, domain reset, bit 0-9 = 1 for module reset. */
#define VFE_RESET_UPON_RESET_CMD  0x000003ff

/* bit 5 is for axi status idle or busy.
 * 1 =  halted,  0 = busy */
#define AXI_STATUS_BUSY_MASK 0x00000020

/* bit 0 & bit 1 = 1, both y and cbcr irqs need to be present
 * for frame done interrupt */
#define VFE_COMP_IRQ_BOTH_Y_CBCR 3

/* bit 1 = 1, only cbcr irq triggers frame done interrupt */
#define VFE_COMP_IRQ_CBCR_ONLY 2

/* bit 0 = 1, only y irq triggers frame done interrupt */
#define VFE_COMP_IRQ_Y_ONLY 1

/* bit 0 = 1, PM go;   bit1 = 1, PM stop */
#define VFE_PERFORMANCE_MONITOR_GO   0x00000001
#define VFE_PERFORMANCE_MONITOR_STOP 0x00000002

/* bit 0 = 1, test gen go;   bit1 = 1, test gen stop */
#define VFE_TEST_GEN_GO   0x00000001
#define VFE_TEST_GEN_STOP 0x00000002

/* the chroma is assumed to be interpolated between
 * the luma samples.  JPEG 4:2:2 */
#define VFE_CHROMA_UPSAMPLE_INTERPOLATED 0

/* constants for irq registers */
#define VFE_DISABLE_ALL_IRQS 0
/* bit =1 is to clear the corresponding bit in VFE_IRQ_STATUS.  */
#define VFE_CLEAR_ALL_IRQS   0xffffffff
/* imask for while waiting for stop ack,  driver has already
 * requested stop, waiting for reset irq,
 * bit 29,28,27,26 for async timer, bit 9 for reset */
#define VFE_IMASK_WHILE_STOPPING  0x3c000200

/* when normal case, don't want to block error status.
 * bit 0,6,20,21,22,30,31 */
#define VFE_IMASK_ERROR_ONLY             0xC0700041
#define VFE_REG_UPDATE_TRIGGER           1
#define VFE_PM_BUF_MAX_CNT_MASK          0xFF
#define VFE_DMI_CFG_DEFAULT              0x00000100
#define LENS_ROLL_OFF_DELTA_TABLE_OFFSET 32
#define VFE_AF_PINGPONG_STATUS_BIT       0x100
#define VFE_AWB_PINGPONG_STATUS_BIT      0x200

/* VFE I/O registers */
enum {
	VFE_HW_VERSION                    = 0x00000000,
	VFE_GLOBAL_RESET_CMD              = 0x00000004,
	VFE_MODULE_RESET                  = 0x00000008,
	VFE_CGC_OVERRIDE                  = 0x0000000C,
	VFE_MODULE_CFG                    = 0x00000010,
	VFE_CFG                           = 0x00000014,
	VFE_IRQ_MASK                      = 0x00000018,
	VFE_IRQ_CLEAR                     = 0x0000001C,
VFE_IRQ_STATUS                    = 0x00000020,
VFE_IRQ_COMPOSITE_MASK            = 0x00000024,
VFE_BUS_CMD                       = 0x00000028,
VFE_BUS_CFG                       = 0x0000002C,
VFE_BUS_ENC_Y_WR_PING_ADDR        = 0x00000030,
VFE_BUS_ENC_Y_WR_PONG_ADDR        = 0x00000034,
VFE_BUS_ENC_Y_WR_IMAGE_SIZE       = 0x00000038,
VFE_BUS_ENC_Y_WR_BUFFER_CFG       = 0x0000003C,
VFE_BUS_ENC_CBCR_WR_PING_ADDR     = 0x00000040,
VFE_BUS_ENC_CBCR_WR_PONG_ADDR     = 0x00000044,
VFE_BUS_ENC_CBCR_WR_IMAGE_SIZE    = 0x00000048,
VFE_BUS_ENC_CBCR_WR_BUFFER_CFG    = 0x0000004C,
VFE_BUS_VIEW_Y_WR_PING_ADDR       = 0x00000050,
VFE_BUS_VIEW_Y_WR_PONG_ADDR       = 0x00000054,
VFE_BUS_VIEW_Y_WR_IMAGE_SIZE      = 0x00000058,
VFE_BUS_VIEW_Y_WR_BUFFER_CFG      = 0x0000005C,
VFE_BUS_VIEW_CBCR_WR_PING_ADDR    = 0x00000060,
VFE_BUS_VIEW_CBCR_WR_PONG_ADDR    = 0x00000064,
VFE_BUS_VIEW_CBCR_WR_IMAGE_SIZE   = 0x00000068,
VFE_BUS_VIEW_CBCR_WR_BUFFER_CFG   = 0x0000006C,
VFE_BUS_STATS_AF_WR_PING_ADDR     = 0x00000070,
VFE_BUS_STATS_AF_WR_PONG_ADDR     = 0x00000074,
VFE_BUS_STATS_AWB_WR_PING_ADDR    = 0x00000078,
VFE_BUS_STATS_AWB_WR_PONG_ADDR    = 0x0000007C,
VFE_BUS_STATS_HIST_WR_PING_ADDR   = 0x00000080,
VFE_BUS_STATS_HIST_WR_PONG_ADDR   = 0x00000084,
VFE_BUS_STATS_WR_PRIORITY         = 0x00000088,
VFE_BUS_STRIPE_RD_ADDR_0          = 0x0000008C,
VFE_BUS_STRIPE_RD_ADDR_1          = 0x00000090,
VFE_BUS_STRIPE_RD_ADDR_2          = 0x00000094,
VFE_BUS_STRIPE_RD_ADDR_3          = 0x00000098,
VFE_BUS_STRIPE_RD_VSIZE           = 0x0000009C,
VFE_BUS_STRIPE_RD_HSIZE           = 0x000000A0,
VFE_BUS_STRIPE_RD_BUFFER_CFG      = 0x000000A4,
VFE_BUS_STRIPE_RD_UNPACK_CFG      = 0x000000A8,
VFE_BUS_STRIPE_RD_UNPACK          = 0x000000AC,
VFE_BUS_STRIPE_RD_PAD_SIZE        = 0x000000B0,
VFE_BUS_STRIPE_RD_PAD_L_UNPACK    = 0x000000B4,
VFE_BUS_STRIPE_RD_PAD_R_UNPACK    = 0x000000B8,
VFE_BUS_STRIPE_RD_PAD_TB_UNPACK   = 0x000000BC,
VFE_BUS_PINGPONG_IRQ_EN           = 0x000000C0,
VFE_BUS_PINGPONG_STATUS           = 0x000000C4,
VFE_BUS_PM_CMD                    = 0x000000C8,
VFE_BUS_PM_CFG                    = 0x000000CC,
VFE_BUS_ENC_Y_WR_PM_STATS_0       = 0x000000D0,
VFE_BUS_ENC_Y_WR_PM_STATS_1       = 0x000000D4,
VFE_BUS_ENC_CBCR_WR_PM_STATS_0    = 0x000000D8,
VFE_BUS_ENC_CBCR_WR_PM_STATS_1    = 0x000000DC,
VFE_BUS_VIEW_Y_WR_PM_STATS_0      = 0x000000E0,
VFE_BUS_VIEW_Y_WR_PM_STATS_1      = 0x000000E4,
VFE_BUS_VIEW_CBCR_WR_PM_STATS_0   = 0x000000E8,
VFE_BUS_VIEW_CBCR_WR_PM_STATS_1   = 0x000000EC,
VFE_BUS_MISR_CFG                  = 0x000000F4,
VFE_BUS_MISR_MAST_CFG_0           = 0x000000F8,
VFE_BUS_MISR_MAST_CFG_1           = 0x000000FC,
VFE_BUS_MISR_RD_VAL               = 0x00000100,
VFE_AXI_CMD                       = 0x00000104,
VFE_AXI_CFG                       = 0x00000108,
VFE_AXI_STATUS                    = 0x0000010C,
CAMIF_COMMAND                     = 0x00000110,
CAMIF_CONFIG                      = 0x00000114,
CAMIF_EFS_CONFIG                  = 0x00000118,
CAMIF_FRAME_CONFIG                = 0x0000011C,
CAMIF_WINDOW_WIDTH_CONFIG         = 0x00000120,
CAMIF_WINDOW_HEIGHT_CONFIG        = 0x00000124,
CAMIF_SUBSAMPLE1_CONFIG           = 0x00000128,
CAMIF_SUBSAMPLE2_CONFIG           = 0x0000012C,
CAMIF_EPOCH_IRQ                   = 0x00000130,
CAMIF_STATUS                      = 0x00000134,
CAMIF_MISR                        = 0x00000138,
VFE_SYNC_TIMER_CMD                = 0x0000013C,
VFE_SYNC_TIMER0_LINE_START        = 0x00000140,
VFE_SYNC_TIMER0_PIXEL_START       = 0x00000144,
VFE_SYNC_TIMER0_PIXEL_DURATION    = 0x00000148,
VFE_SYNC_TIMER1_LINE_START        = 0x0000014C,
VFE_SYNC_TIMER1_PIXEL_START       = 0x00000150,
VFE_SYNC_TIMER1_PIXEL_DURATION    = 0x00000154,
VFE_SYNC_TIMER2_LINE_START        = 0x00000158,
VFE_SYNC_TIMER2_PIXEL_START       = 0x0000015C,
VFE_SYNC_TIMER2_PIXEL_DURATION    = 0x00000160,
VFE_SYNC_TIMER_POLARITY           = 0x00000164,
VFE_ASYNC_TIMER_CMD               = 0x00000168,
VFE_ASYNC_TIMER0_CFG_0            = 0x0000016C,
VFE_ASYNC_TIMER0_CFG_1            = 0x00000170,
VFE_ASYNC_TIMER1_CFG_0            = 0x00000174,
VFE_ASYNC_TIMER1_CFG_1            = 0x00000178,
VFE_ASYNC_TIMER2_CFG_0            = 0x0000017C,
VFE_ASYNC_TIMER2_CFG_1            = 0x00000180,
VFE_ASYNC_TIMER3_CFG_0            = 0x00000184,
VFE_ASYNC_TIMER3_CFG_1            = 0x00000188,
VFE_TIMER_SEL                     = 0x0000018C,
VFE_REG_UPDATE_CMD                = 0x00000190,
VFE_BLACK_EVEN_EVEN_VALUE         = 0x00000194,
VFE_BLACK_EVEN_ODD_VALUE          = 0x00000198,
VFE_BLACK_ODD_EVEN_VALUE          = 0x0000019C,
VFE_BLACK_ODD_ODD_VALUE           = 0x000001A0,
VFE_ROLLOFF_CFG_0                 = 0x000001A4,
VFE_ROLLOFF_CFG_1                 = 0x000001A8,
VFE_ROLLOFF_CFG_2                 = 0x000001AC,
VFE_DEMUX_CFG                     = 0x000001B0,
VFE_DEMUX_GAIN_0                  = 0x000001B4,
VFE_DEMUX_GAIN_1                  = 0x000001B8,
VFE_DEMUX_EVEN_CFG                = 0x000001BC,
VFE_DEMUX_ODD_CFG                 = 0x000001C0,
VFE_DEMOSAIC_CFG                  = 0x000001C4,
VFE_DEMOSAIC_ABF_CFG_0            = 0x000001C8,
VFE_DEMOSAIC_ABF_CFG_1            = 0x000001CC,
VFE_DEMOSAIC_BPC_CFG_0            = 0x000001D0,
VFE_DEMOSAIC_BPC_CFG_1            = 0x000001D4,
VFE_DEMOSAIC_STATUS               = 0x000001D8,
VFE_CHROMA_UPSAMPLE_CFG           = 0x000001DC,
VFE_CROP_WIDTH_CFG                = 0x000001E0,
VFE_CROP_HEIGHT_CFG               = 0x000001E4,
VFE_COLOR_CORRECT_COEFF_0         = 0x000001E8,
VFE_COLOR_CORRECT_COEFF_1         = 0x000001EC,
VFE_COLOR_CORRECT_COEFF_2         = 0x000001F0,
VFE_COLOR_CORRECT_COEFF_3         = 0x000001F4,
VFE_COLOR_CORRECT_COEFF_4         = 0x000001F8,
VFE_COLOR_CORRECT_COEFF_5         = 0x000001FC,
VFE_COLOR_CORRECT_COEFF_6         = 0x00000200,
VFE_COLOR_CORRECT_COEFF_7         = 0x00000204,
VFE_COLOR_CORRECT_COEFF_8         = 0x00000208,
VFE_COLOR_CORRECT_OFFSET_0        = 0x0000020C,
VFE_COLOR_CORRECT_OFFSET_1        = 0x00000210,
VFE_COLOR_CORRECT_OFFSET_2        = 0x00000214,
VFE_COLOR_CORRECT_COEFF_Q         = 0x00000218,
VFE_LA_CFG                        = 0x0000021C,
VFE_LUT_BANK_SEL                  = 0x00000220,
VFE_CHROMA_ENHAN_A                = 0x00000224,
VFE_CHROMA_ENHAN_B                = 0x00000228,
VFE_CHROMA_ENHAN_C                = 0x0000022C,
VFE_CHROMA_ENHAN_D                = 0x00000230,
VFE_CHROMA_ENHAN_K                = 0x00000234,
VFE_COLOR_CONVERT_COEFF_0         = 0x00000238,
VFE_COLOR_CONVERT_COEFF_1         = 0x0000023C,
VFE_COLOR_CONVERT_COEFF_2         = 0x00000240,
VFE_COLOR_CONVERT_OFFSET          = 0x00000244,
VFE_ASF_CFG                       = 0x00000248,
VFE_ASF_SHARP_CFG_0               = 0x0000024C,
VFE_ASF_SHARP_CFG_1               = 0x00000250,
VFE_ASF_SHARP_COEFF_0             = 0x00000254,
VFE_ASF_SHARP_COEFF_1             = 0x00000258,
VFE_ASF_SHARP_COEFF_2             = 0x0000025C,
VFE_ASF_SHARP_COEFF_3             = 0x00000260,
VFE_ASF_MAX_EDGE                  = 0x00000264,
VFE_ASF_CROP_WIDTH_CFG            = 0x00000268,
VFE_ASF_CROP_HEIGHT_CFG           = 0x0000026C,
VFE_SCALE_CFG                     = 0x00000270,
VFE_SCALE_H_IMAGE_SIZE_CFG        = 0x00000274,
VFE_SCALE_H_PHASE_CFG             = 0x00000278,
VFE_SCALE_H_STRIPE_CFG            = 0x0000027C,
VFE_SCALE_V_IMAGE_SIZE_CFG        = 0x00000280,
VFE_SCALE_V_PHASE_CFG             = 0x00000284,
VFE_SCALE_V_STRIPE_CFG            = 0x00000288,
VFE_SCALE_Y_CFG                   = 0x0000028C,
VFE_SCALE_Y_H_IMAGE_SIZE_CFG      = 0x00000290,
VFE_SCALE_Y_H_PHASE_CFG           = 0x00000294,
VFE_SCALE_Y_V_IMAGE_SIZE_CFG      = 0x00000298,
VFE_SCALE_Y_V_PHASE_CFG           = 0x0000029C,
VFE_SCALE_CBCR_CFG                = 0x000002A0,
VFE_SCALE_CBCR_H_IMAGE_SIZE_CFG   = 0x000002A4,
VFE_SCALE_CBCR_H_PHASE_CFG        = 0x000002A8,
VFE_SCALE_CBCR_V_IMAGE_SIZE_CFG   = 0x000002AC,
VFE_SCALE_CBCR_V_PHASE_CFG        = 0x000002B0,
VFE_WB_CFG                        = 0x000002B4,
VFE_CHROMA_SUPPRESS_CFG_0         = 0x000002B8,
VFE_CHROMA_SUPPRESS_CFG_1         = 0x000002BC,
VFE_CHROMA_SUBSAMPLE_CFG          = 0x000002C0,
VFE_CHROMA_SUB_CROP_WIDTH_CFG     = 0x000002C4,
VFE_CHROMA_SUB_CROP_HEIGHT_CFG    = 0x000002C8,
VFE_FRAMEDROP_ENC_Y_CFG           = 0x000002CC,
VFE_FRAMEDROP_ENC_CBCR_CFG        = 0x000002D0,
VFE_FRAMEDROP_ENC_Y_PATTERN       = 0x000002D4,
VFE_FRAMEDROP_ENC_CBCR_PATTERN    = 0x000002D8,
VFE_FRAMEDROP_VIEW_Y_CFG          = 0x000002DC,
VFE_FRAMEDROP_VIEW_CBCR_CFG       = 0x000002E0,
VFE_FRAMEDROP_VIEW_Y_PATTERN      = 0x000002E4,
VFE_FRAMEDROP_VIEW_CBCR_PATTERN   = 0x000002E8,
VFE_CLAMP_MAX_CFG                 = 0x000002EC,
VFE_CLAMP_MIN_CFG                 = 0x000002F0,
VFE_STATS_CMD                     = 0x000002F4,
VFE_STATS_AF_CFG                  = 0x000002F8,
VFE_STATS_AF_DIM                  = 0x000002FC,
VFE_STATS_AF_GRID_0               = 0x00000300,
VFE_STATS_AF_GRID_1               = 0x00000304,
VFE_STATS_AF_GRID_2               = 0x00000308,
VFE_STATS_AF_GRID_3               = 0x0000030C,
VFE_STATS_AF_HEADER               = 0x00000310,
VFE_STATS_AF_COEF0                = 0x00000314,
VFE_STATS_AF_COEF1                = 0x00000318,
VFE_STATS_AWBAE_CFG               = 0x0000031C,
VFE_STATS_AXW_HEADER              = 0x00000320,
VFE_STATS_AWB_MCFG                = 0x00000324,
VFE_STATS_AWB_CCFG1               = 0x00000328,
VFE_STATS_AWB_CCFG2               = 0x0000032C,
VFE_STATS_HIST_HEADER             = 0x00000330,
VFE_STATS_HIST_INNER_OFFSET       = 0x00000334,
VFE_STATS_HIST_INNER_DIM          = 0x00000338,
VFE_STATS_FRAME_SIZE              = 0x0000033C,
VFE_DMI_CFG                       = 0x00000340,
VFE_DMI_ADDR                      = 0x00000344,
VFE_DMI_DATA_HI                   = 0x00000348,
VFE_DMI_DATA_LO                   = 0x0000034C,
VFE_DMI_RAM_AUTO_LOAD_CMD         = 0x00000350,
VFE_DMI_RAM_AUTO_LOAD_STATUS      = 0x00000354,
VFE_DMI_RAM_AUTO_LOAD_CFG         = 0x00000358,
VFE_DMI_RAM_AUTO_LOAD_SEED        = 0x0000035C,
VFE_TESTBUS_SEL                   = 0x00000360,
VFE_TESTGEN_CFG                   = 0x00000364,
VFE_SW_TESTGEN_CMD                = 0x00000368,
VFE_HW_TESTGEN_CMD                = 0x0000036C,
VFE_HW_TESTGEN_CFG                = 0x00000370,
VFE_HW_TESTGEN_IMAGE_CFG          = 0x00000374,
VFE_HW_TESTGEN_SOF_OFFSET_CFG     = 0x00000378,
VFE_HW_TESTGEN_EOF_NOFFSET_CFG    = 0x0000037C,
VFE_HW_TESTGEN_SOL_OFFSET_CFG     = 0x00000380,
VFE_HW_TESTGEN_EOL_NOFFSET_CFG    = 0x00000384,
VFE_HW_TESTGEN_HBI_CFG            = 0x00000388,
VFE_HW_TESTGEN_VBL_CFG            = 0x0000038C,
VFE_HW_TESTGEN_SOF_DUMMY_LINE_CFG2 = 0x00000390,
VFE_HW_TESTGEN_EOF_DUMMY_LINE_CFG2 = 0x00000394,
VFE_HW_TESTGEN_COLOR_BARS_CFG     = 0x00000398,
VFE_HW_TESTGEN_RANDOM_CFG         = 0x0000039C,
VFE_SPARE                         = 0x000003A0,
};

#define ping 0x0
#define pong 0x1

struct vfe_bus_cfg_data {
	boolean                  stripeRdPathEn;
	boolean                  encYWrPathEn;
	boolean                  encCbcrWrPathEn;
	boolean                  viewYWrPathEn;
	boolean                  viewCbcrWrPathEn;
	enum VFE_RAW_PIXEL_DATA_SIZE rawPixelDataSize;
	enum VFE_RAW_WR_PATH_SEL     rawWritePathSelect;
};

struct vfe_camif_cfg_data {
	boolean camif2OutputEnable;
	boolean camif2BusEnable;
	struct vfe_cmds_camif_cfg camifCfgFromCmd;
};

struct vfe_irq_composite_mask_config {
	uint8_t encIrqComMask;
	uint8_t viewIrqComMask;
	uint8_t ceDoneSel;
};

/* define a structure for each output path.*/
struct vfe_output_path {
	uint32_t addressBuffer[8];
	uint16_t fragIndex;
	boolean  hwCurrentFlag;
	uint8_t  *hwRegPingAddress;
	uint8_t  *hwRegPongAddress;
};

struct vfe_output_path_combo {
	boolean           whichOutputPath;
	boolean           pathEnabled;
	boolean           multiFrag;
	uint8_t           fragCount;
	boolean           ackPending;
	uint8_t           currentFrame;
	uint32_t          nextFrameAddrBuf[8];
	struct vfe_output_path   yPath;
	struct vfe_output_path   cbcrPath;
	uint8_t           snapshotPendingCount;
	boolean           pmEnabled;
	uint8_t           cbcrStatusBit;
};

struct vfe_stats_control {
	boolean  ackPending;
	uint32_t addressBuffer[2];
	uint32_t nextFrameAddrBuf;
	boolean  pingPongStatus;
	uint8_t  *hwRegPingAddress;
	uint8_t  *hwRegPongAddress;
	uint32_t droppedStatsFrameCount;
	uint32_t bufToRender;
};

struct vfe_gamma_lut_sel {
	boolean  ch0BankSelect;
	boolean  ch1BankSelect;
	boolean  ch2BankSelect;
};

struct vfe_interrupt_mask {
	boolean  camifErrorIrq;
	boolean  camifSofIrq;
	boolean  camifEolIrq;
	boolean  camifEofIrq;
	boolean  camifEpoch1Irq;
	boolean  camifEpoch2Irq;
	boolean  camifOverflowIrq;
	boolean  ceIrq;
	boolean  regUpdateIrq;
	boolean  resetAckIrq;
	boolean  encYPingpongIrq;
	boolean  encCbcrPingpongIrq;
	boolean  viewYPingpongIrq;
	boolean  viewCbcrPingpongIrq;
	boolean  rdPingpongIrq;
	boolean  afPingpongIrq;
	boolean  awbPingpongIrq;
	boolean  histPingpongIrq;
	boolean  encIrq;
	boolean  viewIrq;
	boolean  busOverflowIrq;
	boolean  afOverflowIrq;
	boolean  awbOverflowIrq;
	boolean  syncTimer0Irq;
	boolean  syncTimer1Irq;
	boolean  syncTimer2Irq;
	boolean  asyncTimer0Irq;
	boolean  asyncTimer1Irq;
	boolean  asyncTimer2Irq;
	boolean  asyncTimer3Irq;
	boolean  axiErrorIrq;
	boolean  violationIrq;
};

enum vfe_interrupt_name {
	CAMIF_ERROR_IRQ,
	CAMIF_SOF_IRQ,
	CAMIF_EOL_IRQ,
	CAMIF_EOF_IRQ,
	CAMIF_EPOCH1_IRQ,
	CAMIF_EPOCH2_IRQ,
	CAMIF_OVERFLOW_IRQ,
	CE_IRQ,
	REG_UPDATE_IRQ,
	RESET_ACK_IRQ,
	ENC_Y_PINGPONG_IRQ,
	ENC_CBCR_PINGPONG_IRQ,
	VIEW_Y_PINGPONG_IRQ,
	VIEW_CBCR_PINGPONG_IRQ,
	RD_PINGPONG_IRQ,
	AF_PINGPONG_IRQ,
	AWB_PINGPONG_IRQ,
	HIST_PINGPONG_IRQ,
	ENC_IRQ,
	VIEW_IRQ,
	BUS_OVERFLOW_IRQ,
	AF_OVERFLOW_IRQ,
	AWB_OVERFLOW_IRQ,
	SYNC_TIMER0_IRQ,
	SYNC_TIMER1_IRQ,
	SYNC_TIMER2_IRQ,
	ASYNC_TIMER0_IRQ,
	ASYNC_TIMER1_IRQ,
	ASYNC_TIMER2_IRQ,
	ASYNC_TIMER3_IRQ,
	AXI_ERROR_IRQ,
	VIOLATION_IRQ
};

enum VFE_DMI_RAM_SEL {
	NO_MEM_SELECTED          = 0,
	ROLLOFF_RAM              = 0x1,
	RGBLUT_RAM_CH0_BANK0     = 0x2,
	RGBLUT_RAM_CH0_BANK1     = 0x3,
	RGBLUT_RAM_CH1_BANK0     = 0x4,
	RGBLUT_RAM_CH1_BANK1     = 0x5,
	RGBLUT_RAM_CH2_BANK0     = 0x6,
	RGBLUT_RAM_CH2_BANK1     = 0x7,
	STATS_HIST_CB_EVEN_RAM   = 0x8,
	STATS_HIST_CB_ODD_RAM    = 0x9,
	STATS_HIST_CR_EVEN_RAM   = 0xa,
	STATS_HIST_CR_ODD_RAM    = 0xb,
	RGBLUT_CHX_BANK0         = 0xc,
	RGBLUT_CHX_BANK1         = 0xd,
	LUMA_ADAPT_LUT_RAM_BANK0 = 0xe,
	LUMA_ADAPT_LUT_RAM_BANK1 = 0xf
};

struct vfe_module_enable {
	boolean  blackLevelCorrectionEnable;
	boolean  lensRollOffEnable;
	boolean  demuxEnable;
	boolean  chromaUpsampleEnable;
	boolean  demosaicEnable;
	boolean  statsEnable;
	boolean  cropEnable;
	boolean  mainScalerEnable;
	boolean  whiteBalanceEnable;
	boolean  colorCorrectionEnable;
	boolean  yHistEnable;
	boolean  skinToneEnable;
	boolean  lumaAdaptationEnable;
	boolean  rgbLUTEnable;
	boolean  chromaEnhanEnable;
	boolean  asfEnable;
	boolean  chromaSuppressionEnable;
	boolean  chromaSubsampleEnable;
	boolean  scaler2YEnable;
	boolean  scaler2CbcrEnable;
};

struct vfe_bus_cmd_data {
	boolean  stripeReload;
	boolean  busPingpongReload;
	boolean  statsPingpongReload;
};

struct vfe_stats_cmd_data {
	boolean  autoFocusEnable;
	boolean  axwEnable;
	boolean  histEnable;
	boolean  clearHistEnable;
	boolean  histAutoClearEnable;
	boolean  colorConversionEnable;
};

struct vfe_hw_ver {
	uint32_t minorVersion:8;
	uint32_t majorVersion:8;
	uint32_t coreVersion:4;
	uint32_t /* reserved */ : 12;
} __attribute__((packed, aligned(4)));

struct vfe_cfg {
	uint32_t pixelPattern:3;
	uint32_t /* reserved */ : 13;
	uint32_t inputSource:2;
	uint32_t /* reserved */ : 14;
} __attribute__((packed, aligned(4)));

struct vfe_buscmd {
	uint32_t  stripeReload:1;
	uint32_t  /* reserved */ : 3;
	uint32_t  busPingpongReload:1;
	uint32_t  statsPingpongReload:1;
	uint32_t  /* reserved */ : 26;
} __attribute__((packed, aligned(4)));

struct VFE_Irq_Composite_MaskType {
	uint32_t  encIrqComMaskBits:2;
	uint32_t  viewIrqComMaskBits:2;
	uint32_t  ceDoneSelBits:5;
	uint32_t  /* reserved */ : 23;
} __attribute__((packed, aligned(4)));

struct vfe_mod_enable {
	uint32_t blackLevelCorrectionEnable:1;
	uint32_t lensRollOffEnable:1;
	uint32_t demuxEnable:1;
	uint32_t chromaUpsampleEnable:1;
	uint32_t demosaicEnable:1;
	uint32_t statsEnable:1;
	uint32_t cropEnable:1;
	uint32_t mainScalerEnable:1;
	uint32_t whiteBalanceEnable:1;
	uint32_t colorCorrectionEnable:1;
	uint32_t yHistEnable:1;
	uint32_t skinToneEnable:1;
	uint32_t lumaAdaptationEnable:1;
	uint32_t rgbLUTEnable:1;
	uint32_t chromaEnhanEnable:1;
	uint32_t asfEnable:1;
	uint32_t chromaSuppressionEnable:1;
	uint32_t chromaSubsampleEnable:1;
	uint32_t scaler2YEnable:1;
	uint32_t scaler2CbcrEnable:1;
	uint32_t /* reserved */ : 14;
} __attribute__((packed, aligned(4)));

struct vfe_irqenable {
	uint32_t camifErrorIrq:1;
	uint32_t camifSofIrq:1;
	uint32_t camifEolIrq:1;
	uint32_t camifEofIrq:1;
	uint32_t camifEpoch1Irq:1;
	uint32_t camifEpoch2Irq:1;
	uint32_t camifOverflowIrq:1;
	uint32_t ceIrq:1;
	uint32_t regUpdateIrq:1;
	uint32_t resetAckIrq:1;
	uint32_t encYPingpongIrq:1;
	uint32_t encCbcrPingpongIrq:1;
	uint32_t viewYPingpongIrq:1;
	uint32_t viewCbcrPingpongIrq:1;
	uint32_t rdPingpongIrq:1;
	uint32_t afPingpongIrq:1;
	uint32_t awbPingpongIrq:1;
	uint32_t histPingpongIrq:1;
	uint32_t encIrq:1;
	uint32_t viewIrq:1;
	uint32_t busOverflowIrq:1;
	uint32_t afOverflowIrq:1;
	uint32_t awbOverflowIrq:1;
	uint32_t syncTimer0Irq:1;
	uint32_t syncTimer1Irq:1;
	uint32_t syncTimer2Irq:1;
	uint32_t asyncTimer0Irq:1;
	uint32_t asyncTimer1Irq:1;
	uint32_t asyncTimer2Irq:1;
	uint32_t asyncTimer3Irq:1;
	uint32_t axiErrorIrq:1;
	uint32_t violationIrq:1;
} __attribute__((packed, aligned(4)));

struct vfe_upsample_cfg {
	uint32_t chromaCositingForYCbCrInputs:1;
	uint32_t /* reserved */ : 31;
} __attribute__((packed, aligned(4)));

struct VFE_CAMIFConfigType {
	/* CAMIF Config */
	uint32_t  /* reserved */ : 1;
	uint32_t  VSyncEdge:1;
	uint32_t  HSyncEdge:1;
	uint32_t  syncMode:2;
	uint32_t  vfeSubsampleEnable:1;
	uint32_t  /* reserved */ : 1;
	uint32_t  busSubsampleEnable:1;
	uint32_t  camif2vfeEnable:1;
	uint32_t  /* reserved */ : 1;
	uint32_t  camif2busEnable:1;
	uint32_t  irqSubsampleEnable:1;
	uint32_t  binningEnable:1;
	uint32_t  /* reserved */ : 18;
	uint32_t  misrEnable:1;
} __attribute__((packed, aligned(4)));

struct vfe_camifcfg {
	/* EFS_Config */
	uint32_t efsEndOfLine:8;
	uint32_t efsStartOfLine:8;
	uint32_t efsEndOfFrame:8;
	uint32_t efsStartOfFrame:8;
	/* Frame Config */
	uint32_t frameConfigPixelsPerLine:14;
	uint32_t /* reserved */ : 2;
	uint32_t frameConfigLinesPerFrame:14;
	uint32_t /* reserved */ : 2;
	/* Window Width Config */
	uint32_t windowWidthCfgLastPixel:14;
	uint32_t /* reserved */ : 2;
	uint32_t windowWidthCfgFirstPixel:14;
	uint32_t /* reserved */ : 2;
	/* Window Height Config */
	uint32_t windowHeightCfglastLine:14;
	uint32_t /* reserved */ : 2;
	uint32_t windowHeightCfgfirstLine:14;
	uint32_t /* reserved */ : 2;
	/* Subsample 1 Config */
	uint32_t subsample1CfgPixelSkip:16;
	uint32_t subsample1CfgLineSkip:16;
	/* Subsample 2 Config */
	uint32_t subsample2CfgFrameSkip:4;
	uint32_t subsample2CfgFrameSkipMode:1;
	uint32_t subsample2CfgPixelSkipWrap:1;
	uint32_t /* reserved */ : 26;
	/* Epoch Interrupt */
	uint32_t epoch1Line:14;
	uint32_t /* reserved */ : 2;
	uint32_t epoch2Line:14;
	uint32_t /* reserved */ : 2;
} __attribute__((packed, aligned(4)));

struct vfe_camifframe_update {
	uint32_t pixelsPerLine:14;
	uint32_t /* reserved */ : 2;
	uint32_t linesPerFrame:14;
	uint32_t /* reserved */ : 2;
} __attribute__((packed, aligned(4)));

struct vfe_axi_bus_cfg {
	uint32_t  stripeRdPathEn:1;
	uint32_t  /* reserved */ : 3;
	uint32_t  encYWrPathEn:1;
	uint32_t  encCbcrWrPathEn:1;
	uint32_t  viewYWrPathEn:1;
	uint32_t  viewCbcrWrPathEn:1;
	uint32_t  rawPixelDataSize:2;
	uint32_t  rawWritePathSelect:2;
	uint32_t  /* reserved */ : 20;
} __attribute__((packed, aligned(4)));

struct vfe_axi_out_cfg {
	uint32_t  out2YPingAddr:32;
	uint32_t  out2YPongAddr:32;
	uint32_t  out2YImageHeight:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  out2YImageWidthin64bit:10;
	uint32_t  /* reserved */ : 6;
	uint32_t  out2YBurstLength:2;
	uint32_t  /* reserved */ : 2;
	uint32_t  out2YNumRows:12;
	uint32_t  out2YRowIncrementIn64bit:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  out2CbcrPingAddr:32;
	uint32_t  out2CbcrPongAddr:32;
	uint32_t  out2CbcrImageHeight:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  out2CbcrImageWidthIn64bit:10;
	uint32_t  /* reserved */ : 6;
	uint32_t  out2CbcrBurstLength:2;
	uint32_t  /* reserved */ : 2;
	uint32_t  out2CbcrNumRows:12;
	uint32_t  out2CbcrRowIncrementIn64bit:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  out1YPingAddr:32;
	uint32_t  out1YPongAddr:32;
	uint32_t  out1YImageHeight:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  out1YImageWidthin64bit:10;
	uint32_t  /* reserved */ : 6;
	uint32_t  out1YBurstLength:2;
	uint32_t  /* reserved */ : 2;
	uint32_t  out1YNumRows:12;
	uint32_t  out1YRowIncrementIn64bit:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  out1CbcrPingAddr:32;
	uint32_t  out1CbcrPongAddr:32;
	uint32_t  out1CbcrImageHeight:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  out1CbcrImageWidthIn64bit:10;
	uint32_t  /* reserved */ : 6;
	uint32_t  out1CbcrBurstLength:2;
	uint32_t  /* reserved */ : 2;
	uint32_t  out1CbcrNumRows:12;
	uint32_t  out1CbcrRowIncrementIn64bit:12;
	uint32_t  /* reserved */ : 4;
} __attribute__((packed, aligned(4)));

struct vfe_output_clamp_cfg {
	/* Output Clamp Maximums */
	uint32_t yChanMax:8;
	uint32_t cbChanMax:8;
	uint32_t crChanMax:8;
	uint32_t /* reserved */ : 8;
	/* Output Clamp Minimums */
	uint32_t yChanMin:8;
	uint32_t cbChanMin:8;
	uint32_t crChanMin:8;
	uint32_t /* reserved */ : 8;
} __attribute__((packed, aligned(4)));

struct vfe_fov_crop_cfg {
	uint32_t lastPixel:12;
	uint32_t /* reserved */ : 4;
	uint32_t firstPixel:12;
	uint32_t /* reserved */ : 4;

	/* FOV Corp, Part 2 */
	uint32_t lastLine:12;
	uint32_t /* reserved */ : 4;
	uint32_t firstLine:12;
	uint32_t /* reserved */ : 4;
} __attribute__((packed, aligned(4)));

struct VFE_FRAME_SKIP_UpdateCmdType {
	uint32_t  yPattern:32;
	uint32_t  cbcrPattern:32;
} __attribute__((packed, aligned(4)));

struct vfe_frame_skip_cfg {
	/* Frame Drop Enc (output2) */
	uint32_t output2YPeriod:5;
	uint32_t /* reserved */	: 27;
	uint32_t output2CbCrPeriod:5;
	uint32_t /* reserved */ : 27;
	uint32_t output2YPattern:32;
	uint32_t output2CbCrPattern:32;
	/* Frame Drop View (output1) */
	uint32_t output1YPeriod:5;
	uint32_t /* reserved */ : 27;
	uint32_t output1CbCrPeriod:5;
	uint32_t /* reserved */ : 27;
	uint32_t output1YPattern:32;
	uint32_t output1CbCrPattern:32;
} __attribute__((packed, aligned(4)));

struct vfe_main_scaler_cfg {
	/* Scaler Enable Config */
	uint32_t hEnable:1;
	uint32_t vEnable:1;
	uint32_t /* reserved */ : 30;
	/* Scale H Image Size Config */
	uint32_t inWidth:12;
	uint32_t /* reserved */ : 4;
	uint32_t outWidth:12;
	uint32_t /* reserved */ : 4;
	/* Scale H Phase Config */
	uint32_t horizPhaseMult:18;
	uint32_t /* reserved */ : 2;
	uint32_t horizInterResolution:2;
	uint32_t /* reserved */ : 10;
	/* Scale H Stripe Config */
	uint32_t horizMNInit:12;
	uint32_t /* reserved */ : 4;
	uint32_t horizPhaseInit:15;
	uint32_t /* reserved */ : 1;
	/* Scale V Image Size Config */
	uint32_t inHeight:12;
	uint32_t /* reserved */ : 4;
	uint32_t outHeight:12;
	uint32_t /* reserved */ : 4;
	/* Scale V Phase Config */
	uint32_t vertPhaseMult:18;
	uint32_t /* reserved */ : 2;
	uint32_t vertInterResolution:2;
	uint32_t /* reserved */ : 10;
	/* Scale V Stripe Config */
	uint32_t vertMNInit:12;
	uint32_t /* reserved */ : 4;
	uint32_t vertPhaseInit:15;
	uint32_t /* reserved */ : 1;
} __attribute__((packed, aligned(4)));

struct vfe_scaler2_cfg {
	/* Scaler   Enable Config */
	uint32_t  hEnable:1;
	uint32_t  vEnable:1;
	uint32_t  /* reserved */ : 30;
	/* Scaler   H Image Size Config */
	uint32_t  inWidth:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  outWidth:12;
	uint32_t  /* reserved */ : 4;
	/* Scaler   H Phase Config */
	uint32_t  horizPhaseMult:18;
	uint32_t  /* reserved */ : 2;
	uint32_t  horizInterResolution:2;
	uint32_t  /* reserved */ : 10;
	/* Scaler   V Image Size Config */
	uint32_t  inHeight:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  outHeight:12;
	uint32_t  /* reserved */ : 4;
	/* Scaler   V Phase Config */
	uint32_t  vertPhaseMult:18;
	uint32_t  /* reserved */ : 2;
	uint32_t  vertInterResolution:2;
	uint32_t  /* reserved */ : 10;
} __attribute__((packed, aligned(4)));

struct vfe_rolloff_cfg {
	/* Rolloff 0 Config */
	uint32_t  gridWidth:9;
	uint32_t  gridHeight:9;
	uint32_t  yDelta:9;
	uint32_t  /* reserved */ : 5;
	/* Rolloff 1 Config*/
	uint32_t  gridX:4;
	uint32_t  gridY:4;
	uint32_t  pixelX:9;
	uint32_t  /* reserved */ : 3;
	uint32_t  pixelY:9;
	uint32_t  /* reserved */ : 3;
	/* Rolloff 2 Config */
	uint32_t  yDeltaAccum:12;
	uint32_t  /* reserved */ : 20;
} __attribute__((packed, aligned(4)));

struct vfe_asf_update {
	/* ASF Config Command */
	uint32_t smoothEnable:1;
	uint32_t sharpMode:2;
	uint32_t /* reserved */ : 1;
	uint32_t smoothCoeff1:4;
	uint32_t smoothCoeff0:8;
	uint32_t pipeFlushCount:12;
	uint32_t pipeFlushOvd:1;
	uint32_t flushHaltOvd:1;
	uint32_t cropEnable:1;
	uint32_t /* reserved */ : 1;
	/* Sharpening Config 0 */
	uint32_t sharpThresholdE1:7;
	uint32_t /* reserved */ : 1;
	uint32_t sharpDegreeK1:5;
	uint32_t /* reserved */ : 3;
	uint32_t sharpDegreeK2:5;
	uint32_t /* reserved */ : 3;
	uint32_t normalizeFactor:7;
	uint32_t /* reserved */ : 1;
	/* Sharpening Config 1 */
	uint32_t sharpThresholdE2:8;
	uint32_t sharpThresholdE3:8;
	uint32_t sharpThresholdE4:8;
	uint32_t sharpThresholdE5:8;
	/* Sharpening Coefficients 0 */
	uint32_t F1Coeff0:6;
	uint32_t F1Coeff1:6;
	uint32_t F1Coeff2:6;
	uint32_t F1Coeff3:6;
	uint32_t F1Coeff4:6;
	uint32_t /* reserved */ : 2;
	/* Sharpening Coefficients 1 */
	uint32_t F1Coeff5:6;
	uint32_t F1Coeff6:6;
	uint32_t F1Coeff7:6;
	uint32_t F1Coeff8:7;
	uint32_t /* reserved */ : 7;
	/* Sharpening Coefficients 2 */
	uint32_t F2Coeff0:6;
	uint32_t F2Coeff1:6;
	uint32_t F2Coeff2:6;
	uint32_t F2Coeff3:6;
	uint32_t F2Coeff4:6;
	uint32_t /* reserved */ : 2;
	/* Sharpening Coefficients 3 */
	uint32_t F2Coeff5:6;
	uint32_t F2Coeff6:6;
	uint32_t F2Coeff7:6;
	uint32_t F2Coeff8:7;
	uint32_t /* reserved */ : 7;
} __attribute__((packed, aligned(4)));

struct vfe_asfcrop_cfg {
	/* ASF Crop Width Config */
	uint32_t lastPixel:12;
	uint32_t /* reserved */ : 4;
	uint32_t firstPixel:12;
	uint32_t /* reserved */ : 4;
	/* ASP Crop Height Config */
	uint32_t lastLine:12;
	uint32_t /* reserved */ : 4;
	uint32_t firstLine:12;
	uint32_t /* reserved */ : 4;
} __attribute__((packed, aligned(4)));

struct vfe_chroma_suppress_cfg {
	/* Chroma Suppress 0 Config */
	uint32_t m1:8;
	uint32_t m3:8;
	uint32_t n1:3;
	uint32_t /* reserved */ : 1;
	uint32_t n3:3;
	uint32_t /* reserved */ : 9;
	/* Chroma Suppress 1 Config */
	uint32_t mm1:8;
	uint32_t nn1:3;
	uint32_t /* reserved */ : 21;
} __attribute__((packed, aligned(4)));

struct vfe_chromasubsample_cfg {
	/* Chroma Subsample Selection */
	uint32_t  hCositedPhase:1;
	uint32_t  vCositedPhase:1;
	uint32_t  hCosited:1;
	uint32_t  vCosited:1;
	uint32_t  hsubSampleEnable:1;
	uint32_t  vsubSampleEnable:1;
	uint32_t  cropEnable:1;
	uint32_t  /* reserved */ : 25;
	uint32_t  cropWidthLastPixel:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  cropWidthFirstPixel:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  cropHeightLastLine:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  cropHeightFirstLine:12;
	uint32_t  /* reserved */ : 4;
} __attribute__((packed, aligned(4)));

struct vfe_blacklevel_cfg {
	/* Black Even-Even Value Config */
	uint32_t    evenEvenAdjustment:9;
	uint32_t   /* reserved */ : 23;
	/* Black Even-Odd Value Config */
	uint32_t    evenOddAdjustment:9;
	uint32_t   /* reserved */ : 23;
	/* Black Odd-Even Value Config */
	uint32_t    oddEvenAdjustment:9;
	uint32_t   /* reserved */ : 23;
	/* Black Odd-Odd Value Config */
	uint32_t    oddOddAdjustment:9;
	uint32_t   /* reserved */ : 23;
} __attribute__((packed, aligned(4)));

struct vfe_demux_cfg {
	/* Demux Gain 0 Config */
	uint32_t  ch0EvenGain:10;
	uint32_t  /* reserved */ : 6;
	uint32_t  ch0OddGain:10;
	uint32_t  /* reserved */ : 6;
	/* Demux Gain 1 Config */
	uint32_t  ch1Gain:10;
	uint32_t  /* reserved */ : 6;
	uint32_t  ch2Gain:10;
	uint32_t  /* reserved */ : 6;
} __attribute__((packed, aligned(4)));

struct vfe_bps_info {
  uint32_t greenBadPixelCount:8;
  uint32_t /* reserved */ : 8;
  uint32_t RedBlueBadPixelCount:8;
  uint32_t /* reserved */ : 8;
} __attribute__((packed, aligned(4)));

struct vfe_demosaic_cfg {
	/* Demosaic Config */
	uint32_t abfEnable:1;
	uint32_t badPixelCorrEnable:1;
	uint32_t forceAbfOn:1;
	uint32_t /* reserved */ : 1;
	uint32_t abfShift:4;
	uint32_t fminThreshold:7;
	uint32_t /* reserved */ : 1;
	uint32_t fmaxThreshold:7;
	uint32_t /* reserved */ : 5;
	uint32_t slopeShift:3;
	uint32_t /* reserved */ : 1;
} __attribute__((packed, aligned(4)));

struct vfe_demosaic_bpc_cfg {
	/* Demosaic BPC Config 0 */
	uint32_t blueDiffThreshold:12;
	uint32_t redDiffThreshold:12;
	uint32_t /* reserved */ : 8;
	/* Demosaic BPC Config 1 */
	uint32_t greenDiffThreshold:12;
	uint32_t /* reserved */ : 20;
} __attribute__((packed, aligned(4)));

struct vfe_demosaic_abf_cfg {
	/* Demosaic ABF Config 0 */
	uint32_t lpThreshold:10;
	uint32_t /* reserved */ : 22;
	/* Demosaic ABF Config 1 */
	uint32_t ratio:4;
	uint32_t minValue:10;
	uint32_t /* reserved */ : 2;
	uint32_t maxValue:10;
	uint32_t /* reserved */ : 6;
} __attribute__((packed, aligned(4)));

struct vfe_color_correction_cfg {
	/* Color Corr. Coefficient 0 Config */
	uint32_t   c0:12;
	uint32_t   /* reserved */ : 20;
	/* Color Corr. Coefficient 1 Config */
	uint32_t   c1:12;
	uint32_t   /* reserved */ : 20;
	/* Color Corr. Coefficient 2 Config */
	uint32_t   c2:12;
	uint32_t   /* reserved */ : 20;
	/* Color Corr. Coefficient 3 Config */
	uint32_t   c3:12;
	uint32_t   /* reserved */ : 20;
	/* Color Corr. Coefficient 4 Config */
	uint32_t   c4:12;
	uint32_t   /* reserved */ : 20;
	/* Color Corr. Coefficient 5 Config */
	uint32_t   c5:12;
	uint32_t   /* reserved */ : 20;
	/* Color Corr. Coefficient 6 Config */
	uint32_t   c6:12;
	uint32_t   /* reserved */ : 20;
	/* Color Corr. Coefficient 7 Config */
	uint32_t   c7:12;
	uint32_t   /* reserved */ : 20;
	/* Color Corr. Coefficient 8 Config */
	uint32_t   c8:12;
	uint32_t   /* reserved */ : 20;
	/* Color Corr. Offset 0 Config */
	uint32_t   k0:11;
	uint32_t   /* reserved */ : 21;
	/* Color Corr. Offset 1 Config */
	uint32_t   k1:11;
	uint32_t   /* reserved */ : 21;
	/* Color Corr. Offset 2 Config */
	uint32_t   k2:11;
	uint32_t   /* reserved */ : 21;
	/* Color Corr. Coefficient Q Config */
	uint32_t   coefQFactor:2;
	uint32_t   /* reserved */ : 30;
} __attribute__((packed, aligned(4)));

struct VFE_LumaAdaptation_ConfigCmdType {
	/* LA Config */
	uint32_t   lutBankSelect:1;
	uint32_t   /* reserved */ : 31;
} __attribute__((packed, aligned(4)));

struct vfe_wb_cfg {
	/* WB Config */
	uint32_t ch0Gain:9;
	uint32_t ch1Gain:9;
	uint32_t ch2Gain:9;
	uint32_t /* reserved */ : 5;
} __attribute__((packed, aligned(4)));

struct VFE_GammaLutSelect_ConfigCmdType {
	/* LUT Bank Select Config */
	uint32_t   ch0BankSelect:1;
	uint32_t   ch1BankSelect:1;
	uint32_t   ch2BankSelect:1;
	uint32_t   /* reserved */ : 29;
} __attribute__((packed, aligned(4)));

struct vfe_chroma_enhance_cfg {
	/* Chroma Enhance A Config */
	uint32_t ap:11;
	uint32_t /* reserved */ : 5;
	uint32_t am:11;
	uint32_t /* reserved */ : 5;
	/* Chroma Enhance B Config */
	uint32_t bp:11;
	uint32_t /* reserved */ : 5;
	uint32_t bm:11;
	uint32_t /* reserved */ : 5;
	/* Chroma Enhance C Config */
	uint32_t cp:11;
	uint32_t /* reserved */ : 5;
	uint32_t cm:11;
	uint32_t /* reserved */ : 5;
	/* Chroma Enhance D Config */
	uint32_t dp:11;
	uint32_t /* reserved */ : 5;
	uint32_t dm:11;
	uint32_t /* reserved */ : 5;
	/* Chroma Enhance K Config */
	uint32_t kcb:11;
	uint32_t /* reserved */ : 5;
	uint32_t kcr:11;
	uint32_t /* reserved */ : 5;
} __attribute__((packed, aligned(4)));

struct vfe_color_convert_cfg {
	/* Conversion Coefficient 0 */
	uint32_t v0:12;
	uint32_t /* reserved */ : 20;
	/* Conversion Coefficient 1 */
	uint32_t v1:12;
	uint32_t /* reserved */ : 20;
	/* Conversion Coefficient 2 */
	uint32_t v2:12;
	uint32_t /* reserved */ : 20;
	/* Conversion Offset */
	uint32_t ConvertOffset:8;
	uint32_t /* reserved */ : 24;
} __attribute__((packed, aligned(4)));

struct VFE_SyncTimer_ConfigCmdType {
	/* Timer Line Start Config */
	uint32_t       timerLineStart:12;
	uint32_t       /* reserved */ : 20;
	/* Timer Pixel Start Config */
	uint32_t       timerPixelStart:18;
	uint32_t       /* reserved */ : 14;
	/* Timer Pixel Duration Config */
	uint32_t       timerPixelDuration:28;
	uint32_t       /* reserved */ : 4;
	/* Sync Timer Polarity Config */
	uint32_t       timer0Polarity:1;
	uint32_t       timer1Polarity:1;
	uint32_t       timer2Polarity:1;
	uint32_t       /* reserved */ : 29;
} __attribute__((packed, aligned(4)));

struct VFE_AsyncTimer_ConfigCmdType {
	/* Async Timer Config 0 */
	uint32_t     inactiveLength:20;
	uint32_t     numRepetition:10;
	uint32_t     /* reserved */ : 1;
	uint32_t     polarity:1;
	/* Async Timer Config 1 */
	uint32_t     activeLength:20;
	uint32_t     /* reserved */ : 12;
} __attribute__((packed, aligned(4)));

struct VFE_AWBAEStatistics_ConfigCmdType {
	/* AWB autoexposure Config */
	uint32_t    aeRegionConfig:1;
	uint32_t    aeSubregionConfig:1;
	uint32_t    /* reserved */ : 14;
	uint32_t    awbYMin:8;
	uint32_t    awbYMax:8;
	/* AXW Header */
	uint32_t    axwHeader:8;
	uint32_t    /* reserved */ : 24;
	/* AWB Mconfig */
	uint32_t    m4:8;
	uint32_t    m3:8;
	uint32_t    m2:8;
	uint32_t    m1:8;
	/* AWB Cconfig */
	uint32_t    c2:12;
	uint32_t    /* reserved */ : 4;
	uint32_t    c1:12;
	uint32_t    /* reserved */ : 4;
	/* AWB Cconfig 2 */
	uint32_t    c4:12;
	uint32_t    /* reserved */ : 4;
	uint32_t    c3:12;
	uint32_t    /* reserved */ : 4;
} __attribute__((packed, aligned(4)));

struct VFE_TestGen_ConfigCmdType {
	/* HW Test Gen Config */
	uint32_t   numFrame:10;
	uint32_t   /* reserved */ : 2;
	uint32_t   pixelDataSelect:1;
	uint32_t   systematicDataSelect:1;
	uint32_t   /* reserved */ : 2;
	uint32_t   pixelDataSize:2;
	uint32_t   hsyncEdge:1;
	uint32_t   vsyncEdge:1;
	uint32_t   /* reserved */ : 12;
	/* HW Test Gen Image Config */
	uint32_t   imageWidth:14;
	uint32_t   /* reserved */ : 2;
	uint32_t   imageHeight:14;
	uint32_t   /* reserved */ : 2;
	/* SOF Offset Config */
	uint32_t   sofOffset:24;
	uint32_t   /* reserved */ : 8;
	/* EOF NOffset Config */
	uint32_t   eofNOffset:24;
	uint32_t   /* reserved */ : 8;
	/* SOL Offset Config */
	uint32_t   solOffset:9;
	uint32_t   /* reserved */ : 23;
	/* EOL NOffset Config */
	uint32_t   eolNOffset:9;
	uint32_t   /* reserved */ : 23;
	/* HBI Config */
	uint32_t   hBlankInterval:14;
	uint32_t   /* reserved */ : 18;
	/* VBL Config */
	uint32_t   vBlankInterval:14;
	uint32_t   /* reserved */ : 2;
	uint32_t   vBlankIntervalEnable:1;
	uint32_t   /* reserved */ : 15;
	/* SOF Dummy Line Config */
	uint32_t   sofDummy:8;
	uint32_t   /* reserved */ : 24;
	/* EOF Dummy Line Config */
	uint32_t   eofDummy:8;
	uint32_t   /* reserved */ : 24;
	/* Color Bars Config */
	uint32_t   unicolorBarSelect:3;
	uint32_t   /* reserved */ : 1;
	uint32_t   unicolorBarEnable:1;
	uint32_t   splitEnable:1;
	uint32_t   pixelPattern:2;
	uint32_t   rotatePeriod:6;
	uint32_t   /* reserved */ : 18;
	/* Random Config */
	uint32_t   randomSeed:16;
	uint32_t   /* reserved */ : 16;
} __attribute__((packed, aligned(4)));

struct VFE_Bus_Pm_ConfigCmdType {
	/* VFE Bus Performance Monitor Config */
	uint32_t  output2YWrPmEnable:1;
	uint32_t  output2CbcrWrPmEnable:1;
	uint32_t  output1YWrPmEnable:1;
	uint32_t  output1CbcrWrPmEnable:1;
	uint32_t  /* reserved */ : 28;
} __attribute__((packed, aligned(4)));

struct vfe_asf_info {
	/* asf max edge  */
	uint32_t maxEdge:13;
	uint32_t /* reserved */ : 3;
	/* HBi count  */
	uint32_t HBICount:12;
	uint32_t /* reserved */ : 4;
} __attribute__((packed, aligned(4)));

struct vfe_camif_stats {
  uint32_t  pixelCount:14;
  uint32_t  /* reserved */ : 2;
  uint32_t  lineCount:14;
  uint32_t  /* reserved */ : 1;
  uint32_t  camifHalt:1;
} __attribute__((packed, aligned(4)));

struct VFE_StatsCmdType {
	uint32_t  autoFocusEnable:1;
	uint32_t  axwEnable:1;
	uint32_t  histEnable:1;
	uint32_t  clearHistEnable:1;
	uint32_t  histAutoClearEnable:1;
	uint32_t  colorConversionEnable:1;
	uint32_t  /* reserved */ : 26;
} __attribute__((packed, aligned(4)));


struct vfe_statsframe {
	uint32_t lastPixel:12;
	uint32_t /* reserved */ : 4;
	uint32_t lastLine:12;
	uint32_t /* reserved */ : 4;
} __attribute__((packed, aligned(4)));

struct vfe_busstats_wrprio {
	uint32_t afBusPriority:4;
	uint32_t awbBusPriority:4;
	uint32_t histBusPriority:4;
	uint32_t afBusPriorityEn:1;
	uint32_t awbBusPriorityEn:1;
	uint32_t histBusPriorityEn:1;
	uint32_t /* reserved */ : 17;
} __attribute__((packed, aligned(4)));

struct vfe_statsaf_update {
	/* VFE_STATS_AF_CFG */
	uint32_t windowVOffset:12;
	uint32_t /* reserved */ : 4;
	uint32_t windowHOffset:12;
	uint32_t /* reserved */ : 3;
	uint32_t windowMode:1;

	/* VFE_STATS_AF_DIM */
	uint32_t windowHeight:12;
	uint32_t /* reserved */ : 4;
	uint32_t windowWidth:12;
	uint32_t /* reserved */ : 4;
} __attribute__((packed, aligned(4)));

struct vfe_statsaf_cfg {
	/* VFE_STATS_AF_GRID_0 */
	uint32_t  entry00:8;
	uint32_t  entry01:8;
	uint32_t  entry02:8;
	uint32_t  entry03:8;

	/* VFE_STATS_AF_GRID_1 */
	uint32_t  entry10:8;
	uint32_t  entry11:8;
	uint32_t  entry12:8;
	uint32_t  entry13:8;

	/* VFE_STATS_AF_GRID_2 */
	uint32_t  entry20:8;
	uint32_t  entry21:8;
	uint32_t  entry22:8;
	uint32_t  entry23:8;

	/* VFE_STATS_AF_GRID_3 */
	uint32_t  entry30:8;
	uint32_t  entry31:8;
	uint32_t  entry32:8;
	uint32_t  entry33:8;

	/* VFE_STATS_AF_HEADER */
	uint32_t  afHeader:8;
	uint32_t  /* reserved */ : 24;
	/*  VFE_STATS_AF_COEF0 */
	uint32_t  a00:5;
	uint32_t  a04:5;
	uint32_t  fvMax:11;
	uint32_t  fvMetric:1;
	uint32_t  /* reserved */ : 10;

	/* VFE_STATS_AF_COEF1 */
	uint32_t  a20:5;
	uint32_t  a21:5;
	uint32_t  a22:5;
	uint32_t  a23:5;
	uint32_t  a24:5;
	uint32_t  /* reserved */ : 7;
} __attribute__((packed, aligned(4)));

struct vfe_statsawbae_update {
	uint32_t  aeRegionCfg:1;
	uint32_t  aeSubregionCfg:1;
	uint32_t  /* reserved */ : 14;
	uint32_t  awbYMin:8;
	uint32_t  awbYMax:8;
} __attribute__((packed, aligned(4)));

struct vfe_statsaxw_hdr_cfg {
	/* Stats AXW Header Config */
	uint32_t axwHeader:8;
	uint32_t /* reserved */ : 24;
} __attribute__((packed, aligned(4)));

struct vfe_statsawb_update {
	/* AWB MConfig */
	uint32_t  m4:8;
	uint32_t  m3:8;
	uint32_t  m2:8;
	uint32_t  m1:8;

	/* AWB CConfig1 */
	uint32_t  c2:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  c1:12;
	uint32_t  /* reserved */ : 4;

	/* AWB CConfig2 */
	uint32_t  c4:12;
	uint32_t  /* reserved */ : 4;
	uint32_t  c3:12;
	uint32_t  /* reserved */ : 4;
} __attribute__((packed, aligned(4)));

struct VFE_SyncTimerCmdType {
	uint32_t  hsyncCount:12;
	uint32_t  /* reserved */ : 20;
	uint32_t  pclkCount:18;
	uint32_t  /* reserved */ : 14;
	uint32_t  outputDuration:28;
	uint32_t  /* reserved */ : 4;
} __attribute__((packed, aligned(4)));

struct VFE_AsyncTimerCmdType {
	/*  config 0 */
	uint32_t    inactiveCount:20;
	uint32_t    repeatCount:10;
	uint32_t    /* reserved */ : 1;
	uint32_t    polarity:1;
	/*  config 1 */
	uint32_t    activeCount:20;
	uint32_t    /* reserved */ : 12;
} __attribute__((packed, aligned(4)));

struct VFE_AxiInputCmdType {
	uint32_t   stripeStartAddr0:32;
	uint32_t   stripeStartAddr1:32;
	uint32_t   stripeStartAddr2:32;
	uint32_t   stripeStartAddr3:32;

	uint32_t   ySize:12;
	uint32_t   yOffsetDelta:12;
	uint32_t   /* reserved */ : 8;

	/* bus_stripe_rd_hSize */
	uint32_t   /* reserved */ : 16;
	uint32_t   xSizeWord:10;
	uint32_t   /* reserved */ : 6;

	/* bus_stripe_rd_buffer_cfg */
	uint32_t   burstLength:2;
	uint32_t   /* reserved */ : 2;
	uint32_t   NumOfRows:12;
	uint32_t   RowIncrement:12;
	uint32_t   /* reserved */ : 4;

	/* bus_stripe_rd_unpack_cfg */
	uint32_t   mainUnpackHeight:12;
	uint32_t   mainUnpackWidth:13;
	uint32_t   mainUnpackHbiSel:3;
	uint32_t   mainUnpackPhase:3;
	uint32_t   /* reserved */ : 1;

	/* bus_stripe_rd_unpack */
	uint32_t   unpackPattern:32;

	/* bus_stripe_rd_pad_size */
	uint32_t   padLeft:7;
	uint32_t   /* reserved */ : 1;
	uint32_t   padRight:7;
	uint32_t   /* reserved */ : 1;
	uint32_t   padTop:7;
	uint32_t   /* reserved */ : 1;
	uint32_t   padBottom:7;
	uint32_t   /* reserved */ : 1;

	/* bus_stripe_rd_pad_L_unpack */
	uint32_t   leftUnpackPattern0:4;
	uint32_t   leftUnpackPattern1:4;
	uint32_t   leftUnpackPattern2:4;
	uint32_t   leftUnpackPattern3:4;
	uint32_t   leftUnpackStop0:1;
	uint32_t   leftUnpackStop1:1;
	uint32_t   leftUnpackStop2:1;
	uint32_t   leftUnpackStop3:1;
	uint32_t   /* reserved */ : 12;

	/* bus_stripe_rd_pad_R_unpack */
	uint32_t   rightUnpackPattern0:4;
	uint32_t   rightUnpackPattern1:4;
	uint32_t   rightUnpackPattern2:4;
	uint32_t   rightUnpackPattern3:4;
	uint32_t   rightUnpackStop0:1;
	uint32_t   rightUnpackStop1:1;
	uint32_t   rightUnpackStop2:1;
	uint32_t   rightUnpackStop3:1;
	uint32_t   /* reserved */ : 12;

	/* bus_stripe_rd_pad_tb_unpack */
	uint32_t   topUnapckPattern:4;
	uint32_t   /* reserved */ : 12;
	uint32_t   bottomUnapckPattern:4;
	uint32_t   /* reserved */ : 12;
} __attribute__((packed, aligned(4)));

struct VFE_AxiRdFragIrqEnable {
	uint32_t stripeRdFragirq0Enable:1;
	uint32_t stripeRdFragirq1Enable:1;
	uint32_t stripeRdFragirq2Enable:1;
	uint32_t stripeRdFragirq3Enable:1;
	uint32_t   /* reserved */ : 28;
} __attribute__((packed, aligned(4)));

int vfe_cmd_init(struct msm_vfe_callback *, struct platform_device *, void *);
void vfe_stats_af_stop(void);
void vfe_stop(void);
void vfe_update(void);
int vfe_rgb_gamma_update(struct vfe_cmd_rgb_gamma_config *);
int vfe_rgb_gamma_config(struct vfe_cmd_rgb_gamma_config *);
void vfe_stats_wb_exp_ack(struct vfe_cmd_stats_wb_exp_ack *);
void vfe_stats_af_ack(struct vfe_cmd_stats_af_ack *);
void vfe_start(struct vfe_cmd_start *);
void vfe_la_update(struct vfe_cmd_la_config *);
void vfe_la_config(struct vfe_cmd_la_config *);
void vfe_test_gen_start(struct vfe_cmd_test_gen_start *);
void vfe_frame_skip_update(struct vfe_cmd_frame_skip_update *);
void vfe_frame_skip_config(struct vfe_cmd_frame_skip_config *);
void vfe_output_clamp_config(struct vfe_cmd_output_clamp_config *);
void vfe_camif_frame_update(struct vfe_cmds_camif_frame *);
void vfe_color_correction_config(struct vfe_cmd_color_correction_config *);
void vfe_demosaic_abf_update(struct vfe_cmd_demosaic_abf_update *);
void vfe_demosaic_bpc_update(struct vfe_cmd_demosaic_bpc_update *);
void vfe_demosaic_config(struct vfe_cmd_demosaic_config *);
void vfe_demux_channel_gain_update(struct vfe_cmd_demux_channel_gain_config *);
void vfe_demux_channel_gain_config(struct vfe_cmd_demux_channel_gain_config *);
void vfe_black_level_update(struct vfe_cmd_black_level_config *);
void vfe_black_level_config(struct vfe_cmd_black_level_config *);
void vfe_asf_update(struct vfe_cmd_asf_update *);
void vfe_asf_config(struct vfe_cmd_asf_config *);
void vfe_white_balance_config(struct vfe_cmd_white_balance_config *);
void vfe_chroma_sup_config(struct vfe_cmd_chroma_suppression_config *);
void vfe_roll_off_config(struct vfe_cmd_roll_off_config *);
void vfe_chroma_subsample_config(struct vfe_cmd_chroma_subsample_config *);
void vfe_chroma_enhan_config(struct vfe_cmd_chroma_enhan_config *);
void vfe_scaler2cbcr_config(struct vfe_cmd_scaler2_config *);
void vfe_scaler2y_config(struct vfe_cmd_scaler2_config *);
void vfe_main_scaler_config(struct vfe_cmd_main_scaler_config *);
void vfe_stats_wb_exp_stop(void);
void vfe_stats_update_wb_exp(struct vfe_cmd_stats_wb_exp_update *);
void vfe_stats_update_af(struct vfe_cmd_stats_af_update *);
void vfe_stats_start_wb_exp(struct vfe_cmd_stats_wb_exp_start *);
void vfe_stats_start_af(struct vfe_cmd_stats_af_start *);
void vfe_stats_setting(struct vfe_cmd_stats_setting *);
void vfe_axi_input_config(struct vfe_cmd_axi_input_config *);
void vfe_stats_config(struct vfe_cmd_stats_setting *);
void vfe_axi_output_config(struct vfe_cmd_axi_output_config *);
void vfe_camif_config(struct vfe_cmd_camif_config *);
void vfe_fov_crop_config(struct vfe_cmd_fov_crop_config *);
void vfe_get_hw_version(struct vfe_cmd_hw_version *);
void vfe_reset(void);
void vfe_cmd_release(struct platform_device *);
void vfe_output1_ack(struct vfe_cmd_output_ack *);
void vfe_output2_ack(struct vfe_cmd_output_ack *);
#endif /* __MSM_VFE8X_REG_H__ */