aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/baseband-xmm-power.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /arch/arm/mach-tegra/baseband-xmm-power.h
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'arch/arm/mach-tegra/baseband-xmm-power.h')
-rw-r--r--arch/arm/mach-tegra/baseband-xmm-power.h111
1 files changed, 111 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/baseband-xmm-power.h b/arch/arm/mach-tegra/baseband-xmm-power.h
new file mode 100644
index 00000000000..0768ed191b0
--- /dev/null
+++ b/arch/arm/mach-tegra/baseband-xmm-power.h
@@ -0,0 +1,111 @@
1/*
2 * arch/arm/mach-tegra/baseband-xmm-power.h
3 *
4 * Copyright (C) 2011 NVIDIA Corporation
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef BASEBAND_XMM_POWER_H
18#define BASREBAND_XMM_POWER_H
19
20#include <linux/pm.h>
21#include <linux/suspend.h>
22
23#define VENDOR_ID 0x1519
24#define PRODUCT_ID 0x0020
25#define TEGRA_EHCI_DEVICE "/sys/devices/platform/tegra-ehci.1/ehci_power"
26
27#define XMM_MODEM_VER_1121 0x1121
28#define XMM_MODEM_VER_1130 0x1130
29
30/* shared between baseband-xmm-* modules so they can agree on same
31 * modem configuration
32 */
33extern unsigned long modem_ver;
34extern unsigned long modem_flash;
35extern unsigned long modem_pm;
36
37enum baseband_type {
38 BASEBAND_XMM,
39};
40
41struct baseband_power_platform_data {
42 enum baseband_type baseband_type;
43 struct platform_device* (*hsic_register)(void);
44 void (*hsic_unregister)(struct platform_device *);
45 union {
46 struct {
47 int mdm_reset;
48 int mdm_on;
49 int ap2mdm_ack;
50 int mdm2ap_ack;
51 int ap2mdm_ack2;
52 int mdm2ap_ack2;
53 struct platform_device *device;
54 } generic;
55 struct {
56 int bb_rst;
57 int bb_on;
58 int ipc_bb_wake;
59 int ipc_ap_wake;
60 int ipc_hsic_active;
61 int ipc_hsic_sus_req;
62 struct platform_device *hsic_device;
63 } xmm;
64 } modem;
65};
66
67enum baseband_xmm_power_work_state_t {
68 BBXMM_WORK_UNINIT,
69 BBXMM_WORK_INIT,
70 /* initialize flash modem */
71 BBXMM_WORK_INIT_FLASH_STEP1,
72 /* initialize flash (with power management support) modem */
73 BBXMM_WORK_INIT_FLASH_PM_STEP1,
74 BBXMM_WORK_INIT_FLASH_PM_VER_LT_1130_STEP1,
75 BBXMM_WORK_INIT_FLASH_PM_VER_GE_1130_STEP1,
76 /* initialize flashless (with power management support) modem */
77 BBXMM_WORK_INIT_FLASHLESS_PM_STEP1,
78 BBXMM_WORK_INIT_FLASHLESS_PM_VER_LT_1130_WAIT_IRQ,
79 BBXMM_WORK_INIT_FLASHLESS_PM_VER_LT_1130_STEP1,
80 BBXMM_WORK_INIT_FLASHLESS_PM_VER_LT_1130_STEP2,
81 BBXMM_WORK_INIT_FLASHLESS_PM_VER_GE_1130_STEP1,
82 BBXMM_WORK_INIT_FLASHLESS_PM_VER_GE_1130_STEP2,
83 BBXMM_WORK_INIT_FLASHLESS_PM_VER_GE_1130_STEP3,
84 BBXMM_WORK_INIT_FLASHLESS_PM_VER_GE_1130_STEP4,
85};
86
87struct baseband_xmm_power_work_t {
88 /* work structure must be first structure member */
89 struct work_struct work;
90 /* xmm modem state */
91 enum baseband_xmm_power_work_state_t state;
92};
93
94enum baseband_xmm_powerstate_t {
95 BBXMM_PS_UNINIT = 0,
96 BBXMM_PS_INIT = 1,
97 BBXMM_PS_L0 = 2,
98 BBXMM_PS_L0TOL2 = 3,
99 BBXMM_PS_L2 = 4,
100 BBXMM_PS_L2TOL0 = 5,
101 BBXMM_PS_L2TOL3 = 6,
102 BBXMM_PS_L3 = 7,
103 BBXMM_PS_L3TOL0 = 8,
104 BBXMM_PS_LAST = -1,
105};
106
107irqreturn_t baseband_xmm_power_ipc_ap_wake_irq(int irq, void *dev_id);
108
109void baseband_xmm_set_power_status(unsigned int status);
110
111#endif /* BASREBAND_XMM_POWER_H */