History

Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC driver updates from Arnd Bergmann: "As usual, the drivers/tee and drivers/reset subsystems get merged here, with the expected set of smaller updates and some new hardware support. The tee subsystem now supports device drivers to be attached to a tee, the first example here is a random number driver with its implementation in the secure world. Three new power domain drivers get added for specific chip families: - Broadcom BCM283x chips (used in Raspberry Pi) - Qualcomm Snapdragon phone chips - Xilinx ZynqMP FPGA SoCs One new driver is added to talk to the BPMP firmware on NVIDIA Tegra210 Existing drivers are extended for new SoC variants from NXP, NVIDIA, Amlogic and Qualcomm" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (113 commits) tee: optee: update optee_msg.h and optee_smc.h to dual license tee: add cancellation support to client interface dpaa2-eth: configure the cache stashing amount on a queue soc: fsl: dpio: configure cache stashing destination soc: fsl: dpio: enable frame data cache stashing per software portal soc: fsl: guts: make fsl_guts_get_svr() static hwrng: make symbol 'optee_rng_id_table' static tee: optee: Fix unsigned comparison with less than zero hwrng: Fix unsigned comparison with less than zero tee: fix possible error pointer ctx dereferencing hwrng: optee: Initialize some structs using memset instead of braces tee: optee: Initialize some structs using memset instead of braces soc: fsl: dpio: fix memory leak of a struct qbman on error exit path clk: tegra: dfll: Make symbol 'tegra210_cpu_cvb_tables' static soc: qcom: llcc-slice: Fix typos qcom: soc: llcc-slice: Consolidate some code qcom: soc: llcc-slice: Clear the global drv_data pointer on error drivers: soc: xilinx: Add ZynqMP power domain driver firmware: xilinx: Add APIs to control node status/power dt-bindings: power: Add ZynqMP power domain bindings ...

Linus Torvalds committed 7 years ago

Commit 384d11f2 parents 6ad63de 8ceb820126 files · +7122 −744Browse files

Showing the changes to include/linux (10 of 126 files). Show all

Unified · Split

10 files
  1. include/linux/firmware/imx/svc/misc.h +3 −0
  2. include/linux/firmware/xlnx-zynqmp.h +184 −0
  3. include/linux/fsl/guts.h +0 −2
  4. include/linux/mfd/bcm2835-pm.h +14 −0
  5. include/linux/mod_devicetable.h +9 −0
  6. include/linux/pm_opp.h +7 −0
  7. include/linux/reset/socfpga.h +7 −0
  8. include/linux/reset/sunxi.h +7 −0
  9. include/linux/soc/qcom/llcc-qcom.h +6 −0
  10. include/linux/tee_drv.h +49 −1
include/linux/firmware/imx/svc/misc.h+3−0
@@ -52,4 +52,7 @@ int imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource, · 51 unmodified lines
5252 int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource,
5353 u8 ctrl, u32 *val);
5454
55+int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource,
56+ bool enable, u64 phys_addr);
57+
5558 #endif /* _SC_MISC_API_H */
include/linux/firmware/xlnx-zynqmp.h+184−0
@@ -28,12 +28,35 @@ · 27 unmodified lines
2828 /* SMC SIP service Call Function Identifier Prefix */
2929 #define PM_SIP_SVC 0xC2000000
3030 #define PM_GET_TRUSTZONE_VERSION 0xa03
31+#define PM_SET_SUSPEND_MODE 0xa02
32+#define GET_CALLBACK_DATA 0xa01
3133
3234 /* Number of 32bits values in payload */
3335 #define PAYLOAD_ARG_CNT 4U
3436
37+/* Number of arguments for a callback */
38+#define CB_ARG_CNT 4
39+
40+/* Payload size (consists of callback API ID + arguments) */
41+#define CB_PAYLOAD_SIZE (CB_ARG_CNT + 1)
42+
43+#define ZYNQMP_PM_MAX_QOS 100U
44+
45+/* Node capabilities */
46+#define ZYNQMP_PM_CAPABILITY_ACCESS 0x1U
47+#define ZYNQMP_PM_CAPABILITY_CONTEXT 0x2U
48+#define ZYNQMP_PM_CAPABILITY_WAKEUP 0x4U
49+#define ZYNQMP_PM_CAPABILITY_POWER 0x8U
50+
3551 enum pm_api_id {
3652 PM_GET_API_VERSION = 1,
53+ PM_REQUEST_NODE = 13,
54+ PM_RELEASE_NODE,
55+ PM_SET_REQUIREMENT,
56+ PM_RESET_ASSERT = 17,
57+ PM_RESET_GET_STATUS,
58+ PM_PM_INIT_FINALIZE = 21,
59+ PM_GET_CHIPID = 24,
3760 PM_IOCTL = 34,
3861 PM_QUERY_DATA,
3962 PM_CLOCK_ENABLE,
@@ -75,6 +98,149 @@ enum pm_query_id { · 35 unmodified lines
7598 PM_QID_CLOCK_GET_NUM_CLOCKS = 12,
7699 };
77100
101+enum zynqmp_pm_reset_action {
102+ PM_RESET_ACTION_RELEASE,
103+ PM_RESET_ACTION_ASSERT,
104+ PM_RESET_ACTION_PULSE,
105+};
106+
107+enum zynqmp_pm_reset {
108+ ZYNQMP_PM_RESET_START = 1000,
109+ ZYNQMP_PM_RESET_PCIE_CFG = ZYNQMP_PM_RESET_START,
110+ ZYNQMP_PM_RESET_PCIE_BRIDGE,
111+ ZYNQMP_PM_RESET_PCIE_CTRL,
112+ ZYNQMP_PM_RESET_DP,
113+ ZYNQMP_PM_RESET_SWDT_CRF,
114+ ZYNQMP_PM_RESET_AFI_FM5,
115+ ZYNQMP_PM_RESET_AFI_FM4,
116+ ZYNQMP_PM_RESET_AFI_FM3,
117+ ZYNQMP_PM_RESET_AFI_FM2,
118+ ZYNQMP_PM_RESET_AFI_FM1,
119+ ZYNQMP_PM_RESET_AFI_FM0,
120+ ZYNQMP_PM_RESET_GDMA,
121+ ZYNQMP_PM_RESET_GPU_PP1,
122+ ZYNQMP_PM_RESET_GPU_PP0,
123+ ZYNQMP_PM_RESET_GPU,
124+ ZYNQMP_PM_RESET_GT,
125+ ZYNQMP_PM_RESET_SATA,
126+ ZYNQMP_PM_RESET_ACPU3_PWRON,
127+ ZYNQMP_PM_RESET_ACPU2_PWRON,
128+ ZYNQMP_PM_RESET_ACPU1_PWRON,
129+ ZYNQMP_PM_RESET_ACPU0_PWRON,
130+ ZYNQMP_PM_RESET_APU_L2,
131+ ZYNQMP_PM_RESET_ACPU3,
132+ ZYNQMP_PM_RESET_ACPU2,
133+ ZYNQMP_PM_RESET_ACPU1,
134+ ZYNQMP_PM_RESET_ACPU0,
135+ ZYNQMP_PM_RESET_DDR,
136+ ZYNQMP_PM_RESET_APM_FPD,
137+ ZYNQMP_PM_RESET_SOFT,
138+ ZYNQMP_PM_RESET_GEM0,
139+ ZYNQMP_PM_RESET_GEM1,
140+ ZYNQMP_PM_RESET_GEM2,
141+ ZYNQMP_PM_RESET_GEM3,
142+ ZYNQMP_PM_RESET_QSPI,
143+ ZYNQMP_PM_RESET_UART0,
144+ ZYNQMP_PM_RESET_UART1,
145+ ZYNQMP_PM_RESET_SPI0,
146+ ZYNQMP_PM_RESET_SPI1,
147+ ZYNQMP_PM_RESET_SDIO0,
148+ ZYNQMP_PM_RESET_SDIO1,
149+ ZYNQMP_PM_RESET_CAN0,
150+ ZYNQMP_PM_RESET_CAN1,
151+ ZYNQMP_PM_RESET_I2C0,
152+ ZYNQMP_PM_RESET_I2C1,
153+ ZYNQMP_PM_RESET_TTC0,
154+ ZYNQMP_PM_RESET_TTC1,
155+ ZYNQMP_PM_RESET_TTC2,
156+ ZYNQMP_PM_RESET_TTC3,
157+ ZYNQMP_PM_RESET_SWDT_CRL,
158+ ZYNQMP_PM_RESET_NAND,
159+ ZYNQMP_PM_RESET_ADMA,
160+ ZYNQMP_PM_RESET_GPIO,
161+ ZYNQMP_PM_RESET_IOU_CC,
162+ ZYNQMP_PM_RESET_TIMESTAMP,
163+ ZYNQMP_PM_RESET_RPU_R50,
164+ ZYNQMP_PM_RESET_RPU_R51,
165+ ZYNQMP_PM_RESET_RPU_AMBA,
166+ ZYNQMP_PM_RESET_OCM,
167+ ZYNQMP_PM_RESET_RPU_PGE,
168+ ZYNQMP_PM_RESET_USB0_CORERESET,
169+ ZYNQMP_PM_RESET_USB1_CORERESET,
170+ ZYNQMP_PM_RESET_USB0_HIBERRESET,
171+ ZYNQMP_PM_RESET_USB1_HIBERRESET,
172+ ZYNQMP_PM_RESET_USB0_APB,
173+ ZYNQMP_PM_RESET_USB1_APB,
174+ ZYNQMP_PM_RESET_IPI,
175+ ZYNQMP_PM_RESET_APM_LPD,
176+ ZYNQMP_PM_RESET_RTC,
177+ ZYNQMP_PM_RESET_SYSMON,
178+ ZYNQMP_PM_RESET_AFI_FM6,
179+ ZYNQMP_PM_RESET_LPD_SWDT,
180+ ZYNQMP_PM_RESET_FPD,
181+ ZYNQMP_PM_RESET_RPU_DBG1,
182+ ZYNQMP_PM_RESET_RPU_DBG0,
183+ ZYNQMP_PM_RESET_DBG_LPD,
184+ ZYNQMP_PM_RESET_DBG_FPD,
185+ ZYNQMP_PM_RESET_APLL,
186+ ZYNQMP_PM_RESET_DPLL,
187+ ZYNQMP_PM_RESET_VPLL,
188+ ZYNQMP_PM_RESET_IOPLL,
189+ ZYNQMP_PM_RESET_RPLL,
190+ ZYNQMP_PM_RESET_GPO3_PL_0,
191+ ZYNQMP_PM_RESET_GPO3_PL_1,
192+ ZYNQMP_PM_RESET_GPO3_PL_2,
193+ ZYNQMP_PM_RESET_GPO3_PL_3,
194+ ZYNQMP_PM_RESET_GPO3_PL_4,
195+ ZYNQMP_PM_RESET_GPO3_PL_5,
196+ ZYNQMP_PM_RESET_GPO3_PL_6,
197+ ZYNQMP_PM_RESET_GPO3_PL_7,
198+ ZYNQMP_PM_RESET_GPO3_PL_8,
199+ ZYNQMP_PM_RESET_GPO3_PL_9,
200+ ZYNQMP_PM_RESET_GPO3_PL_10,
201+ ZYNQMP_PM_RESET_GPO3_PL_11,
202+ ZYNQMP_PM_RESET_GPO3_PL_12,
203+ ZYNQMP_PM_RESET_GPO3_PL_13,
204+ ZYNQMP_PM_RESET_GPO3_PL_14,
205+ ZYNQMP_PM_RESET_GPO3_PL_15,
206+ ZYNQMP_PM_RESET_GPO3_PL_16,
207+ ZYNQMP_PM_RESET_GPO3_PL_17,
208+ ZYNQMP_PM_RESET_GPO3_PL_18,
209+ ZYNQMP_PM_RESET_GPO3_PL_19,
210+ ZYNQMP_PM_RESET_GPO3_PL_20,
211+ ZYNQMP_PM_RESET_GPO3_PL_21,
212+ ZYNQMP_PM_RESET_GPO3_PL_22,
213+ ZYNQMP_PM_RESET_GPO3_PL_23,
214+ ZYNQMP_PM_RESET_GPO3_PL_24,
215+ ZYNQMP_PM_RESET_GPO3_PL_25,
216+ ZYNQMP_PM_RESET_GPO3_PL_26,
217+ ZYNQMP_PM_RESET_GPO3_PL_27,
218+ ZYNQMP_PM_RESET_GPO3_PL_28,
219+ ZYNQMP_PM_RESET_GPO3_PL_29,
220+ ZYNQMP_PM_RESET_GPO3_PL_30,
221+ ZYNQMP_PM_RESET_GPO3_PL_31,
222+ ZYNQMP_PM_RESET_RPU_LS,
223+ ZYNQMP_PM_RESET_PS_ONLY,
224+ ZYNQMP_PM_RESET_PL,
225+ ZYNQMP_PM_RESET_PS_PL0,
226+ ZYNQMP_PM_RESET_PS_PL1,
227+ ZYNQMP_PM_RESET_PS_PL2,
228+ ZYNQMP_PM_RESET_PS_PL3,
229+ ZYNQMP_PM_RESET_END = ZYNQMP_PM_RESET_PS_PL3
230+};
231+
232+enum zynqmp_pm_suspend_reason {
233+ SUSPEND_POWER_REQUEST = 201,
234+ SUSPEND_ALERT,
235+ SUSPEND_SYSTEM_SHUTDOWN,
236+};
237+
238+enum zynqmp_pm_request_ack {
239+ ZYNQMP_PM_REQUEST_ACK_NO = 1,
240+ ZYNQMP_PM_REQUEST_ACK_BLOCKING,
241+ ZYNQMP_PM_REQUEST_ACK_NON_BLOCKING,
242+};
243+
78244 /**
79245 * struct zynqmp_pm_query_data - PM query data
80246 * @qid: query ID
@@ -91,6 +257,7 @@ struct zynqmp_pm_query_data { · 10 unmodified lines
91257
92258 struct zynqmp_eemi_ops {
93259 int (*get_api_version)(u32 *version);
260+ int (*get_chipid)(u32 *idcode, u32 *version);
94261 int (*query_data)(struct zynqmp_pm_query_data qdata, u32 *out);
95262 int (*clock_enable)(u32 clock_id);
96263 int (*clock_disable)(u32 clock_id);
@@ -102,8 +269,25 @@ struct zynqmp_eemi_ops { · 5 unmodified lines
102269 int (*clock_setparent)(u32 clock_id, u32 parent_id);
103270 int (*clock_getparent)(u32 clock_id, u32 *parent_id);
104271 int (*ioctl)(u32 node_id, u32 ioctl_id, u32 arg1, u32 arg2, u32 *out);
272+ int (*reset_assert)(const enum zynqmp_pm_reset reset,
273+ const enum zynqmp_pm_reset_action assert_flag);
274+ int (*reset_get_status)(const enum zynqmp_pm_reset reset, u32 *status);
275+ int (*init_finalize)(void);
276+ int (*set_suspend_mode)(u32 mode);
277+ int (*request_node)(const u32 node,
278+ const u32 capabilities,
279+ const u32 qos,
280+ const enum zynqmp_pm_request_ack ack);
281+ int (*release_node)(const u32 node);
282+ int (*set_requirement)(const u32 node,
283+ const u32 capabilities,
284+ const u32 qos,
285+ const enum zynqmp_pm_request_ack ack);
105286 };
106287
288+int zynqmp_pm_invoke_fn(u32 pm_api_id, u32 arg0, u32 arg1,
289+ u32 arg2, u32 arg3, u32 *ret_payload);
290+
107291 #if IS_REACHABLE(CONFIG_ARCH_ZYNQMP)
108292 const struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void);
109293 #else
include/linux/fsl/guts.h+0−2
@@ -135,8 +135,6 @@ struct ccsr_guts { · 134 unmodified lines
135135 u32 srds2cr1; /* 0x.0f44 - SerDes2 Control Register 0 */
136136 } __attribute__ ((packed));
137137
138−u32 fsl_guts_get_svr(void);
139−
140138 /* Alternate function signal multiplex control */
141139 #define MPC85xx_PMUXCR_QE(x) (0x8000 >> (x))
142140
include/linux/mfd/bcm2835-pm.h+14−0
@@ -0,0 +1,14 @@
1+/* SPDX-License-Identifier: GPL-2.0+ */
2+
3+#ifndef BCM2835_MFD_PM_H
4+#define BCM2835_MFD_PM_H
5+
6+#include <linux/regmap.h>
7+
8+struct bcm2835_pm {
9+ struct device *dev;
10+ void __iomem *base;
11+ void __iomem *asb;
12+};
13+
14+#endif /* BCM2835_MFD_PM_H */
include/linux/mod_devicetable.h+9−0
@@ -779,4 +779,13 @@ struct typec_device_id { · 778 unmodified lines
779779 kernel_ulong_t driver_data;
780780 };
781781
782+/**
783+ * struct tee_client_device_id - tee based device identifier
784+ * @uuid: For TEE based client devices we use the device uuid as
785+ * the identifier.
786+ */
787+struct tee_client_device_id {
788+ uuid_t uuid;
789+};
790+
782791 #endif /* LINUX_MOD_DEVICETABLE_H */
include/linux/pm_opp.h+7−0
@@ -86,6 +86,8 @@ unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp); · 85 unmodified lines
8686
8787 unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp);
8888
89+unsigned int dev_pm_opp_get_level(struct dev_pm_opp *opp);
90+
8991 bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp);
9092
9193 int dev_pm_opp_get_opp_count(struct device *dev);
@@ -158,6 +160,11 @@ static inline unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp) · 66 unmodified lines
158160 return 0;
159161 }
160162
163+static inline unsigned int dev_pm_opp_get_level(struct dev_pm_opp *opp)
164+{
165+ return 0;
166+}
167+
161168 static inline bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp)
162169 {
163170 return false;
include/linux/reset/socfpga.h+7−0
@@ -0,0 +1,7 @@
1+/* SPDX-License-Identifier: GPL-2.0 */
2+#ifndef __LINUX_RESET_SOCFPGA_H__
3+#define __LINUX_RESET_SOCFPGA_H__
4+
5+void __init socfpga_reset_init(void);
6+
7+#endif /* __LINUX_RESET_SOCFPGA_H__ */
include/linux/reset/sunxi.h+7−0
@@ -0,0 +1,7 @@
1+/* SPDX-License-Identifier: GPL-2.0 */
2+#ifndef __LINUX_RESET_SUNXI_H__
3+#define __LINUX_RESET_SUNXI_H__
4+
5+void __init sun6i_reset_init(void);
6+
7+#endif /* __LINUX_RESET_SUNXI_H__ */
include/linux/soc/qcom/llcc-qcom.h+6−0
@@ -162,6 +162,12 @@ int llcc_slice_deactivate(struct llcc_slice_desc *desc); · 161 unmodified lines
162162 */
163163 int qcom_llcc_probe(struct platform_device *pdev,
164164 const struct llcc_slice_config *table, u32 sz);
165+
166+/**
167+ * qcom_llcc_remove - remove the sct table
168+ * @pdev: Platform device pointer
169+ */
170+int qcom_llcc_remove(struct platform_device *pdev);
165171 #else
166172 static inline struct llcc_slice_desc *llcc_slice_getd(u32 uid)
167173 {
include/linux/tee_drv.h+49−1
@@ -15,11 +15,14 @@ · 14 unmodified lines
1515 #ifndef __TEE_DRV_H
1616 #define __TEE_DRV_H
1717
18−#include <linux/types.h>
18+#include <linux/device.h>
1919 #include <linux/idr.h>
2020 #include <linux/kref.h>
2121 #include <linux/list.h>
22+#include <linux/mod_devicetable.h>
2223 #include <linux/tee.h>
24+#include <linux/types.h>
25+#include <linux/uuid.h>
2326
2427 /*
2528 * The file describes the API provided by the generic TEE driver to the
@@ -47,6 +50,11 @@ struct tee_shm_pool; · 21 unmodified lines
4750 * @releasing: flag that indicates if context is being released right now.
4851 * It is needed to break circular dependency on context during
4952 * shared memory release.
53+ * @supp_nowait: flag that indicates that requests in this context should not
54+ * wait for tee-supplicant daemon to be started if not present
55+ * and just return with an error code. It is needed for requests
56+ * that arises from TEE based kernel drivers that should be
57+ * non-blocking in nature.
5058 */
5159 struct tee_context {
5260 struct tee_device *teedev;
@@ -54,6 +62,7 @@ struct tee_context { · 1 unmodified line
5462 void *data;
5563 struct kref refcount;
5664 bool releasing;
65+ bool supp_nowait;
5766 };
5867
5968 struct tee_param_memref {
@@ -526,6 +535,18 @@ int tee_client_invoke_func(struct tee_context *ctx, · 466 unmodified lines
526535 struct tee_ioctl_invoke_arg *arg,
527536 struct tee_param *param);
528537
538+/**
539+ * tee_client_cancel_req() - Request cancellation of the previous open-session
540+ * or invoke-command operations in a Trusted Application
541+ * @ctx: TEE Context
542+ * @arg: Cancellation arguments, see description of
543+ * struct tee_ioctl_cancel_arg
544+ *
545+ * Returns < 0 on error else 0 if the cancellation was successfully requested.
546+ */
547+int tee_client_cancel_req(struct tee_context *ctx,
548+ struct tee_ioctl_cancel_arg *arg);
549+
529550 static inline bool tee_param_is_memref(struct tee_param *param)
530551 {
531552 switch (param->attr & TEE_IOCTL_PARAM_ATTR_TYPE_MASK) {
@@ -538,4 +559,31 @@ static inline bool tee_param_is_memref(struct tee_param *param) · 6 unmodified lines
538559 }
539560 }
540561
562+extern struct bus_type tee_bus_type;
563+
564+/**
565+ * struct tee_client_device - tee based device
566+ * @id: device identifier
567+ * @dev: device structure
568+ */
569+struct tee_client_device {
570+ struct tee_client_device_id id;
571+ struct device dev;
572+};
573+
574+#define to_tee_client_device(d) container_of(d, struct tee_client_device, dev)
575+
576+/**
577+ * struct tee_client_driver - tee client driver
578+ * @id_table: device id table supported by this driver
579+ * @driver: driver structure
580+ */
581+struct tee_client_driver {
582+ const struct tee_client_device_id *id_table;
583+ struct device_driver driver;
584+};
585+
586+#define to_tee_client_driver(d) \
587+ container_of(d, struct tee_client_driver, driver)
588+
541589 #endif /*__TEE_DRV_H*/

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t