Merge branch '2020-03-27-master-imports'
[oweals/u-boot.git] / include / nvme.h
index 362440871b2030c300d54aee6419205a6756f227..2cdf8ce320c1d07e0d4b6938253dd4a0b3d38693 100644 (file)
@@ -1,8 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright (C) 2017 NXP Semiconductors
  * Copyright (C) 2017 Bin Meng <bmeng.cn@gmail.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef __NVME_H__
@@ -68,4 +67,27 @@ int nvme_set_features(struct nvme_dev *dev, unsigned fid, unsigned dword11,
  */
 int nvme_scan_namespace(void);
 
+/**
+ * nvme_print_info - print detailed NVMe controller and namespace information
+ *
+ * This prints out detailed human readable NVMe controller and namespace
+ * information which is very useful for debugging.
+ *
+ * @udev:      NVMe controller device
+ * @return:    0 on success, -EIO if NVMe identify command fails
+ */
+int nvme_print_info(struct udevice *udev);
+
+/**
+ * nvme_get_namespace_id - return namespace identifier
+ *
+ * This returns the namespace identifier.
+ *
+ * @udev:      NVMe controller device
+ * @ns_id:     Place where to put the name space identifier
+ * @eui64:     Place where to put the IEEE Extended Unique Identifier
+ * @return:    0 on success, -ve on error
+ */
+int nvme_get_namespace_id(struct udevice *udev, u32 *ns_id, u8 *eui64);
+
 #endif /* __NVME_H__ */