@@ -383,69 +383,6 @@ int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen,
383
383
}
384
384
EXPORT_SYMBOL (intel_scu_ipc_command );
385
385
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
-
449
386
/*
450
387
* Interrupt handler gets called when ioc bit of IPC_COMMAND_REG set to 1
451
388
* When ioc bit is set to 1, caller api must wait for interrupt handler called
0 commit comments