summaryrefstree
path: root/kernel/drivers/trace/exynos-condbg-dev.h
blob: 4d373378164d57d1f7bb81545e58f42054233017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 * drivers/trace/exynos-condbg.h
 *
 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
 *		http://www.samsung.com
 *
 * Exynos-Console-Debugger for Exynos SoC
 * This codes are based on fiq_debugger of google
 * /driver/staging/android/fiq_debugger
 *
 * Author: Hosung Kim <hosung0.kim@samsung.com>
 *         Changki Kim <changki.kim@samsung.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef _CONSOLE_DEBUGGER_H_
#define _CONSOLE_DEBUGGER_H_

#include <linux/serial_core.h>

#define DEBUGGER_NO_CHAR NO_POLL_CHAR
#define DEBUGGER_BREAK 0x00ff0100

/**
 * struct ecd_pdata - exynos console debugger platform data
 * @uart_resume:	used to restore uart state right
 * @uart_enable:	Do the work necessary to communicate with the uart
 *			hw (enable clocks, etc.). This must be ref-counted.
 * @uart_disable:	Do the work necessary to disable the uart hw
 *			(disable clocks, etc.). This must be ref-counted.
 * @uart_dev_suspend:	called during PM suspend, generally not needed
 *			in debug state.
 * @uart_dev_resume:	called during PM resume, generally not needed
 *			in debug state
 */
struct ecd_pdata {
	int (*uart_init)(struct platform_device *pdev);
	void (*uart_free)(struct platform_device *pdev);
	int (*uart_resume)(struct platform_device *pdev);
	int (*uart_getc)(struct platform_device *pdev);
	void (*uart_putc)(struct platform_device *pdev, unsigned int c);
	void (*uart_flush)(struct platform_device *pdev);
	void (*uart_enable)(struct platform_device *pdev);
	void (*uart_disable)(struct platform_device *pdev);
	void (*uart_clear_rxfifo)(struct platform_device *pdev);

	int (*uart_dev_suspend)(struct platform_device *pdev);
	int (*uart_dev_resume)(struct platform_device *pdev);

	void (*force_irq)(struct platform_device *pdev, unsigned int irq);
	void (*force_irq_ack)(struct platform_device *pdev, unsigned int irq);
};

extern bool initial_no_firmware;
#endif