diff options
author | Ye Li <ye.li@nxp.com> | 2019-01-30 21:31:27 -0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2020-04-26 23:24:10 -0700 |
commit | c63ae2e85488790f475b28e18aaef14435ee99e8 (patch) | |
tree | cd48125b9faf3387ba28f50f104e1acae1aaa31f /arch/arm/include | |
parent | ce9817cce4a463ad8c07aacdfbb6270859d3a68c (diff) |
MLK-20886-2 imx: Add Virtual service glue layer
We use a glue layer to link the low level MU driver and virtual drivers.
This glue layer is named to virtual service (iMX VService). Virtual service
provides unified interfaces for setup connection with M4, get message buffer
and send/receive message, etc.
Multiple virtual drivers (i2c, gpio, etc)
|
iMX Vservice
|
imx_mu_m4 driver
For each virtual device, by default, the Vservice uses the device node property
"fsl,vservice-mu" to specify the MU node handler. A override function is also provided,
so te ARCH level can define its rule. We will use the override function for dynamically
select MU on 8QM/QXP.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 7537b3c0fbe4e2c355bc4ff20613958bdd178bcd)
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/mach-imx/imx_vservice.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/include/asm/mach-imx/imx_vservice.h b/arch/arm/include/asm/mach-imx/imx_vservice.h new file mode 100644 index 00000000000..baedab96441 --- /dev/null +++ b/arch/arm/include/asm/mach-imx/imx_vservice.h @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2019 NXP + * + */ + +#ifndef __IMX_VSERVICE_H__ +#define __IMX_VSERVICE_H__ + +#include <common.h> +#include <dm.h> +#include <linux/list.h> + +struct imx_vservice_channel +{ + u32 msg_seq; + struct udevice *mu_dev; + struct list_head channel_head; +}; + +void * imx_vservice_get_buffer(struct imx_vservice_channel *node, u32 size); +int imx_vservice_blocking_request(struct imx_vservice_channel *node, u8 *buf, u32* size); +struct imx_vservice_channel * imx_vservice_setup(struct udevice *virt_dev); + +#endif |