blob: 5a1aeb3d2b43121d27692295712fb25bb953b6c9 [file] [log] [blame]
Simon Glass09d71aa2016-02-29 15:25:55 -07001config BLK
Simon Glass0417b852022-08-11 19:34:51 -06002 bool # "Support block devices"
Simon Glass09d71aa2016-02-29 15:25:55 -07003 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
Simon Glass0417b852022-08-11 19:34:51 -060015 bool # "Enable Legacy Block Device"
Simon Glassca28baf2022-08-11 19:34:49 -060016 depends on SPL && !DM_SPL
17 default y if SPL_MMC || SPL_USB_STORAGE || SCSI || NVME || IDE
18 default y if SPL_AHCI_PCI
Adam Ford1811a922018-02-06 12:43:56 -060019 help
Simon Glassca28baf2022-08-11 19:34:49 -060020 Some devices require block support whether or not DM is enabled. This
21 is only supported in SPL. With this, the blk uclass is not used, but
22 instead a legacy implementation of block devices is used, with all
23 devices consisting of 'struct blk_desc' records.
Adam Ford1811a922018-02-06 12:43:56 -060024
Simon Glassc4d660d2017-07-04 13:31:19 -060025config SPL_BLK
26 bool "Support block devices in SPL"
27 depends on SPL_DM && BLK
28 default y
29 help
30 Enable support for block devices, such as SCSI, MMC and USB
31 flash sticks. These provide a block-level interface which permits
32 reading, writing and (in some cases) erasing blocks. Block
33 devices often have a partition table which allows the device to
34 be partitioned into several areas, called 'partitions' in U-Boot.
35 A filesystem can be placed in each partition.
36
Simon Glassef391512018-10-01 12:22:13 -060037config TPL_BLK
38 bool "Support block devices in TPL"
39 depends on TPL_DM && BLK
Simon Glassef391512018-10-01 12:22:13 -060040 help
41 Enable support for block devices, such as SCSI, MMC and USB
42 flash sticks. These provide a block-level interface which permits
43 reading, writing and (in some cases) erasing blocks. Block
44 devices often have a partition table which allows the device to
45 be partitioned into several areas, called 'partitions' in U-Boot.
46 A filesystem can be placed in each partition.
47
Simon Glass747093d2022-04-30 00:56:53 -060048config VPL_BLK
49 bool "Support block devices in VPL"
50 depends on VPL_DM && BLK
51 default y
52 help
53 Enable support for block devices, such as SCSI, MMC and USB
54 flash sticks. These provide a block-level interface which permits
55 reading, writing and (in some cases) erasing blocks. Block
56 devices often have a partition table which allows the device to
57 be partitioned into several areas, called 'partitions' in U-Boot.
58 A filesystem can be placed in each partition.
59
Eric Nelsone40cf342016-03-28 10:05:44 -070060config BLOCK_CACHE
61 bool "Use block device cache"
Tom Rini46960ad2018-05-22 12:24:16 -040062 depends on BLK
63 default y
Eric Nelsone40cf342016-03-28 10:05:44 -070064 help
65 This option enables a disk-block cache for all block devices.
66 This is most useful when accessing filesystems under U-Boot since
67 it will prevent repeated reads from directory structures and other
68 filesystem data structures.
Michal Simeke8a016b2016-09-08 15:06:45 +020069
Tobias Waldekranzc41e2092023-02-16 16:33:49 +010070config BLKMAP
71 bool "Composable virtual block devices (blkmap)"
72 depends on BLK
73 help
74 Create virtual block devices that are backed by various sources,
75 e.g. RAM, or parts of an existing block device. Though much more
76 rudimentary, it borrows a lot of ideas from Linux's device mapper
77 subsystem.
78
79 Example use-cases:
80 - Treat a region of RAM as a block device, i.e. a RAM disk. This let's
81 you extract files from filesystem images stored in RAM (perhaps as a
82 result of a TFTP transfer).
83 - Create a virtual partition on an existing device. This let's you
84 access filesystems that aren't stored at an exact partition
85 boundary. A common example is a filesystem image embedded in an FIT
86 image.
87
Adam Ford6fef62c2018-06-11 17:17:48 -050088config SPL_BLOCK_CACHE
89 bool "Use block device cache in SPL"
90 depends on SPL_BLK
Adam Ford6fef62c2018-06-11 17:17:48 -050091 help
92 This option enables the disk-block cache in SPL
93
Simon Glass731ba3c2019-05-18 11:59:53 -060094config TPL_BLOCK_CACHE
95 bool "Use block device cache in TPL"
96 depends on TPL_BLK
Simon Glass731ba3c2019-05-18 11:59:53 -060097 help
98 This option enables the disk-block cache in TPL
99
Simon Glass42b7f422021-12-04 08:56:31 -0700100config EFI_MEDIA
101 bool "Support EFI media drivers"
102 default y if EFI || SANDBOX
103 help
104 Enable this to support media devices on top of UEFI. This enables
105 just the uclass so you also need a specific driver to make this do
106 anything.
107
108 For sandbox there is a test driver.
109
110if EFI_MEDIA
111
112config EFI_MEDIA_SANDBOX
113 bool "Sandbox EFI media driver"
114 depends on SANDBOX
115 default y
116 help
117 Enables a simple sandbox media driver, used for testing just the
118 EFI_MEDIA uclass. It does not do anything useful, since sandbox does
119 not actually support running on top of UEFI.
120
Simon Glassd8063dc2021-12-04 08:56:32 -0700121config EFI_MEDIA_BLK
122 bool "EFI media block driver"
123 depends on EFI_APP
124 default y
125 help
126 Enables a block driver for providing access to UEFI devices. This
127 allows use of block devices detected by the underlying UEFI
128 implementation. With this it is possible to use filesystems on these
129 devices, for example.
130
Simon Glass42b7f422021-12-04 08:56:31 -0700131endif # EFI_MEDIA
132
Simon Glassfc843a02017-05-17 03:25:30 -0600133config IDE
134 bool "Support IDE controllers"
135 help
136 Enables support for IDE (Integrated Drive Electronics) hard drives.
137 This allows access to raw blocks and filesystems on an IDE drive
138 from U-Boot. See also CMD_IDE which provides an 'ide' command for
139 performing various IDE operations.
Simon Glassd2da54b2022-01-22 05:53:24 -0700140
141if IDE
142
143config SYS_IDE_MAXBUS
144 hex "Maximumm number of IDE buses"
145 default 2
146 help
147 This is the number of IDE buses provided by the board. Each one
148 can have one or two devices. One is designated the master and the
149 other one the slave. It is not required to have one or both on any
150 controller.
151
152config SYS_IDE_MAXDEVICE
153 hex "Maximum number of IDE devices"
154 default 2
155 help
156 This is the number of IDE devices which can be connected to the
157 board. Normally this is 2 * CONFIG_SYS_IDE_MAXBUS since up to two
158 devices can be connected to each bus. The number of devices actually
159 connected is determined by probing.
160
161config SYS_ATA_BASE_ADDR
162 hex "Base address of IDE controller"
163 default 0
164 help
165 This is the address of the IDE controller, from which other addresses
166 are calculated. Each bus is at a fixed offset from this address,
167 so it assumed that they are in the same area of the I/O space or
168 memory.
169
170config SYS_ATA_STRIDE
171 hex "IDE port stride"
172 default 0x1
173 help
174 This is the distance between each IDE register, in bytes. For an
175 8-bit controller this is typically 1, meaning that the registers
176 appear at consecutive bytes. If the value 2 two, that might indicate
177 a 16-bit register space.
178
179config SYS_ATA_DATA_OFFSET
180 hex "Offset of the data register"
181 default 0x0
182 help
183 This is the offset of the controller's data register from the base
184 address of the controller. This is typically 0, but may be something
185 else if there are some other registers at the start of the
186 controller space.
187
188config SYS_ATA_REG_OFFSET
189 hex "Offset of the register space"
190 default 0x0
191 help
192 This is the offset of the controller's 'register' space from the base
193 address of the controller. The data register (which is typically at
194 offset 0) has its own CONFIG, to deal with controllers where it is
195 somewhere else. Register 1 will be at this offset + 1, register 2 at
196 CONFIG_SYS_ATA_REG_OFFSET + 2, etc.
197
198config SYS_ATA_ALT_OFFSET
199 hex "Offset of the alternative registers"
200 default 0x0
201 help
202 This is the offset of the controller's 'alternative' space from the
203 base address of the controller. This allows these registers to be
204 located separately from the data and register space.
205
206config SYS_ATA_IDE0_OFFSET
207 hex "Offset of bus 0"
208 default 0x1f0
209 help
210 This is the start offset of bus 0 from the start of the
211 controller registers. All the other registers are calculated from
212 this address. using the above options. For x86 hardware this is often
213 0x1f0.
214
215config SYS_ATA_IDE1_OFFSET
216 hex "Offset of bus 1"
217 default 0x170
218 help
219 This is the start offset of bus 1 from the start of the
220 controller registers. All the other registers are calculated from
221 this address. using the above options. For x86 hardware this is often
222 0x170.
223
224config ATAPI
225 bool "Enable ATAPI support"
226 help
227 This enabled Advanced Technology Attachment Packet Interface (ATAPI),
228 a protocol that allows a greater variety of devices to be connected
229 to the IDE port than with plain ATA. It allows SCSI commands to be
230 sent across the bus, e.g. to support optical drives.
231
232config IDE_RESET
233 bool "Support board-specific reset"
234 help
235 If this is defined, IDE Reset will be performed by calling the
236 function:
237
238 ide_set_reset(int reset)
239
240 where reset is 1 to assert reset and 0 to de-assert it. This function
241 must be defined in a board-specific file.
242
243endif # IDE
Tom Riniaca1f672022-06-10 22:59:28 -0400244
245config LBA48
246 bool "Enable LBA support for disks larger than 137GB"
Tom Riniaca1f672022-06-10 22:59:28 -0400247 help
248 Set this to enable support for disks larger than 137GB.
249 Also look at CONFIG_SYS_64BIT_LBA. Without both of these, LBA48
250 support uses 32bit variables and will 'only' support disks up to
251 2.1TB.
252
253config SYS_64BIT_LBA
254 bool "Enable 64bit number of blocks on a block device"
Tom Riniaca1f672022-06-10 22:59:28 -0400255 help
256 Make the block subsystem use 64bit sector addresses, rather than the
257 default of 32bit.