From 5c753e0439a33840f1a9ca41fbee1bd40f60d7d8 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Thu, 28 Apr 2016 14:50:14 +0200 Subject: ARM: tegra: hotplug: Include missing common.h Some of the functions implemented are flagged as not having a prototype defined when building with W=1. Include the header to avoid these build warnings. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/common.h | 22 ++++++++++++++++++++++ arch/arm/mach-tegra/hotplug.c | 1 + 2 files changed, 23 insertions(+) (limited to 'arch/arm/mach-tegra') diff --git a/arch/arm/mach-tegra/common.h b/arch/arm/mach-tegra/common.h index 1f6fb808e236..4cc00e993b00 100644 --- a/arch/arm/mach-tegra/common.h +++ b/arch/arm/mach-tegra/common.h @@ -1,4 +1,26 @@ +/* + * Copyright (c) 2011, ARM Ltd. + * Copyright (c) 2013, NVIDIA Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __MACH_TEGRA_COMMON_H +#define __MACH_TEGRA_COMMON_H + extern const struct smp_operations tegra_smp_ops; extern int tegra_cpu_kill(unsigned int cpu); extern void tegra_cpu_die(unsigned int cpu); + +#endif diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c index 1b129899a277..8ec707826072 100644 --- a/arch/arm/mach-tegra/hotplug.c +++ b/arch/arm/mach-tegra/hotplug.c @@ -17,6 +17,7 @@ #include +#include "common.h" #include "sleep.h" static void (*tegra_hotplug_shutdown)(void); -- cgit From 755c47ed94a657d1bc04633349a2378dff05fa61 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Thu, 28 Apr 2016 14:52:45 +0200 Subject: ARM: tegra: cpuidle: Add missing cpuidle.h include Some of the functions implemented are flagged as not having a prototype defined when building with W=1. Include the header to avoid these build warnings and add a prototype as well as a dummy implementation for the tegra_cpuidle_pcie_irqs_in_use() function. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/cpuidle-tegra114.c | 1 + arch/arm/mach-tegra/cpuidle-tegra20.c | 1 + arch/arm/mach-tegra/cpuidle-tegra30.c | 1 + arch/arm/mach-tegra/cpuidle.h | 2 ++ 4 files changed, 5 insertions(+) (limited to 'arch/arm/mach-tegra') diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c b/arch/arm/mach-tegra/cpuidle-tegra114.c index 9157546fe68c..d3aa9be16621 100644 --- a/arch/arm/mach-tegra/cpuidle-tegra114.c +++ b/arch/arm/mach-tegra/cpuidle-tegra114.c @@ -26,6 +26,7 @@ #include #include +#include "cpuidle.h" #include "pm.h" #include "sleep.h" diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c index 7469347b1749..afcee04f2616 100644 --- a/arch/arm/mach-tegra/cpuidle-tegra20.c +++ b/arch/arm/mach-tegra/cpuidle-tegra20.c @@ -30,6 +30,7 @@ #include #include +#include "cpuidle.h" #include "flowctrl.h" #include "iomap.h" #include "irq.h" diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c index 4dbe1dae937c..c1417361e10e 100644 --- a/arch/arm/mach-tegra/cpuidle-tegra30.c +++ b/arch/arm/mach-tegra/cpuidle-tegra30.c @@ -30,6 +30,7 @@ #include #include +#include "cpuidle.h" #include "pm.h" #include "sleep.h" diff --git a/arch/arm/mach-tegra/cpuidle.h b/arch/arm/mach-tegra/cpuidle.h index c017dab60ffa..dd1624d4b294 100644 --- a/arch/arm/mach-tegra/cpuidle.h +++ b/arch/arm/mach-tegra/cpuidle.h @@ -23,8 +23,10 @@ void tegra20_cpuidle_pcie_irqs_in_use(void); int tegra30_cpuidle_init(void); int tegra114_cpuidle_init(void); void tegra_cpuidle_init(void); +void tegra_cpuidle_pcie_irqs_in_use(void); #else static inline void tegra_cpuidle_init(void) {} +static inline void tegra_cpuidle_pcie_irqs_in_use(void) {} #endif #endif -- cgit From 4f71a888c5612c70e9000403e0c6440dc3088640 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Thu, 28 Apr 2016 14:54:27 +0200 Subject: ARM: tegra: irq: Add missing irq.h include Some of the functions implemented are flagged as not having a prototype defined when building with W=1. Include the header to avoid these build warnings. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/irq.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-tegra') diff --git a/arch/arm/mach-tegra/irq.c b/arch/arm/mach-tegra/irq.c index 3b9098d27ea5..a69b22d37eed 100644 --- a/arch/arm/mach-tegra/irq.c +++ b/arch/arm/mach-tegra/irq.c @@ -29,6 +29,7 @@ #include "board.h" #include "iomap.h" +#include "irq.h" #define SGI_MASK 0xFFFF -- cgit From fa45caf2ee319fc8cb6ba5c7e6ff8cb36efc0d1a Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Thu, 28 Apr 2016 14:55:15 +0200 Subject: ARM: tegra: pm: Add tegra_cpu_do_idle() prototype When building with W=1 this function is flagged as not having a prototype defined. Add the prototype to avoid a build warning. Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/pm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-tegra') diff --git a/arch/arm/mach-tegra/pm.h b/arch/arm/mach-tegra/pm.h index 83bc87583446..717b48f22912 100644 --- a/arch/arm/mach-tegra/pm.h +++ b/arch/arm/mach-tegra/pm.h @@ -36,7 +36,7 @@ void tegra30_sleep_core_init(void); void tegra_clear_cpu_in_lp2(void); bool tegra_set_cpu_in_lp2(void); - +int tegra_cpu_do_idle(void); void tegra_idle_lp2_last(void); extern void (*tegra_tear_down_cpu)(void); -- cgit From da35cbcafad3d46daa96a6f01022f11842e8e7b6 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 22 Jun 2016 14:39:41 +0200 Subject: ARM: tegra: Remove board_init_funcs array In a configuration that enables CONFIG_UBSAN_SANITIZE_ALL, I am getting a section mismatch warning for tegra20: WARNING: arch/arm/mach-tegra/built-in.o(.data+0x6e0): Section mismatch in reference from the variable board_init_funcs to the function .init.text:paz00_init() The array is no longer useful here since there is only one entry, so we can simply call the function directly after checking of_machine_is_compatible(). This fixes the section mismatch and is easier to read. Signed-off-by: Arnd Bergmann Signed-off-by: Thierry Reding --- arch/arm/mach-tegra/tegra.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'arch/arm/mach-tegra') diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index 2378fa560a21..42d7ee9658fa 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c @@ -118,32 +118,14 @@ out: of_platform_populate(NULL, of_default_bus_match_table, NULL, parent); } -static void __init paz00_init(void) -{ - if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC)) - tegra_paz00_wifikill_init(); -} - -static struct { - char *machine; - void (*init)(void); -} board_init_funcs[] = { - { "compal,paz00", paz00_init }, -}; - static void __init tegra_dt_init_late(void) { - int i; - tegra_init_suspend(); tegra_cpuidle_init(); - for (i = 0; i < ARRAY_SIZE(board_init_funcs); i++) { - if (of_machine_is_compatible(board_init_funcs[i].machine)) { - board_init_funcs[i].init(); - break; - } - } + if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && + of_machine_is_compatible("compal,paz00")) + tegra_paz00_wifikill_init(); } static const char * const tegra_dt_board_compat[] = { -- cgit