OSDN Git Service

msm: ep_pcie: update MSI address for PCIe clients
authorYan He <yanhe@codeaurora.org>
Sat, 5 Dec 2015 02:29:36 +0000 (18:29 -0800)
committerDavid Keitel <dkeitel@codeaurora.org>
Thu, 24 Mar 2016 04:15:46 +0000 (21:15 -0700)
The PCIe clients will utilize the original MSI address instead of
mapped local address when active config is enabled. The change here
provides the original address to the clients.

Change-Id: I0d35fa9508d7c3ec2e97bd7d61754974e798bf8a
Signed-off-by: Yan He <yanhe@codeaurora.org>
drivers/platform/msm/ep_pcie/ep_pcie_core.c

index a109197..c839938 100644 (file)
@@ -1768,8 +1768,13 @@ int ep_pcie_core_get_msi_config(struct ep_pcie_msi_config *cfg)
                                        msi->start, 0, msi->end,
                                        lower, upper);
 
-               cfg->lower = msi->start + (lower & 0xfff);
-               cfg->upper = 0;
+               if (ep_pcie_dev.active_config) {
+                       cfg->lower = lower;
+                       cfg->upper = upper;
+               } else {
+                       cfg->lower = msi->start + (lower & 0xfff);
+                       cfg->upper = 0;
+               }
                cfg->data = data;
                cfg->msg_num = (cap >> 20) & 0x7;
                if ((lower != ep_pcie_dev.msi_cfg.lower)