diff options
Diffstat (limited to 'drivers/misc/mei/mei_dev.h')
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 71 |
1 files changed, 5 insertions, 66 deletions
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 228a98c97b37..472c9cacc543 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
@@ -440,79 +440,18 @@ int mei_amthif_irq_read(struct mei_device *dev, s32 *slots); | |||
440 | * Register Access Function | 440 | * Register Access Function |
441 | */ | 441 | */ |
442 | 442 | ||
443 | /** | 443 | u32 mei_hcsr_read(const struct mei_device *dev); |
444 | * mei_reg_read - Reads 32bit data from the mei device | 444 | u32 mei_mecsr_read(const struct mei_device *dev); |
445 | * | 445 | u32 mei_mecbrw_read(const struct mei_device *dev); |
446 | * @dev: the device structure | ||
447 | * @offset: offset from which to read the data | ||
448 | * | ||
449 | * returns register value (u32) | ||
450 | */ | ||
451 | static inline u32 mei_reg_read(const struct mei_device *dev, | ||
452 | unsigned long offset) | ||
453 | { | ||
454 | return ioread32(dev->mem_addr + offset); | ||
455 | } | ||
456 | |||
457 | /** | ||
458 | * mei_reg_write - Writes 32bit data to the mei device | ||
459 | * | ||
460 | * @dev: the device structure | ||
461 | * @offset: offset from which to write the data | ||
462 | * @value: register value to write (u32) | ||
463 | */ | ||
464 | static inline void mei_reg_write(const struct mei_device *dev, | ||
465 | unsigned long offset, u32 value) | ||
466 | { | ||
467 | iowrite32(value, dev->mem_addr + offset); | ||
468 | } | ||
469 | |||
470 | /** | ||
471 | * mei_hcsr_read - Reads 32bit data from the host CSR | ||
472 | * | ||
473 | * @dev: the device structure | ||
474 | * | ||
475 | * returns the byte read. | ||
476 | */ | ||
477 | static inline u32 mei_hcsr_read(const struct mei_device *dev) | ||
478 | { | ||
479 | return mei_reg_read(dev, H_CSR); | ||
480 | } | ||
481 | 446 | ||
482 | /** | ||
483 | * mei_mecsr_read - Reads 32bit data from the ME CSR | ||
484 | * | ||
485 | * @dev: the device structure | ||
486 | * | ||
487 | * returns ME_CSR_HA register value (u32) | ||
488 | */ | ||
489 | static inline u32 mei_mecsr_read(const struct mei_device *dev) | ||
490 | { | ||
491 | return mei_reg_read(dev, ME_CSR_HA); | ||
492 | } | ||
493 | |||
494 | /** | ||
495 | * get_me_cb_rw - Reads 32bit data from the mei ME_CB_RW register | ||
496 | * | ||
497 | * @dev: the device structure | ||
498 | * | ||
499 | * returns ME_CB_RW register value (u32) | ||
500 | */ | ||
501 | static inline u32 mei_mecbrw_read(const struct mei_device *dev) | ||
502 | { | ||
503 | return mei_reg_read(dev, ME_CB_RW); | ||
504 | } | ||
505 | |||
506 | |||
507 | /* | ||
508 | * mei interface function prototypes | ||
509 | */ | ||
510 | void mei_hcsr_set(struct mei_device *dev); | 447 | void mei_hcsr_set(struct mei_device *dev); |
511 | void mei_csr_clear_his(struct mei_device *dev); | 448 | void mei_csr_clear_his(struct mei_device *dev); |
512 | 449 | ||
450 | void mei_clear_interrupts(struct mei_device *dev); | ||
513 | void mei_enable_interrupts(struct mei_device *dev); | 451 | void mei_enable_interrupts(struct mei_device *dev); |
514 | void mei_disable_interrupts(struct mei_device *dev); | 452 | void mei_disable_interrupts(struct mei_device *dev); |
515 | 453 | ||
454 | |||
516 | static inline struct mei_msg_hdr *mei_hbm_hdr(u32 *buf, size_t length) | 455 | static inline struct mei_msg_hdr *mei_hbm_hdr(u32 *buf, size_t length) |
517 | { | 456 | { |
518 | struct mei_msg_hdr *hdr = (struct mei_msg_hdr *)buf; | 457 | struct mei_msg_hdr *hdr = (struct mei_msg_hdr *)buf; |