V4L/DVB (6715): ivtv: Remove unnecessary register update
[linux-2.6/verdex.git] / drivers / s390 / cio / chsc.h
blobd1f5db1e69b94d6eee24aef06351fdb515abc1e4
1 #ifndef S390_CHSC_H
2 #define S390_CHSC_H
4 #include <linux/types.h>
5 #include <linux/device.h>
6 #include <asm/chpid.h>
7 #include "schid.h"
9 #define CHSC_SDA_OC_MSS 0x2
11 struct chsc_header {
12 u16 length;
13 u16 code;
14 } __attribute__ ((packed));
16 #define NR_MEASUREMENT_CHARS 5
17 struct cmg_chars {
18 u32 values[NR_MEASUREMENT_CHARS];
19 } __attribute__ ((packed));
21 #define NR_MEASUREMENT_ENTRIES 8
22 struct cmg_entry {
23 u32 values[NR_MEASUREMENT_ENTRIES];
24 } __attribute__ ((packed));
26 struct channel_path_desc {
27 u8 flags;
28 u8 lsn;
29 u8 desc;
30 u8 chpid;
31 u8 swla;
32 u8 zeroes;
33 u8 chla;
34 u8 chpp;
35 } __attribute__ ((packed));
37 struct channel_path;
39 extern void chsc_process_crw(void);
41 struct css_general_char {
42 u64 : 41;
43 u32 aif : 1; /* bit 41 */
44 u32 : 3;
45 u32 mcss : 1; /* bit 45 */
46 u32 : 2;
47 u32 ext_mb : 1; /* bit 48 */
48 u32 : 7;
49 u32 aif_tdd : 1; /* bit 56 */
50 u32 : 1;
51 u32 qebsm : 1; /* bit 58 */
52 u32 : 8;
53 u32 aif_osa : 1; /* bit 67 */
54 u32 : 28;
55 }__attribute__((packed));
57 struct css_chsc_char {
58 u64 res;
59 u64 : 20;
60 u32 secm : 1; /* bit 84 */
61 u32 : 1;
62 u32 scmc : 1; /* bit 86 */
63 u32 : 20;
64 u32 scssc : 1; /* bit 107 */
65 u32 scsscf : 1; /* bit 108 */
66 u32 : 19;
67 }__attribute__((packed));
69 extern struct css_general_char css_general_characteristics;
70 extern struct css_chsc_char css_chsc_characteristics;
72 struct chsc_ssd_info {
73 u8 path_mask;
74 u8 fla_valid_mask;
75 struct chp_id chpid[8];
76 u16 fla[8];
78 extern int chsc_get_ssd_info(struct subchannel_id schid,
79 struct chsc_ssd_info *ssd);
80 extern int chsc_determine_css_characteristics(void);
81 extern int css_characteristics_avail;
82 extern int chsc_alloc_sei_area(void);
83 extern void chsc_free_sei_area(void);
85 extern int chsc_enable_facility(int);
86 struct channel_subsystem;
87 extern int chsc_secm(struct channel_subsystem *, int);
89 int chsc_chp_vary(struct chp_id chpid, int on);
90 int chsc_determine_channel_path_description(struct chp_id chpid,
91 struct channel_path_desc *desc);
92 void chsc_chp_online(struct chp_id chpid);
93 void chsc_chp_offline(struct chp_id chpid);
94 int chsc_get_channel_measurement_chars(struct channel_path *chp);
96 #endif