mirror of https://github.com/thesofproject/sof.git
sue: enable IPC over SPI
Sue Creek uses SPI for IPC messages. This patch removes all DMA IPC artefacts and makes necessary for SPI adjustments in sue-ipc.c. Note, that it still uses the purely software IPC mailbox for uniformity with other architectures. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
488bc759c9
commit
ba7b7a6ce5
|
@ -42,6 +42,7 @@
|
|||
#include <sof/alloc.h>
|
||||
#include <sof/wait.h>
|
||||
#include <sof/trace.h>
|
||||
#include <sof/spi.h>
|
||||
#include <sof/ssp.h>
|
||||
#include <platform/interrupt.h>
|
||||
#include <platform/mailbox.h>
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue