From 7c37501568dc90435c74c562e1d0628ec6288d2c Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Wed, 23 Jan 2019 19:37:27 +0200 Subject: [PATCH] drivers: Remove unused host_msg field This is legacy and was used to keep current message from host. It is now unused so remove it. Notice that we also remove temp var msg. Signed-off-by: Daniel Baluta --- src/drivers/intel/baytrail/ipc.c | 8 +------- src/drivers/intel/cavs/ipc.c | 12 +----------- src/drivers/intel/cavs/sue-ipc.c | 2 -- src/drivers/intel/haswell/ipc.c | 8 +------- src/include/sof/ipc.h | 2 -- 5 files changed, 3 insertions(+), 29 deletions(-) diff --git a/src/drivers/intel/baytrail/ipc.c b/src/drivers/intel/baytrail/ipc.c index 2d35c8d8f..deb6b45f1 100644 --- a/src/drivers/intel/baytrail/ipc.c +++ b/src/drivers/intel/baytrail/ipc.c @@ -89,7 +89,6 @@ static void irq_handler(void *arg) { uint32_t isr; uint32_t imrd; - uint32_t msg = 0; /* Interrupt arrived, check src */ isr = shim_read(SHIM_ISRD); @@ -115,17 +114,14 @@ static void irq_handler(void *arg) shim_write(SHIM_IMRD, shim_read(SHIM_IMRD) | SHIM_IMRD_BUSY); interrupt_clear(PLATFORM_IPC_INTERRUPT); - msg = shim_read(SHIM_IPCXL); - /* TODO: place message in Q and process later */ /* It's not Q ATM, may overwrite */ if (_ipc->host_pending) { - trace_ipc_error("ipc: dropping msg 0x%x", msg); + trace_ipc_error("ipc: dropping msg"); trace_ipc_error(" isr 0x%x imrd 0x%x ipcxh 0x%x", isr, shim_read(SHIM_IMRD), shim_read(SHIM_IPCXH)); } else { - _ipc->host_msg = msg; _ipc->host_pending = 1; ipc_schedule_process(_ipc); } @@ -139,8 +135,6 @@ void ipc_platform_do_cmd(struct ipc *ipc) uint32_t ipcxh; int32_t err; - trace_ipc("ipc: msg rx -> 0x%x", ipc->host_msg); - /* perform command and return any error */ err = ipc_cmd(); if (err > 0) { diff --git a/src/drivers/intel/cavs/ipc.c b/src/drivers/intel/cavs/ipc.c index e54108df4..94059fec5 100644 --- a/src/drivers/intel/cavs/ipc.c +++ b/src/drivers/intel/cavs/ipc.c @@ -59,7 +59,6 @@ extern struct ipc *_ipc; static void irq_handler(void *arg) { uint32_t dipcctl; - uint32_t msg = 0; #if defined(CONFIG_APOLLOLAKE) uint32_t dipct; @@ -92,16 +91,10 @@ static void irq_handler(void *arg) /* mask Busy interrupt */ ipc_write(IPC_DIPCCTL, dipcctl & ~IPC_DIPCCTL_IPCTBIE); -#if defined(CONFIG_APOLLOLAKE) - msg = dipct & IPC_DIPCT_MSG_MASK; -#else - msg = dipctdr & IPC_DIPCTDR_MSG_MASK; -#endif - /* TODO: place message in Q and process later */ /* It's not Q ATM, may overwrite */ if (_ipc->host_pending) { - trace_ipc_error("ipc: dropping msg 0x%x", msg); + trace_ipc_error("ipc: dropping msg"); #if defined(CONFIG_APOLLOLAKE) trace_ipc_error(" dipct 0x%x dipcie 0x%x dipcctl 0x%x", dipct, dipcie, ipc_read(IPC_DIPCCTL)); @@ -111,7 +104,6 @@ static void irq_handler(void *arg) ipc_read(IPC_DIPCCTL)); #endif } else { - _ipc->host_msg = msg; _ipc->host_pending = 1; ipc_schedule_process(_ipc); } @@ -148,8 +140,6 @@ void ipc_platform_do_cmd(struct ipc *ipc) struct sof_ipc_reply reply; int32_t err; - trace_ipc("ipc: msg rx -> 0x%x", ipc->host_msg); - /* perform command and return any error */ err = ipc_cmd(); if (err > 0) { diff --git a/src/drivers/intel/cavs/sue-ipc.c b/src/drivers/intel/cavs/sue-ipc.c index f5152a2d7..b7f2dae02 100644 --- a/src/drivers/intel/cavs/sue-ipc.c +++ b/src/drivers/intel/cavs/sue-ipc.c @@ -65,8 +65,6 @@ void ipc_platform_do_cmd(struct ipc *ipc) struct sof_ipc_reply reply; int32_t err; - trace_ipc("ipc: msg rx -> 0x%x", ipc->host_msg); - /* perform command and return any error */ err = ipc_cmd(); if (err > 0) { diff --git a/src/drivers/intel/haswell/ipc.c b/src/drivers/intel/haswell/ipc.c index 951d6134d..492469dee 100644 --- a/src/drivers/intel/haswell/ipc.c +++ b/src/drivers/intel/haswell/ipc.c @@ -88,7 +88,6 @@ out: static void irq_handler(void *arg) { uint32_t isr, imrd; - uint32_t msg = 0; /* Interrupt arrived, check src */ isr = shim_read(SHIM_ISRD); @@ -110,17 +109,14 @@ static void irq_handler(void *arg) shim_write(SHIM_IMRD, shim_read(SHIM_IMRD) | SHIM_IMRD_BUSY); interrupt_clear(PLATFORM_IPC_INTERRUPT); - msg = shim_read(SHIM_IPCX); - /* TODO: place message in Q and process later */ /* It's not Q ATM, may overwrite */ if (_ipc->host_pending) { - trace_ipc_error("ipc: dropping msg 0x%x", msg); + trace_ipc_error("ipc: dropping msg"); trace_ipc_error(" isr 0x%x imrd 0x%x ipcx 0x%x", isr, shim_read(SHIM_IMRD), shim_read(SHIM_IPCX)); } else { - _ipc->host_msg = msg; _ipc->host_pending = 1; ipc_schedule_process(_ipc); } @@ -133,8 +129,6 @@ void ipc_platform_do_cmd(struct ipc *ipc) struct sof_ipc_reply reply; int32_t err; - trace_ipc("ipc: msg rx -> 0x%x", ipc->host_msg); - /* perform command and return any error */ err = ipc_cmd(); if (err > 0) { diff --git a/src/include/sof/ipc.h b/src/include/sof/ipc.h index 35887f9f1..1faf4a230 100644 --- a/src/include/sof/ipc.h +++ b/src/include/sof/ipc.h @@ -106,8 +106,6 @@ struct ipc_shared_context { }; struct ipc { - /* messaging */ - uint32_t host_msg; /* current message from host */ uint32_t host_pending; spinlock_t lock; void *comp_data;