diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-20 21:42:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-20 21:42:30 -0500 |
commit | 9638685e32af961943b679fcb72d4ddd458eb18f (patch) | |
tree | 83cea0db18256448e2eaa9aec3bdbd3b89f26646 /include/linux | |
parent | 03d7d12415e3a4791994e566f1245838bc505c6b (diff) | |
parent | ce96cb7386a57b270648f9ba6003065329a26bd3 (diff) |
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC driver updates from Olof Johansson:
"Driver updates for ARM SoCs. Some for SoC-family code under
drivers/soc, but also some other driver updates that don't belong
anywhere else. We also bring in the drivers/reset code through
arm-soc.
Some of the larger updates:
- Qualcomm support for SMEM, SMSM, SMP2P. All used to communicate
with other parts of the chip/board on these platforms, all
proprietary protocols that don't fit into other subsystems and live
in drivers/soc for now.
- System bus driver for UniPhier
- Driver for the TI Wakeup M3 IPC device
- Power management for Raspberry PI
+ Again a bunch of other smaller updates and patches"
* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (38 commits)
bus: uniphier: allow only built-in driver
ARM: bcm2835: clarify RASPBERRYPI_FIRMWARE dependency
MAINTAINERS: Drop Kumar Gala from QCOM
bus: uniphier-system-bus: add UniPhier System Bus driver
ARM: bcm2835: add rpi power domain driver
dt-bindings: add rpi power domain driver bindings
ARM: bcm2835: Define two new packets from the latest firmware.
drivers/soc: make mediatek/mtk-scpsys.c explicitly non-modular
soc: mediatek: SCPSYS: Add regulator support
MAINTAINERS: Change QCOM entries
soc: qcom: smd-rpm: Add existing platform support
memory/tegra: Add number of TLB lines for Tegra124
reset: hi6220: fix modular build
soc: qcom: Introduce WCNSS_CTRL SMD client
ARM: qcom: select ARM_CPU_SUSPEND for power management
MAINTAINERS: Add rules for Qualcomm dts files
soc: qcom: enable smsm/smp2p modular build
serial: msm_serial: Make config tristate
soc: qcom: smp2p: Qualcomm Shared Memory Point to Point
soc: qcom: smsm: Add driver for Qualcomm SMSM
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/reset.h | 17 | ||||
-rw-r--r-- | include/linux/soc/qcom/smem_state.h | 18 | ||||
-rw-r--r-- | include/linux/wkup_m3_ipc.h | 55 |
3 files changed, 86 insertions, 4 deletions
diff --git a/include/linux/reset.h b/include/linux/reset.h index 7f65f9cff951..c4c097de0ba9 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h | |||
@@ -38,6 +38,9 @@ static inline struct reset_control *devm_reset_control_get_optional( | |||
38 | struct reset_control *of_reset_control_get(struct device_node *node, | 38 | struct reset_control *of_reset_control_get(struct device_node *node, |
39 | const char *id); | 39 | const char *id); |
40 | 40 | ||
41 | struct reset_control *of_reset_control_get_by_index( | ||
42 | struct device_node *node, int index); | ||
43 | |||
41 | #else | 44 | #else |
42 | 45 | ||
43 | static inline int reset_control_reset(struct reset_control *rstc) | 46 | static inline int reset_control_reset(struct reset_control *rstc) |
@@ -71,7 +74,7 @@ static inline void reset_control_put(struct reset_control *rstc) | |||
71 | 74 | ||
72 | static inline int device_reset_optional(struct device *dev) | 75 | static inline int device_reset_optional(struct device *dev) |
73 | { | 76 | { |
74 | return -ENOSYS; | 77 | return -ENOTSUPP; |
75 | } | 78 | } |
76 | 79 | ||
77 | static inline struct reset_control *__must_check reset_control_get( | 80 | static inline struct reset_control *__must_check reset_control_get( |
@@ -91,19 +94,25 @@ static inline struct reset_control *__must_check devm_reset_control_get( | |||
91 | static inline struct reset_control *reset_control_get_optional( | 94 | static inline struct reset_control *reset_control_get_optional( |
92 | struct device *dev, const char *id) | 95 | struct device *dev, const char *id) |
93 | { | 96 | { |
94 | return ERR_PTR(-ENOSYS); | 97 | return ERR_PTR(-ENOTSUPP); |
95 | } | 98 | } |
96 | 99 | ||
97 | static inline struct reset_control *devm_reset_control_get_optional( | 100 | static inline struct reset_control *devm_reset_control_get_optional( |
98 | struct device *dev, const char *id) | 101 | struct device *dev, const char *id) |
99 | { | 102 | { |
100 | return ERR_PTR(-ENOSYS); | 103 | return ERR_PTR(-ENOTSUPP); |
101 | } | 104 | } |
102 | 105 | ||
103 | static inline struct reset_control *of_reset_control_get( | 106 | static inline struct reset_control *of_reset_control_get( |
104 | struct device_node *node, const char *id) | 107 | struct device_node *node, const char *id) |
105 | { | 108 | { |
106 | return ERR_PTR(-ENOSYS); | 109 | return ERR_PTR(-ENOTSUPP); |
110 | } | ||
111 | |||
112 | static inline struct reset_control *of_reset_control_get_by_index( | ||
113 | struct device_node *node, int index) | ||
114 | { | ||
115 | return ERR_PTR(-ENOTSUPP); | ||
107 | } | 116 | } |
108 | 117 | ||
109 | #endif /* CONFIG_RESET_CONTROLLER */ | 118 | #endif /* CONFIG_RESET_CONTROLLER */ |
diff --git a/include/linux/soc/qcom/smem_state.h b/include/linux/soc/qcom/smem_state.h new file mode 100644 index 000000000000..f35e1512fcaa --- /dev/null +++ b/include/linux/soc/qcom/smem_state.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef __QCOM_SMEM_STATE__ | ||
2 | #define __QCOM_SMEM_STATE__ | ||
3 | |||
4 | struct qcom_smem_state; | ||
5 | |||
6 | struct qcom_smem_state_ops { | ||
7 | int (*update_bits)(void *, u32, u32); | ||
8 | }; | ||
9 | |||
10 | struct qcom_smem_state *qcom_smem_state_get(struct device *dev, const char *con_id, unsigned *bit); | ||
11 | void qcom_smem_state_put(struct qcom_smem_state *); | ||
12 | |||
13 | int qcom_smem_state_update_bits(struct qcom_smem_state *state, u32 mask, u32 value); | ||
14 | |||
15 | struct qcom_smem_state *qcom_smem_state_register(struct device_node *of_node, const struct qcom_smem_state_ops *ops, void *data); | ||
16 | void qcom_smem_state_unregister(struct qcom_smem_state *state); | ||
17 | |||
18 | #endif | ||
diff --git a/include/linux/wkup_m3_ipc.h b/include/linux/wkup_m3_ipc.h new file mode 100644 index 000000000000..d6ba7d39a62f --- /dev/null +++ b/include/linux/wkup_m3_ipc.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * TI Wakeup M3 for AMx3 SoCs Power Management Routines | ||
3 | * | ||
4 | * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | * Dave Gerlach <d-gerlach@ti.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License as | ||
9 | * published by the Free Software Foundation version 2. | ||
10 | * | ||
11 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
12 | * kind, whether express or implied; without even the implied warranty | ||
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #ifndef _LINUX_WKUP_M3_IPC_H | ||
18 | #define _LINUX_WKUP_M3_IPC_H | ||
19 | |||
20 | #define WKUP_M3_DEEPSLEEP 1 | ||
21 | #define WKUP_M3_STANDBY 2 | ||
22 | #define WKUP_M3_IDLE 3 | ||
23 | |||
24 | #include <linux/mailbox_client.h> | ||
25 | |||
26 | struct wkup_m3_ipc_ops; | ||
27 | |||
28 | struct wkup_m3_ipc { | ||
29 | struct rproc *rproc; | ||
30 | |||
31 | void __iomem *ipc_mem_base; | ||
32 | struct device *dev; | ||
33 | |||
34 | int mem_type; | ||
35 | unsigned long resume_addr; | ||
36 | int state; | ||
37 | |||
38 | struct completion sync_complete; | ||
39 | struct mbox_client mbox_client; | ||
40 | struct mbox_chan *mbox; | ||
41 | |||
42 | struct wkup_m3_ipc_ops *ops; | ||
43 | }; | ||
44 | |||
45 | struct wkup_m3_ipc_ops { | ||
46 | void (*set_mem_type)(struct wkup_m3_ipc *m3_ipc, int mem_type); | ||
47 | void (*set_resume_address)(struct wkup_m3_ipc *m3_ipc, void *addr); | ||
48 | int (*prepare_low_power)(struct wkup_m3_ipc *m3_ipc, int state); | ||
49 | int (*finish_low_power)(struct wkup_m3_ipc *m3_ipc); | ||
50 | int (*request_pm_status)(struct wkup_m3_ipc *m3_ipc); | ||
51 | }; | ||
52 | |||
53 | struct wkup_m3_ipc *wkup_m3_ipc_get(void); | ||
54 | void wkup_m3_ipc_put(struct wkup_m3_ipc *m3_ipc); | ||
55 | #endif /* _LINUX_WKUP_M3_IPC_H */ | ||