mirror of https://github.com/thesofproject/sof.git
imx8: dai: Initialize esai spinlock
ESAI implementation is still dummy, anyhow we need to initialize ESAI spinlock in order to avoid FW crashes. Similar with commit2ee7a24f97
("byt: hsw: ssp: move spinlock init to earlier stage") we initialize the spinlock in an early stage at dai_init. We started to notice the crash after commitf7abaf7b33
("spinlock: allocate spinlocks in uncached memory") which requires that the lock must be dynamically allocated at init. Before, the lock was statically allocated and there were no crashes. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This commit is contained in:
parent
92d0cbb80f
commit
788000fb7c
|
@ -30,6 +30,12 @@ static struct dai_type_info dti[] = {
|
|||
|
||||
int dai_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* initialize spin locks early to enable ref counting */
|
||||
for (i = 0; i < ARRAY_SIZE(esai); i++)
|
||||
spinlock_init(&esai[i].lock);
|
||||
|
||||
dai_install(dti, ARRAY_SIZE(dti));
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue