soc: add polarfire soc header file
Subsystems (2)
[email protected]
maintainerPATCH 2/6 soc: add polarfire soc header file
From: Conor Dooley <[email protected]>
Add header to support the Microchip PolarFire SoC MSS system controller mailbox.
Signed-off-by Conor Dooley <[email protected]>
--- include/soc/microchip/mpfs.h | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 include/soc/microchip/mpfs.h
include/soc/microchip/mpfs.h new file +50 -0
@@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: GPL-2.0 +* +* Microchip MPFS mailbox +* +* Copyright (c) 2020 Microchip Corporation. All rights reserved. +* +* Author: Conor Dooley <[email protected]> +* +*/ + +#ifndef __SOC_MPFS_H__ +#define __SOC_MPFS_H__ + +#include <linux/types.h> +#include <linux/of_device.h> + +struct mpfs_sys_controller ; + +struct mpfs_mss_msg { +u8 cmd_opcode; +u16 cmd_data_size; +u16 response_size; +u8 *cmd_data; +u16 mailbox_offset; +u16 response_offset; +}; + +#if IS_ENABLED (CONFIG_MPFS_SYS_CONTROLLER ) + +int mpfs_blocking_transaction (struct mpfs_sys_controller *mpfs_client,void *msg, +void *response,u16 response_size_bytes); + +struct mpfs_sys_controller *mpfs_sys_controller_get (struct device_node *mailbox_node); + +#else + +static int mpfs_blocking_transaction (struct mpfs_sys_controller *mpfs_client,void *msg, +void *response,u16 response_size_bytes) +{ +return -ENOSYS ; +}; + +struct mpfs_sys_controller *mpfs_sys_controller_get (struct device_node *mailbox_node) +{ +return NULL ; +} + +#endif /* IS_ENABLED(CONFIG_MPFS_SYS_CONTROLLER) */ + +#endif /* __SOC_MPFS_H__ */
Signature · 1 line
2.17.1
Quoted 4 lines · On 2020/11/20 2:05, [email protected] wrote:
From: Conor Dooley <[email protected]>
Add header to support the Microchip PolarFire SoC MSS system controller mailbox.
This should be squashed into patch 1.
Quoted 13 lines
Signed-off-by Conor Dooley <[email protected]>--- include/soc/microchip/mpfs.h | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 include/soc/microchip/mpfs.hinclude/soc/microchip/mpfs.h new file +0
-0
include/soc/microchip/mpfs.h line 1
Quoted 1 line
include/soc/microchip/mpfs.h new file +1
-0@@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: GPL-2.0
This line should be a comment on its own:
/* SPDX-License-Identifier: GPL-2.0 */
Quoted 50 lines
include/soc/microchip/mpfs.h new file +49
-0+* +* Microchip MPFS mailbox +* +* Copyright (c) 2020 Microchip Corporation. All rights reserved. +* +* Author: Conor Dooley <[email protected]> +* +*/ + +#ifndef __SOC_MPFS_H__ +#define __SOC_MPFS_H__ + +#include <linux/types.h> +#include <linux/of_device.h> + +struct mpfs_sys_controller ; + +struct mpfs_mss_msg { +u8 cmd_opcode; +u16 cmd_data_size; +u16 response_size; +u8 *cmd_data; +u16 mailbox_offset; +u16 response_offset; +}; + +#if IS_ENABLED (CONFIG_MPFS_SYS_CONTROLLER ) + +int mpfs_blocking_transaction (struct mpfs_sys_controller *mpfs_client,void *msg, +void *response,u16 response_size_bytes); + +struct mpfs_sys_controller *mpfs_sys_controller_get (struct device_node *mailbox_node); + +#else + +static int mpfs_blocking_transaction (struct mpfs_sys_controller *mpfs_client,void *msg, +void *response,u16 response_size_bytes) +{ +return -ENOSYS ; +}; + +struct mpfs_sys_controller *mpfs_sys_controller_get (struct device_node *mailbox_node) +{ +return NULL ; +} + +#endif /* IS_ENABLED(CONFIG_MPFS_SYS_CONTROLLER) */ + +#endif /* __SOC_MPFS_H__ */
Signature · 7 lines
Damien Le Moal Western Digital Research _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv