Larry Bassel | 1daa0f0 | 2011-12-06 15:55:58 -0800 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License version 2 and |
| 7 | * only version 2 as published by the Free Software Foundation. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | */ |
| 15 | #ifndef _FMEM_H_ |
| 16 | #define _FMEM_H_ |
| 17 | |
| 18 | struct fmem_platform_data { |
| 19 | unsigned long phys; |
| 20 | unsigned long size; |
| 21 | }; |
| 22 | |
| 23 | struct fmem_data { |
| 24 | unsigned long phys; |
| 25 | void *virt; |
| 26 | unsigned long size; |
| 27 | }; |
| 28 | |
| 29 | enum fmem_state { |
| 30 | FMEM_UNINITIALIZED = 0, |
| 31 | FMEM_C_STATE, |
| 32 | FMEM_T_STATE, |
| 33 | FMEM_O_STATE, |
| 34 | }; |
| 35 | |
Laura Abbott | 99f87d2 | 2011-12-14 16:01:54 -0800 | [diff] [blame^] | 36 | #ifdef CONFIG_QCACHE |
Larry Bassel | 1daa0f0 | 2011-12-06 15:55:58 -0800 | [diff] [blame] | 37 | struct fmem_data *fmem_get_info(void); |
| 38 | int fmem_set_state(enum fmem_state); |
| 39 | void lock_fmem_state(void); |
| 40 | void unlock_fmem_state(void); |
Laura Abbott | 99f87d2 | 2011-12-14 16:01:54 -0800 | [diff] [blame^] | 41 | #else |
| 42 | static inline struct fmem_data *fmem_get_info(void) { return NULL; } |
| 43 | static inline int fmem_set_state(enum fmem_state f) { return -ENODEV; } |
| 44 | static inline void lock_fmem_state(void) { return; } |
| 45 | static inline void unlock_fmem_state(void) { return; } |
| 46 | #endif |
| 47 | |
Larry Bassel | 1daa0f0 | 2011-12-06 15:55:58 -0800 | [diff] [blame] | 48 | |
| 49 | #endif |