[ERD][NEUS7920-135] [COMMON]chub: No remove sensorinfo in reset
authorSukwon Ryoo <sw.ryoo@samsung.com>
Wed, 13 Mar 2019 06:32:09 +0000 (15:32 +0900)
committerKim Gunho <gunho.kim@samsung.com>
Fri, 30 Aug 2019 07:58:56 +0000 (16:58 +0900)
When something went wrong during os select,
sensorinfo area is swiped out because of reset.
So HAL can not get sensorlist.
This patch makes IPC area set 0 except
sensorinfo area.

Change-Id: I667deedbd4ba4b0b190aa46c13f0b3008ca193b3
Signed-off-by: Sukwon Ryoo <sw.ryoo@samsung.com>
drivers/staging/nanohub/chub.c

index a0ecdfc564658cd97109f8860da009529ff6b034..d1de6afc23a3cb0f02d857050780dd22f1f0e393 100644 (file)
@@ -1138,7 +1138,11 @@ int contexthub_reset(struct contexthub_ipc_info *ipc, bool force_load, enum chub
 
        /* image download */
        dev_info(ipc->dev, "%s: clear ipc:%p, %d\n", __func__, ipc_get_base(IPC_REG_IPC), ipc_get_offset(IPC_REG_IPC));
-       memset_io(ipc_get_base(IPC_REG_IPC), 0x0, ipc_get_offset(IPC_REG_IPC));
+       memset_io(ipc_get_base(IPC_REG_IPC_A2C), 0, ipc_get_offset(IPC_REG_IPC_A2C));
+       memset_io(ipc_get_base(IPC_REG_IPC_C2A), 0, ipc_get_offset(IPC_REG_IPC_C2A));
+       memset_io(ipc_get_base(IPC_REG_IPC_EVT_A2C), 0, ipc_get_offset(IPC_REG_IPC_EVT_A2C));
+       memset_io(ipc_get_base(IPC_REG_IPC_EVT_C2A), 0, ipc_get_offset(IPC_REG_IPC_EVT_C2A));
+       memset_io(ipc_get_base(IPC_REG_LOG), 0, ipc_get_offset(IPC_REG_LOG));
        if (ipc->block_reset || force_load) {
                ret = contexthub_download_image(ipc, IPC_REG_BL);
                if (!ret) {