imx: imx8qm/imx8qxp: Power down the resources before SPL jump to u-boot
[oweals/u-boot.git] / drivers / nvme / nvme.h
index b7fdd0b8e25119dc47d085f09aec3bdca791ed2a..0e8cb221a7a2d5cda4ae84badf8c68d199d04bb3 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 __DRIVER_NVME_H__
@@ -528,42 +527,6 @@ struct nvme_completion {
        __le16  status;         /* did the command fail, and if so, why? */
 };
 
-struct nvme_user_io {
-       __u8    opcode;
-       __u8    flags;
-       __u16   control;
-       __u16   nblocks;
-       __u16   rsvd;
-       __u64   metadata;
-       __u64   addr;
-       __u64   slba;
-       __u32   dsmgmt;
-       __u32   reftag;
-       __u16   apptag;
-       __u16   appmask;
-};
-
-struct nvme_passthru_cmd {
-       __u8    opcode;
-       __u8    flags;
-       __u16   rsvd1;
-       __u32   nsid;
-       __u32   cdw2;
-       __u32   cdw3;
-       __u64   metadata;
-       __u64   addr;
-       __u32   metadata_len;
-       __u32   data_len;
-       __u32   cdw10;
-       __u32   cdw11;
-       __u32   cdw12;
-       __u32   cdw13;
-       __u32   cdw14;
-       __u32   cdw15;
-       __u32   timeout_ms;
-       __u32   result;
-};
-
 /*
  * Registers should always be accessed with double word or quad word
  * accesses. Registers with 64-bit address pointers should be written
@@ -644,11 +607,7 @@ struct nvme_dev {
        struct list_head node;
        struct nvme_queue **queues;
        u32 __iomem *dbs;
-       unsigned int cardnum;
-       struct udevice *pdev;
-       pci_dev_t pci_dev;
        int instance;
-       uint8_t *hw_addr;
        unsigned queue_count;
        unsigned online_queues;
        unsigned max_qid;
@@ -657,42 +616,17 @@ struct nvme_dev {
        u32 ctrl_config;
        struct nvme_bar __iomem *bar;
        struct list_head namespaces;
-       const char *name;
        char serial[20];
        char model[40];
        char firmware_rev[8];
        u32 max_transfer_shift;
+       u64 cap;
        u32 stripe_size;
        u32 page_size;
-       u16 oncs;
-       u16 abort_limit;
-       u8 event_limit;
        u8 vwc;
        u64 *prp_pool;
        u32 prp_entry_num;
        u32 nn;
-       u32 blk_dev_start;
-};
-
-struct nvme_info {
-       int ns_num;     /*the number of nvme namespaces*/
-       int ndev_num;   /*the number of nvme devices*/
-       struct list_head dev_list;
-};
-
-/*
- * The nvme_iod describes the data in an I/O, including the list of PRP
- * entries.  You can't see it in this data structure because C doesn't let
- * me express that.  Use nvme_alloc_iod to ensure there's enough space
- * allocated to store the PRP list.
- */
-struct nvme_iod {
-       unsigned long private;  /* For the use of the submitter of the I/O */
-       int npages;             /* In the PRP list. 0 means small pool in use */
-       int offset;             /* Of PRP list */
-       int nents;              /* Used in scatterlist */
-       int length;             /* Of data, in bytes */
-       dma_addr_t first_dma;
 };
 
 /*
@@ -703,15 +637,12 @@ struct nvme_ns {
        struct list_head list;
        struct nvme_dev *dev;
        unsigned ns_id;
+       u8 eui64[8];
        int devnum;
        int lba_shift;
-       u16 ms;
        u8 flbas;
-       u8 pi_type;
        u64 mode_select_num_blocks;
        u32 mode_select_block_len;
 };
 
-extern struct nvme_info *nvme_info;
-
 #endif /* __DRIVER_NVME_H__ */