diff --git a/src/drivers/intel/cavs/sue-ipc.c b/src/drivers/intel/cavs/sue-ipc.c index 28b00b1ba..ae9b8b61a 100644 --- a/src/drivers/intel/cavs/sue-ipc.c +++ b/src/drivers/intel/cavs/sue-ipc.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -54,11 +55,6 @@ extern struct ipc *_ipc; -/* test code to check working IRQ */ -static void irq_handler(void *arg) -{ -} - void ipc_platform_do_cmd(struct ipc *ipc) { struct ipc_data *iipc = ipc_get_drvdata(ipc); @@ -68,6 +64,7 @@ void ipc_platform_do_cmd(struct ipc *ipc) /* perform command and return any error */ err = ipc_cmd(); if (err > 0) { + mailbox_hostbox_read(&reply, 0, sizeof(reply)); goto done; /* reply created and copied by cmd() */ } else if (err < 0) { /* send std error reply */ @@ -80,9 +77,10 @@ void ipc_platform_do_cmd(struct ipc *ipc) /* send std error/ok reply */ reply.hdr.cmd = SOF_IPC_GLB_REPLY; reply.hdr.size = sizeof(reply); - mailbox_hostbox_write(0, &reply, sizeof(reply)); done: + spi_push(spi_get(SOF_SPI_INTEL_SLAVE), &reply, sizeof(reply)); + ipc->host_pending = 0; // TODO: signal audio work to enter D3 in normal context @@ -140,12 +138,5 @@ int platform_ipc_init(struct ipc *ipc) /* PM */ iipc->pm_prepare_D3 = 0; - /* configure interrupt */ - interrupt_register(PLATFORM_IPC_INTERRUPT, IRQ_AUTO_UNMASK, - irq_handler, NULL); - interrupt_enable(PLATFORM_IPC_INTERRUPT); - - /* enable IPC interrupts from host */ - return 0; }