]>
Commit | Line | Data |
---|---|---|
cb3557c4 UK |
1 | /* |
2 | * CXL Flash Device Driver | |
3 | * | |
4 | * Written by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>, IBM Corporation | |
5 | * Uma Krishnan <ukrishn@linux.vnet.ibm.com>, IBM Corporation | |
6 | * | |
7 | * Copyright (C) 2018 IBM Corporation | |
8 | * | |
9 | * This program is free software; you can redistribute it and/or | |
10 | * modify it under the terms of the GNU General Public License | |
11 | * as published by the Free Software Foundation; either version | |
12 | * 2 of the License, or (at your option) any later version. | |
13 | */ | |
14 | ||
15 | /* OCXL hardware AFU associated with the host */ | |
16 | struct ocxl_hw_afu { | |
79a0b664 | 17 | struct ocxlflash_context *ocxl_ctx; /* Host context */ |
cb3557c4 UK |
18 | struct pci_dev *pdev; /* PCI device */ |
19 | struct device *dev; /* Generic device */ | |
a5f975fd UK |
20 | |
21 | struct ocxl_fn_config fcfg; /* DVSEC config of the function */ | |
4eca005f | 22 | struct ocxl_afu_config acfg; /* AFU configuration data */ |
8cc395f6 UK |
23 | |
24 | int fn_actag_base; /* Function acTag base */ | |
25 | int fn_actag_enabled; /* Function acTag number enabled */ | |
c4a54f07 UK |
26 | int afu_actag_base; /* AFU acTag base */ |
27 | int afu_actag_enabled; /* AFU acTag number enabled */ | |
dc7e2795 | 28 | |
db1f1d0a | 29 | struct idr idr; /* IDR to manage contexts */ |
dc7e2795 | 30 | int max_pasid; /* Maximum number of contexts */ |
cb3557c4 | 31 | }; |
79a0b664 UK |
32 | |
33 | struct ocxlflash_context { | |
34 | struct ocxl_hw_afu *hw_afu; /* HW AFU back pointer */ | |
6c7ea21b | 35 | struct address_space *mapping; /* Mapping for pseudo filesystem */ |
79a0b664 | 36 | bool master; /* Whether this is a master context */ |
db1f1d0a | 37 | int pe; /* Process element */ |
79a0b664 | 38 | }; |