| 1 | /* SPDX-License-Identifier: MIT */ |
| 2 | /* |
| 3 | * Copyright(c) 2019-2025, Intel Corporation. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | #ifndef __INTEL_DG_NVM_AUX_H__ |
| 7 | #define __INTEL_DG_NVM_AUX_H__ |
| 8 | |
| 9 | #include <linux/auxiliary_bus.h> |
| 10 | #include <linux/container_of.h> |
| 11 | #include <linux/ioport.h> |
| 12 | #include <linux/types.h> |
| 13 | |
| 14 | #define INTEL_DG_NVM_REGIONS 13 |
| 15 | |
| 16 | struct intel_dg_nvm_region { |
| 17 | const char *name; |
| 18 | }; |
| 19 | |
| 20 | struct intel_dg_nvm_dev { |
| 21 | struct auxiliary_device aux_dev; |
| 22 | bool writable_override; |
| 23 | bool non_posted_erase; |
| 24 | struct resource bar; |
| 25 | struct resource bar2; |
| 26 | const struct intel_dg_nvm_region *regions; |
| 27 | }; |
| 28 | |
| 29 | #define auxiliary_dev_to_intel_dg_nvm_dev(auxiliary_dev) \ |
| 30 | container_of(auxiliary_dev, struct intel_dg_nvm_dev, aux_dev) |
| 31 | |
| 32 | #endif /* __INTEL_DG_NVM_AUX_H__ */ |
| 33 | |