diff options
| author | Eric Tashakkor <w36098@motorola.com> | 2014-07-10 15:22:44 -0500 |
|---|---|---|
| committer | ERIC TASHAKKOR <w36098@motorola.com> | 2014-07-11 15:28:54 +0000 |
| commit | 9ca7073f04ce70feb12f95090f58fcf7bed1ff04 (patch) | |
| tree | 61fef11f094956f462239402bf155597c3457dc1 /include/linux | |
| parent | 0c8d538a8157ff339be582040925f205cc17c91e (diff) | |
| download | olio-linux-3.10-9ca7073f04ce70feb12f95090f58fcf7bed1ff04.tar.xz olio-linux-3.10-9ca7073f04ce70feb12f95090f58fcf7bed1ff04.zip | |
IKXCLOCK-2835 Fix M4 Panic Recovery
Reduced the retry logic to only do a reboot and jump-to-user.
Updated the panic handler to use the same call as m4sensorhub_initialize.
Removed an unused static variable in the M4 core.
Change-Id: I246e220540a4c02939c0ac435b670529d85c8f27
Signed-off-by: Eric Tashakkor <w36098@motorola.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/m4sensorhub.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/m4sensorhub.h b/include/linux/m4sensorhub.h index ff41f8dc33f..bd4cf0c24e6 100644 --- a/include/linux/m4sensorhub.h +++ b/include/linux/m4sensorhub.h @@ -170,14 +170,19 @@ void m4sensorhub_reg_access_unlock(void); int m4sensorhub_i2c_write_read(struct m4sensorhub_data *m4sensorhub, u8 *buf, int writelen, int readlen); +/* + * Functions for re-initializing M4 + * + * In general, only m4sensorhub_test_m4_reboot() should ever + * be called directly. + */ +int m4sensorhub_test_m4_reboot(struct m4sensorhub_data *m4, bool reboot_first); int m4sensorhub_load_firmware(struct m4sensorhub_data *m4sensorhub, unsigned short force_upgrade, const struct firmware *firmware); - int m4sensorhub_401_load_firmware(struct m4sensorhub_data *m4sensorhub, unsigned short force_upgrade, const struct firmware *fm); - void m4sensorhub_hw_reset(struct m4sensorhub_data *m4sensorhub); /* Interrupt handler */ @@ -198,6 +203,7 @@ int m4sensorhub_irq_enable_get(struct m4sensorhub_data *m4sensorhub, void m4sensorhub_irq_pm_dbg_suspend(void); void m4sensorhub_irq_pm_dbg_resume(void); +/* M4 Panic Calls */ int m4sensorhub_panic_init(struct m4sensorhub_data *m4sensorhub); void m4sensorhub_panic_shutdown(struct m4sensorhub_data *m4sensorhub); int m4sensorhub_panic_register(struct m4sensorhub_data *m4sensorhub, @@ -207,6 +213,7 @@ int m4sensorhub_panic_register(struct m4sensorhub_data *m4sensorhub, int m4sensorhub_panic_unregister(struct m4sensorhub_data *m4sensorhub, enum m4sensorhub_panichdl_index index); void m4sensorhub_panic_process(struct m4sensorhub_data *m4sensorhub); + /* all M4 based drivers need to register an init call with the core, this callback will be executed once M4 core has properly set up FW on M4. For registration, a callback and a void* is passed in. When |