msm: Add subsystem restart support for MSM9615
The modem and the lpass subsystems in MSM9615 are very similar
to MSM8960. So, reuse the modem-8960 and lpass-8960 drivers to
handle modem and lpass errors in MSM9615.
Change-Id: Idfd3db65fe8f3d94857229fe2f3458fd13062130
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index db2eda5..304a4dd 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -1518,7 +1518,7 @@
config MSM_SUBSYSTEM_RESTART
bool "MSM Subsystem Restart Driver"
- depends on (ARCH_MSM8X60 || ARCH_MSM8960)
+ depends on (ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_MSM9615)
default n
help
This option enables the MSM subsystem restart driver, which provides
@@ -1535,19 +1535,19 @@
config MSM_MODEM_8960
bool "MSM 8960 Modem driver"
- depends on (ARCH_MSM8960)
+ depends on (ARCH_MSM8960 || ARCH_MSM9615)
help
- This option enables the modem driver for the MSM8960, which monitors
+ This option enables the modem driver for the MSM8960 and MSM9615, which monitors
modem hardware watchdog interrupt lines and plugs into the subsystem
- restart and PIL drivers.
+ restart and PIL drivers. For MSM9615, it only supports a full chip reset.
config MSM_LPASS_8960
tristate "MSM 8960 Lpass driver"
- depends on (ARCH_MSM8960)
+ depends on (ARCH_MSM8960 || ARCH_MSM9615)
help
- This option enables the lpass driver for the MSM8960, which monitors
+ This option enables the lpass driver for the MSM8960 and MSM9615. This monitors
lpass hardware watchdog interrupt lines and plugs into the subsystem
- restart and PIL drivers.
+ restart and PIL drivers. For MSM9615, it only supports a full chip reset.
config MSM_WCNSS_SSR_8960
tristate "MSM 8960 WCNSS restart module"
diff --git a/arch/arm/mach-msm/include/mach/irqs-9615.h b/arch/arm/mach-msm/include/mach/irqs-9615.h
index 8b62632..74e5847 100644
--- a/arch/arm/mach-msm/include/mach/irqs-9615.h
+++ b/arch/arm/mach-msm/include/mach/irqs-9615.h
@@ -71,8 +71,8 @@
#define MSMC_SC_PRI_CE_IRQ (GIC_SPI_START + 32)
#define SLIMBUS0_CORE_EE1_IRQ (GIC_SPI_START + 33)
#define SLIMBUS0_BAM_EE1_IRQ (GIC_SPI_START + 34)
-#define Q6FW_WDOG_EXPIRED (GIC_SPI_START + 35)
-#define Q6SW_WDOG_EXPIRED (GIC_SPI_START + 36)
+#define Q6FW_WDOG_EXPIRED_IRQ (GIC_SPI_START + 35)
+#define Q6SW_WDOG_EXPIRED_IRQ (GIC_SPI_START + 36)
#define MSS_TO_APPS_IRQ_0 (GIC_SPI_START + 37)
#define MSS_TO_APPS_IRQ_1 (GIC_SPI_START + 38)
#define MSS_TO_APPS_IRQ_2 (GIC_SPI_START + 39)
diff --git a/arch/arm/mach-msm/lpass-8960.c b/arch/arm/mach-msm/lpass-8960.c
index 0f2559e..294e9c0 100644
--- a/arch/arm/mach-msm/lpass-8960.c
+++ b/arch/arm/mach-msm/lpass-8960.c
@@ -178,7 +178,7 @@
ret = -ENOMEM;
goto out;
}
- pr_info("%s: 8960 lpass SSR driver init'ed.\n", __func__);
+ pr_info("%s: lpass SSR driver init'ed.\n", __func__);
out:
return ret;
}
diff --git a/arch/arm/mach-msm/modem-8960.c b/arch/arm/mach-msm/modem-8960.c
index 7bcd844..f0aa13c 100644
--- a/arch/arm/mach-msm/modem-8960.c
+++ b/arch/arm/mach-msm/modem-8960.c
@@ -26,7 +26,6 @@
#include <mach/peripheral-loader.h>
#include <mach/subsystem_restart.h>
#include <mach/subsystem_notif.h>
-#include <mach/irqs-8960.h>
#include <mach/socinfo.h>
#include "smd_private.h"
@@ -227,7 +226,7 @@
{
int ret;
- if (!cpu_is_msm8960() && !cpu_is_msm8930())
+ if (!cpu_is_msm8960() && !cpu_is_msm8930() && !cpu_is_msm9615())
return -ENODEV;
ret = smsm_state_cb_register(SMSM_MODEM_STATE, SMSM_RESET,
@@ -266,7 +265,7 @@
ret = modem_debugfs_init();
- pr_info("%s: 8960 modem fatal driver init'ed.\n", __func__);
+ pr_info("%s: modem fatal driver init'ed.\n", __func__);
out:
return ret;
}
diff --git a/arch/arm/mach-msm/subsystem_restart.c b/arch/arm/mach-msm/subsystem_restart.c
index 54607d0..37469f8 100644
--- a/arch/arm/mach-msm/subsystem_restart.c
+++ b/arch/arm/mach-msm/subsystem_restart.c
@@ -139,6 +139,11 @@
int ret;
int old_val = restart_level;
+ if (cpu_is_msm9615()) {
+ pr_err("Only Phase 1 subsystem restart is supported\n");
+ return -EINVAL;
+ }
+
ret = param_set_int(val, kp);
if (ret)
return ret;
@@ -571,7 +576,7 @@
n_restart_orders = ARRAY_SIZE(orders_8x60_all);
}
- if (cpu_is_msm8960() || cpu_is_msm8930()) {
+ if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm9615()) {
restart_orders = restart_orders_8960;
n_restart_orders = ARRAY_SIZE(restart_orders_8960);
}