aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel_pmc_ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/intel_pmc_ipc.c')
-rw-r--r--drivers/platform/x86/intel_pmc_ipc.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c
index d734763dab69..69d43b8fe9ba 100644
--- a/drivers/platform/x86/intel_pmc_ipc.c
+++ b/drivers/platform/x86/intel_pmc_ipc.c
@@ -96,18 +96,18 @@ static struct intel_pmc_ipc_dev {
96 struct completion cmd_complete; 96 struct completion cmd_complete;
97 97
98 /* The following PMC BARs share the same ACPI device with the IPC */ 98 /* The following PMC BARs share the same ACPI device with the IPC */
99 void *acpi_io_base; 99 resource_size_t acpi_io_base;
100 int acpi_io_size; 100 int acpi_io_size;
101 struct platform_device *tco_dev; 101 struct platform_device *tco_dev;
102 102
103 /* gcr */ 103 /* gcr */
104 void *gcr_base; 104 resource_size_t gcr_base;
105 int gcr_size; 105 int gcr_size;
106 106
107 /* punit */ 107 /* punit */
108 void *punit_base; 108 resource_size_t punit_base;
109 int punit_size; 109 int punit_size;
110 void *punit_base2; 110 resource_size_t punit_base2;
111 int punit_size2; 111 int punit_size2;
112 struct platform_device *punit_dev; 112 struct platform_device *punit_dev;
113} ipcdev; 113} ipcdev;
@@ -480,11 +480,11 @@ static int ipc_create_punit_device(void)
480 pdev->dev.parent = ipcdev.dev; 480 pdev->dev.parent = ipcdev.dev;
481 481
482 res = punit_res; 482 res = punit_res;
483 res->start = (resource_size_t)ipcdev.punit_base; 483 res->start = ipcdev.punit_base;
484 res->end = res->start + ipcdev.punit_size - 1; 484 res->end = res->start + ipcdev.punit_size - 1;
485 485
486 res = punit_res + PUNIT_RESOURCE_INTER; 486 res = punit_res + PUNIT_RESOURCE_INTER;
487 res->start = (resource_size_t)ipcdev.punit_base2; 487 res->start = ipcdev.punit_base2;
488 res->end = res->start + ipcdev.punit_size2 - 1; 488 res->end = res->start + ipcdev.punit_size2 - 1;
489 489
490 ret = platform_device_add_resources(pdev, punit_res, 490 ret = platform_device_add_resources(pdev, punit_res,
@@ -522,15 +522,15 @@ static int ipc_create_tco_device(void)
522 pdev->dev.parent = ipcdev.dev; 522 pdev->dev.parent = ipcdev.dev;
523 523
524 res = tco_res + TCO_RESOURCE_ACPI_IO; 524 res = tco_res + TCO_RESOURCE_ACPI_IO;
525 res->start = (resource_size_t)ipcdev.acpi_io_base + TCO_BASE_OFFSET; 525 res->start = ipcdev.acpi_io_base + TCO_BASE_OFFSET;
526 res->end = res->start + TCO_REGS_SIZE - 1; 526 res->end = res->start + TCO_REGS_SIZE - 1;
527 527
528 res = tco_res + TCO_RESOURCE_SMI_EN_IO; 528 res = tco_res + TCO_RESOURCE_SMI_EN_IO;
529 res->start = (resource_size_t)ipcdev.acpi_io_base + SMI_EN_OFFSET; 529 res->start = ipcdev.acpi_io_base + SMI_EN_OFFSET;
530 res->end = res->start + SMI_EN_SIZE - 1; 530 res->end = res->start + SMI_EN_SIZE - 1;
531 531
532 res = tco_res + TCO_RESOURCE_GCR_MEM; 532 res = tco_res + TCO_RESOURCE_GCR_MEM;
533 res->start = (resource_size_t)ipcdev.gcr_base; 533 res->start = ipcdev.gcr_base;
534 res->end = res->start + ipcdev.gcr_size - 1; 534 res->end = res->start + ipcdev.gcr_size - 1;
535 535
536 ret = platform_device_add_resources(pdev, tco_res, ARRAY_SIZE(tco_res)); 536 ret = platform_device_add_resources(pdev, tco_res, ARRAY_SIZE(tco_res));
@@ -589,7 +589,7 @@ static int ipc_plat_get_res(struct platform_device *pdev)
589 return -ENXIO; 589 return -ENXIO;
590 } 590 }
591 size = resource_size(res); 591 size = resource_size(res);
592 ipcdev.acpi_io_base = (void *)res->start; 592 ipcdev.acpi_io_base = res->start;
593 ipcdev.acpi_io_size = size; 593 ipcdev.acpi_io_size = size;
594 dev_info(&pdev->dev, "io res: %llx %x\n", 594 dev_info(&pdev->dev, "io res: %llx %x\n",
595 (long long)res->start, (int)resource_size(res)); 595 (long long)res->start, (int)resource_size(res));
@@ -601,7 +601,7 @@ static int ipc_plat_get_res(struct platform_device *pdev)
601 return -ENXIO; 601 return -ENXIO;
602 } 602 }
603 size = resource_size(res); 603 size = resource_size(res);
604 ipcdev.punit_base = (void *)res->start; 604 ipcdev.punit_base = res->start;
605 ipcdev.punit_size = size; 605 ipcdev.punit_size = size;
606 dev_info(&pdev->dev, "punit data res: %llx %x\n", 606 dev_info(&pdev->dev, "punit data res: %llx %x\n",
607 (long long)res->start, (int)resource_size(res)); 607 (long long)res->start, (int)resource_size(res));
@@ -613,7 +613,7 @@ static int ipc_plat_get_res(struct platform_device *pdev)
613 return -ENXIO; 613 return -ENXIO;
614 } 614 }
615 size = resource_size(res); 615 size = resource_size(res);
616 ipcdev.punit_base2 = (void *)res->start; 616 ipcdev.punit_base2 = res->start;
617 ipcdev.punit_size2 = size; 617 ipcdev.punit_size2 = size;
618 dev_info(&pdev->dev, "punit interface res: %llx %x\n", 618 dev_info(&pdev->dev, "punit interface res: %llx %x\n",
619 (long long)res->start, (int)resource_size(res)); 619 (long long)res->start, (int)resource_size(res));
@@ -637,7 +637,7 @@ static int ipc_plat_get_res(struct platform_device *pdev)
637 } 637 }
638 ipcdev.ipc_base = addr; 638 ipcdev.ipc_base = addr;
639 639
640 ipcdev.gcr_base = (void *)(res->start + size); 640 ipcdev.gcr_base = res->start + size;
641 ipcdev.gcr_size = PLAT_RESOURCE_GCR_SIZE; 641 ipcdev.gcr_size = PLAT_RESOURCE_GCR_SIZE;
642 dev_info(&pdev->dev, "ipc res: %llx %x\n", 642 dev_info(&pdev->dev, "ipc res: %llx %x\n",
643 (long long)res->start, (int)resource_size(res)); 643 (long long)res->start, (int)resource_size(res));