blob: c6c8fc9264b9e3dd4e206ff72da9b4619a6168a1 [file] [log] [blame]
Mona Hossain6a476362013-03-06 17:00:47 -08001/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
Mona Hossaind44a3842012-10-15 09:41:35 -07002 *
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 __QSEECOM_KERNEL_H_
14#define __QSEECOM_KERNEL_H_
15
16#include <linux/types.h>
Mona Hossain6a476362013-03-06 17:00:47 -080017
18#define QSEECOM_ALIGN_SIZE 0x40
19#define QSEECOM_ALIGN_MASK (QSEECOM_ALIGN_SIZE - 1)
20#define QSEECOM_ALIGN(x) \
21 ((x + QSEECOM_ALIGN_SIZE) & (~QSEECOM_ALIGN_MASK))
22
Mona Hossaind44a3842012-10-15 09:41:35 -070023/*
24 * struct qseecom_handle -
25 * Handle to the qseecom device for kernel clients
26 * @sbuf - shared buffer pointer
27 * @sbbuf_len - shared buffer size
28 */
29struct qseecom_handle {
30 void *dev; /* in/out */
31 unsigned char *sbuf; /* in/out */
32 uint32_t sbuf_len; /* in/out */
33};
34
35int qseecom_start_app(struct qseecom_handle **handle,
36 char *app_name, uint32_t size);
37int qseecom_shutdown_app(struct qseecom_handle **handle);
38int qseecom_send_command(struct qseecom_handle *handle, void *send_buf,
39 uint32_t sbuf_len, void *resp_buf, uint32_t rbuf_len);
Mona Hossain91a8fc92012-11-07 19:58:30 -080040int qseecom_set_bandwidth(struct qseecom_handle *handle, bool high);
Mona Hossaind44a3842012-10-15 09:41:35 -070041
42#endif /* __QSEECOM_KERNEL_H_ */