Skip to content

Commit 313531d

Browse files
committed
Temporary workaround for PPR reset
1 parent 421d110 commit 313531d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

subsys/ipc/ipc_service/backends/ipc_icmsg.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,16 @@ static int backend_init(const struct device *instance)
103103
&backend_ops);
104104

105105
DT_INST_FOREACH_STATUS_OKAY(DEFINE_BACKEND_DEVICE)
106+
107+
/* TODO: REMOVE THIS WORKAROUND!!! */
108+
109+
static int workaround_ppr_reset(void)
110+
{
111+
#define _FIX_RESET_MEM(i) \
112+
memset(&backend_data_##i, 0, sizeof(backend_data_##i)); \
113+
backend_data_##i.tx_pb = &tx_pb_##i; \
114+
backend_data_##i.rx_pb = &rx_pb_##i;
115+
DT_INST_FOREACH_STATUS_OKAY(_FIX_RESET_MEM);
116+
}
117+
118+
SYS_INIT(workaround_ppr_reset, PRE_KERNEL_1, 0);

0 commit comments

Comments
 (0)