Duy Truong | 790f06d | 2013-02-13 16:38:12 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2011, The Linux Foundation. All rights reserved. |
Harini Jayaraman | ef7805f | 2011-09-28 12:45:31 -0600 | [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 __MSM_BUSPM_DEV_H__ |
| 14 | #define __MSM_BUSPM_DEV_H__ |
| 15 | |
| 16 | #include <linux/ioctl.h> |
| 17 | |
| 18 | struct msm_buspm_map_dev { |
| 19 | void *vaddr; |
| 20 | unsigned long paddr; |
| 21 | size_t buflen; |
| 22 | }; |
| 23 | |
| 24 | /* Read/write data into kernel buffer */ |
| 25 | struct buspm_xfer_req { |
| 26 | int size; /* Size of this request, in bytes */ |
| 27 | void *data; /* Data buffer to transfer data to/from */ |
| 28 | }; |
| 29 | |
| 30 | struct buspm_alloc_params { |
| 31 | int size; |
| 32 | }; |
| 33 | |
Gagan Mac | 0d5d49e | 2012-08-28 19:41:37 -0600 | [diff] [blame] | 34 | enum msm_buspm_ioc_cmds { |
| 35 | MSM_BUSPM_SPDM_CLK_DIS = 0, |
| 36 | MSM_BUSPM_SPDM_CLK_EN, |
| 37 | }; |
| 38 | |
Harini Jayaraman | ef7805f | 2011-09-28 12:45:31 -0600 | [diff] [blame] | 39 | #define MSM_BUSPM_IOC_MAGIC 'p' |
| 40 | |
| 41 | #define MSM_BUSPM_IOC_FREE \ |
| 42 | _IOW(MSM_BUSPM_IOC_MAGIC, 0, void *) |
| 43 | |
| 44 | #define MSM_BUSPM_IOC_ALLOC \ |
| 45 | _IOW(MSM_BUSPM_IOC_MAGIC, 1, size_t) |
| 46 | |
| 47 | #define MSM_BUSPM_IOC_RDBUF \ |
| 48 | _IOW(MSM_BUSPM_IOC_MAGIC, 2, struct buspm_xfer_req) |
| 49 | |
| 50 | #define MSM_BUSPM_IOC_WRBUF \ |
| 51 | _IOW(MSM_BUSPM_IOC_MAGIC, 3, struct buspm_xfer_req) |
| 52 | |
| 53 | #define MSM_BUSPM_IOC_RD_PHYS_ADDR \ |
| 54 | _IOR(MSM_BUSPM_IOC_MAGIC, 4, unsigned long) |
Gagan Mac | 0d5d49e | 2012-08-28 19:41:37 -0600 | [diff] [blame] | 55 | |
| 56 | #define MSM_BUSPM_IOC_CMD \ |
| 57 | _IOR(MSM_BUSPM_IOC_MAGIC, 5, uint32_t) |
Harini Jayaraman | ef7805f | 2011-09-28 12:45:31 -0600 | [diff] [blame] | 58 | #endif |