diff options
Diffstat (limited to 'drivers/misc/cxl/cxl.h')
| -rw-r--r-- | drivers/misc/cxl/cxl.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/misc/cxl/cxl.h b/drivers/misc/cxl/cxl.h index 28078f8894a5..a1cee4767ec6 100644 --- a/drivers/misc/cxl/cxl.h +++ b/drivers/misc/cxl/cxl.h | |||
| @@ -287,6 +287,13 @@ static const cxl_p2n_reg_t CXL_PSL_WED_An = {0x0A0}; | |||
| 287 | #define CXL_PE_SOFTWARE_STATE_S (1ul << (31 - 30)) /* Suspend */ | 287 | #define CXL_PE_SOFTWARE_STATE_S (1ul << (31 - 30)) /* Suspend */ |
| 288 | #define CXL_PE_SOFTWARE_STATE_T (1ul << (31 - 31)) /* Terminate */ | 288 | #define CXL_PE_SOFTWARE_STATE_T (1ul << (31 - 31)) /* Terminate */ |
| 289 | 289 | ||
| 290 | /****** CXL_PSL_RXCTL_An (Implementation Specific) ************************** | ||
| 291 | * Controls AFU Hang Pulse, which sets the timeout for the AFU to respond to | ||
| 292 | * the PSL for any response (except MMIO). Timeouts will occur between 1x to 2x | ||
| 293 | * of the hang pulse frequency. | ||
| 294 | */ | ||
| 295 | #define CXL_PSL_RXCTL_AFUHP_4S 0x7000000000000000ULL | ||
| 296 | |||
| 290 | /* SPA->sw_command_status */ | 297 | /* SPA->sw_command_status */ |
| 291 | #define CXL_SPA_SW_CMD_MASK 0xffff000000000000ULL | 298 | #define CXL_SPA_SW_CMD_MASK 0xffff000000000000ULL |
| 292 | #define CXL_SPA_SW_CMD_TERMINATE 0x0001000000000000ULL | 299 | #define CXL_SPA_SW_CMD_TERMINATE 0x0001000000000000ULL |
| @@ -375,6 +382,10 @@ struct cxl_afu { | |||
| 375 | int slice; | 382 | int slice; |
| 376 | int modes_supported; | 383 | int modes_supported; |
| 377 | int current_mode; | 384 | int current_mode; |
| 385 | int crs_num; | ||
| 386 | u64 crs_len; | ||
| 387 | u64 crs_offset; | ||
| 388 | struct list_head crs; | ||
| 378 | enum prefault_modes prefault_mode; | 389 | enum prefault_modes prefault_mode; |
| 379 | bool psa; | 390 | bool psa; |
| 380 | bool pp_psa; | 391 | bool pp_psa; |
| @@ -481,6 +492,8 @@ void cxl_release_one_irq(struct cxl *adapter, int hwirq); | |||
| 481 | int cxl_alloc_irq_ranges(struct cxl_irq_ranges *irqs, struct cxl *adapter, unsigned int num); | 492 | int cxl_alloc_irq_ranges(struct cxl_irq_ranges *irqs, struct cxl *adapter, unsigned int num); |
| 482 | void cxl_release_irq_ranges(struct cxl_irq_ranges *irqs, struct cxl *adapter); | 493 | void cxl_release_irq_ranges(struct cxl_irq_ranges *irqs, struct cxl *adapter); |
| 483 | int cxl_setup_irq(struct cxl *adapter, unsigned int hwirq, unsigned int virq); | 494 | int cxl_setup_irq(struct cxl *adapter, unsigned int hwirq, unsigned int virq); |
| 495 | int cxl_update_image_control(struct cxl *adapter); | ||
| 496 | int cxl_reset(struct cxl *adapter); | ||
| 484 | 497 | ||
| 485 | /* common == phyp + powernv */ | 498 | /* common == phyp + powernv */ |
| 486 | struct cxl_process_element_common { | 499 | struct cxl_process_element_common { |
| @@ -542,6 +555,15 @@ static inline void __iomem *_cxl_p2n_addr(struct cxl_afu *afu, cxl_p2n_reg_t reg | |||
| 542 | #define cxl_p2n_read(afu, reg) \ | 555 | #define cxl_p2n_read(afu, reg) \ |
| 543 | in_be64(_cxl_p2n_addr(afu, reg)) | 556 | in_be64(_cxl_p2n_addr(afu, reg)) |
| 544 | 557 | ||
| 558 | |||
| 559 | #define cxl_afu_cr_read64(afu, cr, off) \ | ||
| 560 | in_le64((afu)->afu_desc_mmio + (afu)->crs_offset + ((cr) * (afu)->crs_len) + (off)) | ||
| 561 | #define cxl_afu_cr_read32(afu, cr, off) \ | ||
| 562 | in_le32((afu)->afu_desc_mmio + (afu)->crs_offset + ((cr) * (afu)->crs_len) + (off)) | ||
| 563 | u16 cxl_afu_cr_read16(struct cxl_afu *afu, int cr, u64 off); | ||
| 564 | u8 cxl_afu_cr_read8(struct cxl_afu *afu, int cr, u64 off); | ||
| 565 | |||
| 566 | |||
| 545 | struct cxl_calls { | 567 | struct cxl_calls { |
| 546 | void (*cxl_slbia)(struct mm_struct *mm); | 568 | void (*cxl_slbia)(struct mm_struct *mm); |
| 547 | struct module *owner; | 569 | struct module *owner; |
