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 commit 2ee7a24f97 ("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 commit f7abaf7b33 ("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:
Daniel Baluta 2019-08-08 17:35:38 +03:00 committed by Tomasz Lauda
parent 92d0cbb80f
commit 788000fb7c
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}