platform/x86: intel_scu_ipc: Introduce new SCU IPC API
authorMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 16 Apr 2020 08:15:36 +0000 (11:15 +0300)
committerLee Jones <lee.jones@linaro.org>
Fri, 24 Apr 2020 10:17:28 +0000 (11:17 +0100)
commitf57fa18583f538786b66a045446617f5638f032a
treea82d09b1b28285d2224cf8ca31f4ae1202d5ce95
parentdd88564937390a9ebf4fb9c0ef21652ff6e35780
platform/x86: intel_scu_ipc: Introduce new SCU IPC API

The current SCU IPC API has been operating on a single instance and
there has been no way to pin the providing module in place when the SCU
IPC is in use.

This implements a new API that takes the SCU IPC instance as first
parameter (NULL means the single instance is being used). The SCU IPC
instance can be retrieved by calling new function intel_scu_ipc_dev_get()
that take care of pinning the providing module in place as long as
intel_scu_ipc_dev_put() is not called.

The old API is updated to call the new API and is is left there in the
legacy API header to support the existing users that cannot be converted
easily.

Subsequent patches will convert most of the users over to the new API.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
arch/x86/include/asm/intel_scu_ipc.h
arch/x86/include/asm/intel_scu_ipc_legacy.h
drivers/platform/x86/intel_scu_ipc.c