Revision tags: v00.04.15, v00.04.14, v00.04.13, v00.04.12, v00.04.11, v00.04.10, v00.04.09, v00.04.08, v00.04.07, v00.04.06, v00.04.05, v00.04.04, v00.04.03, v00.04.02, v00.04.01, v00.04.00, v2021.04, v00.03.03, v2021.01, v2020.10, v2020.07, v00.02.13, v2020.04, v2020.01, v2019.10, v00.02.05, v00.02.04, v00.02.03, v00.02.02, v00.02.01, v2019.07, v00.02.00, v2019.04 |
|
#
1d6edcbf |
| 16-Nov-2018 |
Tom Rini <trini@konsulko.com> |
Merge tag 'pull-14nov18' of git://git.denx.de/u-boot-dm
- virtio implementation and supporting patches - DM_FLAG_PRE_RELOC fixes - regmap improvements - minor buildman and sandbox things
|
#
d0851c89 |
| 15-Oct-2018 |
Bin Meng <bmeng.cn@gmail.com> |
blk: Call part_init() in the post_probe() method
part_init() is currently called in every DM BLK driver, either in its bind() or probe() method. However we can use the BLK uclass driver's post_probe
blk: Call part_init() in the post_probe() method
part_init() is currently called in every DM BLK driver, either in its bind() or probe() method. However we can use the BLK uclass driver's post_probe() method to do it automatically.
Update all DM BLK drivers to adopt this change.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
Revision tags: v2018.07 |
|
#
83d290c5 |
| 06-May-2018 |
Tom Rini <trini@konsulko.com> |
SPDX: Convert all of our single license tags to Linux Kernel style
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So
SPDX: Convert all of our single license tags to Linux Kernel style
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us.
In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style.
This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one.
Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
Revision tags: v2018.03, v2018.01, v2017.11 |
|
#
9e18eae2 |
| 02-Sep-2017 |
Bin Meng <bmeng.cn@gmail.com> |
nvme: Remove dead codes in nvme_setup_io_queues()
Execution cannot reach this statement: "nr_io_queues = result;"
Reported-by: Coverity (CID: 166731) Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Re
nvme: Remove dead codes in nvme_setup_io_queues()
Execution cannot reach this statement: "nr_io_queues = result;"
Reported-by: Coverity (CID: 166731) Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
52a5690e |
| 02-Sep-2017 |
Bin Meng <bmeng.cn@gmail.com> |
nvme: Fix potential sign extension issue in nvme_blk_rw()
"lbas" with type "u16" (16 bits, unsigned) is promoted in "lbas << ns->lba_shift" to type "int" (32 bits, signed), then sign-extended to typ
nvme: Fix potential sign extension issue in nvme_blk_rw()
"lbas" with type "u16" (16 bits, unsigned) is promoted in "lbas << ns->lba_shift" to type "int" (32 bits, signed), then sign-extended to type "unsigned long long" (64 bits, unsigned). If "lbas << ns->lba_shift" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
Fix it by casting "lbas" to "u32".
Reported-by: Coverity (CID: 166730) Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
37d46870 |
| 02-Sep-2017 |
Bin Meng <bmeng.cn@gmail.com> |
nvme: Fix wrong ndev->queues memset
memset() was given a sizeof(NVME_Q_NUM * sizeof(struct nvme_queue *) to clear, which is wrong.
Reported-by: Coverity (CID: 166729) Signed-off-by: Bin Meng <bmeng
nvme: Fix wrong ndev->queues memset
memset() was given a sizeof(NVME_Q_NUM * sizeof(struct nvme_queue *) to clear, which is wrong.
Reported-by: Coverity (CID: 166729) Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
18aa5a41 |
| 22-Aug-2017 |
Bin Meng <bmeng.cn@gmail.com> |
nvme: Get rid of the global variable nvme_info
At present the NVMe uclass driver uses a global variable nvme_info to store global information like namespace id, and NVMe controller driver's priv str
nvme: Get rid of the global variable nvme_info
At present the NVMe uclass driver uses a global variable nvme_info to store global information like namespace id, and NVMe controller driver's priv struct has a blk_dev_start that is used to calculate the namespace id based on the global information from nvme_info.
This is not a good design in the DM world and can be replaced with the following changes:
- Encode the namespace id in the NVMe block device name during the NVMe uclass post probe - Extract the namespace id from the device name during the NVMe block device probe - Let BLK uclass calculate the devnum for us by passing -1 to blk_create_devicef() as the devnum
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
#
704e040a |
| 22-Aug-2017 |
Bin Meng <bmeng.cn@gmail.com> |
nvme: Apply cache operations on the DMA buffers
So far cache operations are only applied on the submission queue and completion queue, but they are missing in other places like identify and block re
nvme: Apply cache operations on the DMA buffers
So far cache operations are only applied on the submission queue and completion queue, but they are missing in other places like identify and block read/write routines.
In order to correctly operate on the caches, the DMA buffer passed to identify routine must be allocated properly on the stack with the existing macro ALLOC_CACHE_ALIGN_BUFFER().
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
#
625a483c |
| 22-Aug-2017 |
Bin Meng <bmeng.cn@gmail.com> |
nvme: Consolidate block read and write routines
The NVMe block read and write routines are almost the same except the command opcode. Let's consolidate them to avoid duplication.
Signed-off-by: Bin
nvme: Consolidate block read and write routines
The NVMe block read and write routines are almost the same except the command opcode. Let's consolidate them to avoid duplication.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
#
722e668d |
| 22-Aug-2017 |
Bin Meng <bmeng.cn@gmail.com> |
nvme: Use macros to access NVMe queues
NVMe driver only uses two queues. The first one is allocated to do admin stuff, while the second one is for IO stuff. So far the driver uses magic number (0/1)
nvme: Use macros to access NVMe queues
NVMe driver only uses two queues. The first one is allocated to do admin stuff, while the second one is for IO stuff. So far the driver uses magic number (0/1) to access them. Change to use macros.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
#
04d2a384 |
| 22-Aug-2017 |
Bin Meng <bmeng.cn@gmail.com> |
nvme: Respect timeout when en/disabling the controller
So far the driver unconditionally delays 10ms when en/disabling the controller and still return 0 if 10ms times out. In fact, spec defines a ti
nvme: Respect timeout when en/disabling the controller
So far the driver unconditionally delays 10ms when en/disabling the controller and still return 0 if 10ms times out. In fact, spec defines a timeout value in the CAP register that is the worst case time that host software shall wait for the controller to become ready.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
#
b65c6921 |
| 22-Aug-2017 |
Bin Meng <bmeng.cn@gmail.com> |
nvme: Cache controller's capabilities
Capabilities register is RO and accessed at various places in the driver. Let's cache it in the controller driver's priv struct.
Signed-off-by: Bin Meng <bmeng
nvme: Cache controller's capabilities
Capabilities register is RO and accessed at various places in the driver. Let's cache it in the controller driver's priv struct.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
#
3e185629 |
| 22-Aug-2017 |
Bin Meng <bmeng.cn@gmail.com> |
nvme: Fix endianness assignment to prp2 in nvme_identify()
So far this is not causing any issue due to NVMe and x86 are using the same endianness, but for correctness, it should be fixed.
Signed-of
nvme: Fix endianness assignment to prp2 in nvme_identify()
So far this is not causing any issue due to NVMe and x86 are using the same endianness, but for correctness, it should be fixed.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
#
099c2015 |
| 22-Aug-2017 |
Bin Meng <bmeng.cn@gmail.com> |
nvme: Fix ndev->queues allocation
ndev->queues is a pointer to pointer, but the allocation wrongly requests sizeof(struct nvme_queue). Fix it.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
|
#
e5dc2d26 |
| 22-Aug-2017 |
Bin Meng <bmeng.cn@gmail.com> |
nvme: Fix getting PCI vendor id of the NVMe block device
The codes currently try to read PCI vendor id of the NVMe block device by dm_pci_read_config16() with its parameter set as its root complex c
nvme: Fix getting PCI vendor id of the NVMe block device
The codes currently try to read PCI vendor id of the NVMe block device by dm_pci_read_config16() with its parameter set as its root complex controller (ndev->pdev) instead of itself. This is seriously wrong. We can read the vendor id by passing the correct udevice parameter to the dm_pci_read_config16() API, however there is a shortcut by reading the cached vendor id from the PCI device's struct pci_child_platdata.
While we are here fixing this bug, apparently the quirk stuff handle codes in nvme_get_info_from_identify() never takes effect since its logic has never been true at all. Remove these codes completely.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
show more ...
|
#
beb5f521 |
| 03-Aug-2017 |
Bin Meng <bmeng.cn@gmail.com> |
nvme: Handle zero Maximum Data Transfer Size (MDTS)
Maximum Data Transfer Size (MDTS) field indicates the maximum data transfer size between the host and the controller. The host should not submit a
nvme: Handle zero Maximum Data Transfer Size (MDTS)
Maximum Data Transfer Size (MDTS) field indicates the maximum data transfer size between the host and the controller. The host should not submit a command that exceeds this transfer size. The value is in units of the minimum memory page size and is reported as a power of two (2^n).
The spec also says: a value of 0h indicates no restrictions on transfer size. On the real NVMe card this is normally not 0 due to hardware restrictions, but with QEMU emulated NVMe device it reports as 0. In nvme_blk_read/write() below we have the following algorithm for maximum number of logic blocks per transfer:
u16 lbas = 1 << (dev->max_transfer_shift - ns->lba_shift);
dev->max_transfer_shift being 0 will for sure cause lbas to overflow. Let's use 20. With this fix, the NVMe driver works on QEMU emulated NVMe device.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
f81d83d5 |
| 03-Aug-2017 |
Jon Nettleton <jon@solid-run.com> |
nvme: Fix number of blocks detection
NVMe should use the nsze value from the queried device. This will reflect the total number of blocks of the device and fix detecting my Samsung 960 EVO 256GB.
O
nvme: Fix number of blocks detection
NVMe should use the nsze value from the queried device. This will reflect the total number of blocks of the device and fix detecting my Samsung 960 EVO 256GB.
Original: Capacity: 40386.6 MB = 39.4 GB (82711872 x 512)
Fixed: Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
Signed-off-by: Jon Nettleton <jon@solid-run.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
0deb9131 |
| 03-Aug-2017 |
Jon Nettleton <jon@solid-run.com> |
nvme: Detect devices that are class Storage Express
This adds support to detect the catchall PCI class for NVMe devices. It allows the drivers to work with most NVMe devices that don't need specific
nvme: Detect devices that are class Storage Express
This adds support to detect the catchall PCI class for NVMe devices. It allows the drivers to work with most NVMe devices that don't need specific detection due to quirks etc.
Tested against a Samsung 960 EVO drive.
Signed-off-by: Jon Nettleton <jon@solid-run.com> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
#
982388ea |
| 03-Aug-2017 |
Zhikang Zhang <zhikang.zhang@nxp.com> |
nvme: Add NVM Express driver support
NVM Express (NVMe) is a register level interface that allows host software to communicate with a non-volatile memory subsystem. This interface is optimized for e
nvme: Add NVM Express driver support
NVM Express (NVMe) is a register level interface that allows host software to communicate with a non-volatile memory subsystem. This interface is optimized for enterprise and client solid state drives, typically attached to the PCI express interface.
This adds a U-Boot driver support of devices that follow the NVMe standard [1] and supports basic read/write operations.
Tested with a 400GB Intel SSD 750 series NVMe card with controller id 8086:0953.
[1] http://www.nvmexpress.org/resources/specifications/
Signed-off-by: Zhikang Zhang <zhikang.zhang@nxp.com> Signed-off-by: Wenbin Song <wenbin.song@nxp.com> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|