blob: b2fb7f761382997387967fa880ccc23c5c7b2f9c [file] [log] [blame]
Matt Wagantallb3fe8992011-12-07 19:26:55 -08001/*
Matt Wagantall6c515982013-01-29 14:58:43 -08002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
Matt Wagantallb3fe8992011-12-07 19:26:55 -08003 *
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 Boyd3826cd42012-07-05 17:37:53 -070016#include "peripheral-loader.h"
17
Matt Wagantallb3fe8992011-12-07 19:26:55 -080018struct regulator;
19struct clk;
20struct pil_device;
Matt Wagantallb3fe8992011-12-07 19:26:55 -080021struct platform_device;
22
23struct q6v5_data {
24 void __iomem *reg_base;
Seemanta Dutta39dd3042013-06-18 17:17:56 -070025 void __iomem *rmb_base;
Patrick Daly11ca6af2013-03-03 17:07:28 -080026 void __iomem *cxrail_bhs; /* External BHS register */
27 struct clk *xo; /* XO clock source */
28 struct clk *ahb_clk; /* PIL access to registers */
29 struct clk *axi_clk; /* CPU access to memory */
30 struct clk *core_clk; /* CPU core */
31 struct clk *reg_clk; /* CPU access registers */
32 struct clk *rom_clk; /* Boot ROM */
Matt Wagantallc2bbdc32012-03-21 19:44:50 -070033 void __iomem *axi_halt_base;
Matt Wagantall4e2599e2012-03-21 22:31:35 -070034 void __iomem *restart_reg;
Matt Wagantallb3fe8992011-12-07 19:26:55 -080035 struct regulator *vreg;
Matt Wagantall6c515982013-01-29 14:58:43 -080036 struct regulator *vreg_cx;
Matt Wagantall70315fb2012-12-03 16:33:28 -080037 struct regulator *vreg_mx;
Matt Wagantall6c515982013-01-29 14:58:43 -080038 struct regulator *vreg_pll;
Matt Wagantalld41ce772012-05-10 23:16:41 -070039 bool is_booted;
Stephen Boyd3826cd42012-07-05 17:37:53 -070040 struct pil_desc desc;
Seemanta Dutta39dd3042013-06-18 17:17:56 -070041 bool self_auth;
Matt Wagantallb3fe8992011-12-07 19:26:55 -080042};
43
44int pil_q6v5_make_proxy_votes(struct pil_desc *pil);
45void pil_q6v5_remove_proxy_votes(struct pil_desc *pil);
Matt Wagantallb7747992012-05-11 19:37:51 -070046void pil_q6v5_halt_axi_port(struct pil_desc *pil, void __iomem *halt_base);
Matt Wagantallb3fe8992011-12-07 19:26:55 -080047void pil_q6v5_shutdown(struct pil_desc *pil);
48int pil_q6v5_reset(struct pil_desc *pil);
Stephen Boyd3826cd42012-07-05 17:37:53 -070049struct q6v5_data *pil_q6v5_init(struct platform_device *pdev);
Matt Wagantallb3fe8992011-12-07 19:26:55 -080050
51#endif