summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrashanth Bhatta <bhattap@qca.qualcomm.com>2014-09-12 16:44:42 -0700
committerAnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com>2014-11-03 16:21:13 +0530
commit8cf9941f38cb50efcc3ad94caa8d481fc5689cac (patch)
tree74183008094ec4b7fd0331c76a3d36fc7429a102
parent62ad9c4db473a2f9afee60854e3ac1875ba090e6 (diff)
qcacld: ssr: Do not iomap ramdump address
Driver doesn't need to know about the memory address how it is getting from CNSS as CLD only uses virtual address to copy the CNSS dump. CNSS driver independently can allocate the required memory for cnss ramdump. This change would give flexibility to both CNSS and CLD drivers. Change-Id: I087e87fd2960f39f4266a85a69a2e78072bf0793 CRs-fixed: 749232
-rw-r--r--CORE/SERVICES/COMMON/ol_if_athvar.h2
-rw-r--r--CORE/SERVICES/HIF/PCIe/if_pci.c36
2 files changed, 9 insertions, 29 deletions
diff --git a/CORE/SERVICES/COMMON/ol_if_athvar.h b/CORE/SERVICES/COMMON/ol_if_athvar.h
index 967e2cc561e1..c5537cb78f73 100644
--- a/CORE/SERVICES/COMMON/ol_if_athvar.h
+++ b/CORE/SERVICES/COMMON/ol_if_athvar.h
@@ -274,7 +274,7 @@ struct ol_softc {
struct ol_fw_files fw_files;
#endif
#if defined(CONFIG_CNSS) || defined(HIF_SDIO)
- void __iomem *ramdump_base;
+ void *ramdump_base;
unsigned long ramdump_address;
unsigned long ramdump_size;
#endif
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c
index 97e2f6f7dda9..0dc0c0f95820 100644
--- a/CORE/SERVICES/HIF/PCIe/if_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/if_pci.c
@@ -935,16 +935,11 @@ again:
#ifdef CONFIG_CNSS
/* Get RAM dump memory address and size */
- if (!cnss_get_ramdump_mem(&ol_sc->ramdump_address, &ol_sc->ramdump_size)) {
- ol_sc->ramdump_base = ioremap(ol_sc->ramdump_address,
- ol_sc->ramdump_size);
- if (!ol_sc->ramdump_base) {
- pr_err("%s: Cannot map ramdump_address 0x%lx!\n",
- __func__, ol_sc->ramdump_address);
- }
- } else {
+ ol_sc->ramdump_base = cnss_get_virt_ramdump_mem(&ol_sc->ramdump_size);
+
+ if (ol_sc->ramdump_base == NULL || !ol_sc->ramdump_size) {
pr_info("%s: Failed to get RAM dump memory address or size!\n",
- __func__);
+ __func__);
}
#endif
@@ -1275,16 +1270,11 @@ again:
#ifdef CONFIG_CNSS
/* Get RAM dump memory address and size */
- if (!cnss_get_ramdump_mem(&ol_sc->ramdump_address, &ol_sc->ramdump_size)) {
- ol_sc->ramdump_base = ioremap(ol_sc->ramdump_address,
- ol_sc->ramdump_size);
- if (!ol_sc->ramdump_base) {
- pr_err("%s: Cannot map ramdump_address 0x%lx!\n",
- __func__, ol_sc->ramdump_address);
- }
- } else {
+ ol_sc->ramdump_base = cnss_get_virt_ramdump_mem(&ol_sc->ramdump_size);
+
+ if (ol_sc->ramdump_base == NULL || !ol_sc->ramdump_size) {
pr_info("%s: Failed to get RAM dump memory address or size!\n",
- __func__);
+ __func__);
}
#endif
@@ -1634,11 +1624,6 @@ hif_pci_remove(struct pci_dev *pdev)
pci_disable_msi(pdev);
-#ifdef CONFIG_CNSS
- if (scn->ramdump_base)
- iounmap(scn->ramdump_base);
-#endif
-
A_FREE(scn);
A_FREE(sc->hif_device);
A_FREE(sc);
@@ -1693,11 +1678,6 @@ void hif_pci_shutdown(struct pci_dev *pdev)
pci_disable_msi(pdev);
-#ifdef CONFIG_CNSS
- if (scn->ramdump_base)
- iounmap(scn->ramdump_base);
-#endif
-
A_FREE(scn);
A_FREE(sc->hif_device);
A_FREE(sc);