aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/omap_hsi
diff options
context:
space:
mode:
authorAmbresh K <ambresh@ti.com>2011-10-03 18:45:16 -0700
committerTodd Poynor <toddpoynor@google.com>2011-10-06 19:09:25 -0700
commit9aba00ea6a83e8055534c3d83831adc22576c824 (patch)
tree0147857c2ef5880eb47c082a705b98c95fe42eee /drivers/omap_hsi
parentfba74cafd7522984373612f74048ca474316c830 (diff)
downloadkernel_samsung_tuna-9aba00ea6a83e8055534c3d83831adc22576c824.zip
kernel_samsung_tuna-9aba00ea6a83e8055534c3d83831adc22576c824.tar.gz
kernel_samsung_tuna-9aba00ea6a83e8055534c3d83831adc22576c824.tar.bz2
OMAP4: HSI: PM: Errata: DSP woken-up by HSI CAWAKE signal
Description: There is a silicon bug in HSI IP. The logic for generating the SWakeup for DSP is same as the logic for generating SWakeup for MPU, even when DSP interrupt generation is disabled. As a result when the MPU Wakeup is generated, a false DSP wakeup is also generated. Consequences of this bug in below scenario: - Modem interface (HSI is enabled) - The system is allowed to suspend - When CAWAKE signal has activity, it will wake-up MPU; it also wakes up DSP incorrectly - The DSP is not able to handle this wake up correctly. - Next suspend, system can’t enter in off-mode because DSP remains active This errata needs to be handled in two scenarios: a) If the device has woken-up from RET/OFF through CAWAKE signal and is taken care as part of wakeup from suspend. b) During MPU active and HSI transitioning from its internal low power state, will generate SWakeup signal which eventually wakeup's DSP. This prevents DSP (Tesla) from entering low power state and thus handling this corner case in HSI interrupt handler as recommended by silicon team. Signed-off-by: Vinay Chaurasia <vinayc@ti.com> Signed-off-by: Ambresh K <ambresh@ti.com>
Diffstat (limited to 'drivers/omap_hsi')
-rw-r--r--drivers/omap_hsi/hsi_driver.h11
-rw-r--r--drivers/omap_hsi/hsi_driver_int.c9
2 files changed, 20 insertions, 0 deletions
diff --git a/drivers/omap_hsi/hsi_driver.h b/drivers/omap_hsi/hsi_driver.h
index ab642b1..027f3ca 100644
--- a/drivers/omap_hsi/hsi_driver.h
+++ b/drivers/omap_hsi/hsi_driver.h
@@ -405,4 +405,15 @@ static inline int hsi_clocks_enable(struct device *dev, const char *s)
return hsi_clocks_enable_channel(dev, HSI_CH_NUMBER_NONE, s);
}
+#if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP4)
+extern u8 pm44xx_errata;
+#define IS_HSI_PM44XX_ERRATUM(id) (pm44xx_errata & (id))
+#define OMAP4_PM_ERRATUM_HSI_SWAKEUP_iXXX BIT(2)
+extern void omap_pm_clear_dsp_wake_up(void);
+#else
+#define IS_HSI_PM44XX_ERRATUM(id) 0
+#define OMAP4_PM_ERRATUM_HSI_SWAKEUP_iXXX 0
+#define static inline void omap_pm_clear_dsp_wake_up(void) { }
+#endif
+
#endif /* __HSI_DRIVER_H__ */
diff --git a/drivers/omap_hsi/hsi_driver_int.c b/drivers/omap_hsi/hsi_driver_int.c
index f93725b..8389782 100644
--- a/drivers/omap_hsi/hsi_driver_int.c
+++ b/drivers/omap_hsi/hsi_driver_int.c
@@ -455,6 +455,15 @@ int hsi_do_cawake_process(struct hsi_port *pport)
spin_unlock(&hsi_ctrl->lock);
hsi_port_event_handler(pport, HSI_EVENT_CAWAKE_UP, NULL);
spin_lock(&hsi_ctrl->lock);
+
+ /*
+ * HSI - OMAP4430-2.2BUG00055:
+ * HSI: DSP Swakeup generated is the same than MPU Swakeup.
+ * System can’t enter in off mode due to the DSP.
+ */
+ if (IS_HSI_PM44XX_ERRATUM(OMAP4_PM_ERRATUM_HSI_SWAKEUP_iXXX))
+ omap_pm_clear_dsp_wake_up();
+
} else {
dev_dbg(hsi_ctrl->dev, "CAWAKE falling edge detected\n");