blob: 707e2bcd2388fd17c389e510f836f735227aaf7d [file] [log] [blame]
Simon Glasscceee552016-02-29 15:25:55 -07001config BLK
Simon Glass0bfaf582022-08-11 19:34:51 -06002 bool # "Support block devices"
Simon Glasscceee552016-02-29 15:25:55 -07003 depends on DM
Simon Glassa78e9062022-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 Glasscceee552016-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 Glass3bf7d7a2022-08-11 19:34:48 -060014config SPL_LEGACY_BLOCK
Simon Glass0bfaf582022-08-11 19:34:51 -060015 bool # "Enable Legacy Block Device"
Simon Glasse1a5ec52022-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 Fordb10ba902018-02-06 12:43:56 -060019 help
Simon Glasse1a5ec52022-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 Fordb10ba902018-02-06 12:43:56 -060024
Simon Glass5f4bd8c2017-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 Glassa19f7302018-10-01 12:22:13 -060037config TPL_BLK
38 bool "Support block devices in TPL"
39 depends on TPL_DM && BLK
40 default y
41 help
42 Enable support for block devices, such as SCSI, MMC and USB
43 flash sticks. These provide a block-level interface which permits
44 reading, writing and (in some cases) erasing blocks. Block
45 devices often have a partition table which allows the device to
46 be partitioned into several areas, called 'partitions' in U-Boot.
47 A filesystem can be placed in each partition.
48
Simon Glasse7ca7da2022-04-30 00:56:53 -060049config VPL_BLK
50 bool "Support block devices in VPL"
51 depends on VPL_DM && BLK
52 default y
53 help
54 Enable support for block devices, such as SCSI, MMC and USB
55 flash sticks. These provide a block-level interface which permits
56 reading, writing and (in some cases) erasing blocks. Block
57 devices often have a partition table which allows the device to
58 be partitioned into several areas, called 'partitions' in U-Boot.
59 A filesystem can be placed in each partition.
60
Eric Nelsonfaf4f052016-03-28 10:05:44 -070061config BLOCK_CACHE
62 bool "Use block device cache"
Tom Rini587a09e2018-05-22 12:24:16 -040063 depends on BLK
64 default y
Eric Nelsonfaf4f052016-03-28 10:05:44 -070065 help
66 This option enables a disk-block cache for all block devices.
67 This is most useful when accessing filesystems under U-Boot since
68 it will prevent repeated reads from directory structures and other
69 filesystem data structures.
Michal Simekc886f352016-09-08 15:06:45 +020070
Adam Fordd693fb92018-06-11 17:17:48 -050071config SPL_BLOCK_CACHE
72 bool "Use block device cache in SPL"
73 depends on SPL_BLK
Adam Fordd693fb92018-06-11 17:17:48 -050074 help
75 This option enables the disk-block cache in SPL
76
Simon Glassbfd48442019-05-18 11:59:53 -060077config TPL_BLOCK_CACHE
78 bool "Use block device cache in TPL"
79 depends on TPL_BLK
Simon Glassbfd48442019-05-18 11:59:53 -060080 help
81 This option enables the disk-block cache in TPL
82
Simon Glass507ab962021-12-04 08:56:31 -070083config EFI_MEDIA
84 bool "Support EFI media drivers"
85 default y if EFI || SANDBOX
86 help
87 Enable this to support media devices on top of UEFI. This enables
88 just the uclass so you also need a specific driver to make this do
89 anything.
90
91 For sandbox there is a test driver.
92
93if EFI_MEDIA
94
95config EFI_MEDIA_SANDBOX
96 bool "Sandbox EFI media driver"
97 depends on SANDBOX
98 default y
99 help
100 Enables a simple sandbox media driver, used for testing just the
101 EFI_MEDIA uclass. It does not do anything useful, since sandbox does
102 not actually support running on top of UEFI.
103
Simon Glassc4688392021-12-04 08:56:32 -0700104config EFI_MEDIA_BLK
105 bool "EFI media block driver"
106 depends on EFI_APP
107 default y
108 help
109 Enables a block driver for providing access to UEFI devices. This
110 allows use of block devices detected by the underlying UEFI
111 implementation. With this it is possible to use filesystems on these
112 devices, for example.
113
Simon Glass507ab962021-12-04 08:56:31 -0700114endif # EFI_MEDIA
115
Simon Glassb569a012017-05-17 03:25:30 -0600116config IDE
117 bool "Support IDE controllers"
118 help
119 Enables support for IDE (Integrated Drive Electronics) hard drives.
120 This allows access to raw blocks and filesystems on an IDE drive
121 from U-Boot. See also CMD_IDE which provides an 'ide' command for
122 performing various IDE operations.
Simon Glass8a4b5882022-01-22 05:53:24 -0700123
124if IDE
125
126config SYS_IDE_MAXBUS
127 hex "Maximumm number of IDE buses"
128 default 2
129 help
130 This is the number of IDE buses provided by the board. Each one
131 can have one or two devices. One is designated the master and the
132 other one the slave. It is not required to have one or both on any
133 controller.
134
135config SYS_IDE_MAXDEVICE
136 hex "Maximum number of IDE devices"
137 default 2
138 help
139 This is the number of IDE devices which can be connected to the
140 board. Normally this is 2 * CONFIG_SYS_IDE_MAXBUS since up to two
141 devices can be connected to each bus. The number of devices actually
142 connected is determined by probing.
143
144config SYS_ATA_BASE_ADDR
145 hex "Base address of IDE controller"
146 default 0
147 help
148 This is the address of the IDE controller, from which other addresses
149 are calculated. Each bus is at a fixed offset from this address,
150 so it assumed that they are in the same area of the I/O space or
151 memory.
152
153config SYS_ATA_STRIDE
154 hex "IDE port stride"
155 default 0x1
156 help
157 This is the distance between each IDE register, in bytes. For an
158 8-bit controller this is typically 1, meaning that the registers
159 appear at consecutive bytes. If the value 2 two, that might indicate
160 a 16-bit register space.
161
162config SYS_ATA_DATA_OFFSET
163 hex "Offset of the data register"
164 default 0x0
165 help
166 This is the offset of the controller's data register from the base
167 address of the controller. This is typically 0, but may be something
168 else if there are some other registers at the start of the
169 controller space.
170
171config SYS_ATA_REG_OFFSET
172 hex "Offset of the register space"
173 default 0x0
174 help
175 This is the offset of the controller's 'register' space from the base
176 address of the controller. The data register (which is typically at
177 offset 0) has its own CONFIG, to deal with controllers where it is
178 somewhere else. Register 1 will be at this offset + 1, register 2 at
179 CONFIG_SYS_ATA_REG_OFFSET + 2, etc.
180
181config SYS_ATA_ALT_OFFSET
182 hex "Offset of the alternative registers"
183 default 0x0
184 help
185 This is the offset of the controller's 'alternative' space from the
186 base address of the controller. This allows these registers to be
187 located separately from the data and register space.
188
189config SYS_ATA_IDE0_OFFSET
190 hex "Offset of bus 0"
191 default 0x1f0
192 help
193 This is the start offset of bus 0 from the start of the
194 controller registers. All the other registers are calculated from
195 this address. using the above options. For x86 hardware this is often
196 0x1f0.
197
198config SYS_ATA_IDE1_OFFSET
199 hex "Offset of bus 1"
200 default 0x170
201 help
202 This is the start offset of bus 1 from the start of the
203 controller registers. All the other registers are calculated from
204 this address. using the above options. For x86 hardware this is often
205 0x170.
206
207config ATAPI
208 bool "Enable ATAPI support"
209 help
210 This enabled Advanced Technology Attachment Packet Interface (ATAPI),
211 a protocol that allows a greater variety of devices to be connected
212 to the IDE port than with plain ATA. It allows SCSI commands to be
213 sent across the bus, e.g. to support optical drives.
214
215config IDE_RESET
216 bool "Support board-specific reset"
217 help
218 If this is defined, IDE Reset will be performed by calling the
219 function:
220
221 ide_set_reset(int reset)
222
223 where reset is 1 to assert reset and 0 to de-assert it. This function
224 must be defined in a board-specific file.
225
226endif # IDE
Tom Rini3f004772022-06-10 22:59:28 -0400227
228config LBA48
229 bool "Enable LBA support for disks larger than 137GB"
Tom Rini3f004772022-06-10 22:59:28 -0400230 help
231 Set this to enable support for disks larger than 137GB.
232 Also look at CONFIG_SYS_64BIT_LBA. Without both of these, LBA48
233 support uses 32bit variables and will 'only' support disks up to
234 2.1TB.
235
236config SYS_64BIT_LBA
237 bool "Enable 64bit number of blocks on a block device"
Tom Rini3f004772022-06-10 22:59:28 -0400238 help
239 Make the block subsystem use 64bit sector addresses, rather than the
240 default of 32bit.