aboutsummaryrefslogtreecommitdiff
path: root/include/soc/qcom/avs.h
blob: 358fef46f5de262b9748e6efbfbec78d68631884 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * Copyright (c) 2009,2012-2013, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef AVS_H
#define AVS_H

#ifdef CONFIG_MSM_AVS_HW
u32 avs_get_avscsr(void);
void avs_set_avscsr(u32 avscsr);
u32 avs_get_avsdscr(void);
void avs_set_avsdscr(u32 avsdscr);
void avs_disable(int cpu);
void avs_enable(int cpu, u32 avsdscr);
#else
static inline u32 avs_get_avscsr(void)
{ return 0; }
static inline void avs_set_avscsr(u32 avscsr) {}
static inline u32 avs_get_avsdscr(void)
{ return 0; }
static inline void avs_set_avsdscr(u32 avsdscr) {}
static inline void avs_disable(int cpu) {}
static inline void avs_enable(int cpu, u32 avsdscr) {}
#endif

#define AVS_DISABLE(cpu) avs_disable(cpu)
#define AVS_ENABLE(cpu, x) avs_enable(cpu, x)

#endif