2 * TI Wakeup M3 for AMx3 SoCs Power Management Routines
4 * Copyright (C) 2015 Texas Instruments Incorporated - https://www.ti.com/
5 * Dave Gerlach <d-gerlach@ti.com>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation version 2.
11 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
12 * kind, whether express or implied; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
17 #ifndef _LINUX_WKUP_M3_IPC_H
18 #define _LINUX_WKUP_M3_IPC_H
20 #define WKUP_M3_DEEPSLEEP 1
21 #define WKUP_M3_STANDBY 2
22 #define WKUP_M3_IDLE 3
24 #include <linux/mailbox_client.h>
26 struct wkup_m3_ipc_ops;
31 void __iomem *ipc_mem_base;
35 unsigned long resume_addr;
41 unsigned long volt_scale_offsets;
42 const char *sd_fw_name;
44 struct completion sync_complete;
45 struct mbox_client mbox_client;
46 struct mbox_chan *mbox;
48 struct wkup_m3_ipc_ops *ops;
50 struct dentry *dbg_path;
53 struct wkup_m3_wakeup_src {
58 struct wkup_m3_scale_data_header {
64 struct wkup_m3_ipc_ops {
65 void (*set_mem_type)(struct wkup_m3_ipc *m3_ipc, int mem_type);
66 void (*set_resume_address)(struct wkup_m3_ipc *m3_ipc, void *addr);
67 int (*prepare_low_power)(struct wkup_m3_ipc *m3_ipc, int state);
68 int (*finish_low_power)(struct wkup_m3_ipc *m3_ipc);
69 int (*request_pm_status)(struct wkup_m3_ipc *m3_ipc);
70 const char *(*request_wake_src)(struct wkup_m3_ipc *m3_ipc);
71 void (*set_rtc_only)(struct wkup_m3_ipc *m3_ipc);
74 struct wkup_m3_ipc *wkup_m3_ipc_get(void);
75 void wkup_m3_ipc_put(struct wkup_m3_ipc *m3_ipc);
76 void wkup_m3_set_rtc_only_mode(void);
77 #endif /* _LINUX_WKUP_M3_IPC_H */