Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* 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 | #ifndef __ARCH_ARM_MACH_MSM_SPM_DEVICES_H |
| 13 | #define __ARCH_ARM_MACH_MSM_SPM_DEVICES_H |
| 14 | |
| 15 | #include "spm.h" |
| 16 | |
| 17 | struct msm_spm_driver_data { |
| 18 | void __iomem *reg_base_addr; |
| 19 | uint32_t vctl_timeout_us; |
Maheshkumar Sivasubramanian | 059e091 | 2011-09-29 12:56:39 -0600 | [diff] [blame] | 20 | uint32_t reg_shadow[MSM_SPM_REG_NR]; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 21 | uint32_t *reg_seq_entry_shadow; |
| 22 | }; |
| 23 | |
| 24 | int msm_spm_drv_init(struct msm_spm_driver_data *dev, |
| 25 | struct msm_spm_platform_data *data); |
| 26 | int msm_spm_drv_set_low_power_mode(struct msm_spm_driver_data *dev, |
| 27 | uint32_t addr); |
| 28 | int msm_spm_drv_set_vdd(struct msm_spm_driver_data *dev, |
| 29 | unsigned int vlevel); |
| 30 | int msm_spm_drv_write_seq_data(struct msm_spm_driver_data *dev, |
| 31 | uint8_t *cmd, uint32_t offset); |
| 32 | void msm_spm_drv_flush_seq_entry(struct msm_spm_driver_data *dev); |
| 33 | int msm_spm_drv_set_spm_enable(struct msm_spm_driver_data *dev, |
| 34 | bool enable); |
| 35 | |
| 36 | #endif |