]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/blob - arch/arm/include/asm/fiq_debugger.h
FIQ: Implement WDT FIQ debugger
[sojka/nv-tegra/linux-3.10.git] / arch / arm / include / asm / fiq_debugger.h
1 /*
2  * arch/arm/include/asm/fiq_debugger.h
3  *
4  * Copyright (C) 2010 Google, Inc.
5  * Author: Colin Cross <ccross@android.com>
6  * Copyright (C) 2010-2015 NVIDIA Corporation.  All rights reserved.
7  *
8  * This software is licensed under the terms of the GNU General Public
9  * License version 2, as published by the Free Software Foundation, and
10  * may be copied, distributed, and modified under those terms.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  */
18
19 #ifndef _ARCH_ARM_MACH_TEGRA_FIQ_DEBUGGER_H_
20 #define _ARCH_ARM_MACH_TEGRA_FIQ_DEBUGGER_H_
21
22 #include <linux/serial_core.h>
23
24 #define FIQ_DEBUGGER_NO_CHAR NO_POLL_CHAR
25 #define FIQ_DEBUGGER_BREAK 0x00ff0100
26
27 #define FIQ_DEBUGGER_FIQ_IRQ_NAME       "fiq"
28 #define FIQ_DEBUGGER_SIGNAL_IRQ_NAME    "signal"
29 #define FIQ_DEBUGGER_WAKEUP_IRQ_NAME    "wakeup"
30
31 /**
32  * struct fiq_debugger_pdata - fiq debugger platform data
33  * @uart_resume:        used to restore uart state right before enabling
34  *                      the fiq.
35  * @uart_enable:        Do the work necessary to communicate with the uart
36  *                      hw (enable clocks, etc.). This must be ref-counted.
37  * @uart_disable:       Do the work necessary to disable the uart hw
38  *                      (disable clocks, etc.). This must be ref-counted.
39  * @uart_dev_suspend:   called during PM suspend, generally not needed
40  *                      for real fiq mode debugger.
41  * @uart_dev_resume:    called during PM resume, generally not needed
42  *                      for real fiq mode debugger.
43  */
44 struct fiq_debugger_pdata {
45         int (*uart_init)(struct platform_device *pdev);
46         void (*uart_free)(struct platform_device *pdev);
47         int (*uart_resume)(struct platform_device *pdev);
48         int (*uart_getc)(struct platform_device *pdev);
49         void (*uart_putc)(struct platform_device *pdev, unsigned int c);
50         void (*uart_flush)(struct platform_device *pdev);
51         void (*uart_enable)(struct platform_device *pdev);
52         void (*uart_disable)(struct platform_device *pdev);
53
54         int (*uart_dev_suspend)(struct platform_device *pdev);
55         int (*uart_dev_resume)(struct platform_device *pdev);
56
57         void (*fiq_enable)(struct platform_device *pdev, unsigned int fiq,
58                                                                 bool enable);
59         void (*fiq_ack)(struct platform_device *pdev, unsigned int fiq);
60
61         void (*force_irq)(struct platform_device *pdev, unsigned int irq);
62         void (*force_irq_ack)(struct platform_device *pdev, unsigned int irq);
63 };
64
65 #endif