1 /*
2 * include/asm-s390/irqextras390.h
3 *
4 * S390 version
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com)
7 */
8
9 #ifndef __irqextras390_h
10 #define __irqextras390_h
11
12 /*
13 irqextras390.h by D.J. Barrow
14 if you are a bitfield fan & are paranoid that ansi dosen't
15 give hard definitions about the size of an int or long you might
16 prefer these definitions as an alternative.
17
18 */
19
20 #include <linux/types.h>
21
22 typedef struct
23 {
24 unsigned key:4;
25 unsigned s:1;
26 unsigned l:1;
27 unsigned cc:2;
28 unsigned f:1;
29 unsigned p:1;
30 unsigned i:1;
31 unsigned a:1;
32 unsigned u:1;
33 unsigned z:1;
34 unsigned e:1;
35 unsigned n:1;
36 unsigned zero:1;
37
38 unsigned fc_start:1;
39 unsigned fc_halt:1;
40 unsigned fc_clear:1;
41
42 unsigned ac_resume_pending:1;
43 unsigned ac_start_pending:1;
44 unsigned ac_halt_pending:1;
45 unsigned ac_clear_pending:1;
46 unsigned ac_subchannel_active:1;
47 unsigned ac_device_active:1;
48 unsigned ac_suspended:1;
49
50 unsigned sc_alert:1;
51 unsigned sc_intermediate:1;
52 unsigned sc_primary:1;
53 unsigned sc_seconary:1;
54 unsigned sc_status_pending:1;
55
56 __u32 ccw_address;
57
58 unsigned dev_status_attention:1;
59 unsigned dev_status_modifier:1;
60 unsigned dev_status_control_unit_end:1;
61 unsigned dev_status_busy:1;
62 unsigned dev_status_channel_end:1;
63 unsigned dev_status_device_end:1;
64 unsigned dev_status_unit_check:1;
65 unsigned dev_status_unit_exception:1;
66
67 unsigned sch_status_program_cont_int:1;
68 unsigned sch_status_incorrect_length:1;
69 unsigned sch_status_program_check:1;
70 unsigned sch_status_protection_check:1;
71 unsigned sch_status_channel_data_check:1;
72 unsigned sch_status_channel_control_check:1;
73 unsigned sch_status_interface_control_check:1;
74 unsigned sch_status_chaining_check:1;
75
76 __u16 byte_count;
77 } scsw_bits_t __attribute__((packed));
78
79 typedef struct
80 {
81 __u32 flags;
82 __u32 ccw_address;
83 __u8 dev_status;
84 __u8 sch_status;
85 __u16 byte_count;
86 } scsw_words_t __attribute__((packed));
87
88 typedef struct
89 {
90 __u8 cmd_code;
91
92 unsigned cd:1;
93 unsigned cc:1;
94 unsigned sli:1;
95 unsigned skip:1;
96 unsigned pci:1;
97 unsigned ida:1;
98 unsigned s:1;
99 unsigned res1:1;
100
101 __u16 count;
102
103 void *ccw_data_address;
104 } ccw1_bits_t __attribute__((packed,aligned(8)));
105
106 typedef struct
107 {
108 __u32 interruption_parm;
109 unsigned key:4;
110 unsigned s:1;
111 unsigned res1:3;
112 unsigned f:1;
113 unsigned p:1;
114 unsigned i:1;
115 unsigned a:1;
116 unsigned u:1;
117 __u8 lpm;
118 unsigned l:1;
119 unsigned res2:7;
120 ccw1_bits_t *ccw_program_address;
121 } orb_bits_t __attribute__((packed));
122
123 void fixchannelprogram(orb_bits_t *orbptr);
124 void fixccws(ccw1_bits_t *ccwptr);
125 enum
126 {
127 ccw_write=0x1,
128 ccw_read=0x2,
129 ccw_read_backward=0xc,
130 ccw_control=0x3,
131 ccw_sense=0x4,
132 ccw_sense_id=0xe4,
133 ccw_transfer_in_channel0=0x8,
134 ccw_transfer_in_channel1=0x8,
135 ccw_set_x_mode=0xc3, // according to uli's lan notes
136 ccw_nop=0x3 // according to uli's notes again
137 // n.b. ccw_control clashes with this
138 // so I presume its a special case of
139 // control
140 };
141
142
143
144 #endif
145
146
147
148
149
150
151
152
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.