Heiko Carstens | ab14de6 | 2007-02-05 21:18:37 +0100 | [diff] [blame] | 1 | /* |
| 2 | * include/asm-s390/sclp.h |
| 3 | * |
| 4 | * Copyright IBM Corp. 2007 |
| 5 | * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com> |
| 6 | */ |
| 7 | |
| 8 | #ifndef _ASM_S390_SCLP_H |
| 9 | #define _ASM_S390_SCLP_H |
| 10 | |
| 11 | #include <linux/types.h> |
Peter Oberparleiter | e5854a5 | 2007-04-27 16:01:31 +0200 | [diff] [blame] | 12 | #include <asm/chpid.h> |
Heiko Carstens | ab14de6 | 2007-02-05 21:18:37 +0100 | [diff] [blame] | 13 | |
| 14 | struct sccb_header { |
| 15 | u16 length; |
| 16 | u8 function_code; |
| 17 | u8 control_mask[3]; |
| 18 | u16 response_code; |
| 19 | } __attribute__((packed)); |
| 20 | |
| 21 | #define LOADPARM_LEN 8 |
| 22 | |
| 23 | struct sclp_readinfo_sccb { |
| 24 | struct sccb_header header; /* 0-7 */ |
| 25 | u16 rnmax; /* 8-9 */ |
| 26 | u8 rnsize; /* 10 */ |
| 27 | u8 _reserved0[24 - 11]; /* 11-23 */ |
| 28 | u8 loadparm[LOADPARM_LEN]; /* 24-31 */ |
| 29 | u8 _reserved1[91 - 32]; /* 32-90 */ |
| 30 | u8 flags; /* 91 */ |
| 31 | u8 _reserved2[100 - 92]; /* 92-99 */ |
| 32 | u32 rnsize2; /* 100-103 */ |
| 33 | u64 rnmax2; /* 104-111 */ |
| 34 | u8 _reserved3[4096 - 112]; /* 112-4095 */ |
| 35 | } __attribute__((packed, aligned(4096))); |
| 36 | |
Peter Oberparleiter | e5854a5 | 2007-04-27 16:01:31 +0200 | [diff] [blame] | 37 | #define SCLP_CHP_INFO_MASK_SIZE 32 |
| 38 | |
| 39 | struct sclp_chp_info { |
| 40 | u8 recognized[SCLP_CHP_INFO_MASK_SIZE]; |
| 41 | u8 standby[SCLP_CHP_INFO_MASK_SIZE]; |
| 42 | u8 configured[SCLP_CHP_INFO_MASK_SIZE]; |
| 43 | }; |
| 44 | |
Heiko Carstens | ab14de6 | 2007-02-05 21:18:37 +0100 | [diff] [blame] | 45 | extern struct sclp_readinfo_sccb s390_readinfo_sccb; |
| 46 | extern void sclp_readinfo_early(void); |
Michael Holzheu | 411ed32 | 2007-04-27 16:01:49 +0200 | [diff] [blame] | 47 | extern int sclp_sdias_blk_count(void); |
| 48 | extern int sclp_sdias_copy(void *dest, int blk_num, int nr_blks); |
Peter Oberparleiter | e5854a5 | 2007-04-27 16:01:31 +0200 | [diff] [blame] | 49 | extern int sclp_chp_configure(struct chp_id chpid); |
| 50 | extern int sclp_chp_deconfigure(struct chp_id chpid); |
| 51 | extern int sclp_chp_read_info(struct sclp_chp_info *info); |
Heiko Carstens | ab14de6 | 2007-02-05 21:18:37 +0100 | [diff] [blame] | 52 | |
| 53 | #endif /* _ASM_S390_SCLP_H */ |