blob: 5a0c434058a384e48e79f75e0784fa9ec285006e [file] [log] [blame]
Simon Glass09d71aa2016-02-29 15:25:55 -07001config BLK
2 bool "Support block devices"
3 depends on DM
Simon Glass6b03b9d2022-08-11 19:34:41 -06004 default y if MMC || USB || SCSI || NVME || IDE || AHCI || SATA
5 default y if EFI_MEDIA || VIRTIO_BLK || PVBLOCK
Simon Glass09d71aa2016-02-29 15:25:55 -07006 help
7 Enable support for block devices, such as SCSI, MMC and USB
8 flash sticks. These provide a block-level interface which permits
9 reading, writing and (in some cases) erasing blocks. Block
10 devices often have a partition table which allows the device to
11 be partitioned into several areas, called 'partitions' in U-Boot.
12 A filesystem can be placed in each partition.
13
Simon Glass7f8967c2022-08-11 19:34:48 -060014config SPL_LEGACY_BLOCK
Adam Ford1811a922018-02-06 12:43:56 -060015 bool "Enable Legacy Block Device"
16 help
17 Some devices require block support whether or not DM is enabled
18
Simon Glassc4d660d2017-07-04 13:31:19 -060019config SPL_BLK
20 bool "Support block devices in SPL"
21 depends on SPL_DM && BLK
22 default y
23 help
24 Enable support for block devices, such as SCSI, MMC and USB
25 flash sticks. These provide a block-level interface which permits
26 reading, writing and (in some cases) erasing blocks. Block
27 devices often have a partition table which allows the device to
28 be partitioned into several areas, called 'partitions' in U-Boot.
29 A filesystem can be placed in each partition.
30
Simon Glassef391512018-10-01 12:22:13 -060031config TPL_BLK
32 bool "Support block devices in TPL"
33 depends on TPL_DM && BLK
34 default y
35 help
36 Enable support for block devices, such as SCSI, MMC and USB
37 flash sticks. These provide a block-level interface which permits
38 reading, writing and (in some cases) erasing blocks. Block
39 devices often have a partition table which allows the device to
40 be partitioned into several areas, called 'partitions' in U-Boot.
41 A filesystem can be placed in each partition.
42
Simon Glass747093d2022-04-30 00:56:53 -060043config VPL_BLK
44 bool "Support block devices in VPL"
45 depends on VPL_DM && BLK
46 default y
47 help
48 Enable support for block devices, such as SCSI, MMC and USB
49 flash sticks. These provide a block-level interface which permits
50 reading, writing and (in some cases) erasing blocks. Block
51 devices often have a partition table which allows the device to
52 be partitioned into several areas, called 'partitions' in U-Boot.
53 A filesystem can be placed in each partition.
54
Eric Nelsone40cf342016-03-28 10:05:44 -070055config BLOCK_CACHE
56 bool "Use block device cache"
Tom Rini46960ad2018-05-22 12:24:16 -040057 depends on BLK
58 default y
Eric Nelsone40cf342016-03-28 10:05:44 -070059 help
60 This option enables a disk-block cache for all block devices.
61 This is most useful when accessing filesystems under U-Boot since
62 it will prevent repeated reads from directory structures and other
63 filesystem data structures.
Michal Simeke8a016b2016-09-08 15:06:45 +020064
Adam Ford6fef62c2018-06-11 17:17:48 -050065config SPL_BLOCK_CACHE
66 bool "Use block device cache in SPL"
67 depends on SPL_BLK
Adam Ford6fef62c2018-06-11 17:17:48 -050068 help
69 This option enables the disk-block cache in SPL
70
Simon Glass731ba3c2019-05-18 11:59:53 -060071config TPL_BLOCK_CACHE
72 bool "Use block device cache in TPL"
73 depends on TPL_BLK
Simon Glass731ba3c2019-05-18 11:59:53 -060074 help
75 This option enables the disk-block cache in TPL
76
Simon Glass42b7f422021-12-04 08:56:31 -070077config EFI_MEDIA
78 bool "Support EFI media drivers"
79 default y if EFI || SANDBOX
80 help
81 Enable this to support media devices on top of UEFI. This enables
82 just the uclass so you also need a specific driver to make this do
83 anything.
84
85 For sandbox there is a test driver.
86
87if EFI_MEDIA
88
89config EFI_MEDIA_SANDBOX
90 bool "Sandbox EFI media driver"
91 depends on SANDBOX
92 default y
93 help
94 Enables a simple sandbox media driver, used for testing just the
95 EFI_MEDIA uclass. It does not do anything useful, since sandbox does
96 not actually support running on top of UEFI.
97
Simon Glassd8063dc2021-12-04 08:56:32 -070098config EFI_MEDIA_BLK
99 bool "EFI media block driver"
100 depends on EFI_APP
101 default y
102 help
103 Enables a block driver for providing access to UEFI devices. This
104 allows use of block devices detected by the underlying UEFI
105 implementation. With this it is possible to use filesystems on these
106 devices, for example.
107
Simon Glass42b7f422021-12-04 08:56:31 -0700108endif # EFI_MEDIA
109
Simon Glassfc843a02017-05-17 03:25:30 -0600110config IDE
111 bool "Support IDE controllers"
Simon Glass7f8967c2022-08-11 19:34:48 -0600112 select SPL_LEGACY_BLOCK
Simon Glassfc843a02017-05-17 03:25:30 -0600113 help
114 Enables support for IDE (Integrated Drive Electronics) hard drives.
115 This allows access to raw blocks and filesystems on an IDE drive
116 from U-Boot. See also CMD_IDE which provides an 'ide' command for
117 performing various IDE operations.
Simon Glassd2da54b2022-01-22 05:53:24 -0700118
119if IDE
120
121config SYS_IDE_MAXBUS
122 hex "Maximumm number of IDE buses"
123 default 2
124 help
125 This is the number of IDE buses provided by the board. Each one
126 can have one or two devices. One is designated the master and the
127 other one the slave. It is not required to have one or both on any
128 controller.
129
130config SYS_IDE_MAXDEVICE
131 hex "Maximum number of IDE devices"
132 default 2
133 help
134 This is the number of IDE devices which can be connected to the
135 board. Normally this is 2 * CONFIG_SYS_IDE_MAXBUS since up to two
136 devices can be connected to each bus. The number of devices actually
137 connected is determined by probing.
138
139config SYS_ATA_BASE_ADDR
140 hex "Base address of IDE controller"
141 default 0
142 help
143 This is the address of the IDE controller, from which other addresses
144 are calculated. Each bus is at a fixed offset from this address,
145 so it assumed that they are in the same area of the I/O space or
146 memory.
147
148config SYS_ATA_STRIDE
149 hex "IDE port stride"
150 default 0x1
151 help
152 This is the distance between each IDE register, in bytes. For an
153 8-bit controller this is typically 1, meaning that the registers
154 appear at consecutive bytes. If the value 2 two, that might indicate
155 a 16-bit register space.
156
157config SYS_ATA_DATA_OFFSET
158 hex "Offset of the data register"
159 default 0x0
160 help
161 This is the offset of the controller's data register from the base
162 address of the controller. This is typically 0, but may be something
163 else if there are some other registers at the start of the
164 controller space.
165
166config SYS_ATA_REG_OFFSET
167 hex "Offset of the register space"
168 default 0x0
169 help
170 This is the offset of the controller's 'register' space from the base
171 address of the controller. The data register (which is typically at
172 offset 0) has its own CONFIG, to deal with controllers where it is
173 somewhere else. Register 1 will be at this offset + 1, register 2 at
174 CONFIG_SYS_ATA_REG_OFFSET + 2, etc.
175
176config SYS_ATA_ALT_OFFSET
177 hex "Offset of the alternative registers"
178 default 0x0
179 help
180 This is the offset of the controller's 'alternative' space from the
181 base address of the controller. This allows these registers to be
182 located separately from the data and register space.
183
184config SYS_ATA_IDE0_OFFSET
185 hex "Offset of bus 0"
186 default 0x1f0
187 help
188 This is the start offset of bus 0 from the start of the
189 controller registers. All the other registers are calculated from
190 this address. using the above options. For x86 hardware this is often
191 0x1f0.
192
193config SYS_ATA_IDE1_OFFSET
194 hex "Offset of bus 1"
195 default 0x170
196 help
197 This is the start offset of bus 1 from the start of the
198 controller registers. All the other registers are calculated from
199 this address. using the above options. For x86 hardware this is often
200 0x170.
201
202config ATAPI
203 bool "Enable ATAPI support"
204 help
205 This enabled Advanced Technology Attachment Packet Interface (ATAPI),
206 a protocol that allows a greater variety of devices to be connected
207 to the IDE port than with plain ATA. It allows SCSI commands to be
208 sent across the bus, e.g. to support optical drives.
209
210config IDE_RESET
211 bool "Support board-specific reset"
212 help
213 If this is defined, IDE Reset will be performed by calling the
214 function:
215
216 ide_set_reset(int reset)
217
218 where reset is 1 to assert reset and 0 to de-assert it. This function
219 must be defined in a board-specific file.
220
221endif # IDE
Tom Riniaca1f672022-06-10 22:59:28 -0400222
223config LBA48
224 bool "Enable LBA support for disks larger than 137GB"
Simon Glass7f8967c2022-08-11 19:34:48 -0600225 depends on SPL_LEGACY_BLOCK
Tom Riniaca1f672022-06-10 22:59:28 -0400226 help
227 Set this to enable support for disks larger than 137GB.
228 Also look at CONFIG_SYS_64BIT_LBA. Without both of these, LBA48
229 support uses 32bit variables and will 'only' support disks up to
230 2.1TB.
231
232config SYS_64BIT_LBA
233 bool "Enable 64bit number of blocks on a block device"
Simon Glass7f8967c2022-08-11 19:34:48 -0600234 depends on SPL_LEGACY_BLOCK
Tom Riniaca1f672022-06-10 22:59:28 -0400235 help
236 Make the block subsystem use 64bit sector addresses, rather than the
237 default of 32bit.