Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 1 | /* |
Matt Wagantall | f5c44bd | 2012-10-29 12:20:07 -0700 | [diff] [blame] | 2 | * Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 3 | * |
| 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 | #ifndef __MSM_PIL_Q6V5_H |
| 14 | #define __MSM_PIL_Q6V5_H |
| 15 | |
Stephen Boyd | 3826cd4 | 2012-07-05 17:37:53 -0700 | [diff] [blame] | 16 | #include "peripheral-loader.h" |
| 17 | |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 18 | struct regulator; |
| 19 | struct clk; |
| 20 | struct pil_device; |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 21 | struct platform_device; |
| 22 | |
| 23 | struct q6v5_data { |
| 24 | void __iomem *reg_base; |
Matt Wagantall | 8c2246d | 2012-08-12 17:08:04 -0700 | [diff] [blame] | 25 | struct clk *xo; /* XO clock source */ |
| 26 | struct clk *ahb_clk; /* PIL access to registers */ |
| 27 | struct clk *axi_clk; /* CPU access to memory */ |
| 28 | struct clk *core_clk; /* CPU core */ |
| 29 | struct clk *reg_clk; /* CPU access registers */ |
| 30 | struct clk *rom_clk; /* Boot ROM */ |
Matt Wagantall | c2bbdc3 | 2012-03-21 19:44:50 -0700 | [diff] [blame] | 31 | void __iomem *axi_halt_base; |
Matt Wagantall | 4e2599e | 2012-03-21 22:31:35 -0700 | [diff] [blame] | 32 | void __iomem *restart_reg; |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 33 | struct regulator *vreg; |
Matt Wagantall | 70315fb | 2012-12-03 16:33:28 -0800 | [diff] [blame] | 34 | struct regulator *vreg_mx; |
Matt Wagantall | d41ce77 | 2012-05-10 23:16:41 -0700 | [diff] [blame] | 35 | bool is_booted; |
Stephen Boyd | 3826cd4 | 2012-07-05 17:37:53 -0700 | [diff] [blame] | 36 | struct pil_desc desc; |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 37 | }; |
| 38 | |
| 39 | int pil_q6v5_make_proxy_votes(struct pil_desc *pil); |
| 40 | void pil_q6v5_remove_proxy_votes(struct pil_desc *pil); |
Matt Wagantall | b774799 | 2012-05-11 19:37:51 -0700 | [diff] [blame] | 41 | void pil_q6v5_halt_axi_port(struct pil_desc *pil, void __iomem *halt_base); |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 42 | void pil_q6v5_shutdown(struct pil_desc *pil); |
| 43 | int pil_q6v5_reset(struct pil_desc *pil); |
Stephen Boyd | 3826cd4 | 2012-07-05 17:37:53 -0700 | [diff] [blame] | 44 | struct q6v5_data *pil_q6v5_init(struct platform_device *pdev); |
Matt Wagantall | b3fe899 | 2011-12-07 19:26:55 -0800 | [diff] [blame] | 45 | |
| 46 | #endif |