]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blame - drivers/scsi/cxlflash/backend.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
[mirror_ubuntu-eoan-kernel.git] / drivers / scsi / cxlflash / backend.h
CommitLineData
2874c5fd 1/* SPDX-License-Identifier: GPL-2.0-or-later */
25b8e08e
MO
2/*
3 * CXL Flash Device Driver
4 *
5 * Written by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>, IBM Corporation
6 * Uma Krishnan <ukrishn@linux.vnet.ibm.com>, IBM Corporation
7 *
8 * Copyright (C) 2018 IBM Corporation
25b8e08e
MO
9 */
10
5e12397a
UK
11#ifndef _CXLFLASH_BACKEND_H
12#define _CXLFLASH_BACKEND_H
13
25b8e08e 14extern const struct cxlflash_backend_ops cxlflash_cxl_ops;
76ebe01f 15extern const struct cxlflash_backend_ops cxlflash_ocxl_ops;
25b8e08e
MO
16
17struct cxlflash_backend_ops {
18 struct module *module;
fb77e528
UK
19 void __iomem * (*psa_map)(void *ctx_cookie);
20 void (*psa_unmap)(void __iomem *addr);
21 int (*process_element)(void *ctx_cookie);
22 int (*map_afu_irq)(void *ctx_cookie, int num, irq_handler_t handler,
23 void *cookie, char *name);
24 void (*unmap_afu_irq)(void *ctx_cookie, int num, void *cookie);
402a55ea 25 u64 (*get_irq_objhndl)(void *ctx_cookie, int irq);
fb77e528
UK
26 int (*start_context)(void *ctx_cookie);
27 int (*stop_context)(void *ctx_cookie);
28 int (*afu_reset)(void *ctx_cookie);
29 void (*set_master)(void *ctx_cookie);
30 void * (*get_context)(struct pci_dev *dev, void *afu_cookie);
31 void * (*dev_context_init)(struct pci_dev *dev, void *afu_cookie);
32 int (*release_context)(void *ctx_cookie);
33 void (*perst_reloads_same_image)(void *afu_cookie, bool image);
34 ssize_t (*read_adapter_vpd)(struct pci_dev *dev, void *buf,
35 size_t count);
36 int (*allocate_afu_irqs)(void *ctx_cookie, int num);
37 void (*free_afu_irqs)(void *ctx_cookie);
38 void * (*create_afu)(struct pci_dev *dev);
48e077db 39 void (*destroy_afu)(void *afu_cookie);
fb77e528
UK
40 struct file * (*get_fd)(void *ctx_cookie, struct file_operations *fops,
41 int *fd);
42 void * (*fops_get_context)(struct file *file);
43 int (*start_work)(void *ctx_cookie, u64 irqs);
44 int (*fd_mmap)(struct file *file, struct vm_area_struct *vm);
45 int (*fd_release)(struct inode *inode, struct file *file);
25b8e08e 46};
5e12397a
UK
47
48#endif /* _CXLFLASH_BACKEND_H */