blob: e0d7a208760ddfd5170e41ec3a4ab7bb5ba109d5 [file] [log] [blame]
Matt Wagantallb3fe8992011-12-07 19:26:55 -08001/*
2 * Copyright (c) 2012, Code Aurora Forum. All rights reserved.
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
16struct regulator;
17struct clk;
18struct pil_device;
19struct pil_desc;
20struct platform_device;
21
22struct q6v5_data {
23 void __iomem *reg_base;
Matt Wagantalld41ce772012-05-10 23:16:41 -070024 struct clk *xo;
25 struct clk *bus_clk;
26 struct clk *core_clk;
Matt Wagantall4e2599e2012-03-21 22:31:35 -070027 struct clk *mem_clk;
Matt Wagantallc2bbdc32012-03-21 19:44:50 -070028 void __iomem *axi_halt_base;
Matt Wagantallb3fe8992011-12-07 19:26:55 -080029 void __iomem *rmb_base;
Matt Wagantall4e2599e2012-03-21 22:31:35 -070030 void __iomem *restart_reg;
Matt Wagantallb3fe8992011-12-07 19:26:55 -080031 unsigned long start_addr;
32 struct regulator *vreg;
Matt Wagantalld41ce772012-05-10 23:16:41 -070033 bool is_booted;
Matt Wagantallb3fe8992011-12-07 19:26:55 -080034 int self_auth;
Matt Wagantallb3fe8992011-12-07 19:26:55 -080035 struct pil_device *pil;
36};
37
38int pil_q6v5_make_proxy_votes(struct pil_desc *pil);
39void pil_q6v5_remove_proxy_votes(struct pil_desc *pil);
Matt Wagantallb7747992012-05-11 19:37:51 -070040void pil_q6v5_halt_axi_port(struct pil_desc *pil, void __iomem *halt_base);
Matt Wagantallb3fe8992011-12-07 19:26:55 -080041int pil_q6v5_init_image(struct pil_desc *pil, const u8 *metadata,
42 size_t size);
43void pil_q6v5_shutdown(struct pil_desc *pil);
44int pil_q6v5_reset(struct pil_desc *pil);
Matt Wagantalld41ce772012-05-10 23:16:41 -070045int pil_q6v5_enable_clks(struct pil_desc *pil);
46void pil_q6v5_disable_clks(struct pil_desc *pil);
Matt Wagantallb3fe8992011-12-07 19:26:55 -080047struct pil_desc *pil_q6v5_init(struct platform_device *pdev);
48
49#endif