From 35ddd45989e46a68a529de51a195b8af04449f05 Mon Sep 17 00:00:00 2001 From: Mikko Perttunen Date: Fri, 9 Dec 2016 15:06:19 +0200 Subject: platform: tegra: Import tegra_fiq_debugger from linux-4.4 Moving tegra_fiq_debugger driver to nvidia repo. This is a migration patch from Kernel 4.9. As the original one commit d2c919e9d698 ("platform: tegra: Import from linux-4.4") included many other files and drivers while this one only aims at the tegra_fiq_debugger, so renewing the commit log. And, since the patch (https://git-master.nvidia.com/r/1554655), commit b99e994f9bd6 ("platform: tegra: move tegra_fiq_debugger from mach-tegra"), added its header file, this patch squashes that one too. It also fixes warnings reported by checkpatch script: WARNING: Missing a blank line after declarations #95: FILE: drivers/platform/tegra/tegra_fiq_debugger.c:68: + struct tegra_fiq_debugger *t; + t = container_of(dev_get_platdata(&pdev->dev), typeof(*t), pdata); WARNING: Missing a blank line after declarations #111: FILE: drivers/platform/tegra/tegra_fiq_debugger.c:84: + struct tegra_fiq_debugger *t; + t = container_of(dev_get_platdata(&pdev->dev), typeof(*t), pdata); WARNING: Missing a blank line after declarations #129: FILE: drivers/platform/tegra/tegra_fiq_debugger.c:102: + struct tegra_fiq_debugger *t; + t = container_of(dev_get_platdata(&pdev->dev), typeof(*t), pdata); WARNING: Missing a blank line after declarations #140: FILE: drivers/platform/tegra/tegra_fiq_debugger.c:113: + struct tegra_fiq_debugger *t; + t = container_of(dev_get_platdata(&pdev->dev), typeof(*t), pdata); WARNING: Possible unnecessary 'out of memory' message #166: FILE: drivers/platform/tegra/tegra_fiq_debugger.c:139: + if (!t) { + pr_err("Failed to allocate for fiq debugger\n"); WARNING: Possible unnecessary 'out of memory' message #184: FILE: drivers/platform/tegra/tegra_fiq_debugger.c:157: + if (!res) { + pr_err("Failed to alloc fiq debugger resources\n"); WARNING: Possible unnecessary 'out of memory' message #190: FILE: drivers/platform/tegra/tegra_fiq_debugger.c:163: + if (!pdev) { + pr_err("Failed to alloc fiq debugger platform device\n"); Bug 200416212 Change-Id: Iaea87259bcda9c5a2e1a01b03d905debe52aa016 Signed-off-by: Nicolin Chen Reviewed-on: https://git-master.nvidia.com/r/1750507 GVS: Gerrit_Virtual_Submit Reviewed-by: Varun Wadekar Reviewed-by: Sachin Nikam Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/linux/tegra_fiq_debugger.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 include/linux/tegra_fiq_debugger.h (limited to 'include') diff --git a/include/linux/tegra_fiq_debugger.h b/include/linux/tegra_fiq_debugger.h new file mode 100644 index 000000000..67ca9bdaa --- /dev/null +++ b/include/linux/tegra_fiq_debugger.h @@ -0,0 +1,36 @@ +/* + * linux/arch/arm/mach-tegra/include/mach/tegra_fiq_debugger.h + * + * Copyright (C) 2010 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef __MACH_TEGRA_FIQ_DEBUGGER_H +#define __MACH_TEGRA_FIQ_DEBUGGER_H + +#ifdef CONFIG_TEGRA_FIQ_DEBUGGER +void tegra_serial_debug_init(unsigned int base, int fiq, + struct clk *clk, int signal_irq, int wakeup_irq); +void tegra_serial_debug_init_irq_mode(unsigned int base, int irq, + struct clk *clk, int signal_irq, int wakeup_irq); +#else +static inline void tegra_serial_debug_init(unsigned int base, int fiq, + struct clk *clk, int signal_irq, int wakeup_irq) +{ +} +static inline void tegra_serial_debug_init_irq_mode(unsigned int base, int irq, + struct clk *clk, int signal_irq, int wakeup_irq) +{ +} +#endif + +#endif -- cgit v1.2.2