blob: 583908714b956b619fb60e50dfba32f745ae4fb6 [file] [log] [blame]
Harini Jayaramanef7805f2011-09-28 12:45:31 -06001/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
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 __MSM_BUSPM_DEV_H__
14#define __MSM_BUSPM_DEV_H__
15
16#include <linux/ioctl.h>
17
18struct msm_buspm_map_dev {
19 void *vaddr;
20 unsigned long paddr;
21 size_t buflen;
22};
23
24/* Read/write data into kernel buffer */
25struct buspm_xfer_req {
26 int size; /* Size of this request, in bytes */
27 void *data; /* Data buffer to transfer data to/from */
28};
29
30struct buspm_alloc_params {
31 int size;
32};
33
34#define MSM_BUSPM_IOC_MAGIC 'p'
35
36#define MSM_BUSPM_IOC_FREE \
37 _IOW(MSM_BUSPM_IOC_MAGIC, 0, void *)
38
39#define MSM_BUSPM_IOC_ALLOC \
40 _IOW(MSM_BUSPM_IOC_MAGIC, 1, size_t)
41
42#define MSM_BUSPM_IOC_RDBUF \
43 _IOW(MSM_BUSPM_IOC_MAGIC, 2, struct buspm_xfer_req)
44
45#define MSM_BUSPM_IOC_WRBUF \
46 _IOW(MSM_BUSPM_IOC_MAGIC, 3, struct buspm_xfer_req)
47
48#define MSM_BUSPM_IOC_RD_PHYS_ADDR \
49 _IOR(MSM_BUSPM_IOC_MAGIC, 4, unsigned long)
50#endif