summaryrefslogtreecommitdiff
path: root/drivers/nvme/nvme.h
AgeCommit message (Collapse)AuthorFilesLines
2019-10-06nvme: add accessor to namespace id and eui64Patrick Wildt1-0/+1
This adds a function which can be used by e.g. EFI to retrieve the namespace identifier and EUI64. For that it adds the EUI64 to its driver internal namespace structure and copies the EUI64 during namespace identification. Signed-off-by: Patrick Wildt <patrick@blueri.se> Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
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>
2017-08-28nvme: Get rid of the global variable nvme_infoBin Meng1-9/+0
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>
2017-08-28nvme: Cache controller's capabilitiesBin Meng1-0/+1
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>
2017-08-28nvme: Fix getting PCI vendor id of the NVMe block deviceBin Meng1-1/+0
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>
2017-08-28nvme: Remove useless definesBin Meng1-60/+0
These are leftover when the driver was ported from Linux and are not used by the U-Boot driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-13nvme: Add NVM Express driver supportZhikang Zhang1-0/+717
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>