Heiko Carstens | ab14de6 | 2007-02-05 21:18:37 +0100 | [diff] [blame] | 1 | /* |
Heiko Carstens | ab14de6 | 2007-02-05 21:18:37 +0100 | [diff] [blame] | 2 | * Copyright IBM Corp. 2007 |
| 3 | * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com> |
| 4 | */ |
| 5 | |
| 6 | #ifndef _ASM_S390_SCLP_H |
| 7 | #define _ASM_S390_SCLP_H |
| 8 | |
| 9 | #include <linux/types.h> |
Peter Oberparleiter | e5854a5 | 2007-04-27 16:01:31 +0200 | [diff] [blame] | 10 | #include <asm/chpid.h> |
Heiko Carstens | 9c09523 | 2013-11-30 12:00:28 +0100 | [diff] [blame] | 11 | #include <asm/cpu.h> |
Heiko Carstens | ab14de6 | 2007-02-05 21:18:37 +0100 | [diff] [blame] | 12 | |
Peter Oberparleiter | e5854a5 | 2007-04-27 16:01:31 +0200 | [diff] [blame] | 13 | #define SCLP_CHP_INFO_MASK_SIZE 32 |
| 14 | |
| 15 | struct sclp_chp_info { |
| 16 | u8 recognized[SCLP_CHP_INFO_MASK_SIZE]; |
| 17 | u8 standby[SCLP_CHP_INFO_MASK_SIZE]; |
| 18 | u8 configured[SCLP_CHP_INFO_MASK_SIZE]; |
| 19 | }; |
| 20 | |
Heiko Carstens | 05dd253 | 2007-07-10 11:24:09 +0200 | [diff] [blame] | 21 | #define LOADPARM_LEN 8 |
| 22 | |
| 23 | struct sclp_ipl_info { |
| 24 | int is_valid; |
| 25 | int has_dump; |
| 26 | char loadparm[LOADPARM_LEN]; |
| 27 | }; |
| 28 | |
Heiko Carstens | 08d0796 | 2008-01-26 14:10:56 +0100 | [diff] [blame] | 29 | struct sclp_cpu_entry { |
| 30 | u8 address; |
| 31 | u8 reserved0[13]; |
| 32 | u8 type; |
| 33 | u8 reserved1; |
| 34 | } __attribute__((packed)); |
| 35 | |
| 36 | struct sclp_cpu_info { |
| 37 | unsigned int configured; |
| 38 | unsigned int standby; |
| 39 | unsigned int combined; |
| 40 | int has_cpu_type; |
Heiko Carstens | 9c09523 | 2013-11-30 12:00:28 +0100 | [diff] [blame] | 41 | struct sclp_cpu_entry cpu[MAX_CPU_ADDRESS + 1]; |
Heiko Carstens | 08d0796 | 2008-01-26 14:10:56 +0100 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | int sclp_get_cpu_info(struct sclp_cpu_info *info); |
| 45 | int sclp_cpu_configure(u8 cpu); |
| 46 | int sclp_cpu_deconfigure(u8 cpu); |
Heiko Carstens | 23d1742 | 2008-07-14 09:59:21 +0200 | [diff] [blame] | 47 | unsigned long long sclp_get_rnmax(void); |
| 48 | unsigned long long sclp_get_rzm(void); |
Heiko Carstens | 05dd253 | 2007-07-10 11:24:09 +0200 | [diff] [blame] | 49 | int sclp_sdias_blk_count(void); |
| 50 | int sclp_sdias_copy(void *dest, int blk_num, int nr_blks); |
| 51 | int sclp_chp_configure(struct chp_id chpid); |
| 52 | int sclp_chp_deconfigure(struct chp_id chpid); |
| 53 | int sclp_chp_read_info(struct sclp_chp_info *info); |
| 54 | void sclp_get_ipl_info(struct sclp_ipl_info *info); |
Hendrik Brueckner | 52733e0 | 2013-12-05 19:28:39 +0100 | [diff] [blame] | 55 | bool __init sclp_has_linemode(void); |
| 56 | bool __init sclp_has_vt220(void); |
Martin Schwidefsky | 07be038 | 2014-01-24 09:18:52 +0100 | [diff] [blame] | 57 | bool sclp_has_sprp(void); |
Jan Glauber | 7441b06 | 2012-11-29 14:35:47 +0100 | [diff] [blame] | 58 | int sclp_pci_configure(u32 fid); |
| 59 | int sclp_pci_deconfigure(u32 fid); |
Michael Holzheu | 6f79d33 | 2013-09-11 14:24:54 -0700 | [diff] [blame] | 60 | int memcpy_hsa(void *dest, unsigned long src, size_t count, int mode); |
Michael Holzheu | e657d8f | 2013-11-13 10:38:27 +0100 | [diff] [blame] | 61 | unsigned long sclp_get_hsa_size(void); |
Michael Holzheu | 7b50da5 | 2013-11-13 10:38:27 +0100 | [diff] [blame] | 62 | void sclp_early_detect(void); |
Heiko Carstens | ab14de6 | 2007-02-05 21:18:37 +0100 | [diff] [blame] | 63 | |
| 64 | #endif /* _ASM_S390_SCLP_H */ |