blob: f8b311c355944976580188ac4376d6ba74c92beb [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/*
Praveen Chidambaram5e614112012-11-08 17:53:34 -07002 * Copyright (c) 2009,2012, The Linux Foundation. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07003 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#ifndef AVS_H
15#define AVS_H
16
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070017#ifdef CONFIG_MSM_AVS_HW
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070018u32 avs_get_avscsr(void);
Praveen Chidambaram5e614112012-11-08 17:53:34 -070019void avs_set_avscsr(u32 avscsr);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070020u32 avs_get_avsdscr(void);
Praveen Chidambaram5e614112012-11-08 17:53:34 -070021void avs_set_avsdscr(u32 avsdscr);
22void avs_disable(int cpu);
23void avs_enable(int cpu, u32 avsdscr);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070024#else
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070025static inline u32 avs_get_avscsr(void)
26{ return 0; }
Praveen Chidambaram5e614112012-11-08 17:53:34 -070027static inline void avs_set_avscsr(u32 avscsr) {}
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070028static inline u32 avs_get_avsdscr(void)
29{ return 0; }
Praveen Chidambaram5e614112012-11-08 17:53:34 -070030static inline void avs_set_avsdscr(u32 avsdscr) {}
31static inline void avs_disable(int cpu) {}
32static inline void avs_enable(int cpu, u32 avsdscr) {}
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070033#endif
34
Praveen Chidambaram5e614112012-11-08 17:53:34 -070035#define AVS_DISABLE(cpu) avs_disable(cpu)
36#define AVS_ENABLE(cpu, x) avs_enable(cpu, x)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070037
Praveen Chidambaram5e614112012-11-08 17:53:34 -070038#endif