Skip to content

Commit 4907898

Browse files
westeriandy-shev
authored andcommitted
platform/x86: intel_scu_ipc: Drop intel_scu_ipc_raw_command()
There is no user for this function so we can drop it from the driver. Signed-off-by: Mika Westerberg <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent b7380a1 commit 4907898

File tree

2 files changed

+0
-65
lines changed

2 files changed

+0
-65
lines changed

arch/x86/include/asm/intel_scu_ipc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ int intel_scu_ipc_update_register(u16 addr, u8 data, u8 mask);
3838
int intel_scu_ipc_simple_command(int cmd, int sub);
3939
int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen,
4040
u32 *out, int outlen);
41-
int intel_scu_ipc_raw_command(int cmd, int sub, u8 *in, int inlen,
42-
u32 *out, int outlen, u32 dptr, u32 sptr);
4341

4442
extern struct blocking_notifier_head intel_scu_notifier;
4543

drivers/platform/x86/intel_scu_ipc.c

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -383,69 +383,6 @@ int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen,
383383
}
384384
EXPORT_SYMBOL(intel_scu_ipc_command);
385385

386-
#define IPC_SPTR 0x08
387-
#define IPC_DPTR 0x0C
388-
389-
/**
390-
* intel_scu_ipc_raw_command() - IPC command with data and pointers
391-
* @cmd: IPC command code.
392-
* @sub: IPC command sub type.
393-
* @in: input data of this IPC command.
394-
* @inlen: input data length in dwords.
395-
* @out: output data of this IPC command.
396-
* @outlen: output data length in dwords.
397-
* @sptr: data writing to SPTR register.
398-
* @dptr: data writing to DPTR register.
399-
*
400-
* Send an IPC command to SCU with input/output data and source/dest pointers.
401-
*
402-
* Return: an IPC error code or 0 on success.
403-
*/
404-
int intel_scu_ipc_raw_command(int cmd, int sub, u8 *in, int inlen,
405-
u32 *out, int outlen, u32 dptr, u32 sptr)
406-
{
407-
struct intel_scu_ipc_dev *scu = &ipcdev;
408-
int inbuflen = DIV_ROUND_UP(inlen, 4);
409-
u32 inbuf[4];
410-
int i, err;
411-
412-
/* Up to 16 bytes */
413-
if (inbuflen > 4)
414-
return -EINVAL;
415-
416-
mutex_lock(&ipclock);
417-
if (scu->dev == NULL) {
418-
mutex_unlock(&ipclock);
419-
return -ENODEV;
420-
}
421-
422-
writel(dptr, scu->ipc_base + IPC_DPTR);
423-
writel(sptr, scu->ipc_base + IPC_SPTR);
424-
425-
/*
426-
* SRAM controller doesn't support 8-bit writes, it only
427-
* supports 32-bit writes, so we have to copy input data into
428-
* the temporary buffer, and SCU FW will use the inlen to
429-
* determine the actual input data length in the temporary
430-
* buffer.
431-
*/
432-
memcpy(inbuf, in, inlen);
433-
434-
for (i = 0; i < inbuflen; i++)
435-
ipc_data_writel(scu, inbuf[i], 4 * i);
436-
437-
ipc_command(scu, (inlen << 16) | (sub << 12) | cmd);
438-
err = intel_scu_ipc_check_status(scu);
439-
if (!err) {
440-
for (i = 0; i < outlen; i++)
441-
*out++ = ipc_data_readl(scu, 4 * i);
442-
}
443-
444-
mutex_unlock(&ipclock);
445-
return err;
446-
}
447-
EXPORT_SYMBOL_GPL(intel_scu_ipc_raw_command);
448-
449386
/*
450387
* Interrupt handler gets called when ioc bit of IPC_COMMAND_REG set to 1
451388
* When ioc bit is set to 1, caller api must wait for interrupt handler called

0 commit comments

Comments
 (0)