[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241021133705.2933464-2-andriy.shevchenko@linux.intel.com>
Date: Mon, 21 Oct 2024 16:34:29 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-kernel@...r.kernel.org,
platform-driver-x86@...r.kernel.org
Cc: Andy Shevchenko <andy@...nel.org>,
Hans de Goede <hdegoede@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Ferry Toth <fntoth@...il.com>
Subject: [PATCH v3 1/5] platform/x86: intel_scu_ipc: Unify the flow in pwr_reg_rdwr()
Unify the flow in pwr_reg_rdwr() with intel_scu_ipc_dev_command_with_size().
While read buffer is not currently being used by the callers of
pwr_reg_rdwr(), this might change in the future. For the existing code
it's a harmless change because the read data for the write operation
is simply discarded.
Tested-by: Ferry Toth <fntoth@...il.com>
Acked-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
drivers/platform/x86/intel_scu_ipc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c
index 5b16d29c93d7..8d11d18701a4 100644
--- a/drivers/platform/x86/intel_scu_ipc.c
+++ b/drivers/platform/x86/intel_scu_ipc.c
@@ -325,7 +325,7 @@ static int pwr_reg_rdwr(struct intel_scu_ipc_dev *scu, u16 *addr, u8 *data,
}
err = intel_scu_ipc_check_status(scu);
- if (!err && id == IPC_CMD_PCNTRL_R) { /* Read rbuf */
+ if (!err) { /* Read rbuf */
/* Workaround: values are read as 0 without memcpy_fromio */
memcpy_fromio(cbuf, scu->ipc_base + 0x90, 16);
for (nc = 0; nc < count; nc++)
--
2.43.0.rc1.1336.g36b5255a03ac
Powered by blists - more mailing lists