47b3d10307090665d4ee7d539152833c9bbfde20
[openwrt/staging/chunkeey.git] /
1 From c2939a719ebc7b39453f47ad2d8d30fc06ef4be6 Mon Sep 17 00:00:00 2001
2 From: Ioana Ciornei <ioana.ciornei@nxp.com>
3 Date: Tue, 13 Mar 2018 13:57:00 +0200
4 Subject: [PATCH] bus: fsl-mc: move fsl_mc_command struct in a uapi header
5
6 Define "struct fsl_mc_command" as a structure that can cross the
7 user/kernel boundary.
8
9 Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
10 ---
11 MAINTAINERS | 2 ++
12 include/linux/fsl/mc.h | 8 +-------
13 include/uapi/linux/fsl_mc.h | 25 +++++++++++++++++++++++++
14 3 files changed, 28 insertions(+), 7 deletions(-)
15 create mode 100644 include/uapi/linux/fsl_mc.h
16
17 --- a/MAINTAINERS
18 +++ b/MAINTAINERS
19 @@ -13436,6 +13436,8 @@ S: Maintained
20 F: drivers/bus/fsl-mc/
21 F: Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt
22 F: Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
23 +F: Documentation/networking/dpaa2/overview.rst
24 +F: include/uapi/linux/fsl_mc.h
25
26 QT1010 MEDIA DRIVER
27 M: Antti Palosaari <crope@iki.fi>
28 --- a/include/linux/fsl/mc.h
29 +++ b/include/linux/fsl/mc.h
30 @@ -12,6 +12,7 @@
31 #include <linux/device.h>
32 #include <linux/mod_devicetable.h>
33 #include <linux/interrupt.h>
34 +#include <uapi/linux/fsl_mc.h>
35
36 #define FSL_MC_VENDOR_FREESCALE 0x1957
37
38 @@ -199,8 +200,6 @@ struct fsl_mc_device {
39 #define to_fsl_mc_device(_dev) \
40 container_of(_dev, struct fsl_mc_device, dev)
41
42 -#define MC_CMD_NUM_OF_PARAMS 7
43 -
44 struct mc_cmd_header {
45 u8 src_id;
46 u8 flags_hw;
47 @@ -210,11 +209,6 @@ struct mc_cmd_header {
48 __le16 cmd_id;
49 };
50
51 -struct fsl_mc_command {
52 - __le64 header;
53 - __le64 params[MC_CMD_NUM_OF_PARAMS];
54 -};
55 -
56 enum mc_cmd_status {
57 MC_CMD_STATUS_OK = 0x0, /* Completed successfully */
58 MC_CMD_STATUS_READY = 0x1, /* Ready to be processed */
59 --- /dev/null
60 +++ b/include/uapi/linux/fsl_mc.h
61 @@ -0,0 +1,25 @@
62 +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
63 +/*
64 + * Management Complex (MC) userspace public interface
65 + *
66 + * Copyright 2018 NXP
67 + *
68 + */
69 +#ifndef _UAPI_FSL_MC_H_
70 +#define _UAPI_FSL_MC_H_
71 +
72 +#include <linux/types.h>
73 +
74 +#define MC_CMD_NUM_OF_PARAMS 7
75 +
76 +/**
77 + * struct fsl_mc_command - Management Complex (MC) command structure
78 + * @header: MC command header
79 + * @params: MC command parameters
80 + */
81 +struct fsl_mc_command {
82 + __le64 header;
83 + __le64 params[MC_CMD_NUM_OF_PARAMS];
84 +};
85 +
86 +#endif /* _UAPI_FSL_MC_H_ */