xref: /linux/drivers/net/wireless/ath/ath10k/ahb.h (revision 8beff219c528d19c66e9d2c40fa868d7e7c2e36f)
1 /*
2  * Copyright (c) 2016 Qualcomm Atheros, Inc. All rights reserved.
3  * Copyright (c) 2015 The Linux Foundation. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 #ifndef _AHB_H_
19 #define _AHB_H_
20 
21 #include <linux/platform_device.h>
22 
23 struct ath10k_ahb {
24 	struct platform_device *pdev;
25 	void __iomem *mem;
26 	void __iomem *gcc_mem;
27 	void __iomem *tcsr_mem;
28 
29 	struct clk *cmd_clk;
30 	struct clk *ref_clk;
31 	struct clk *rtc_clk;
32 };
33 
34 #ifdef CONFIG_ATH10K_AHB
35 
36 int ath10k_ahb_init(void);
37 void ath10k_ahb_exit(void);
38 
39 #else /* CONFIG_ATH10K_AHB */
40 
41 static inline int ath10k_ahb_init(void)
42 {
43 	return 0;
44 }
45 
46 static inline void ath10k_ahb_exit(void)
47 {
48 }
49 
50 #endif /* CONFIG_ATH10K_AHB */
51 
52 #endif /* _AHB_H_ */
53