* [PATCH] arm/tegra: Fix build error with tegra_assert_system_reset
@ 2011-11-23 0:53 Stephen Warren
2011-11-23 9:50 ` Russell King - ARM Linux
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2011-11-23 0:53 UTC (permalink / raw)
To: linux-arm-kernel
Build error:
error: static declaration of 'tegra_assert_system_reset' follows non-static
declaration
Fix:
Remove the non-static declaration; the function should be local now.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
arch/arm/mach-tegra/board.h | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h
index 1d14df7..f159577 100644
--- a/arch/arm/mach-tegra/board.h
+++ b/arch/arm/mach-tegra/board.h
@@ -23,8 +23,6 @@
#include <linux/types.h>
-void tegra_assert_system_reset(char mode, const char *cmd);
-
void __init tegra_init_early(void);
void __init tegra_map_common_io(void);
void __init tegra_init_irq(void);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] arm/tegra: Fix build error with tegra_assert_system_reset
2011-11-23 0:53 [PATCH] arm/tegra: Fix build error with tegra_assert_system_reset Stephen Warren
@ 2011-11-23 9:50 ` Russell King - ARM Linux
2011-11-23 16:59 ` Stephen Warren
0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2011-11-23 9:50 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Nov 22, 2011 at 05:53:51PM -0700, Stephen Warren wrote:
> Build error:
>
> error: static declaration of 'tegra_assert_system_reset' follows non-static
> declaration
>
> Fix:
>
> Remove the non-static declaration; the function should be local now.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Thanks Stephen. I'd prefer to fix this a different way, moving tegra to
use the .restart method instead. So, I'm about to merge this into the
commit which created your error.
diff --git a/arch/arm/mach-tegra/board-dt.c b/arch/arm/mach-tegra/board-dt.c
index f6f03ce..e417a83 100644
--- a/arch/arm/mach-tegra/board-dt.c
+++ b/arch/arm/mach-tegra/board-dt.c
@@ -134,5 +134,6 @@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegra (Flattened Device Tree)")
.handle_irq = gic_handle_irq,
.timer = &tegra_timer,
.init_machine = tegra_dt_init,
+ .restart = tegra_assert_system_reset,
.dt_compat = tegra_dt_board_compat,
MACHINE_END
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index fd190a8..70ee674 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -191,4 +191,5 @@ MACHINE_START(HARMONY, "harmony")
.handle_irq = gic_handle_irq,
.timer = &tegra_timer,
.init_machine = tegra_harmony_init,
+ .restart = tegra_assert_system_reset,
MACHINE_END
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 0b7e1cf..33d6205 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -194,4 +194,5 @@ MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ")
.handle_irq = gic_handle_irq,
.timer = &tegra_timer,
.init_machine = tegra_paz00_init,
+ .restart = tegra_assert_system_reset,
MACHINE_END
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c
index 7328379..c1599eb 100644
--- a/arch/arm/mach-tegra/board-seaboard.c
+++ b/arch/arm/mach-tegra/board-seaboard.c
@@ -288,6 +288,7 @@ MACHINE_START(SEABOARD, "seaboard")
.handle_irq = gic_handle_irq,
.timer = &tegra_timer,
.init_machine = tegra_seaboard_init,
+ .restart = tegra_assert_system_reset,
MACHINE_END
MACHINE_START(KAEN, "kaen")
@@ -298,6 +299,7 @@ MACHINE_START(KAEN, "kaen")
.handle_irq = gic_handle_irq,
.timer = &tegra_timer,
.init_machine = tegra_kaen_init,
+ .restart = tegra_assert_system_reset,
MACHINE_END
MACHINE_START(WARIO, "wario")
@@ -308,4 +310,5 @@ MACHINE_START(WARIO, "wario")
.handle_irq = gic_handle_irq,
.timer = &tegra_timer,
.init_machine = tegra_wario_init,
+ .restart = tegra_assert_system_reset,
MACHINE_END
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index 60a36a2..c242314 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -180,4 +180,5 @@ MACHINE_START(TRIMSLICE, "trimslice")
.handle_irq = gic_handle_irq,
.timer = &tegra_timer,
.init_machine = tegra_trimslice_init,
+ .restart = tegra_assert_system_reset,
MACHINE_END
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h
index f159577..1d14df7 100644
--- a/arch/arm/mach-tegra/board.h
+++ b/arch/arm/mach-tegra/board.h
@@ -23,6 +23,8 @@
#include <linux/types.h>
+void tegra_assert_system_reset(char mode, const char *cmd);
+
void __init tegra_init_early(void);
void __init tegra_map_common_io(void);
void __init tegra_init_irq(void);
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 1374d10..20f396d 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -31,7 +31,7 @@
#include "clock.h"
#include "fuse.h"
-static void tegra_assert_system_reset(char mode, const char *cmd)
+void tegra_assert_system_reset(char mode, const char *cmd)
{
void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04);
u32 reg;
@@ -74,7 +74,6 @@ static void __init tegra_init_cache(void)
void __init tegra_init_early(void)
{
- arm_pm_restart = tegra_assert_system_reset;
tegra_init_fuse();
tegra_init_clock();
tegra_clk_init_from_table(common_clk_init_table);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] arm/tegra: Fix build error with tegra_assert_system_reset
2011-11-23 9:50 ` Russell King - ARM Linux
@ 2011-11-23 16:59 ` Stephen Warren
2011-11-24 20:34 ` Russell King - ARM Linux
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2011-11-23 16:59 UTC (permalink / raw)
To: linux-arm-kernel
Russell King wrote at Wednesday, November 23, 2011 2:50 AM:
> On Tue, Nov 22, 2011 at 05:53:51PM -0700, Stephen Warren wrote:
> > Build error:
> >
> > error: static declaration of 'tegra_assert_system_reset' follows non-static
> > declaration
> >
> > Fix:
> >
> > Remove the non-static declaration; the function should be local now.
> >
> > Signed-off-by: Stephen Warren <swarren@nvidia.com>
>
> Thanks Stephen. I'd prefer to fix this a different way, moving tegra to
> use the .restart method instead. So, I'm about to merge this into the
> commit which created your error.
> ...
OK, I tested that and it works too.
Thanks!
--
nvpublic
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] arm/tegra: Fix build error with tegra_assert_system_reset
2011-11-23 16:59 ` Stephen Warren
@ 2011-11-24 20:34 ` Russell King - ARM Linux
2011-11-28 6:35 ` Olof Johansson
0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2011-11-24 20:34 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Nov 23, 2011 at 08:59:48AM -0800, Stephen Warren wrote:
> OK, I tested that and it works too.
Great. Here's the final patch - could I have an ack for it please?
Thanks.
8<======
ARM: restart: tegra: use new restart hook
Hook these platforms restart code into the new restart hook rather
than using arch_reset().
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/mach-tegra/board-dt.c | 1 +
arch/arm/mach-tegra/board-harmony.c | 1 +
arch/arm/mach-tegra/board-paz00.c | 1 +
arch/arm/mach-tegra/board-seaboard.c | 3 +++
arch/arm/mach-tegra/board-trimslice.c | 1 +
arch/arm/mach-tegra/common.c | 2 --
arch/arm/mach-tegra/include/mach/system.h | 6 +++---
7 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-tegra/board-dt.c b/arch/arm/mach-tegra/board-dt.c
index d368f8d..a00713c 100644
--- a/arch/arm/mach-tegra/board-dt.c
+++ b/arch/arm/mach-tegra/board-dt.c
@@ -131,5 +131,6 @@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegra (Flattened Device Tree)")
.init_irq = tegra_init_irq,
.timer = &tegra_timer,
.init_machine = tegra_dt_init,
+ .restart = tegra_assert_system_reset,
.dt_compat = tegra_dt_board_compat,
MACHINE_END
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index f0bdc5e..7eaa52d 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -189,4 +189,5 @@ MACHINE_START(HARMONY, "harmony")
.init_irq = tegra_init_irq,
.timer = &tegra_timer,
.init_machine = tegra_harmony_init,
+ .restart = tegra_assert_system_reset,
MACHINE_END
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 55c55ba..28c97e3 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -192,4 +192,5 @@ MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ")
.init_irq = tegra_init_irq,
.timer = &tegra_timer,
.init_machine = tegra_paz00_init,
+ .restart = tegra_assert_system_reset,
MACHINE_END
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c
index bf13ea3..9b2eca1 100644
--- a/arch/arm/mach-tegra/board-seaboard.c
+++ b/arch/arm/mach-tegra/board-seaboard.c
@@ -286,6 +286,7 @@ MACHINE_START(SEABOARD, "seaboard")
.init_irq = tegra_init_irq,
.timer = &tegra_timer,
.init_machine = tegra_seaboard_init,
+ .restart = tegra_assert_system_reset,
MACHINE_END
MACHINE_START(KAEN, "kaen")
@@ -295,6 +296,7 @@ MACHINE_START(KAEN, "kaen")
.init_irq = tegra_init_irq,
.timer = &tegra_timer,
.init_machine = tegra_kaen_init,
+ .restart = tegra_assert_system_reset,
MACHINE_END
MACHINE_START(WARIO, "wario")
@@ -304,4 +306,5 @@ MACHINE_START(WARIO, "wario")
.init_irq = tegra_init_irq,
.timer = &tegra_timer,
.init_machine = tegra_wario_init,
+ .restart = tegra_assert_system_reset,
MACHINE_END
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index 1a6617b..1fa9e48 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -178,4 +178,5 @@ MACHINE_START(TRIMSLICE, "trimslice")
.init_irq = tegra_init_irq,
.timer = &tegra_timer,
.init_machine = tegra_trimslice_init,
+ .restart = tegra_assert_system_reset,
MACHINE_END
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 690b888..20f396d 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -31,8 +31,6 @@
#include "clock.h"
#include "fuse.h"
-void (*arch_reset)(char mode, const char *cmd) = tegra_assert_system_reset;
-
void tegra_assert_system_reset(char mode, const char *cmd)
{
void __iomem *reset = IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x04);
diff --git a/arch/arm/mach-tegra/include/mach/system.h b/arch/arm/mach-tegra/include/mach/system.h
index 027c421..b87b8a4 100644
--- a/arch/arm/mach-tegra/include/mach/system.h
+++ b/arch/arm/mach-tegra/include/mach/system.h
@@ -21,9 +21,9 @@
#ifndef __MACH_TEGRA_SYSTEM_H
#define __MACH_TEGRA_SYSTEM_H
-#include <mach/iomap.h>
-
-extern void (*arch_reset)(char mode, const char *cmd);
+static inline void arch_reset(char mode, const char *cmd)
+{
+}
static inline void arch_idle(void)
{
--
1.7.4.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] arm/tegra: Fix build error with tegra_assert_system_reset
2011-11-24 20:34 ` Russell King - ARM Linux
@ 2011-11-28 6:35 ` Olof Johansson
0 siblings, 0 replies; 5+ messages in thread
From: Olof Johansson @ 2011-11-28 6:35 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Nov 24, 2011 at 12:34 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Wed, Nov 23, 2011 at 08:59:48AM -0800, Stephen Warren wrote:
>> OK, I tested that and it works too.
>
> Great. ?Here's the final patch - could I have an ack for it please?
>
> Thanks.
>
> 8<======
> ARM: restart: tegra: use new restart hook
>
> Hook these platforms restart code into the new restart hook rather
> than using arch_reset().
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Olof Johansson <olof@lixom.net>
(tested-by as well, but adding multiple entries seems silly)
-Olof
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-28 6:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23 0:53 [PATCH] arm/tegra: Fix build error with tegra_assert_system_reset Stephen Warren
2011-11-23 9:50 ` Russell King - ARM Linux
2011-11-23 16:59 ` Stephen Warren
2011-11-24 20:34 ` Russell King - ARM Linux
2011-11-28 6:35 ` Olof Johansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).