summaryrefslogtreecommitdiff
path: root/common/spl/Kconfig
blob: b03a476b9f6906d14eae95f39fb9f3eed2f8f7fb (plain)
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
menu "SPL / TPL"

config SUPPORT_SPL
	bool

config SUPPORT_TPL
	bool

config SPL_DFU_NO_RESET
	bool

config SPL
	bool
	depends on SUPPORT_SPL
	prompt "Enable SPL"
	help
	  If you want to build SPL as well as the normal image, say Y.

config SPL_FRAMEWORK
	bool "Support SPL based upon the common SPL framework"
	depends on SPL
	default y
	help
	  Enable the SPL framework under common/spl/.  This framework
	  supports MMC, NAND and YMODEM and other methods loading of U-Boot
	  and the Linux Kernel.  If unsure, say Y.

config SPL_FRAMEWORK_BOARD_INIT_F
	bool "Define a generic function board_init_f"
	depends on SPL_FRAMEWORK
	help
	  Define a generic function board_init_f that:
	  - initialize the spl (spl_early_init)
	  - initialize the serial (preloader_console_init)
	  Unless you want to provide your own board_init_f, you should say Y.

config SPL_SIZE_LIMIT
	hex "Maximum size of SPL image"
	depends on SPL
	default 69632 if ARCH_MX6 && !MX6_OCRAM_256KB
	default 200704 if ARCH_MX6 && MX6_OCRAM_256KB
	default 0
	help
	  Specifies the maximum length of the U-Boot SPL image.
	  If this value is zero, it is ignored.

config SPL_SIZE_LIMIT_SUBTRACT_GD
	bool "SPL image size check: provide space for global data"
	depends on SPL_SIZE_LIMIT > 0
	help
	  If enabled, aligned size of global data is reserved in
	  SPL_SIZE_LIMIT check to ensure such an image does not overflow SRAM
	  if SPL_SIZE_LIMIT describes the size of SRAM available for SPL when
	  pre-reloc global data is put into this SRAM, too.

config SPL_SIZE_LIMIT_SUBTRACT_MALLOC
	bool "SPL image size check: provide space for malloc() pool before relocation"
	depends on SPL_SIZE_LIMIT > 0
	help
	  If enabled, SPL_SYS_MALLOC_F_LEN is reserved in SPL_SIZE_LIMIT check
	  to ensure such an image does not overflow SRAM if SPL_SIZE_LIMIT
	  describes the size of SRAM available for SPL when pre-reloc malloc
	  pool is put into this SRAM, too.

config SPL_SIZE_LIMIT_PROVIDE_STACK
	hex "SPL image size check: provide stack space before relocation"
	depends on SPL_SIZE_LIMIT > 0
	default 0
	help
	  If set, this size is reserved in SPL_SIZE_LIMIT check to ensure such
	  an image does not overflow SRAM if SPL_SIZE_LIMIT describes the size
	  of SRAM available for SPL when the stack required before reolcation
	  uses this SRAM, too.

config SPL_SYS_STACK_F_CHECK_BYTE
	hex
	default 0xaa
	help
	  Constant used to check the stack

config SPL_SYS_REPORT_STACK_F_USAGE
	depends on SPL_SIZE_LIMIT_PROVIDE_STACK != 0
	bool "Check and report stack usage in SPL before relocation"
	help
	  If this option is enabled, the initial SPL stack is filled with 0xaa
	  very early, up to the size configured with
	  SPL_SIZE_LIMIT_PROVIDE_STACK.
	  Later when SPL is done using this initial stack and switches to a
	  stack in DRAM, the actually used size of this initial stack is
	  reported by examining the memory and searching for the lowest
	  occurrence of non 0xaa bytes.
	  This default implementation works for stacks growing down only.

menu "PowerPC and LayerScape SPL Boot options"

config SPL_NAND_BOOT
	bool "Load SPL from NAND flash"
	depends on PPC && (SUPPORT_SPL && !SPL_FRAMEWORK)

config SPL_MMC_BOOT
	bool "Load SPL from SD Card / eMMC"
	depends on PPC && (SUPPORT_SPL && !SPL_FRAMEWORK)

config SPL_SPI_BOOT
	bool "Load SPL from SPI flash"
	depends on PPC && (SUPPORT_SPL && !SPL_FRAMEWORK)

config SPL_FSL_PBL
	bool "Create SPL in Freescale PBI format"
	depends on (PPC || ARCH_LS1021A || ARCH_LS1043A || ARCH_LS1046A) && \
		    SUPPORT_SPL
	help
	  Create boot binary having SPL binary in PBI format concatenated with
	  u-boot binary.

endmenu

config HANDOFF
	bool "Pass hand-off information from SPL to U-Boot proper"
	depends on BLOBLIST
	help
	  It is useful to be able to pass information from SPL to U-Boot
	  proper to preserve state that is known in SPL and is needed in U-Boot.
	  Enable this to locate the handoff information in U-Boot proper, early
	  in boot. It is available in gd->handoff. The state state is set up
	  in SPL (or TPL if that is being used).

if SPL

config SPL_HANDOFF
	bool "Pass hand-off information from SPL to U-Boot proper"
	depends on HANDOFF && SPL_BLOBLIST
	default y
	help
	  This option enables SPL to write handoff information. This can be
	  used to pass information like the size of SDRAM from SPL to U-Boot
	  proper. Also SPL can receive information from TPL in the same place
	  if that is enabled.

config SPL_LDSCRIPT
	string "Linker script for the SPL stage"
	default "arch/$(ARCH)/cpu/u-boot-spl.lds"
	help
	  The SPL stage will usually require a different linker-script
	  (as it runs from a different memory region) than the regular
	  U-Boot stage.	 Set this to the path of the linker-script to
	  be used for SPL.

config SPL_TEXT_BASE
	hex "SPL Text Base"
	default ISW_ENTRY_ADDR if AM43XX || AM33XX || OMAP54XX || ARCH_KEYSTONE
	default 0x10060 if MACH_SUN50I || MACH_SUN50I_H5 || MACH_SUN9I
	default 0x20060 if MACH_SUN50I_H6
	default 0x00060 if ARCH_SUNXI
	default 0xfffc0000 if ARCH_ZYNQMP
	default 0x0
	help
	  The address in memory that SPL will be running from.

config SPL_BOARD_INIT
	bool "Call board-specific initialization in SPL"
	help
	  If this option is enabled, U-Boot will call the function
	  spl_board_init() from board_init_r(). This function should be
	  provided by the board.

config SPL_BOOTROM_SUPPORT
        bool "Support returning to the BOOTROM"
	help
	  Some platforms (e.g. the Rockchip RK3368) provide support in their
	  ROM for loading the next boot-stage after performing basic setup
	  from the SPL stage.

	  Enable this option, to return to the BOOTROM through the
	  BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the
	  boot device list, if not implemented for a given board)

config SPL_BOOTCOUNT_LIMIT
	bool "Support bootcount in SPL"
	depends on SPL_ENV_SUPPORT
	help
	  On some boards, which use 'falcon' mode, it is necessary to check
	  and increment the number of boot attempts. Such boards do not
	  use proper U-Boot for normal boot flow and hence needs those
	  adjustments to be done in the SPL.

config SPL_RAW_IMAGE_SUPPORT
	bool "Support SPL loading and booting of RAW images"
	default n if (ARCH_MX6 && (SPL_MMC_SUPPORT || SPL_SATA_SUPPORT))
	default y if !TI_SECURE_DEVICE
	help
	  SPL will support loading and booting a RAW image when this option
	  is y. If this is not set, SPL will move on to other available
	  boot media to find a suitable image.

config SPL_LEGACY_IMAGE_SUPPORT
	bool "Support SPL loading and booting of Legacy images"
	default y if !TI_SECURE_DEVICE && !SPL_LOAD_FIT
	help
	  SPL will support loading and booting Legacy images when this option
	  is y. If this is not set, SPL will move on to other available
	  boot media to find a suitable image.

config SPL_LEGACY_IMAGE_CRC_CHECK
	bool "Check CRC of Legacy images"
	depends on SPL_LEGACY_IMAGE_SUPPORT
	select SPL_CRC32_SUPPORT
	help
	  Enable this to check the CRC of Legacy images. While this increases
	  reliability, it affects both code size and boot duration.
	  If disabled, Legacy images are booted if the image magic and size
	  are correct, without further integrity checks.

config SPL_SYS_MALLOC_SIMPLE
	bool
	prompt "Only use malloc_simple functions in the SPL"
	help
	  Say Y here to only use the *_simple malloc functions from
	  malloc_simple.c, rather then using the versions from dlmalloc.c;
	  this will make the SPL binary smaller at the cost of more heap
	  usage as the *_simple malloc functions do not re-use free-ed mem.

config TPL_SYS_MALLOC_SIMPLE
	bool
	prompt "Only use malloc_simple functions in the TPL"
	depends on TPL
	help
	  Say Y here to only use the *_simple malloc functions from
	  malloc_simple.c, rather then using the versions from dlmalloc.c;
	  this will make the TPL binary smaller at the cost of more heap
	  usage as the *_simple malloc functions do not re-use free-ed mem.

config SPL_STACK_R
	bool "Enable SDRAM location for SPL stack"
	help
	  SPL starts off execution in SRAM and thus typically has only a small
	  stack available. Since SPL sets up DRAM while in its board_init_f()
	  function, it is possible for the stack to move there before
	  board_init_r() is reached. This option enables a special SDRAM
	  location for the SPL stack. U-Boot SPL switches to this after
	  board_init_f() completes, and before board_init_r() starts.

config SPL_STACK_R_ADDR
	depends on SPL_STACK_R
	hex "SDRAM location for SPL stack"
	default 0x82000000 if ARCH_OMAP2PLUS
	help
	  Specify the address in SDRAM for the SPL stack. This will be set up
	  before board_init_r() is called.

config SPL_STACK_R_MALLOC_SIMPLE_LEN
	depends on SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE
	hex "Size of malloc_simple heap after switching to DRAM SPL stack"
	default 0x100000
	help
	  Specify the amount of the stack to use as memory pool for
	  malloc_simple after switching the stack to DRAM. This may be set
	  to give board_init_r() a larger heap then the initial heap in
	  SRAM which is limited to SYS_MALLOC_F_LEN bytes.

config SPL_SEPARATE_BSS
	bool "BSS section is in a different memory region from text"
	help
	  Some platforms need a large BSS region in SPL and can provide this
	  because RAM is already set up. In this case BSS can be moved to RAM.
	  This option should then be enabled so that the correct device tree
	  location is used. Normally we put the device tree at the end of BSS
	  but with this option enabled, it goes at _image_binary_end.

config SPL_BANNER_PRINT
	bool "Enable output of the SPL banner 'U-Boot SPL ...'"
	default y
	help
	  If this option is enabled, SPL will print the banner with version
	  info. Disabling this option could be useful to reduce SPL boot time
	  (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).

config TPL_BANNER_PRINT
	bool "Enable output of the TPL banner 'U-Boot TPL ...'"
	depends on TPL
	default y
	help
	  If this option is enabled, TPL will print the banner with version
	  info. Disabling this option could be useful to reduce TPL boot time
	  (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).

config SPL_EARLY_BSS
	depends on ARM && !ARM64
	bool "Allows initializing BSS early before entering board_init_f"
	help
	  On some platform we have sufficient memory available early on to
	  allow setting up and using a basic BSS prior to entering
	  board_init_f. Activating this option will also de-activate the
	  clearing of BSS during the SPL relocation process, thus allowing
	  to carry state from board_init_f to board_init_r by way of BSS.

config SPL_DISPLAY_PRINT
	bool "Display a board-specific message in SPL"
	help
	  If this option is enabled, U-Boot will call the function
	  spl_display_print() immediately after displaying the SPL console
	  banner ("U-Boot SPL ..."). This function should be provided by
	  the board.

config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
	bool "MMC raw mode: by sector"
	default y if ARCH_SUNXI || ARCH_DAVINCI || ARCH_UNIPHIER || \
		     ARCH_MX6 || ARCH_MX7 || \
		     ARCH_ROCKCHIP || ARCH_MVEBU ||  ARCH_SOCFPGA || \
		     ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \
		     OMAP44XX || OMAP54XX || AM33XX || AM43XX
	help
	  Use sector number for specifying U-Boot location on MMC/SD in
	  raw mode.

config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
	hex "Address on the MMC to load U-Boot from"
	depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
	default 0x50 if ARCH_SUNXI
	default 0x75 if ARCH_DAVINCI
	default 0x8a if ARCH_MX6 || ARCH_MX7
	default 0x100 if ARCH_UNIPHIER
	default 0x140 if ARCH_MVEBU
	default 0x200 if ARCH_SOCFPGA || ARCH_AT91
	default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \
		         OMAP54XX || AM33XX || AM43XX || ARCH_K3
	default 0x4000 if ARCH_ROCKCHIP
	help
	  Address on the MMC to load U-Boot from, when the MMC is being used
	  in raw mode. Units: MMC sectors (1 sector = 512 bytes).

config SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET
	hex "U-Boot main hardware partition image offset"
	depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
	default 0x0
	help
	  On some platforms SPL location depends on hardware partition. The ROM
	  code skips the MBR sector when loading SPL from main hardware data
	  partition. This adds offset to the main U-Boot image. Set this symbol
	  to the number of skipped sectors.

	  If unsure, leave the default.

config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
	bool "MMC Raw mode: by partition"
	help
	  Use a partition for loading U-Boot when using MMC/SD in raw mode.

config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
	hex "Partition to use to load U-Boot from"
	depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
	default 1
	help
	  Partition on the MMC to load U-Boot from when the MMC is being
	  used in raw mode

config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
	bool "MMC raw mode: by partition type"
	depends on DOS_PARTITION && SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
	help
	  Use partition type for specifying U-Boot partition on MMC/SD in
	  raw mode. U-Boot will be loaded from the first partition of this
	  type to be found.

config SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE
	hex "Partition Type on the MMC to load U-Boot from"
	depends on SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
	help
	  Partition Type on the MMC to load U-Boot from, when the MMC is being
	  used in raw mode.

config SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG
	bool "Override eMMC EXT_CSC_PART_CONFIG by user defined partition"
	depends on SUPPORT_EMMC_BOOT
	help
	  eMMC boot partition is normally configured by the bits of the EXT_CSD
	  register (EXT_CSC_PART_CONFIG), BOOT_PARTITION_ENABLE field. In some
	  cases it might be required in SPL to load the image from different
	  partition than the partition selected by EXT_CSC_PART_CONFIG register.
	  Enable this option if you intend to use an eMMC boot partition other
	  then selected via EXT_CSC_PART_CONFIG register and specify the custom
	  partition number by the CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION
	  option.

config SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION
	int "Number of the eMMC boot partition to use"
	depends on SUPPORT_EMMC_BOOT_OVERRIDE_PART_CONFIG
	default 1
	help
	  eMMC boot partition number to use when the eMMC in raw mode and
	  the eMMC EXT_CSC_PART_CONFIG selection should be overridden in SPL
	  by user defined partition number.

config SPL_CRC32_SUPPORT
	bool "Support CRC32"
	default y if SPL_LEGACY_IMAGE_SUPPORT
	help
	  Enable this to support CRC32 in uImages or FIT images within SPL.
	  This is a 32-bit checksum value that can be used to verify images.
	  For FIT images, this is the least secure type of checksum, suitable
	  for detected accidental image corruption. For secure applications you
	  should consider SHA1 or SHA256.

config SPL_MD5_SUPPORT
	bool "Support MD5"
	depends on SPL_FIT
	help
	  Enable this to support MD5 in FIT images within SPL. An MD5
	  checksum is a 128-bit hash value used to check that the image
	  contents have not been corrupted. Note that MD5 is not considered
	  secure as it is possible (with a brute-force attack) to adjust the
	  image while still retaining the same MD5 hash value. For secure
	  applications where images may be changed maliciously, you should
	  consider SHA1 or SHA256.

config SPL_SHA1_SUPPORT
	bool "Support SHA1"
	depends on SPL_FIT
	select SHA1
	help
	  Enable this to support SHA1 in FIT images within SPL. A SHA1
	  checksum is a 160-bit (20-byte) hash value used to check that the
	  image contents have not been corrupted or maliciously altered.
	  While SHA1 is fairly secure it is coming to the end of its life
	  due to the expanding computing power available to brute-force
	  attacks. For more security, consider SHA256.

config SPL_SHA256_SUPPORT
	bool "Support SHA256"
	depends on SPL_FIT
	select SHA256
	help
	  Enable this to support SHA256 in FIT images within SPL. A SHA256
	  checksum is a 256-bit (32-byte) hash value used to check that the
	  image contents have not been corrupted. SHA256 is recommended for
	  use in secure applications since (as at 2016) there is no known
	  feasible attack that could produce a 'collision' with differing
	  input data. Use this for the highest security. Note that only the
	  SHA256 variant is supported: SHA512 and others are not currently
	  supported in U-Boot.

config SPL_FIT_IMAGE_TINY
	bool "Remove functionality from SPL FIT loading to reduce size"
	depends on SPL_FIT
	default y if MACH_SUN50I || MACH_SUN50I_H5 || MACH_SUN50I_H6
	default y if ARCH_IMX8M
	help
	  Enable this to reduce the size of the FIT image loading code
	  in SPL, if space for the SPL binary is very tight.

	  This removes the detection of image types (which forces the
	  first image to be treated as having a U-Boot style calling
	  convention) and skips the recording of each loaded payload
	  (i.e. loadable) into the FDT (modifying the loaded FDT to
	  ensure this information is available to the next image
	  invoked).

config SPL_CACHE_SUPPORT
	bool "Support CACHE drivers"
	help
	  Enable CACHE drivers in SPL. These drivers can keep data so that
	  future requests for that data can be served faster. Enable this option
	  to build the drivers in drivers/cache as part of an SPL build.

config SPL_CPU_SUPPORT
	bool "Support CPU drivers"
	help
	  Enable this to support CPU drivers in SPL. These drivers can set
	  up CPUs and provide information about them such as the model and
	  name. This can be useful in SPL since setting up the CPUs earlier
	  may improve boot performance. Enable this option to build the
	  drivers in drivers/cpu as part of an SPL build.

config SPL_CRYPTO_SUPPORT
	bool "Support crypto drivers"
	help
	  Enable crypto drivers in SPL. These drivers can be used to
	  accelerate secure boot processing in secure applications. Enable
	  this option to build the drivers in drivers/crypto as part of an
	  SPL build.

config SPL_HASH_SUPPORT
	bool "Support hashing drivers"
	select SHA1
	select SHA256
	help
	  Enable hashing drivers in SPL. These drivers can be used to
	  accelerate secure boot processing in secure applications. Enable
	  this option to build system-specific drivers for hash acceleration
	  as part of an SPL build.

config TPL_HASH_SUPPORT
	bool "Support hashing drivers in TPL"
	depends on TPL
	select SHA1
	select SHA256
	help
	  Enable hashing drivers in SPL. These drivers can be used to
	  accelerate secure boot processing in secure applications. Enable
	  this option to build system-specific drivers for hash acceleration
	  as part of an SPL build.

config SPL_DMA
	bool "Support DMA drivers"
	help
	  Enable DMA (direct-memory-access) drivers in SPL. These drivers
	  can be used to handle memory-to-peripheral data transfer without
	  the CPU moving the data. Enable this option to build the drivers
	  in drivers/dma as part of an SPL build.

config SPL_DM_GPIO
	bool "Support Driver Model GPIO drivers"
	depends on SPL_GPIO_SUPPORT && DM_GPIO
	help
	  Enable support for Driver Model based GPIO drivers in SPL.

config SPL_DRIVERS_MISC_SUPPORT
	bool "Support misc drivers"
	help
	  Enable miscellaneous drivers in SPL. These drivers perform various
	  tasks that don't fall nicely into other categories, Enable this
	  option to build the drivers in drivers/misc as part of an SPL
	  build, for those that support building in SPL (not all drivers do).

config SPL_ENV_SUPPORT
	bool "Support an environment"
	help
	  Enable environment support in SPL. The U-Boot environment provides
	  a number of settings (essentially name/value pairs) which can
	  control many aspects of U-Boot's operation. Normally this is not
	  needed in SPL as it has a much simpler task with less
	  configuration. But some boards use this to support 'Falcon' boot
	  on EXT2 and FAT, where SPL boots directly into Linux without
	  starting U-Boot first. Enabling this option will make env_get()
	  and env_set() available in SPL.

config SPL_SAVEENV
	bool "Support save environment"
	depends on SPL_ENV_SUPPORT
	select SPL_MMC_WRITE if ENV_IS_IN_MMC
	help
	  Enable save environment support in SPL after setenv. By default
	  the saveenv option is not provided in SPL, but some boards need
	  this support in 'Falcon' boot, where SPL need to boot from
	  different images based on environment variable set by OS. For
	  example OS may set "reboot_image" environment variable to
	  "recovery" inorder to boot recovery image by SPL. The SPL read
	  "reboot_image" and act accordingly and change the reboot_image
	  to default mode using setenv and save the environment.

config SPL_ETH_SUPPORT
	bool "Support Ethernet"
	depends on SPL_ENV_SUPPORT
	help
	  Enable access to the network subsystem and associated Ethernet
	  drivers in SPL. This permits SPL to load U-Boot over an Ethernet
	  link rather than from an on-board peripheral. Environment support
	  is required since the network stack uses a number of environment
	  variables. See also SPL_NET_SUPPORT.

config SPL_FS_EXT4
	bool "Support EXT filesystems"
	help
	  Enable support for EXT2/3/4 filesystems with SPL. This permits
	  U-Boot (or Linux in Falcon mode) to be loaded from an EXT
	  filesystem from within SPL. Support for the underlying block
	  device (e.g. MMC or USB) must be enabled separately.

config SPL_FS_FAT
	bool "Support FAT filesystems"
	select FS_FAT
	help
	  Enable support for FAT and VFAT filesystems with SPL. This
	  permits U-Boot (or Linux in Falcon mode) to be loaded from a FAT
	  filesystem from within SPL. Support for the underlying block
	  device (e.g. MMC or USB) must be enabled separately.

config SPL_FAT_WRITE
	bool "Support write for FAT filesystems"
	help
	  Enable write support for FAT and VFAT filesystems with SPL.
	  Support for the underlying block device (e.g. MMC or USB) must be
	  enabled separately.

config SPL_FPGA_SUPPORT
	bool "Support FPGAs"
	help
	  Enable support for FPGAs in SPL. Field-programmable Gate Arrays
	  provide software-configurable hardware which is typically used to
	  implement peripherals (such as UARTs, LCD displays, MMC) or
	  accelerate custom processing functions, such as image processing
	  or machine learning. Sometimes it is useful to program the FPGA
	  as early as possible during boot, and this option can enable that
	  within SPL.

config SPL_GPIO_SUPPORT
	bool "Support GPIO in SPL"
	help
	  Enable support for GPIOs (General-purpose Input/Output) in SPL.
	  GPIOs allow U-Boot to read the state of an input line (high or
	  low) and set the state of an output line. This can be used to
	  drive LEDs, control power to various system parts and read user
	  input. GPIOs can be useful in SPL to enable a 'sign-of-life' LED,
	  for example. Enable this option to build the drivers in
	  drivers/gpio as part of an SPL build.

config SPL_I2C_SUPPORT
	bool "Support I2C"
	help
	  Enable support for the I2C (Inter-Integrated Circuit) bus in SPL.
	  I2C works with a clock and data line which can be driven by a
	  one or more masters or slaves. It is a fairly complex bus but is
	  widely used as it only needs two lines for communication. Speeds of
	  400kbps are typical but up to 3.4Mbps is supported by some
	  hardware. I2C can be useful in SPL to configure power management
	  ICs (PMICs) before raising the CPU clock speed, for example.
	  Enable this option to build the drivers in drivers/i2c as part of
	  an SPL build.

config SPL_LIBCOMMON_SUPPORT
	bool "Support common libraries"
	help
	  Enable support for common U-Boot libraries within SPL. These
	  libraries include common code to deal with U-Boot images,
	  environment and USB, for example. This option is enabled on many
	  boards. Enable this option to build the code in common/ as part of
	  an SPL build.

config SPL_LIBDISK_SUPPORT
	bool "Support disk partitions"
	select PARTITIONS
	help
	  Enable support for disk partitions within SPL. 'Disk' is something
	  of a misnomer as it includes non-spinning media such as flash (as
	  used in MMC and USB sticks). Partitions provide a way for a disk
	  to be split up into separate regions, with a partition table placed
	  at the start or end which describes the location and size of each
	  'partition'. These partitions are typically uses as individual block
	  devices, typically with an EXT2 or FAT filesystem in each. This
	  option enables whatever partition support has been enabled in
	  U-Boot to also be used in SPL. It brings in the code in disk/.

config SPL_LIBGENERIC_SUPPORT
	bool "Support generic libraries"
	help
	  Enable support for generic U-Boot libraries within SPL. These
	  libraries include generic code to deal with device tree, hashing,
	  printf(), compression and the like. This option is enabled on many
	  boards. Enable this option to build the code in lib/ as part of an
	  SPL build.

config SPL_DM_MAILBOX
	bool "Support Mailbox"
	help
	  Enable support for Mailbox within SPL. This enable the inter
	  processor communication protocols tobe used within SPL. Enable
	  this option to build the drivers in drivers/mailbox as part of
	  SPL build.

config SPL_MMC_SUPPORT
	bool "Support MMC"
	depends on MMC
	select HAVE_BLOCK_DEVICE
	help
	  Enable support for MMC (Multimedia Card) within SPL. This enables
	  the MMC protocol implementation and allows any enabled drivers to
	  be used within SPL. MMC can be used with or without disk partition
	  support depending on the application (SPL_LIBDISK_SUPPORT). Enable
	  this option to build the drivers in drivers/mmc as part of an SPL
	  build.

config SPL_FORCE_MMC_BOOT
	bool "Force SPL booting from MMC"
	depends on SPL_MMC_SUPPORT
	default n
	help
	  Force SPL to use MMC device for Linux kernel booting even when the
	  SoC ROM recognized boot medium is not eMMC/SD. This is crucial for
	  factory or 'falcon mode' booting.

config SPL_MMC_TINY
	bool "Tiny MMC framework in SPL"
	depends on SPL_MMC_SUPPORT
	default n
	help
	  Enable MMC framework tinification support. This option is useful if
	  if your SPL is extremely size constrained. Heed the warning, enable
	  this option if and only if you know exactly what you are doing, if
	  you are reading this help text, you most likely have no idea :-)

	  The MMC framework is reduced to bare minimum to be useful. No malloc
	  support is needed for the MMC framework operation with this option
	  enabled. The framework supports exactly one MMC device and exactly
	  one MMC driver. The MMC driver can be adjusted to avoid any malloc
	  operations too, which can remove the need for malloc support in SPL
	  and thus further reduce footprint.

config SPL_MMC_WRITE
	bool "MMC/SD/SDIO card support for write operations in SPL"
	depends on SPL_MMC_SUPPORT
	default n
	help
	  Enable write access to MMC and SD Cards in SPL


config SPL_MPC8XXX_INIT_DDR_SUPPORT
	bool "Support MPC8XXX DDR init"
	help
	  Enable support for DDR-SDRAM (double-data-rate synchronous dynamic
	  random-access memory) on the MPC8XXX family within SPL. This
	  allows DRAM to be set up before loading U-Boot into that DRAM,
	  where it can run.

config SPL_MTD_SUPPORT
	bool "Support MTD drivers"
	help
	  Enable support for MTD (Memory Technology Device) within SPL. MTD
	  provides a block interface over raw NAND and can also be used with
	  SPI flash. This allows SPL to load U-Boot from supported MTD
	  devices. See SPL_NAND_SUPPORT and SPL_ONENAND_SUPPORT for how
	  to enable specific MTD drivers.

config SPL_MUSB_NEW_SUPPORT
	bool "Support new Mentor Graphics USB"
	help
	  Enable support for Mentor Graphics USB in SPL. This is a new
	  driver used by some boards. Enable this option to build
	  the drivers in drivers/usb/musb-new as part of an SPL build. The
	  old drivers are in drivers/usb/musb.

config SPL_NAND_SUPPORT
	bool "Support NAND flash"
	help
	  Enable support for NAND (Negative AND) flash in SPL. NAND flash
	  can be used to allow SPL to load U-Boot from supported devices.
	  This enables the drivers in drivers/mtd/nand/raw as part of an SPL
	  build.

config SPL_UBI
	bool "Support UBI"
	help
	  Enable support for loading payloads from UBI. See
	  README.ubispl for more info.

if SPL_DM
config SPL_CACHE
	depends on CACHE
	bool "Support cache drivers in SPL"
	help
	  Enable support for cache drivers in SPL.

config SPL_DM_SPI
	bool "Support SPI DM drivers in SPL"
	help
	  Enable support for SPI DM drivers in SPL.

endif
if SPL_UBI
config SPL_UBI_LOAD_BY_VOLNAME
	bool "Support loading volumes by name"
	help
	  This enables support for loading UBI volumes by name. When this
	  is set, CONFIG_SPL_UBI_LOAD_MONITOR_VOLNAME can be used to
	  configure the volume name from which to load U-Boot.

config SPL_UBI_MAX_VOL_LEBS
	int "Maximum number of LEBs per volume"
	depends on SPL_UBI
	help
	  The maximum number of logical eraseblocks which a static volume
	  to load can contain. Used for sizing the scan data structure.

config SPL_UBI_MAX_PEB_SIZE
	int "Maximum PEB size"
	depends on SPL_UBI
	help
	  The maximum physical erase block size.

config SPL_UBI_MAX_PEBS
	int "Maximum number of PEBs"
	depends on SPL_UBI
	help
	  The maximum physical erase block size. If not overridden by
	  board code, this value will be used as the actual number of PEBs.

config SPL_UBI_PEB_OFFSET
	int "Offset to first UBI PEB"
	depends on SPL_UBI
	help
	  The offset in number of PEBs from the start of flash to the first
	  PEB part of the UBI image.

config SPL_UBI_VID_OFFSET
	int "Offset to VID header"
	depends on SPL_UBI

config SPL_UBI_LEB_START
	int "Offset to LEB in PEB"
	depends on SPL_UBI
	help
	  The offset in bytes to the LEB within a PEB.

config SPL_UBI_INFO_ADDR
	hex "Address to place UBI scan info"
	depends on SPL_UBI
	help
	  Address for ubispl to place the scan info. Read README.ubispl to
	  determine the required size

config SPL_UBI_VOL_IDS
	int "Maximum volume id"
	depends on SPL_UBI
	help
	  The maximum volume id which can be loaded. Used for sizing the
	  scan data structure.

config SPL_UBI_LOAD_MONITOR_ID
	int "id of U-Boot volume"
	depends on SPL_UBI
	help
	  The UBI volume id from which to load U-Boot

config SPL_UBI_LOAD_MONITOR_VOLNAME
	string "volume name of U-Boot volume"
	depends on SPL_UBI_LOAD_BY_VOLNAME
	help
	  The UBI volume name from which to load U-Boot

config SPL_UBI_LOAD_KERNEL_ID
	int "id of kernel volume"
	depends on SPL_OS_BOOT && SPL_UBI
	help
	  The UBI volume id from which to load the kernel

config SPL_UBI_LOAD_ARGS_ID
	int "id of kernel args volume"
	depends on SPL_OS_BOOT && SPL_UBI
	help
	  The UBI volume id from which to load the device tree

config UBI_SPL_SILENCE_MSG
	bool "silence UBI SPL messages"
	default n
	help
	  Disable messages from UBI SPL. This leaves warnings
	  and errors enabled.

endif   # if SPL_UBI

config SPL_NET_SUPPORT
	bool "Support networking"
	help
	  Enable support for network devices (such as Ethernet) in SPL.
	  This permits SPL to load U-Boot over a network link rather than
	  from an on-board peripheral. Environment support is required since
	  the network stack uses a number of environment variables. See also
	  SPL_ETH_SUPPORT.

if SPL_NET_SUPPORT
config SPL_NET_VCI_STRING
	string "BOOTP Vendor Class Identifier string sent by SPL"
	help
	  As defined by RFC 2132 the vendor class identifier field can be
	  sent by the client to identify the vendor type and configuration
	  of a client.  This is often used in practice to allow for the DHCP
	  server to specify different files to load depending on if the ROM,
	  SPL or U-Boot itself makes the request
endif   # if SPL_NET_SUPPORT

config SPL_NO_CPU_SUPPORT
	bool "Drop CPU code in SPL"
	help
	  This is specific to the ARM926EJ-S CPU. It disables the standard
	  start.S start-up code, presumably so that a replacement can be
	  used on that CPU. You should not enable it unless you know what
	  you are doing.

config SPL_NOR_SUPPORT
	bool "Support NOR flash"
	help
	  Enable support for loading U-Boot from memory-mapped NOR (Negative
	  OR) flash in SPL. NOR flash is slow to write but fast to read, and
	  a memory-mapped device makes it very easy to access. Loading from
	  NOR is typically achieved with just a memcpy().

config SPL_XIP_SUPPORT
	bool "Support XIP"
	depends on SPL
	help
	  Enable support for execute in place of U-Boot or kernel image. There
	  is no need to copy image from flash to ram if flash supports execute
	  in place. Its very useful in systems having enough flash but not
	  enough ram to load the image.

config SPL_ONENAND_SUPPORT
	bool "Support OneNAND flash"
	help
	  Enable support for OneNAND (Negative AND) flash in SPL. OneNAND is
	  a type of NAND flash and therefore can be used to allow SPL to
	  load U-Boot from supported devices. This enables the drivers in
	  drivers/mtd/onenand as part of an SPL build.

config SPL_OS_BOOT
	bool "Activate Falcon Mode"
	depends on !TI_SECURE_DEVICE
	default n
	help
	  Enable booting directly to an OS from SPL.
	  for more info read doc/README.falcon

if SPL_OS_BOOT
config SYS_OS_BASE
	hex "addr, where OS is found"
	depends on SPL_NOR_SUPPORT
	help
	  Specify the address, where the OS image is found, which
	  gets booted.

endif # SPL_OS_BOOT

config SPL_PAYLOAD
	string "SPL payload"
	default "tpl/u-boot-with-tpl.bin" if TPL
	default "u-boot.bin"
	help
	  Payload for SPL boot. For backward compatibility, default to
	  u-boot.bin, i.e. RAW image without any header. In case of
	  TPL, tpl/u-boot-with-tpl.bin. For new boards, suggest to
	  use u-boot.img.

config SPL_PCI
	bool "Support PCI drivers"
	help
	  Enable support for PCI in SPL. For platforms that need PCI to boot,
	  or must perform some init using PCI in SPL, this provides the
	  necessary driver support. This enables the drivers in drivers/pci
	  as part of an SPL build.

config SPL_PCH_SUPPORT
	bool "Support PCH drivers"
	help
	  Enable support for PCH (Platform Controller Hub) devices in SPL.
	  These are used to set up GPIOs and the SPI peripheral early in
	  boot. This enables the drivers in drivers/pch as part of an SPL
	  build.

config SPL_POST_MEM_SUPPORT
	bool "Support POST drivers"
	help
	  Enable support for POST (Power-on Self Test) in SPL. POST is a
	  procedure that checks that the hardware (CPU or board) appears to
	  be functionally correctly. It is a sanity check that can be
	  performed before booting. This enables the drivers in post/drivers
	  as part of an SPL build.

config SPL_DM_RESET
	bool "Support reset drivers"
	depends on SPL
	help
	  Enable support for reset control in SPL.
	  That can be useful in SPL to handle IP reset in driver, as in U-Boot,
	  by using the generic reset API provided by driver model.
	  This enables the drivers in drivers/reset as part of an SPL build.

config SPL_POWER_SUPPORT
	bool "Support power drivers"
	help
	  Enable support for power control in SPL. This includes support
	  for PMICs (Power-management Integrated Circuits) and some of the
	  features provided by PMICs. In particular, voltage regulators can
	  be used to enable/disable power and vary its voltage. That can be
	  useful in SPL to turn on boot peripherals and adjust CPU voltage
	  so that the clock speed can be increased. This enables the drivers
	  in drivers/power, drivers/power/pmic and drivers/power/regulator
	  as part of an SPL build.

config SPL_POWER_DOMAIN
	bool "Support power domain drivers"
	help
	  Enable support for power domain control in SPL. Many SoCs allow
	  power to be applied to or removed from portions of the SoC (power
	  domains). This may be used to save power. This API provides the
	  means to control such power management hardware. This enables
	  the drivers in drivers/power/domain as part of a SPL build.

config SPL_RAM_SUPPORT
	bool "Support booting from RAM"
	default y if MICROBLAZE || ARCH_SOCFPGA || TEGRA || ARCH_ZYNQ
	help
	  Enable booting of an image in RAM. The image can be preloaded or
	  it can be loaded by SPL directly into RAM (e.g. using USB).

config SPL_RAM_DEVICE
	bool "Support booting from preloaded image in RAM"
	depends on SPL_RAM_SUPPORT
	default y if MICROBLAZE || ARCH_SOCFPGA || TEGRA || ARCH_ZYNQ
	help
	  Enable booting of an image already loaded in RAM. The image has to
	  be already in memory when SPL takes over, e.g. loaded by the boot
	  ROM.

config SPL_REMOTEPROC
	bool "Support REMOTEPROCS"
	help
	  Enable support for REMOTEPROCs in SPL. This permits to load
	  a remote processor firmware in SPL.

config SPL_RTC_SUPPORT
	bool "Support RTC drivers"
	help
	  Enable RTC (Real-time Clock) support in SPL. This includes support
	  for reading and setting the time. Some RTC devices also have some
	  non-volatile (battery-backed) memory which is accessible if
	  needed. This enables the drivers in drivers/rtc as part of an SPL
	  build.

config SPL_SATA_SUPPORT
	bool "Support loading from SATA"
	help
	  Enable support for SATA (Serial AT attachment) in SPL. This allows
	  use of SATA devices such as hard drives and flash drivers for
	  loading U-Boot. SATA is used in higher-end embedded systems and
	  can provide higher performance than MMC , at somewhat higher
	  expense and power consumption. This enables loading from SATA
	  using a configured device.

config SPL_SATA_RAW_U_BOOT_USE_SECTOR
	bool "SATA raw mode: by sector"
	depends on SPL_SATA_SUPPORT
	help
	  Use sector number for specifying U-Boot location on SATA disk in
	  raw mode.

config SPL_SATA_RAW_U_BOOT_SECTOR
	hex "Sector on the SATA disk to load U-Boot from"
	depends on SPL_SATA_RAW_U_BOOT_USE_SECTOR
	help
	  Sector on the SATA disk to load U-Boot from, when the SATA disk is being
	  used in raw mode. Units: SATA disk sectors (1 sector = 512 bytes).

config SPL_SERIAL_SUPPORT
	bool "Support serial"
	select SPL_PRINTF
	select SPL_STRTO
	help
	  Enable support for serial in SPL. This allows use of a serial UART
	  for displaying messages while SPL is running. It also brings in
	  printf() and panic() functions. This should normally be enabled
	  unless there are space reasons not to. Even then, consider
	  enabling SPL_USE_TINY_PRINTF which is a small printf() version.

config SPL_SPI_SUPPORT
	bool "Support SPI drivers"
	help
	  Enable support for using SPI in SPL. This is used for connecting
	  to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT for
	  more details on that. The SPI driver provides the transport for
	  data between the SPI flash and the CPU. This option can be used to
	  enable SPI drivers that are needed for other purposes also, such
	  as a SPI PMIC.

config SPL_SPI_FLASH_SUPPORT
	bool "Support SPI flash drivers"
	depends on SPL_SPI_SUPPORT
	help
	  Enable support for using SPI flash in SPL, and loading U-Boot from
	  SPI flash. SPI flash (Serial Peripheral Bus flash) is named after
	  the SPI bus that is used to connect it to a system. It is a simple
	  but fast bidirectional 4-wire bus (clock, chip select and two data
	  lines). This enables the drivers in drivers/mtd/spi as part of an
	  SPL build. This normally requires SPL_SPI_SUPPORT.

if SPL_SPI_FLASH_SUPPORT

config SPL_SPI_FLASH_TINY
	bool "Enable low footprint SPL SPI Flash support"
	depends on !SPI_FLASH_BAR
	default y if SPI_FLASH
	help
	 Enable lightweight SPL SPI Flash support that supports just reading
	 data/images from flash. No support to write/erase flash. Enable
	 this if you have SPL size limitations and don't need full
	 fledged SPI flash support.

config SPL_SPI_FLASH_SFDP_SUPPORT
	bool "SFDP table parsing support for SPI NOR flashes"
	depends on !SPI_FLASH_BAR && !SPL_SPI_FLASH_TINY
	help
	 Enable support for parsing and auto discovery of parameters for
	 SPI NOR flashes using Serial Flash Discoverable Parameters (SFDP)
	 tables as per JESD216 standard in SPL.

config SPL_SPI_LOAD
	bool "Support loading from SPI flash"
	help
	  Enable support for loading next stage, U-Boot or otherwise, from
	  SPI NOR in U-Boot SPL.

endif # SPL_SPI_FLASH_SUPPORT

config SYS_SPI_U_BOOT_OFFS
	hex "address of u-boot payload in SPI flash"
	default 0x8000 if ARCH_SUNXI
	default 0x0
	depends on SPL_SPI_LOAD || SPL_SPI_SUNXI
	help
	 Address within SPI-Flash from where the u-boot payload is fetched
	 from.

config SPL_THERMAL
	bool "Driver support for thermal devices"
	help
	  Enable support for temperature-sensing devices. Some SoCs have on-chip
	  temperature sensors to permit warnings, speed throttling or even
	  automatic power-off when the temperature gets too high or low. Other
	  devices may be discrete but connected on a suitable bus.

config SPL_USB_HOST_SUPPORT
	bool "Support USB host drivers"
	select HAVE_BLOCK_DEVICE
	help
	  Enable access to USB (Universal Serial Bus) host devices so that
	  SPL can load U-Boot from a connected USB peripheral, such as a USB
	  flash stick. While USB takes a little longer to start up than most
	  buses, it is very flexible since many different types of storage
	  device can be attached. This option enables the drivers in
	  drivers/usb/host as part of an SPL build.

config SPL_USB_STORAGE
	bool "Support loading from USB"
	depends on SPL_USB_HOST_SUPPORT && !(BLK && !DM_USB)
	help
	  Enable support for USB devices in SPL. This allows use of USB
	  devices such as hard drives and flash drivers for loading U-Boot.
	  The actual drivers are enabled separately using the normal U-Boot
	  config options. This enables loading from USB using a configured
	  device.

config SPL_USB_GADGET
	bool "Suppport USB Gadget drivers"
	help
	  Enable USB Gadget API which allows to enable USB device functions
	  in SPL.

if SPL_USB_GADGET

config SPL_USB_ETHER
	bool "Support USB Ethernet drivers"
	help
	  Enable access to the USB network subsystem and associated
	  drivers in SPL. This permits SPL to load U-Boot over a
	  USB-connected Ethernet link (such as a USB Ethernet dongle) rather
	  than from an onboard peripheral. Environment support is required
	  since the network stack uses a number of environment variables.
	  See also SPL_NET_SUPPORT and SPL_ETH_SUPPORT.

config SPL_DFU
	bool "Support DFU (Device Firmware Upgrade)"
	select SPL_HASH_SUPPORT
	select SPL_DFU_NO_RESET
	depends on SPL_RAM_SUPPORT
	help
	  This feature enables the DFU (Device Firmware Upgrade) in SPL with
	  RAM memory device support. The ROM code will load and execute
	  the SPL built with dfu. The user can load binaries (u-boot/kernel) to
	  selected device partition from host-pc using dfu-utils.
	  This feature is useful to flash the binaries to factory or bare-metal
	  boards using USB interface.

choice
	bool "DFU device selection"
	depends on SPL_DFU

config SPL_DFU_RAM
	bool "RAM device"
	depends on SPL_DFU && SPL_RAM_SUPPORT
	help
	 select RAM/DDR memory device for loading binary images
	 (u-boot/kernel) to the selected device partition using
	 DFU and execute the u-boot/kernel from RAM.

endchoice

config SPL_USB_SDP_SUPPORT
	bool "Support SDP (Serial Download Protocol)"
	help
	  Enable Serial Download Protocol (SDP) device support in SPL. This
	  allows to download images into memory and execute (jump to) them
	  using the same protocol as implemented by the i.MX family's boot ROM.
endif

config SPL_WATCHDOG_SUPPORT
	bool "Support watchdog drivers"
	imply SPL_WDT if !HW_WATCHDOG
	help
	  Enable support for watchdog drivers in SPL. A watchdog is
	  typically a hardware peripheral which can reset the system when it
	  detects no activity for a while (such as a software crash). This
	  enables the drivers in drivers/watchdog as part of an SPL build.

config SPL_YMODEM_SUPPORT
	bool "Support loading using Ymodem"
	depends on SPL_SERIAL_SUPPORT
	help
	  While loading from serial is slow it can be a useful backup when
	  there is no other option. The Ymodem protocol provides a reliable
	  means of transmitting U-Boot over a serial line for using in SPL,
	  with a checksum to ensure correctness.

config SPL_ATF
	bool "Support ARM Trusted Firmware"
	depends on ARM64
	help
	  ATF(ARM Trusted Firmware) is a component for ARM AArch64 which
	  is loaded by SPL (which is considered as BL2 in ATF terminology).
	  More detail at: https://github.com/ARM-software/arm-trusted-firmware

config SPL_ATF_NO_PLATFORM_PARAM
        bool "Pass no platform parameter"
	depends on SPL_ATF
	help
	  While we expect to call a pointer to a valid FDT (or NULL)
	  as the platform parameter to an ATF, some ATF versions are
	  not U-Boot aware and have an insufficiently robust parameter
	  validation to gracefully reject a FDT being passed.

	  If this option is enabled, the spl_atf os-type handler will
	  always pass NULL for the platform parameter.

	  If your ATF is affected, say Y.

config SPL_AM33XX_ENABLE_RTC32K_OSC
	bool "Enable the RTC32K OSC on AM33xx based platforms"
	default y if AM33XX
	help
	  Enable access to the AM33xx RTC and select the external 32kHz clock
	  source.

config SPL_OPTEE
	bool "Support OP-TEE Trusted OS"
	depends on ARM
	help
	  OP-TEE is an open source Trusted OS  which is loaded by SPL.
	  More detail at: https://github.com/OP-TEE/optee_os

config SPL_OPENSBI
	bool "Support RISC-V OpenSBI"
	depends on RISCV && SPL_RISCV_MMODE && RISCV_SMODE
	help
	  OpenSBI is an open-source implementation of the RISC-V Supervisor Binary
	  Interface (SBI) specification. U-Boot supports the OpenSBI FW_DYNAMIC
	  firmware. It is loaded and started by U-Boot SPL.

	  More details are available at https://github.com/riscv/opensbi and
	  https://github.com/riscv/riscv-sbi-doc

config SPL_OPENSBI_LOAD_ADDR
	hex "OpenSBI load address"
	depends on SPL_OPENSBI
	help
	  Load address of the OpenSBI binary.

config TPL
	bool
	depends on SUPPORT_TPL
	prompt "Enable TPL"
	help
	  If you want to build TPL as well as the normal image and SPL, say Y.

if TPL

config TPL_SIZE_LIMIT
	hex "Maximum size of TPL image"
	depends on TPL
	default 0
	help
	  Specifies the maximum length of the U-Boot TPL image.
	  If this value is zero, it is ignored.

config TPL_FRAMEWORK
	bool "Support TPL based upon the common SPL framework"
	default y if SPL_FRAMEWORK
	help
	  Enable the SPL framework under common/spl/ for TPL builds.
	  This framework supports MMC, NAND and YMODEM and other methods
	  loading of U-Boot's SPL stage. If unsure, say Y.

config TPL_HANDOFF
	bool "Pass hand-off information from TPL to SPL and U-Boot proper"
	depends on HANDOFF && TPL_BLOBLIST
	default y
	help
	  This option enables TPL to write handoff information. This can be
	  used to pass information like the size of SDRAM from TPL to U-Boot
	  proper. The information is also available to SPL if it is useful
	  there.

config TPL_BOARD_INIT
	bool "Call board-specific initialization in TPL"
	help
	  If this option is enabled, U-Boot will call the function
	  spl_board_init() from board_init_r(). This function should be
	  provided by the board.

config TPL_LDSCRIPT
        string "Linker script for the TPL stage"
	depends on TPL
	default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
	default "arch/$(ARCH)/cpu/u-boot-spl.lds"
	help
	  The TPL stage will usually require a different linker-script
	  (as it runs from a different memory region) than the regular
	  U-Boot stage.  Set this to the path of the linker-script to
	  be used for TPL.

	  May be left empty to trigger the Makefile infrastructure to
	  fall back to the linker-script used for the SPL stage.

config TPL_NEEDS_SEPARATE_TEXT_BASE
        bool "TPL needs a separate text-base"
	default n
	depends on TPL
	help
	  Enable, if the TPL stage should not inherit its text-base
	  from the SPL stage.  When enabled, a base address for the
	  .text sections of the TPL stage has to be set below.

config TPL_NEEDS_SEPARATE_STACK
        bool "TPL needs a separate initial stack-pointer"
	default n
	depends on TPL
	help
	  Enable, if the TPL stage should not inherit its initial
	  stack-pointer from the settings for the SPL stage.

config TPL_TEXT_BASE
        hex "Base address for the .text section of the TPL stage"
	depends on TPL_NEEDS_SEPARATE_TEXT_BASE
	help
	  The base address for the .text section of the TPL stage.

config TPL_MAX_SIZE
        int "Maximum size (in bytes) for the TPL stage"
	default 0
	depends on TPL
	help
	  The maximum size (in bytes) of the TPL stage.

config TPL_STACK
        hex "Address of the initial stack-pointer for the TPL stage"
	depends on TPL_NEEDS_SEPARATE_STACK
	help
	  The address of the initial stack-pointer for the TPL stage.
	  Usually this will be the (aligned) top-of-stack.

config TPL_BOOTROM_SUPPORT
        bool "Support returning to the BOOTROM (from TPL)"
	help
	  Some platforms (e.g. the Rockchip RK3368) provide support in their
	  ROM for loading the next boot-stage after performing basic setup
	  from the TPL stage.

	  Enable this option, to return to the BOOTROM through the
	  BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the
	  boot device list, if not implemented for a given board)

config TPL_DRIVERS_MISC_SUPPORT
	bool "Support misc drivers in TPL"
	help
	  Enable miscellaneous drivers in TPL. These drivers perform various
	  tasks that don't fall nicely into other categories, Enable this
	  option to build the drivers in drivers/misc as part of an TPL
	  build, for those that support building in TPL (not all drivers do).

config TPL_ENV_SUPPORT
	bool "Support an environment"
	help
	  Enable environment support in TPL. See SPL_ENV_SUPPORT for details.

config TPL_GPIO_SUPPORT
	bool "Support GPIO in TPL"
	help
	  Enable support for GPIOs (General-purpose Input/Output) in TPL.
	  GPIOs allow U-Boot to read the state of an input line (high or
	  low) and set the state of an output line. This can be used to
	  drive LEDs, control power to various system parts and read user
	  input. GPIOs can be useful in TPL to enable a 'sign-of-life' LED,
	  for example. Enable this option to build the drivers in
	  drivers/gpio as part of an TPL build.

config TPL_I2C_SUPPORT
	bool "Support I2C"
	help
	  Enable support for the I2C bus in TPL. See SPL_I2C_SUPPORT for
	  details.

config TPL_LIBCOMMON_SUPPORT
	bool "Support common libraries"
	help
	  Enable support for common U-Boot libraries within TPL. See
	  SPL_LIBCOMMON_SUPPORT for details.

config TPL_LIBGENERIC_SUPPORT
	bool "Support generic libraries"
	help
	  Enable support for generic U-Boot libraries within TPL. See
	  SPL_LIBGENERIC_SUPPORT for details.

config TPL_MPC8XXX_INIT_DDR_SUPPORT
	bool "Support MPC8XXX DDR init"
	help
	  Enable support for DDR-SDRAM on the MPC8XXX family within TPL. See
	  SPL_MPC8XXX_INIT_DDR_SUPPORT for details.

config TPL_MMC_SUPPORT
	bool "Support MMC"
	depends on MMC
	help
	  Enable support for MMC within TPL. See SPL_MMC_SUPPORT for details.

config TPL_NAND_SUPPORT
	bool "Support NAND flash"
	help
	  Enable support for NAND in TPL. See SPL_NAND_SUPPORT for details.

config TPL_PCI
	bool "Support PCI drivers"
	help
	  Enable support for PCI in TPL. For platforms that need PCI to boot,
	  or must perform some init using PCI in SPL, this provides the
	  necessary driver support. This enables the drivers in drivers/pci
	  as part of a TPL build.

config TPL_PCH_SUPPORT
	bool "Support PCH drivers"
	help
	  Enable support for PCH (Platform Controller Hub) devices in TPL.
	  These are used to set up GPIOs and the SPI peripheral early in
	  boot. This enables the drivers in drivers/pch as part of a TPL
	  build.

config TPL_RAM_SUPPORT
	bool "Support booting from RAM"
	help
	  Enable booting of an image in RAM. The image can be preloaded or
	  it can be loaded by TPL directly into RAM (e.g. using USB).

config TPL_RAM_DEVICE
	bool "Support booting from preloaded image in RAM"
	depends on TPL_RAM_SUPPORT
	help
	  Enable booting of an image already loaded in RAM. The image has to
	  be already in memory when TPL takes over, e.g. loaded by the boot
	  ROM.

config TPL_RTC_SUPPORT
	bool "Support RTC drivers"
	help
	  Enable RTC (Real-time Clock) support in TPL. This includes support
	  for reading and setting the time. Some RTC devices also have some
	  non-volatile (battery-backed) memory which is accessible if
	  needed. This enables the drivers in drivers/rtc as part of an TPL
	  build.

config TPL_SERIAL_SUPPORT
	bool "Support serial"
	select TPL_PRINTF
	select TPL_STRTO
	help
	  Enable support for serial in TPL. See SPL_SERIAL_SUPPORT for
	  details.

config TPL_SPI_FLASH_SUPPORT
	bool "Support SPI flash drivers"
	help
	  Enable support for using SPI flash in TPL. See SPL_SPI_FLASH_SUPPORT
	  for details.

config TPL_SPI_LOAD
	bool "Support loading from SPI flash"
	depends on TPL_SPI_FLASH_SUPPORT
	help
	  Enable support for loading next stage, U-Boot or otherwise, from
	  SPI NOR in U-Boot TPL.

config TPL_SPI_SUPPORT
	bool "Support SPI drivers"
	help
	  Enable support for using SPI in TPL. See SPL_SPI_SUPPORT for
	  details.

config TPL_YMODEM_SUPPORT
	bool "Support loading using Ymodem"
	depends on TPL_SERIAL_SUPPORT
	help
	  While loading from serial is slow it can be a useful backup when
	  there is no other option. The Ymodem protocol provides a reliable
	  means of transmitting U-Boot over a serial line for using in TPL,
	  with a checksum to ensure correctness.

endif # TPL

config SPL_AT91_MCK_BYPASS
	bool "Use external clock signal as a source of main clock for AT91 platforms"
	depends on ARCH_AT91
	default n
	help
	  Use external 8 to 24 Mhz clock signal as source of main clock instead
	  of an external crystal oscillator.
	  This option disables the internal driving on the XOUT pin.
	  The external source has to provide a stable clock on the XIN pin.
	  If this option is disabled, the SoC expects a crystal oscillator
	  that needs driving on both XIN and XOUT lines.

endif # SPL
endmenu