Simon Glass | 09d71aa | 2016-02-29 15:25:55 -0700 | [diff] [blame] | 1 | config BLK |
Simon Glass | 0417b85 | 2022-08-11 19:34:51 -0600 | [diff] [blame] | 2 | bool # "Support block devices" |
Simon Glass | 09d71aa | 2016-02-29 15:25:55 -0700 | [diff] [blame] | 3 | depends on DM |
Simon Glass | 6b03b9d | 2022-08-11 19:34:41 -0600 | [diff] [blame] | 4 | default y if MMC || USB || SCSI || NVME || IDE || AHCI || SATA |
| 5 | default y if EFI_MEDIA || VIRTIO_BLK || PVBLOCK |
Simon Glass | 09d71aa | 2016-02-29 15:25:55 -0700 | [diff] [blame] | 6 | 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 Glass | 7f8967c | 2022-08-11 19:34:48 -0600 | [diff] [blame] | 14 | config SPL_LEGACY_BLOCK |
Simon Glass | 0417b85 | 2022-08-11 19:34:51 -0600 | [diff] [blame] | 15 | bool # "Enable Legacy Block Device" |
Simon Glass | ca28baf | 2022-08-11 19:34:49 -0600 | [diff] [blame] | 16 | 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 Ford | 1811a92 | 2018-02-06 12:43:56 -0600 | [diff] [blame] | 19 | help |
Simon Glass | ca28baf | 2022-08-11 19:34:49 -0600 | [diff] [blame] | 20 | 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 Ford | 1811a92 | 2018-02-06 12:43:56 -0600 | [diff] [blame] | 24 | |
Simon Glass | c4d660d | 2017-07-04 13:31:19 -0600 | [diff] [blame] | 25 | config 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 Glass | ef39151 | 2018-10-01 12:22:13 -0600 | [diff] [blame] | 37 | config TPL_BLK |
| 38 | bool "Support block devices in TPL" |
| 39 | depends on TPL_DM && BLK |
Simon Glass | ef39151 | 2018-10-01 12:22:13 -0600 | [diff] [blame] | 40 | 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 Glass | 747093d | 2022-04-30 00:56:53 -0600 | [diff] [blame] | 48 | config 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 Nelson | e40cf34 | 2016-03-28 10:05:44 -0700 | [diff] [blame] | 60 | config BLOCK_CACHE |
| 61 | bool "Use block device cache" |
Tom Rini | 46960ad | 2018-05-22 12:24:16 -0400 | [diff] [blame] | 62 | depends on BLK |
| 63 | default y |
Eric Nelson | e40cf34 | 2016-03-28 10:05:44 -0700 | [diff] [blame] | 64 | 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 Simek | e8a016b | 2016-09-08 15:06:45 +0200 | [diff] [blame] | 69 | |
Adam Ford | 6fef62c | 2018-06-11 17:17:48 -0500 | [diff] [blame] | 70 | config SPL_BLOCK_CACHE |
| 71 | bool "Use block device cache in SPL" |
| 72 | depends on SPL_BLK |
Adam Ford | 6fef62c | 2018-06-11 17:17:48 -0500 | [diff] [blame] | 73 | help |
| 74 | This option enables the disk-block cache in SPL |
| 75 | |
Simon Glass | 731ba3c | 2019-05-18 11:59:53 -0600 | [diff] [blame] | 76 | config TPL_BLOCK_CACHE |
| 77 | bool "Use block device cache in TPL" |
| 78 | depends on TPL_BLK |
Simon Glass | 731ba3c | 2019-05-18 11:59:53 -0600 | [diff] [blame] | 79 | help |
| 80 | This option enables the disk-block cache in TPL |
| 81 | |
Simon Glass | 42b7f42 | 2021-12-04 08:56:31 -0700 | [diff] [blame] | 82 | config EFI_MEDIA |
| 83 | bool "Support EFI media drivers" |
| 84 | default y if EFI || SANDBOX |
| 85 | help |
| 86 | Enable this to support media devices on top of UEFI. This enables |
| 87 | just the uclass so you also need a specific driver to make this do |
| 88 | anything. |
| 89 | |
| 90 | For sandbox there is a test driver. |
| 91 | |
| 92 | if EFI_MEDIA |
| 93 | |
| 94 | config EFI_MEDIA_SANDBOX |
| 95 | bool "Sandbox EFI media driver" |
| 96 | depends on SANDBOX |
| 97 | default y |
| 98 | help |
| 99 | Enables a simple sandbox media driver, used for testing just the |
| 100 | EFI_MEDIA uclass. It does not do anything useful, since sandbox does |
| 101 | not actually support running on top of UEFI. |
| 102 | |
Simon Glass | d8063dc | 2021-12-04 08:56:32 -0700 | [diff] [blame] | 103 | config EFI_MEDIA_BLK |
| 104 | bool "EFI media block driver" |
| 105 | depends on EFI_APP |
| 106 | default y |
| 107 | help |
| 108 | Enables a block driver for providing access to UEFI devices. This |
| 109 | allows use of block devices detected by the underlying UEFI |
| 110 | implementation. With this it is possible to use filesystems on these |
| 111 | devices, for example. |
| 112 | |
Simon Glass | 42b7f42 | 2021-12-04 08:56:31 -0700 | [diff] [blame] | 113 | endif # EFI_MEDIA |
| 114 | |
Simon Glass | fc843a0 | 2017-05-17 03:25:30 -0600 | [diff] [blame] | 115 | config IDE |
| 116 | bool "Support IDE controllers" |
| 117 | help |
| 118 | Enables support for IDE (Integrated Drive Electronics) hard drives. |
| 119 | This allows access to raw blocks and filesystems on an IDE drive |
| 120 | from U-Boot. See also CMD_IDE which provides an 'ide' command for |
| 121 | performing various IDE operations. |
Simon Glass | d2da54b | 2022-01-22 05:53:24 -0700 | [diff] [blame] | 122 | |
| 123 | if IDE |
| 124 | |
| 125 | config SYS_IDE_MAXBUS |
| 126 | hex "Maximumm number of IDE buses" |
| 127 | default 2 |
| 128 | help |
| 129 | This is the number of IDE buses provided by the board. Each one |
| 130 | can have one or two devices. One is designated the master and the |
| 131 | other one the slave. It is not required to have one or both on any |
| 132 | controller. |
| 133 | |
| 134 | config SYS_IDE_MAXDEVICE |
| 135 | hex "Maximum number of IDE devices" |
| 136 | default 2 |
| 137 | help |
| 138 | This is the number of IDE devices which can be connected to the |
| 139 | board. Normally this is 2 * CONFIG_SYS_IDE_MAXBUS since up to two |
| 140 | devices can be connected to each bus. The number of devices actually |
| 141 | connected is determined by probing. |
| 142 | |
| 143 | config SYS_ATA_BASE_ADDR |
| 144 | hex "Base address of IDE controller" |
| 145 | default 0 |
| 146 | help |
| 147 | This is the address of the IDE controller, from which other addresses |
| 148 | are calculated. Each bus is at a fixed offset from this address, |
| 149 | so it assumed that they are in the same area of the I/O space or |
| 150 | memory. |
| 151 | |
| 152 | config SYS_ATA_STRIDE |
| 153 | hex "IDE port stride" |
| 154 | default 0x1 |
| 155 | help |
| 156 | This is the distance between each IDE register, in bytes. For an |
| 157 | 8-bit controller this is typically 1, meaning that the registers |
| 158 | appear at consecutive bytes. If the value 2 two, that might indicate |
| 159 | a 16-bit register space. |
| 160 | |
| 161 | config SYS_ATA_DATA_OFFSET |
| 162 | hex "Offset of the data register" |
| 163 | default 0x0 |
| 164 | help |
| 165 | This is the offset of the controller's data register from the base |
| 166 | address of the controller. This is typically 0, but may be something |
| 167 | else if there are some other registers at the start of the |
| 168 | controller space. |
| 169 | |
| 170 | config SYS_ATA_REG_OFFSET |
| 171 | hex "Offset of the register space" |
| 172 | default 0x0 |
| 173 | help |
| 174 | This is the offset of the controller's 'register' space from the base |
| 175 | address of the controller. The data register (which is typically at |
| 176 | offset 0) has its own CONFIG, to deal with controllers where it is |
| 177 | somewhere else. Register 1 will be at this offset + 1, register 2 at |
| 178 | CONFIG_SYS_ATA_REG_OFFSET + 2, etc. |
| 179 | |
| 180 | config SYS_ATA_ALT_OFFSET |
| 181 | hex "Offset of the alternative registers" |
| 182 | default 0x0 |
| 183 | help |
| 184 | This is the offset of the controller's 'alternative' space from the |
| 185 | base address of the controller. This allows these registers to be |
| 186 | located separately from the data and register space. |
| 187 | |
| 188 | config SYS_ATA_IDE0_OFFSET |
| 189 | hex "Offset of bus 0" |
| 190 | default 0x1f0 |
| 191 | help |
| 192 | This is the start offset of bus 0 from the start of the |
| 193 | controller registers. All the other registers are calculated from |
| 194 | this address. using the above options. For x86 hardware this is often |
| 195 | 0x1f0. |
| 196 | |
| 197 | config SYS_ATA_IDE1_OFFSET |
| 198 | hex "Offset of bus 1" |
| 199 | default 0x170 |
| 200 | help |
| 201 | This is the start offset of bus 1 from the start of the |
| 202 | controller registers. All the other registers are calculated from |
| 203 | this address. using the above options. For x86 hardware this is often |
| 204 | 0x170. |
| 205 | |
| 206 | config ATAPI |
| 207 | bool "Enable ATAPI support" |
| 208 | help |
| 209 | This enabled Advanced Technology Attachment Packet Interface (ATAPI), |
| 210 | a protocol that allows a greater variety of devices to be connected |
| 211 | to the IDE port than with plain ATA. It allows SCSI commands to be |
| 212 | sent across the bus, e.g. to support optical drives. |
| 213 | |
| 214 | config IDE_RESET |
| 215 | bool "Support board-specific reset" |
| 216 | help |
| 217 | If this is defined, IDE Reset will be performed by calling the |
| 218 | function: |
| 219 | |
| 220 | ide_set_reset(int reset) |
| 221 | |
| 222 | where reset is 1 to assert reset and 0 to de-assert it. This function |
| 223 | must be defined in a board-specific file. |
| 224 | |
| 225 | endif # IDE |
Tom Rini | aca1f67 | 2022-06-10 22:59:28 -0400 | [diff] [blame] | 226 | |
| 227 | config LBA48 |
| 228 | bool "Enable LBA support for disks larger than 137GB" |
Tom Rini | aca1f67 | 2022-06-10 22:59:28 -0400 | [diff] [blame] | 229 | help |
| 230 | Set this to enable support for disks larger than 137GB. |
| 231 | Also look at CONFIG_SYS_64BIT_LBA. Without both of these, LBA48 |
| 232 | support uses 32bit variables and will 'only' support disks up to |
| 233 | 2.1TB. |
| 234 | |
| 235 | config SYS_64BIT_LBA |
| 236 | bool "Enable 64bit number of blocks on a block device" |
Tom Rini | aca1f67 | 2022-06-10 22:59:28 -0400 | [diff] [blame] | 237 | help |
| 238 | Make the block subsystem use 64bit sector addresses, rather than the |
| 239 | default of 32bit. |