blob: 50a17c8ad6051d40e0d9553f888e9f12b8b4f38b [file] [log] [blame]
Chris Lew3c8356762016-08-01 15:18:55 -07001/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef _RAMDUMP_HEADER
14#define _RAMDUMP_HEADER
15
16struct device;
17
18struct ramdump_segment {
19 unsigned long address;
20 void *v_address;
21 unsigned long size;
22};
23
24#ifdef CONFIG_MSM_SUBSYSTEM_RESTART
25extern void *create_ramdump_device(const char *dev_name, struct device *parent);
26extern void destroy_ramdump_device(void *dev);
27extern int do_ramdump(void *handle, struct ramdump_segment *segments,
28 int nsegments);
29extern int do_elf_ramdump(void *handle, struct ramdump_segment *segments,
30 int nsegments);
31
32#else
33static inline void *create_ramdump_device(const char *dev_name,
34 struct device *parent)
35{
36 return NULL;
37}
38
39static inline void destroy_ramdump_device(void *dev)
40{
41}
42
43static inline int do_ramdump(void *handle, struct ramdump_segment *segments,
44 int nsegments)
45{
46 return -ENODEV;
47}
48
49static inline int do_elf_ramdump(void *handle, struct ramdump_segment *segments,
50 int nsegments)
51{
52 return -ENODEV;
53}
54#endif /* CONFIG_MSM_SUBSYSTEM_RESTART */
55
56#endif