aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/mei_dev.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/mei/mei_dev.h')
-rw-r--r--drivers/misc/mei/mei_dev.h71
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/** 443u32 mei_hcsr_read(const struct mei_device *dev);
444 * mei_reg_read - Reads 32bit data from the mei device 444u32 mei_mecsr_read(const struct mei_device *dev);
445 * 445u32 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 */
451static 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 */
464static 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 */
477static 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 */
489static 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 */
501static 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 */
510void mei_hcsr_set(struct mei_device *dev); 447void mei_hcsr_set(struct mei_device *dev);
511void mei_csr_clear_his(struct mei_device *dev); 448void mei_csr_clear_his(struct mei_device *dev);
512 449
450void mei_clear_interrupts(struct mei_device *dev);
513void mei_enable_interrupts(struct mei_device *dev); 451void mei_enable_interrupts(struct mei_device *dev);
514void mei_disable_interrupts(struct mei_device *dev); 452void mei_disable_interrupts(struct mei_device *dev);
515 453
454
516static inline struct mei_msg_hdr *mei_hbm_hdr(u32 *buf, size_t length) 455static 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;