xref: /linux/drivers/net/wireless/ath/ath10k/ahb.h (revision 14854bfd9daaa20778db64f224a957c2abaab6fe)
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 	struct reset_control *core_cold_rst;
34 	struct reset_control *radio_cold_rst;
35 	struct reset_control *radio_warm_rst;
36 	struct reset_control *radio_srif_rst;
37 	struct reset_control *cpu_init_rst;
38 };
39 
40 #ifdef CONFIG_ATH10K_AHB
41 
42 int ath10k_ahb_init(void);
43 void ath10k_ahb_exit(void);
44 
45 #else /* CONFIG_ATH10K_AHB */
46 
47 static inline int ath10k_ahb_init(void)
48 {
49 	return 0;
50 }
51 
52 static inline void ath10k_ahb_exit(void)
53 {
54 }
55 
56 #endif /* CONFIG_ATH10K_AHB */
57 
58 #endif /* _AHB_H_ */
59