Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 1 | /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. |
Ofir Cohen | c7827e4 | 2011-12-13 20:10:01 +0200 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #ifndef _USB_BAM_H_ |
| 14 | #define _USB_BAM_H_ |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 15 | #include "sps.h" |
Ofir Cohen | ce5e3f2 | 2012-11-16 15:47:40 +0200 | [diff] [blame] | 16 | #include <mach/ipa.h> |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 17 | #include <linux/usb/msm_hsusb.h> |
Ofir Cohen | c7827e4 | 2011-12-13 20:10:01 +0200 | [diff] [blame] | 18 | |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 19 | enum usb_bam { |
| 20 | SSUSB_BAM = 0, |
| 21 | HSUSB_BAM, |
| 22 | HSIC_BAM, |
| 23 | MAX_BAMS, |
| 24 | }; |
| 25 | |
| 26 | enum peer_bam { |
| 27 | A2_P_BAM = 0, |
| 28 | QDSS_P_BAM, |
| 29 | IPA_P_BAM, |
| 30 | MAX_PEER_BAMS, |
| 31 | }; |
| 32 | |
Amit Blay | e5bb35e | 2012-05-08 20:38:20 +0300 | [diff] [blame] | 33 | enum usb_bam_pipe_dir { |
| 34 | USB_TO_PEER_PERIPHERAL, |
| 35 | PEER_PERIPHERAL_TO_USB, |
| 36 | }; |
| 37 | |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 38 | enum usb_pipe_mem_type { |
| 39 | SPS_PIPE_MEM = 0, /* Default, SPS dedicated pipe memory */ |
| 40 | USB_PRIVATE_MEM, /* USB's private memory */ |
| 41 | SYSTEM_MEM, /* System RAM, requires allocation */ |
Vamsi Krishna | fd09ddd | 2013-03-27 15:39:49 -0700 | [diff] [blame] | 42 | OCI_MEM, /* Shared memory among peripherals */ |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 43 | }; |
| 44 | |
Ido Shayevitz | 1ef192f | 2013-04-25 21:14:34 +0300 | [diff] [blame] | 45 | enum usb_bam_event_type { |
| 46 | USB_BAM_EVENT_WAKEUP_PIPE = 0, /* Wake a pipe */ |
| 47 | USB_BAM_EVENT_WAKEUP, /* Wake a bam (first pipe waked) */ |
| 48 | USB_BAM_EVENT_INACTIVITY, /* Inactivity on all pipes */ |
| 49 | }; |
| 50 | |
Ofir Cohen | ce5e3f2 | 2012-11-16 15:47:40 +0200 | [diff] [blame] | 51 | struct usb_bam_connect_ipa_params { |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 52 | u8 src_idx; |
| 53 | u8 dst_idx; |
Ofir Cohen | ce5e3f2 | 2012-11-16 15:47:40 +0200 | [diff] [blame] | 54 | u32 *src_pipe; |
| 55 | u32 *dst_pipe; |
| 56 | enum usb_bam_pipe_dir dir; |
| 57 | /* client handle assigned by IPA to client */ |
| 58 | u32 prod_clnt_hdl; |
| 59 | u32 cons_clnt_hdl; |
| 60 | /* params assigned by the CD */ |
| 61 | enum ipa_client_type client; |
| 62 | struct ipa_ep_cfg ipa_ep_cfg; |
| 63 | void *priv; |
| 64 | void (*notify)(void *priv, enum ipa_dp_evt_type evt, |
| 65 | unsigned long data); |
Ido Shayevitz | 1ef192f | 2013-04-25 21:14:34 +0300 | [diff] [blame] | 66 | int (*activity_notify)(void *priv); |
| 67 | int (*inactivity_notify)(void *priv); |
Ofir Cohen | ce5e3f2 | 2012-11-16 15:47:40 +0200 | [diff] [blame] | 68 | }; |
| 69 | |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 70 | /** |
| 71 | * struct usb_bam_event_info: suspend/resume event information. |
Ido Shayevitz | 1ef192f | 2013-04-25 21:14:34 +0300 | [diff] [blame] | 72 | * @type: usb bam event type. |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 73 | * @event: holds event data. |
| 74 | * @callback: suspend/resume callback. |
| 75 | * @param: port num (for suspend) or NULL (for resume). |
| 76 | * @event_w: holds work queue parameters. |
| 77 | */ |
| 78 | struct usb_bam_event_info { |
Ido Shayevitz | 1ef192f | 2013-04-25 21:14:34 +0300 | [diff] [blame] | 79 | enum usb_bam_event_type type; |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 80 | struct sps_register_event event; |
| 81 | int (*callback)(void *); |
| 82 | void *param; |
| 83 | struct work_struct event_w; |
| 84 | }; |
| 85 | |
| 86 | /** |
| 87 | * struct usb_bam_pipe_connect: pipe connection information |
| 88 | * between USB/HSIC BAM and another BAM. USB/HSIC BAM can be |
| 89 | * either src BAM or dst BAM |
| 90 | * @name: pipe description. |
| 91 | * @mem_type: type of memory used for BAM FIFOs |
| 92 | * @src_phy_addr: src bam physical address. |
| 93 | * @src_pipe_index: src bam pipe index. |
| 94 | * @dst_phy_addr: dst bam physical address. |
| 95 | * @dst_pipe_index: dst bam pipe index. |
| 96 | * @data_fifo_base_offset: data fifo offset. |
| 97 | * @data_fifo_size: data fifo size. |
| 98 | * @desc_fifo_base_offset: descriptor fifo offset. |
| 99 | * @desc_fifo_size: descriptor fifo size. |
| 100 | * @data_mem_buf: data fifo buffer. |
| 101 | * @desc_mem_buf: descriptor fifo buffer. |
Ido Shayevitz | 1ef192f | 2013-04-25 21:14:34 +0300 | [diff] [blame] | 102 | * @event: event for wakeup. |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 103 | * @enabled: true if pipe is enabled. |
Lena Salman | 05b544f | 2013-05-13 15:49:10 +0300 | [diff] [blame^] | 104 | * @ipa_clnt_hdl : pipe handle to ipa api. |
Ido Shayevitz | 1ef192f | 2013-04-25 21:14:34 +0300 | [diff] [blame] | 105 | * @priv: private data to return upon activity_notify |
| 106 | * or inactivity_notify callbacks. |
| 107 | * @activity_notify: callback to invoke on activity on one of the in pipes. |
| 108 | * @inactivity_notify: callback to invoke on inactivity on all pipes. |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 109 | */ |
| 110 | struct usb_bam_pipe_connect { |
| 111 | const char *name; |
| 112 | u32 pipe_num; |
| 113 | enum usb_pipe_mem_type mem_type; |
| 114 | enum usb_bam_pipe_dir dir; |
| 115 | enum usb_bam bam_type; |
| 116 | enum peer_bam peer_bam; |
| 117 | u32 src_phy_addr; |
| 118 | u32 src_pipe_index; |
| 119 | u32 dst_phy_addr; |
| 120 | u32 dst_pipe_index; |
| 121 | u32 data_fifo_base_offset; |
| 122 | u32 data_fifo_size; |
| 123 | u32 desc_fifo_base_offset; |
| 124 | u32 desc_fifo_size; |
| 125 | struct sps_mem_buffer data_mem_buf; |
| 126 | struct sps_mem_buffer desc_mem_buf; |
Ido Shayevitz | 1ef192f | 2013-04-25 21:14:34 +0300 | [diff] [blame] | 127 | struct usb_bam_event_info event; |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 128 | bool enabled; |
Lena Salman | 05b544f | 2013-05-13 15:49:10 +0300 | [diff] [blame^] | 129 | int ipa_clnt_hdl; |
Ido Shayevitz | 1ef192f | 2013-04-25 21:14:34 +0300 | [diff] [blame] | 130 | void *priv; |
| 131 | int (*activity_notify)(void *priv); |
| 132 | int (*inactivity_notify)(void *priv); |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 133 | }; |
| 134 | |
| 135 | /** |
| 136 | * struct msm_usb_bam_platform_data: pipe connection information |
| 137 | * between USB/HSIC BAM and another BAM. USB/HSIC BAM can be |
| 138 | * either src BAM or dst BAM |
| 139 | * @connections: holds all pipe connections data. |
| 140 | * @usb_bam_num_pipes: max number of pipes to use. |
| 141 | * @active_conn_num: number of active pipe connections. |
Vamsi Krishna | fd09ddd | 2013-03-27 15:39:49 -0700 | [diff] [blame] | 142 | * @usb_bam_fifo_baseaddr: base address for bam pipe's data and descriptor |
| 143 | * fifos. This can be on chip memory (ocimem) or usb |
| 144 | * private memory. |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 145 | * @ignore_core_reset_ack: BAM can ignore ACK from USB core during PIPE RESET |
| 146 | * @disable_clk_gating: Disable clock gating |
| 147 | */ |
| 148 | struct msm_usb_bam_platform_data { |
| 149 | struct usb_bam_pipe_connect *connections; |
| 150 | u8 max_connections; |
| 151 | int usb_bam_num_pipes; |
Vamsi Krishna | fd09ddd | 2013-03-27 15:39:49 -0700 | [diff] [blame] | 152 | phys_addr_t usb_bam_fifo_baseaddr; |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 153 | bool ignore_core_reset_ack; |
| 154 | bool reset_on_connect[MAX_BAMS]; |
| 155 | bool disable_clk_gating; |
| 156 | }; |
| 157 | |
Amit Blay | e5bb35e | 2012-05-08 20:38:20 +0300 | [diff] [blame] | 158 | #ifdef CONFIG_USB_BAM |
| 159 | /** |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 160 | * Connect USB-to-Peripheral SPS connection. |
Ofir Cohen | c7827e4 | 2011-12-13 20:10:01 +0200 | [diff] [blame] | 161 | * |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 162 | * This function returns the allocated pipe number. |
Ofir Cohen | c7827e4 | 2011-12-13 20:10:01 +0200 | [diff] [blame] | 163 | * |
| 164 | * @idx - Connection index. |
| 165 | * |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 166 | * @bam_pipe_idx - allocated pipe index. |
Ofir Cohen | c7827e4 | 2011-12-13 20:10:01 +0200 | [diff] [blame] | 167 | * |
| 168 | * @return 0 on success, negative value on error |
| 169 | * |
| 170 | */ |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 171 | int usb_bam_connect(u8 idx, u32 *bam_pipe_idx); |
Amit Blay | e5bb35e | 2012-05-08 20:38:20 +0300 | [diff] [blame] | 172 | |
| 173 | /** |
Ofir Cohen | ce5e3f2 | 2012-11-16 15:47:40 +0200 | [diff] [blame] | 174 | * Connect USB-to-IPA SPS connection. |
| 175 | * |
Lena Salman | abde35d | 2013-04-25 15:29:43 +0300 | [diff] [blame] | 176 | * This function returns the allocated pipes number and clnt |
| 177 | * handles. Assumes that the user first connects producer pipes |
| 178 | * and only after that consumer pipes, since that's the correct |
| 179 | * sequence for the handshake with the IPA. |
Ofir Cohen | ce5e3f2 | 2012-11-16 15:47:40 +0200 | [diff] [blame] | 180 | * |
| 181 | * @ipa_params - in/out parameters |
| 182 | * |
| 183 | * @return 0 on success, negative value on error |
| 184 | * |
| 185 | */ |
| 186 | int usb_bam_connect_ipa(struct usb_bam_connect_ipa_params *ipa_params); |
| 187 | |
| 188 | /** |
| 189 | * Disconnect USB-to-IPA SPS connection. |
| 190 | * |
Ofir Cohen | ce5e3f2 | 2012-11-16 15:47:40 +0200 | [diff] [blame] | 191 | * @ipa_params - in/out parameters |
| 192 | * |
| 193 | * @return 0 on success, negative value on error |
| 194 | * |
| 195 | */ |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 196 | int usb_bam_disconnect_ipa( |
Ofir Cohen | ce5e3f2 | 2012-11-16 15:47:40 +0200 | [diff] [blame] | 197 | struct usb_bam_connect_ipa_params *ipa_params); |
| 198 | |
| 199 | /** |
Lena Salman | 05b544f | 2013-05-13 15:49:10 +0300 | [diff] [blame^] | 200 | * Wait for Consumer granted from Resource Manager. |
| 201 | * |
| 202 | * @ipa_params - in/out parameters |
| 203 | * |
| 204 | */ |
| 205 | void usb_bam_wait_for_cons_granted( |
| 206 | struct usb_bam_connect_ipa_params *ipa_params); |
| 207 | /** |
Amit Blay | e5bb35e | 2012-05-08 20:38:20 +0300 | [diff] [blame] | 208 | * Register a wakeup callback from peer BAM. |
| 209 | * |
| 210 | * @idx - Connection index. |
| 211 | * |
| 212 | * @callback - the callback function |
| 213 | * |
| 214 | * @return 0 on success, negative value on error |
| 215 | * |
| 216 | */ |
| 217 | int usb_bam_register_wake_cb(u8 idx, |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 218 | int (*callback)(void *), void *param); |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 219 | |
| 220 | /** |
Amit Blay | 0c929f4 | 2012-12-26 12:02:29 +0200 | [diff] [blame] | 221 | * Register a callback for peer BAM reset. |
| 222 | * |
Amit Blay | 0c929f4 | 2012-12-26 12:02:29 +0200 | [diff] [blame] | 223 | * @callback - the callback function that will be called in USB |
| 224 | * driver upon a peer bam reset |
| 225 | * |
| 226 | * @param - context that the caller can supply |
| 227 | * |
| 228 | * @return 0 on success, negative value on error |
| 229 | * |
| 230 | */ |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 231 | int usb_bam_register_peer_reset_cb(int (*callback)(void *), void *param); |
Amit Blay | 0c929f4 | 2012-12-26 12:02:29 +0200 | [diff] [blame] | 232 | |
| 233 | /** |
Lena Salman | 05b544f | 2013-05-13 15:49:10 +0300 | [diff] [blame^] | 234 | * Register callbacks for start/stop of transfers. |
| 235 | * |
| 236 | * @start - the callback function that will be called in USB |
| 237 | * driver to start transfers |
| 238 | * @stop - the callback function that will be called in USB |
| 239 | * driver to stop transfers |
| 240 | * |
| 241 | * @param - context that the caller can supply |
| 242 | * |
| 243 | * @return 0 on success, negative value on error |
| 244 | * |
| 245 | */ |
| 246 | int usb_bam_register_start_stop_cbs( |
| 247 | void (*start)(void *, enum usb_bam_pipe_dir), |
| 248 | void (*stop)(void *, enum usb_bam_pipe_dir), |
| 249 | void *param); |
| 250 | |
| 251 | /** |
| 252 | * Start usb suspend sequence |
| 253 | * |
| 254 | * @ipa_params - in/out parameters |
| 255 | * |
| 256 | */ |
| 257 | void usb_bam_suspend(struct usb_bam_connect_ipa_params *ipa_params); |
| 258 | |
| 259 | /** |
| 260 | * Start usb resume sequence |
| 261 | * |
| 262 | * @ipa_params - in/out parameters |
| 263 | * |
| 264 | */ |
| 265 | void usb_bam_resume(struct usb_bam_connect_ipa_params *ipa_params); |
| 266 | /** |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 267 | * Disconnect USB-to-Periperal SPS connection. |
| 268 | * |
| 269 | * @idx - Connection index. |
| 270 | * |
| 271 | * @return 0 on success, negative value on error |
| 272 | */ |
| 273 | int usb_bam_disconnect_pipe(u8 idx); |
| 274 | |
| 275 | /** |
| 276 | * Returns usb bam connection parameters. |
| 277 | * |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 278 | * @idx - Connection index. |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 279 | * |
| 280 | * @usb_bam_handle - Usb bam handle. |
| 281 | * |
| 282 | * @usb_bam_pipe_idx - Usb bam pipe index. |
| 283 | * |
| 284 | * @peer_pipe_idx - Peer pipe index. |
| 285 | * |
| 286 | * @desc_fifo - Descriptor fifo parameters. |
| 287 | * |
| 288 | * @data_fifo - Data fifo parameters. |
| 289 | * |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 290 | * @return pipe index on success, negative value on error. |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 291 | */ |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 292 | int get_bam2bam_connection_info(u8 idx, |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 293 | u32 *usb_bam_handle, u32 *usb_bam_pipe_idx, u32 *peer_pipe_idx, |
| 294 | struct sps_mem_buffer *desc_fifo, struct sps_mem_buffer *data_fifo); |
| 295 | |
Amit Blay | 0c929f4 | 2012-12-26 12:02:29 +0200 | [diff] [blame] | 296 | /** |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 297 | * Resets the USB BAM that has A2 pipes |
Amit Blay | 0c929f4 | 2012-12-26 12:02:29 +0200 | [diff] [blame] | 298 | * |
| 299 | */ |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 300 | int usb_bam_a2_reset(void); |
Amit Blay | 0c929f4 | 2012-12-26 12:02:29 +0200 | [diff] [blame] | 301 | |
| 302 | /** |
| 303 | * Indicates if the client of the USB BAM is ready to start |
| 304 | * sending/receiving transfers. |
| 305 | * |
| 306 | * @ready - TRUE to enable, FALSE to disable. |
| 307 | * |
| 308 | */ |
| 309 | int usb_bam_client_ready(bool ready); |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 310 | /** |
| 311 | * Returns qdss index from the connections array. |
| 312 | * |
| 313 | * @num - The qdss pipe number. |
| 314 | * |
| 315 | * @return pipe index on success, negative value on error |
| 316 | */ |
| 317 | int usb_bam_get_qdss_idx(u8 num); |
| 318 | |
| 319 | /** |
| 320 | * Saves qdss core number. |
| 321 | * |
| 322 | * @qdss_core - The qdss core name. |
| 323 | */ |
| 324 | void usb_bam_set_qdss_core(const char *qdss_core); |
| 325 | |
| 326 | /** |
| 327 | * Indicates if the client of the USB BAM is ready to start |
| 328 | * sending/receiving transfers. |
| 329 | * |
| 330 | * @name - Core name (ssusb/hsusb/hsic). |
| 331 | * |
| 332 | * @client - Usb pipe peer (a2, ipa, qdss...) |
| 333 | * |
| 334 | * @dir - In (from peer to usb) or out (from usb to peer) |
| 335 | * |
| 336 | * @num - Pipe number. |
| 337 | * |
| 338 | * @return 0 on success, negative value on error |
| 339 | */ |
| 340 | int usb_bam_get_connection_idx(const char *name, enum peer_bam client, |
| 341 | enum usb_bam_pipe_dir dir, u32 num); |
Amit Blay | 0c929f4 | 2012-12-26 12:02:29 +0200 | [diff] [blame] | 342 | |
Ofir Cohen | c7827e4 | 2011-12-13 20:10:01 +0200 | [diff] [blame] | 343 | #else |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 344 | static inline int usb_bam_connect(u8 idx, u32 *bam_pipe_idx) |
Amit Blay | e5bb35e | 2012-05-08 20:38:20 +0300 | [diff] [blame] | 345 | { |
| 346 | return -ENODEV; |
| 347 | } |
| 348 | |
Ofir Cohen | ce5e3f2 | 2012-11-16 15:47:40 +0200 | [diff] [blame] | 349 | static inline int usb_bam_connect_ipa( |
| 350 | struct usb_bam_connect_ipa_params *ipa_params) |
| 351 | { |
| 352 | return -ENODEV; |
| 353 | } |
| 354 | |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 355 | static inline int usb_bam_disconnect_ipa( |
Ofir Cohen | ce5e3f2 | 2012-11-16 15:47:40 +0200 | [diff] [blame] | 356 | struct usb_bam_connect_ipa_params *ipa_params) |
| 357 | { |
| 358 | return -ENODEV; |
| 359 | } |
| 360 | |
Lena Salman | 05b544f | 2013-05-13 15:49:10 +0300 | [diff] [blame^] | 361 | static inline void usb_bam_wait_for_cons_granted( |
| 362 | struct usb_bam_connect_ipa_params *ipa_params) |
| 363 | { |
| 364 | return; |
| 365 | } |
| 366 | |
Amit Blay | e5bb35e | 2012-05-08 20:38:20 +0300 | [diff] [blame] | 367 | static inline int usb_bam_register_wake_cb(u8 idx, |
| 368 | int (*callback)(void *), void* param) |
Ofir Cohen | c7827e4 | 2011-12-13 20:10:01 +0200 | [diff] [blame] | 369 | { |
| 370 | return -ENODEV; |
| 371 | } |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 372 | |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 373 | static inline int usb_bam_register_peer_reset_cb( |
| 374 | int (*callback)(void *), void *param) |
Amit Blay | 0c929f4 | 2012-12-26 12:02:29 +0200 | [diff] [blame] | 375 | { |
| 376 | return -ENODEV; |
| 377 | } |
| 378 | |
Lena Salman | 05b544f | 2013-05-13 15:49:10 +0300 | [diff] [blame^] | 379 | static inline int usb_bam_register_start_stop_cbs( |
| 380 | void (*start)(void *, enum usb_bam_pipe_dir), |
| 381 | void (*stop)(void *, enum usb_bam_pipe_dir), |
| 382 | void *param) |
| 383 | { |
| 384 | return -ENODEV; |
| 385 | } |
| 386 | |
| 387 | static inline void usb_bam_suspend( |
| 388 | struct usb_bam_connect_ipa_params *ipa_params){} |
| 389 | |
| 390 | static inline void usb_bam_resume( |
| 391 | struct usb_bam_connect_ipa_params *ipa_params) {} |
| 392 | |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 393 | static inline int usb_bam_disconnect_pipe(u8 idx) |
| 394 | { |
| 395 | return -ENODEV; |
| 396 | } |
| 397 | |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 398 | static inline int get_bam2bam_connection_info(u8 idx, |
| 399 | u32 *usb_bam_handle, u32 *usb_bam_pipe_idx, u32 *peer_pipe_idx, |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 400 | struct sps_mem_buffer *desc_fifo, struct sps_mem_buffer *data_fifo) |
| 401 | { |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 402 | return -ENODEV; |
Shimrit Malichi | 255b534 | 2012-08-02 21:01:43 +0300 | [diff] [blame] | 403 | } |
Amit Blay | 0c929f4 | 2012-12-26 12:02:29 +0200 | [diff] [blame] | 404 | |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 405 | static inline int usb_bam_a2_reset(void) |
Amit Blay | 0c929f4 | 2012-12-26 12:02:29 +0200 | [diff] [blame] | 406 | { |
| 407 | return -ENODEV; |
| 408 | } |
| 409 | |
| 410 | static inline int usb_bam_client_ready(bool ready) |
| 411 | { |
| 412 | return -ENODEV; |
| 413 | } |
| 414 | |
Shimrit Malichi | dbf43d7 | 2013-03-16 03:32:27 +0200 | [diff] [blame] | 415 | static inline int usb_bam_get_qdss_idx(u8 num) |
| 416 | { |
| 417 | return -ENODEV; |
| 418 | } |
| 419 | |
| 420 | static inline void usb_bam_set_qdss_core(const char *qdss_core) |
| 421 | { |
| 422 | return; |
| 423 | } |
| 424 | |
| 425 | static inline int usb_bam_get_connection_idx(const char *name, |
| 426 | enum peer_bam client, enum usb_bam_pipe_dir dir, u32 num) |
| 427 | { |
| 428 | return -ENODEV; |
| 429 | } |
Ofir Cohen | c7827e4 | 2011-12-13 20:10:01 +0200 | [diff] [blame] | 430 | #endif |
| 431 | #endif /* _USB_BAM_H_ */ |