wcnss: Notify Kernel suspend/resume to WCNSS
Notify WCNSS when the Kernel is suspended and also when it resumes.
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index 3e26e23..6d3893e 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -1980,7 +1980,8 @@
config MSM_WCNSS_SSR_8960
tristate "MSM 8960 WCNSS restart module"
- depends on (ARCH_MSM8960)
+ depends on ARCH_MSM8960
+ depends on WCNSS_CORE
help
This option enables the WCNSS restart module for MSM8960, which
monitors WCNSS hardware watchdog interrupt lines and plugs WCNSS
diff --git a/arch/arm/mach-msm/wcnss-ssr-8960.c b/arch/arm/mach-msm/wcnss-ssr-8960.c
index 7e4bdb9..f569de4 100644
--- a/arch/arm/mach-msm/wcnss-ssr-8960.c
+++ b/arch/arm/mach-msm/wcnss-ssr-8960.c
@@ -31,12 +31,6 @@
#define MODULE_NAME "wcnss_8960"
#define MAX_BUF_SIZE 0x51
-static void __iomem *msm_riva_base;
-#define MSM_RIVA_PHYS 0x03204000
-#define RIVA_SSR_OUT (msm_riva_base + 0x0b4)
-#define RIVA_SSR_BIT BIT(23)
-
-
static struct delayed_work cancel_vote_work;
static void *riva_ramdump_dev;
static int riva_crash;
@@ -147,20 +141,9 @@
struct platform_device *pdev = wcnss_get_platform_device();
struct wcnss_wlan_config *pwlanconfig = wcnss_get_wlan_config();
int ret = -1;
- u32 reg = 0;
- msm_riva_base = ioremap(MSM_RIVA_PHYS, SZ_256);
- if (!msm_riva_base) {
- pr_err("ioremap MSM_RIVA_PHYS failed\n");
- goto poweron;
- }
+ wcnss_ssr_boot_notify();
- reg = readl_relaxed(RIVA_SSR_OUT);
- reg |= RIVA_SSR_BIT;
- writel_relaxed(reg, RIVA_SSR_OUT);
- iounmap(msm_riva_base);
-
-poweron:
if (pdev && pwlanconfig)
ret = wcnss_wlan_power(&pdev->dev, pwlanconfig,
WCNSS_WLAN_SWITCH_ON);