All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] intel_pmc_ipc: Fix GCR register base address and length
@ 2016-02-17 18:03 Qipeng Zha
  2016-02-17 10:58 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Qipeng Zha @ 2016-02-17 18:03 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: dvhart, andriy.shevchenko, qipeng.zha, Francois-Nicolas Muller

GCR register (pmc_cfg register) is at offset 0x1008, and
remapping of 0x4 bytes is enough.

Signed-off-by: Francois-Nicolas Muller <francois-nicolas.muller@intel.com>
Signed-off-by: Qipeng Zha <qipeng.zha@intel.com>
---
 drivers/platform/x86/intel_pmc_ipc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/intel_pmc_ipc.c b/drivers/platform/x86/intel_pmc_ipc.c
index ca69135..abdf67c 100644
--- a/drivers/platform/x86/intel_pmc_ipc.c
+++ b/drivers/platform/x86/intel_pmc_ipc.c
@@ -67,7 +67,8 @@
 /* exported resources from IFWI */
 #define PLAT_RESOURCE_IPC_INDEX		0
 #define PLAT_RESOURCE_IPC_SIZE		0x1000
-#define PLAT_RESOURCE_GCR_SIZE		0x1000
+#define PLAT_RESOURCE_GCR_OFFSET	0x1008
+#define PLAT_RESOURCE_GCR_SIZE		0x4
 #define PLAT_RESOURCE_BIOS_DATA_INDEX	1
 #define PLAT_RESOURCE_BIOS_IFACE_INDEX	2
 #define PLAT_RESOURCE_ISP_DATA_INDEX	4
@@ -688,7 +689,7 @@ static int ipc_plat_get_res(struct platform_device *pdev)
 	}
 	ipcdev.ipc_base = addr;
 
-	ipcdev.gcr_base = res->start + size;
+	ipcdev.gcr_base = res->start + PLAT_RESOURCE_GCR_OFFSET;
 	ipcdev.gcr_size = PLAT_RESOURCE_GCR_SIZE;
 	dev_info(&pdev->dev, "ipc res: %pR\n", res);
 
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-19 22:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-17 18:03 [PATCH 1/2] intel_pmc_ipc: Fix GCR register base address and length Qipeng Zha
2016-02-17 10:58 ` Andy Shevchenko
2016-02-17 18:03 ` [PATCH 2/2] intel_pmc_ipc: avoid pending IPC1 command during legacy suspend Qipeng Zha
2016-02-18  6:13   ` Darren Hart
2016-02-18  6:14 ` [PATCH 1/2] intel_pmc_ipc: Fix GCR register base address and length Darren Hart
2016-02-18  6:19   ` Zha, Qipeng
2016-02-19 22:37     ` Darren Hart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.