summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Wildt <[email protected]>2019-10-03 13:48:47 +0200
committerHeinrich Schuchardt <[email protected]>2019-10-06 16:02:37 +0200
commitc50b2883dfc1ce355dc37238741ef97cd2c5d000 (patch)
treeaa8f9e9ca55add15791a5cb3d16e3768a0479be6 /include
parent6810caf856ba68e124e4f8f9a522996a45f5232d (diff)
nvme: add accessor to namespace id and eui64
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 <[email protected]> Tested-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Bin Meng <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/nvme.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/nvme.h b/include/nvme.h
index 2c3d14d2418..2cdf8ce320c 100644
--- a/include/nvme.h
+++ b/include/nvme.h
@@ -78,4 +78,16 @@ int nvme_scan_namespace(void);
*/
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__ */