aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2015-09-09 19:15:34 -0400
committerKevin Hilman <khilman@linaro.org>2015-09-09 19:15:34 -0400
commitc6e59bdac940e63cfabd40a89d342eb470b009b9 (patch)
tree84c6777a03f7eda4ef5a1bdbc75c8baa7f2f4637 /include
parent312146b50781a9ed1172402e170983a5e967d55d (diff)
parent208487a8f69084992f76ef87ddd3e00e5eaf6587 (diff)
Merge tag 'qcom-soc-for-4.3-rc2' of git://codeaurora.org/quic/kernel/agross-msm into next/late
Qualcomm ARM Based SoC Updates for 4.3-rc2 * Fix errant private access in SMEM * Fix use of correct remote processor ID in SMD transactions * Correct SMD fBLOCKREADINTR handling * tag 'qcom-soc-for-4.3-rc2' of git://codeaurora.org/quic/kernel/agross-msm: soc: qcom: smd: Correct fBLOCKREADINTR handling soc: qcom: smd: Use correct remote processor ID soc: qcom: smem: Fix errant private access devicetree: soc: Add Qualcomm SMD based RPM DT binding soc: qcom: Driver for the Qualcomm RPM over SMD soc: qcom: Add Shared Memory Driver soc: qcom: Add device tree binding for Shared Memory Device drivers: qcom: Select QCOM_SCM unconditionally for QCOM_PM soc: qcom: Add Shared Memory Manager driver
Diffstat (limited to 'include')
-rw-r--r--include/linux/soc/qcom/smd-rpm.h35
-rw-r--r--include/linux/soc/qcom/smd.h46
-rw-r--r--include/linux/soc/qcom/smem.h11
3 files changed, 92 insertions, 0 deletions
diff --git a/include/linux/soc/qcom/smd-rpm.h b/include/linux/soc/qcom/smd-rpm.h
new file mode 100644
index 000000000000..2a53dcaeeeed
--- /dev/null
+++ b/include/linux/soc/qcom/smd-rpm.h
@@ -0,0 +1,35 @@
1#ifndef __QCOM_SMD_RPM_H__
2#define __QCOM_SMD_RPM_H__
3
4struct qcom_smd_rpm;
5
6#define QCOM_SMD_RPM_ACTIVE_STATE 0
7#define QCOM_SMD_RPM_SLEEP_STATE 1
8
9/*
10 * Constants used for addressing resources in the RPM.
11 */
12#define QCOM_SMD_RPM_BOOST 0x61747362
13#define QCOM_SMD_RPM_BUS_CLK 0x316b6c63
14#define QCOM_SMD_RPM_BUS_MASTER 0x73616d62
15#define QCOM_SMD_RPM_BUS_SLAVE 0x766c7362
16#define QCOM_SMD_RPM_CLK_BUF_A 0x616B6C63
17#define QCOM_SMD_RPM_LDOA 0x616f646c
18#define QCOM_SMD_RPM_LDOB 0x626F646C
19#define QCOM_SMD_RPM_MEM_CLK 0x326b6c63
20#define QCOM_SMD_RPM_MISC_CLK 0x306b6c63
21#define QCOM_SMD_RPM_NCPA 0x6170636E
22#define QCOM_SMD_RPM_NCPB 0x6270636E
23#define QCOM_SMD_RPM_OCMEM_PWR 0x706d636f
24#define QCOM_SMD_RPM_QPIC_CLK 0x63697071
25#define QCOM_SMD_RPM_SMPA 0x61706d73
26#define QCOM_SMD_RPM_SMPB 0x62706d73
27#define QCOM_SMD_RPM_SPDM 0x63707362
28#define QCOM_SMD_RPM_VSA 0x00617376
29
30int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm,
31 int state,
32 u32 resource_type, u32 resource_id,
33 void *buf, size_t count);
34
35#endif
diff --git a/include/linux/soc/qcom/smd.h b/include/linux/soc/qcom/smd.h
new file mode 100644
index 000000000000..d7e50aa6a4ac
--- /dev/null
+++ b/include/linux/soc/qcom/smd.h
@@ -0,0 +1,46 @@
1#ifndef __QCOM_SMD_H__
2#define __QCOM_SMD_H__
3
4#include <linux/device.h>
5#include <linux/mod_devicetable.h>
6
7struct qcom_smd;
8struct qcom_smd_channel;
9struct qcom_smd_lookup;
10
11/**
12 * struct qcom_smd_device - smd device struct
13 * @dev: the device struct
14 * @channel: handle to the smd channel for this device
15 */
16struct qcom_smd_device {
17 struct device dev;
18 struct qcom_smd_channel *channel;
19};
20
21/**
22 * struct qcom_smd_driver - smd driver struct
23 * @driver: underlying device driver
24 * @probe: invoked when the smd channel is found
25 * @remove: invoked when the smd channel is closed
26 * @callback: invoked when an inbound message is received on the channel,
27 * should return 0 on success or -EBUSY if the data cannot be
28 * consumed at this time
29 */
30struct qcom_smd_driver {
31 struct device_driver driver;
32 int (*probe)(struct qcom_smd_device *dev);
33 void (*remove)(struct qcom_smd_device *dev);
34 int (*callback)(struct qcom_smd_device *, const void *, size_t);
35};
36
37int qcom_smd_driver_register(struct qcom_smd_driver *drv);
38void qcom_smd_driver_unregister(struct qcom_smd_driver *drv);
39
40#define module_qcom_smd_driver(__smd_driver) \
41 module_driver(__smd_driver, qcom_smd_driver_register, \
42 qcom_smd_driver_unregister)
43
44int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len);
45
46#endif
diff --git a/include/linux/soc/qcom/smem.h b/include/linux/soc/qcom/smem.h
new file mode 100644
index 000000000000..bc9630d3aced
--- /dev/null
+++ b/include/linux/soc/qcom/smem.h
@@ -0,0 +1,11 @@
1#ifndef __QCOM_SMEM_H__
2#define __QCOM_SMEM_H__
3
4#define QCOM_SMEM_HOST_ANY -1
5
6int qcom_smem_alloc(unsigned host, unsigned item, size_t size);
7int qcom_smem_get(unsigned host, unsigned item, void **ptr, size_t *size);
8
9int qcom_smem_get_free_space(unsigned host);
10
11#endif