1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_S390_EADM_H
3 #define _ASM_S390_EADM_H
5 #include <linux/types.h>
6 #include <linux/device.h>
7 #include <linux/blk_types.h>
19 #define ARQB_CMD_MOVE 1
39 #define EQC_WR_PROHIBIT 22
60 #define MSB_OC_CLEAR 0
62 #define MSB_OC_WRITE 2
63 #define MSB_OC_RELEASE 3
65 #define MSB_FLAG_BNM 0x80
66 #define MSB_FLAG_IDA 0x40
71 #define AOB_NR_MSB 124
76 struct msb msb
[AOB_NR_MSB
];
77 } __packed
__aligned(PAGE_SIZE
);
79 struct aob_rq_header
{
80 struct scm_device
*scmdev
;
87 unsigned int nr_max_block
;
90 unsigned int persistence
:4;
91 unsigned int oper_state
:4;
92 unsigned int data_state
:4;
94 unsigned int release
:1;
95 unsigned int res_id
:8;
99 #define OP_STATE_GOOD 1
100 #define OP_STATE_TEMP_ERR 2
101 #define OP_STATE_PERM_ERR 3
103 enum scm_event
{SCM_CHANGE
, SCM_AVAIL
};
106 struct device_driver drv
;
107 int (*probe
) (struct scm_device
*scmdev
);
108 int (*remove
) (struct scm_device
*scmdev
);
109 void (*notify
) (struct scm_device
*scmdev
, enum scm_event event
);
110 void (*handler
) (struct scm_device
*scmdev
, void *data
,
114 int scm_driver_register(struct scm_driver
*scmdrv
);
115 void scm_driver_unregister(struct scm_driver
*scmdrv
);
117 int eadm_start_aob(struct aob
*aob
);
118 void scm_irq_handler(struct aob
*aob
, blk_status_t error
);
120 #endif /* _ASM_S390_EADM_H */