aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/hw-me.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/mei/hw-me.c')
-rw-r--r--drivers/misc/mei/hw-me.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
index df42b6f6e7ca..1247be706216 100644
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw-me.c
@@ -217,10 +217,10 @@ static int mei_me_hw_reset(struct mei_device *dev, bool intr_enable)
217 hcsr = mei_hcsr_read(hw); 217 hcsr = mei_hcsr_read(hw);
218 218
219 if ((hcsr & H_RST) == 0) 219 if ((hcsr & H_RST) == 0)
220 dev_warn(&dev->pdev->dev, "H_RST is not set = 0x%08X", hcsr); 220 dev_warn(dev->dev, "H_RST is not set = 0x%08X", hcsr);
221 221
222 if ((hcsr & H_RDY) == H_RDY) 222 if ((hcsr & H_RDY) == H_RDY)
223 dev_warn(&dev->pdev->dev, "H_RDY is not cleared 0x%08X", hcsr); 223 dev_warn(dev->dev, "H_RDY is not cleared 0x%08X", hcsr);
224 224
225 if (intr_enable == false) 225 if (intr_enable == false)
226 mei_me_hw_reset_release(dev); 226 mei_me_hw_reset_release(dev);
@@ -279,7 +279,7 @@ static int mei_me_hw_ready_wait(struct mei_device *dev)
279 mei_secs_to_jiffies(MEI_HW_READY_TIMEOUT)); 279 mei_secs_to_jiffies(MEI_HW_READY_TIMEOUT));
280 mutex_lock(&dev->device_lock); 280 mutex_lock(&dev->device_lock);
281 if (!dev->recvd_hw_ready) { 281 if (!dev->recvd_hw_ready) {
282 dev_err(&dev->pdev->dev, "wait hw ready failed\n"); 282 dev_err(dev->dev, "wait hw ready failed\n");
283 return -ETIME; 283 return -ETIME;
284 } 284 }
285 285
@@ -293,7 +293,7 @@ static int mei_me_hw_start(struct mei_device *dev)
293 293
294 if (ret) 294 if (ret)
295 return ret; 295 return ret;
296 dev_dbg(&dev->pdev->dev, "hw is ready\n"); 296 dev_dbg(dev->dev, "hw is ready\n");
297 297
298 mei_me_host_set_ready(dev); 298 mei_me_host_set_ready(dev);
299 return ret; 299 return ret;
@@ -381,10 +381,10 @@ static int mei_me_write_message(struct mei_device *dev,
381 int i; 381 int i;
382 int empty_slots; 382 int empty_slots;
383 383
384 dev_dbg(&dev->pdev->dev, MEI_HDR_FMT, MEI_HDR_PRM(header)); 384 dev_dbg(dev->dev, MEI_HDR_FMT, MEI_HDR_PRM(header));
385 385
386 empty_slots = mei_hbuf_empty_slots(dev); 386 empty_slots = mei_hbuf_empty_slots(dev);
387 dev_dbg(&dev->pdev->dev, "empty slots = %hu.\n", empty_slots); 387 dev_dbg(dev->dev, "empty slots = %hu.\n", empty_slots);
388 388
389 dw_cnt = mei_data2slots(length); 389 dw_cnt = mei_data2slots(length);
390 if (empty_slots < 0 || dw_cnt > empty_slots) 390 if (empty_slots < 0 || dw_cnt > empty_slots)
@@ -434,7 +434,7 @@ static int mei_me_count_full_read_slots(struct mei_device *dev)
434 if (filled_slots > buffer_depth) 434 if (filled_slots > buffer_depth)
435 return -EOVERFLOW; 435 return -EOVERFLOW;
436 436
437 dev_dbg(&dev->pdev->dev, "filled_slots =%08x\n", filled_slots); 437 dev_dbg(dev->dev, "filled_slots =%08x\n", filled_slots);
438 return (int)filled_slots; 438 return (int)filled_slots;
439} 439}
440 440
@@ -591,7 +591,7 @@ static bool mei_me_pg_is_enabled(struct mei_device *dev)
591 return true; 591 return true;
592 592
593notsupported: 593notsupported:
594 dev_dbg(&dev->pdev->dev, "pg: not supported: HGP = %d hbm version %d.%d ?= %d.%d\n", 594 dev_dbg(dev->dev, "pg: not supported: HGP = %d hbm version %d.%d ?= %d.%d\n",
595 !!(reg & ME_PGIC_HRA), 595 !!(reg & ME_PGIC_HRA),
596 dev->version.major_version, 596 dev->version.major_version,
597 dev->version.minor_version, 597 dev->version.minor_version,
@@ -642,7 +642,7 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
642 s32 slots; 642 s32 slots;
643 int rets = 0; 643 int rets = 0;
644 644
645 dev_dbg(&dev->pdev->dev, "function called after ISR to handle the interrupt processing.\n"); 645 dev_dbg(dev->dev, "function called after ISR to handle the interrupt processing.\n");
646 /* initialize our complete list */ 646 /* initialize our complete list */
647 mutex_lock(&dev->device_lock); 647 mutex_lock(&dev->device_lock);
648 mei_io_list_init(&complete_list); 648 mei_io_list_init(&complete_list);
@@ -654,7 +654,7 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
654 654
655 /* check if ME wants a reset */ 655 /* check if ME wants a reset */
656 if (!mei_hw_is_ready(dev) && dev->dev_state != MEI_DEV_RESETTING) { 656 if (!mei_hw_is_ready(dev) && dev->dev_state != MEI_DEV_RESETTING) {
657 dev_warn(&dev->pdev->dev, "FW not ready: resetting.\n"); 657 dev_warn(dev->dev, "FW not ready: resetting.\n");
658 schedule_work(&dev->reset_work); 658 schedule_work(&dev->reset_work);
659 goto end; 659 goto end;
660 } 660 }
@@ -663,19 +663,19 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
663 if (!mei_host_is_ready(dev)) { 663 if (!mei_host_is_ready(dev)) {
664 if (mei_hw_is_ready(dev)) { 664 if (mei_hw_is_ready(dev)) {
665 mei_me_hw_reset_release(dev); 665 mei_me_hw_reset_release(dev);
666 dev_dbg(&dev->pdev->dev, "we need to start the dev.\n"); 666 dev_dbg(dev->dev, "we need to start the dev.\n");
667 667
668 dev->recvd_hw_ready = true; 668 dev->recvd_hw_ready = true;
669 wake_up(&dev->wait_hw_ready); 669 wake_up(&dev->wait_hw_ready);
670 } else { 670 } else {
671 dev_dbg(&dev->pdev->dev, "Spurious Interrupt\n"); 671 dev_dbg(dev->dev, "Spurious Interrupt\n");
672 } 672 }
673 goto end; 673 goto end;
674 } 674 }
675 /* check slots available for reading */ 675 /* check slots available for reading */
676 slots = mei_count_full_read_slots(dev); 676 slots = mei_count_full_read_slots(dev);
677 while (slots > 0) { 677 while (slots > 0) {
678 dev_dbg(&dev->pdev->dev, "slots to read = %08x\n", slots); 678 dev_dbg(dev->dev, "slots to read = %08x\n", slots);
679 rets = mei_irq_read_handler(dev, &complete_list, &slots); 679 rets = mei_irq_read_handler(dev, &complete_list, &slots);
680 /* There is a race between ME write and interrupt delivery: 680 /* There is a race between ME write and interrupt delivery:
681 * Not all data is always available immediately after the 681 * Not all data is always available immediately after the
@@ -685,7 +685,7 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
685 break; 685 break;
686 686
687 if (rets && dev->dev_state != MEI_DEV_RESETTING) { 687 if (rets && dev->dev_state != MEI_DEV_RESETTING) {
688 dev_err(&dev->pdev->dev, "mei_irq_read_handler ret = %d.\n", 688 dev_err(dev->dev, "mei_irq_read_handler ret = %d.\n",
689 rets); 689 rets);
690 schedule_work(&dev->reset_work); 690 schedule_work(&dev->reset_work);
691 goto end; 691 goto end;
@@ -707,7 +707,7 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
707 mei_irq_compl_handler(dev, &complete_list); 707 mei_irq_compl_handler(dev, &complete_list);
708 708
709end: 709end:
710 dev_dbg(&dev->pdev->dev, "interrupt thread end ret = %d\n", rets); 710 dev_dbg(dev->dev, "interrupt thread end ret = %d\n", rets);
711 mutex_unlock(&dev->device_lock); 711 mutex_unlock(&dev->device_lock);
712 return IRQ_HANDLED; 712 return IRQ_HANDLED;
713} 713}