| .. | .. |
|---|
| 7 | 7 | |
|---|
| 8 | 8 | #include <linux/spinlock.h> |
|---|
| 9 | 9 | #include <linux/bitops.h> |
|---|
| 10 | +#include <linux/genalloc.h> |
|---|
| 10 | 11 | #include <asm/types.h> |
|---|
| 11 | 12 | |
|---|
| 12 | 13 | #define LPM_ANYPATH 0xff |
|---|
| .. | .. |
|---|
| 264 | 265 | #define CIW_TYPE_RNI 0x2 /* read node identifier */ |
|---|
| 265 | 266 | |
|---|
| 266 | 267 | /* |
|---|
| 268 | + * Node Descriptor as defined in SA22-7204, "Common I/O-Device Commands" |
|---|
| 269 | + */ |
|---|
| 270 | + |
|---|
| 271 | +#define ND_VALIDITY_VALID 0 |
|---|
| 272 | +#define ND_VALIDITY_OUTDATED 1 |
|---|
| 273 | +#define ND_VALIDITY_INVALID 2 |
|---|
| 274 | + |
|---|
| 275 | +struct node_descriptor { |
|---|
| 276 | + /* Flags. */ |
|---|
| 277 | + union { |
|---|
| 278 | + struct { |
|---|
| 279 | + u32 validity:3; |
|---|
| 280 | + u32 reserved:5; |
|---|
| 281 | + } __packed; |
|---|
| 282 | + u8 byte0; |
|---|
| 283 | + } __packed; |
|---|
| 284 | + |
|---|
| 285 | + /* Node parameters. */ |
|---|
| 286 | + u32 params:24; |
|---|
| 287 | + |
|---|
| 288 | + /* Node ID. */ |
|---|
| 289 | + char type[6]; |
|---|
| 290 | + char model[3]; |
|---|
| 291 | + char manufacturer[3]; |
|---|
| 292 | + char plant[2]; |
|---|
| 293 | + char seq[12]; |
|---|
| 294 | + u16 tag; |
|---|
| 295 | +} __packed; |
|---|
| 296 | + |
|---|
| 297 | +/* |
|---|
| 267 | 298 | * Flags used as input parameters for do_IO() |
|---|
| 268 | 299 | */ |
|---|
| 269 | 300 | #define DOIO_ALLOW_SUSPEND 0x0001 /* allow for channel prog. suspend */ |
|---|
| .. | .. |
|---|
| 325 | 356 | return 8 - ffs(mask); |
|---|
| 326 | 357 | } |
|---|
| 327 | 358 | |
|---|
| 328 | | -void channel_subsystem_reinit(void); |
|---|
| 329 | 359 | extern void css_schedule_reprobe(void); |
|---|
| 360 | + |
|---|
| 361 | +extern void *cio_dma_zalloc(size_t size); |
|---|
| 362 | +extern void cio_dma_free(void *cpu_addr, size_t size); |
|---|
| 363 | +extern struct device *cio_get_dma_css_dev(void); |
|---|
| 364 | + |
|---|
| 365 | +void *cio_gp_dma_zalloc(struct gen_pool *gp_dma, struct device *dma_dev, |
|---|
| 366 | + size_t size); |
|---|
| 367 | +void cio_gp_dma_free(struct gen_pool *gp_dma, void *cpu_addr, size_t size); |
|---|
| 368 | +void cio_gp_dma_destroy(struct gen_pool *gp_dma, struct device *dma_dev); |
|---|
| 369 | +struct gen_pool *cio_gp_dma_create(struct device *dma_dev, int nr_pages); |
|---|
| 330 | 370 | |
|---|
| 331 | 371 | /* Function from drivers/s390/cio/chsc.c */ |
|---|
| 332 | 372 | int chsc_sstpc(void *page, unsigned int op, u16 ctrl, u64 *clock_delta); |
|---|
| 333 | 373 | int chsc_sstpi(void *page, void *result, size_t size); |
|---|
| 374 | +int chsc_stzi(void *page, void *result, size_t size); |
|---|
| 375 | +int chsc_sgib(u32 origin); |
|---|
| 334 | 376 | |
|---|
| 335 | 377 | #endif |
|---|