linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 17/51] ARM: OMAP: convert reset to use arm_arch_reset
Date: Fri, 28 Oct 2011 15:43:45 +0100	[thread overview]
Message-ID: <1319813059-8914-18-git-send-email-will.deacon@arm.com> (raw)
In-Reply-To: <1319813059-8914-1-git-send-email-will.deacon@arm.com>

From: Paul Walmsley <paul@pwsan.com>

Align the OMAP reset code with Will Deacon's "ARM: reset: introduce
arm_arch_reset function pointer" cleanup patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
 arch/arm/mach-omap1/board-voiceblue.c    |    2 +-
 arch/arm/mach-omap1/io.c                 |    4 ++++
 arch/arm/mach-omap1/reset.c              |    2 --
 arch/arm/mach-omap2/io.c                 |    7 ++++++-
 arch/arm/mach-omap2/prcm.c               |    4 +---
 arch/arm/plat-omap/include/plat/system.h |    6 +++++-
 6 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 036edc0e..e2a24a0 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -296,7 +296,7 @@ static void __init voiceblue_init(void)
 	omap_writeb(0x00, OMAP_LPG1_LCR);
 	omap_writeb(0x00, OMAP_LPG1_PMR);	/* Disable clock */
 
-	arch_reset = voiceblue_reset;
+	arm_arch_reset = voiceblue_reset;
 }
 
 MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index 870886a..d3b54da 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -15,8 +15,10 @@
 
 #include <asm/tlb.h>
 #include <asm/mach/map.h>
+#include <asm/system.h>
 #include <plat/mux.h>
 #include <plat/tc.h>
+#include <plat/system.h>
 
 #include "clock.h"
 
@@ -140,6 +142,8 @@ void __init omap1_init_common_hw(void)
 	omap1_clk_init();
 
 	omap1_mux_init();
+
+	arm_arch_reset = omap1_arch_reset;
 }
 
 /*
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c
index ad951ee..a5ed979 100644
--- a/arch/arm/mach-omap1/reset.c
+++ b/arch/arm/mach-omap1/reset.c
@@ -21,5 +21,3 @@ void omap1_arch_reset(char mode, const char *cmd)
 
 	omap_writew(1, ARM_RSTCT1);
 }
-
-void (*arch_reset)(char, const char *) = omap1_arch_reset;
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 2ce1ce6..b94e1a2 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -31,6 +31,7 @@
 #include <plat/sram.h>
 #include <plat/sdrc.h>
 #include <plat/serial.h>
+#include <plat/system.h>
 
 #include "clock2xxx.h"
 #include "clock3xxx.h"
@@ -44,6 +45,8 @@
 #include <plat/omap_hwmod.h>
 #include <plat/multi.h>
 
+#include "prcm-common.h"
+
 /*
  * The machine specific code may provide the extra mapping besides the
  * default mapping provided here.
@@ -358,7 +361,9 @@ void __init omap2_init_common_infrastructure(void)
 		omap44xx_hwmod_init();
 	} else {
 		pr_err("Could not init hwmod data - unknown SoC\n");
-        }
+	}
+
+	arm_arch_reset = omap_prcm_arch_reset;
 
 	/* Set the default postsetup state for all hwmods */
 #ifdef CONFIG_PM_RUNTIME
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 2e40a5c..ad3ac5c 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -58,7 +58,7 @@ u32 omap_prcm_get_reset_sources(void)
 EXPORT_SYMBOL(omap_prcm_get_reset_sources);
 
 /* Resets clock rates and reboots the system. Only called from system.h */
-static void omap_prcm_arch_reset(char mode, const char *cmd)
+void omap_prcm_arch_reset(char mode, const char *cmd)
 {
 	s16 prcm_offs = 0;
 
@@ -109,8 +109,6 @@ static void omap_prcm_arch_reset(char mode, const char *cmd)
 	omap2_prm_read_mod_reg(prcm_offs, OMAP2_RM_RSTCTRL); /* OCP barrier */
 }
 
-void (*arch_reset)(char, const char *) = omap_prcm_arch_reset;
-
 /**
  * omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness
  * @reg: physical address of module IDLEST register
diff --git a/arch/arm/plat-omap/include/plat/system.h b/arch/arm/plat-omap/include/plat/system.h
index c5fa9e9..ac32d88 100644
--- a/arch/arm/plat-omap/include/plat/system.h
+++ b/arch/arm/plat-omap/include/plat/system.h
@@ -12,6 +12,10 @@ static inline void arch_idle(void)
 	cpu_do_idle();
 }
 
-extern void (*arch_reset)(char, const char *);
+/* To be removed in a future ARM-wide cleanup */
+static inline void arch_reset(char mode, const char *cmd) {}
+
+extern void omap1_arch_reset(char mode, const char *cmd);
+extern void omap_prcm_arch_reset(char mode, const char *cmd);
 
 #endif
-- 
1.7.4.1

  parent reply	other threads:[~2011-10-28 14:43 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 14:43 [PATCH 00/51] Remove inline arch_reset definitions from system.h Will Deacon
2011-10-28 14:43 ` [PATCH 01/51] ARM: reset: introduce arm_arch_reset function pointer Will Deacon
2011-10-28 21:38   ` Jean-Christophe PLAGNIOL-VILLARD
2011-10-29 13:59     ` Will Deacon
2011-10-29 10:21   ` Russell King - ARM Linux
2011-10-29 13:56     ` Will Deacon
2011-10-29 20:05       ` Russell King - ARM Linux
2011-10-30 21:07         ` Will Deacon
2011-10-31 12:06       ` Russell King - ARM Linux
2011-10-31 13:53         ` Will Deacon
2011-11-01 18:05         ` Will Deacon
2011-10-31 14:13       ` Russell King - ARM Linux
2011-10-31 14:26         ` Jamie Iles
2011-10-31 14:33           ` Russell King - ARM Linux
2011-10-31 14:33         ` Rabin Vincent
2011-10-31 14:39           ` Russell King - ARM Linux
2011-10-31 14:44             ` Rabin Vincent
2011-10-31 14:56               ` Russell King - ARM Linux
2011-10-31 14:37         ` Will Deacon
2011-10-31 22:15           ` Russell King - ARM Linux
2011-11-01 12:40             ` Will Deacon
2011-11-01 13:01               ` Russell King - ARM Linux
2011-10-31 22:43       ` Nicolas Pitre
2011-10-28 14:43 ` [PATCH 02/51] ARM: mach-at91: use arm_arch_reset instead of arch_reset Will Deacon
2011-10-28 14:43 ` [PATCH 03/51] ARM: bcmring: " Will Deacon
2011-10-28 14:43 ` [PATCH 04/51] ARM: mach-clps711x: " Will Deacon
2011-10-28 14:43 ` [PATCH 05/51] ARM: cns3xxx: " Will Deacon
2011-10-28 14:43 ` [PATCH 06/51] ARM: mach-davinci: " Will Deacon
2011-10-28 14:43 ` [PATCH 07/51] ARM: mach-dove: " Will Deacon
2011-10-28 14:43 ` [PATCH 08/51] ARM: mach-ebsa110: " Will Deacon
2011-10-28 14:43 ` [PATCH 09/51] ARM: mach-ep93xx: " Will Deacon
2011-10-28 14:43 ` [PATCH 10/51] ARM: mach-footbridge: " Will Deacon
2011-10-28 14:43 ` [PATCH 11/51] ARM: mach-gemini: " Will Deacon
2011-10-28 14:43 ` [PATCH 12/51] ARM: mach-h720x: " Will Deacon
2011-10-28 14:43 ` [PATCH 13/51] ARM: mach-integrator: " Will Deacon
2011-10-28 14:43 ` [PATCH 14/51] ARM: mach-iop13xx: " Will Deacon
2011-10-28 14:43 ` [PATCH 15/51] ARM: mach-iop32x: " Will Deacon
2011-10-28 14:43 ` [PATCH 16/51] ARM: mach-iop33x: " Will Deacon
2011-10-28 14:43 ` Will Deacon [this message]
2011-10-28 14:43 ` [PATCH 18/51] ARM: mach-ixp2000: " Will Deacon
2011-10-28 14:43 ` [PATCH 19/51] ARM: mach-ixp23xx: " Will Deacon
2011-10-28 14:43 ` [PATCH 20/51] ARM: mach-ixp4xx: " Will Deacon
2011-10-28 14:43 ` [PATCH 21/51] ARM: mach-kirkwood: " Will Deacon
2011-10-28 14:43 ` [PATCH 22/51] ARM: mach-ks8695: " Will Deacon
2011-10-28 14:43 ` [PATCH 23/51] ARM: mach-lpc32xx: " Will Deacon
2011-10-28 14:43 ` [PATCH 24/51] ARM: mach-mmp: " Will Deacon
2011-10-28 14:43 ` [PATCH 25/51] ARM: mach-mv78xx0: " Will Deacon
2011-10-28 14:43 ` [PATCH 26/51] ARM: mach-msm: " Will Deacon
2011-10-28 14:43 ` [PATCH 27/51] ARM: mach-mxs: " Will Deacon
2011-10-28 14:43 ` [PATCH 28/51] ARM: mach-netx: " Will Deacon
2011-10-28 14:43 ` [PATCH 29/51] ARM: mach-nomadik: " Will Deacon
2011-10-28 14:43 ` [PATCH 30/51] ARM: mach-nuc93x: " Will Deacon
2011-10-28 14:43 ` [PATCH 31/51] ARM: mach-orion5x: " Will Deacon
2011-10-28 14:44 ` [PATCH 32/51] ARM: mach-pnx4008: " Will Deacon
2011-10-28 14:44 ` [PATCH 33/51] ARM: mach-prima2: " Will Deacon
2011-10-29  9:41   ` Barry Song
2011-10-29 13:58     ` Will Deacon
2011-10-28 14:44 ` [PATCH 34/51] ARM: mach-pxa: " Will Deacon
2011-10-28 22:12   ` Marek Vasut
2011-10-28 14:44 ` [PATCH 35/51] ARM: mach-realview: " Will Deacon
2011-10-28 14:44 ` [PATCH 36/51] ARM: mach-rpc: " Will Deacon
2011-10-28 14:44 ` [PATCH 37/51] ARM: mach-s3c64xx: " Will Deacon
2011-10-28 14:44 ` [PATCH 38/51] ARM: mach-sa1100: " Will Deacon
2011-10-28 14:44 ` [PATCH 39/51] ARM: mach-shark: " Will Deacon
2011-10-28 14:44 ` [PATCH 40/51] ARM: mach-shmobile: " Will Deacon
2011-10-28 14:44 ` [PATCH 41/51] ARM: mach-tegra: " Will Deacon
2011-10-28 14:44 ` [PATCH 42/51] ARM: mach-u300: " Will Deacon
2011-10-28 19:37   ` Linus Walleij
2011-10-28 14:44 ` [PATCH 43/51] ARM: mach-versatile: " Will Deacon
2011-10-28 14:44 ` [PATCH 44/51] ARM: mach-vt8500: " Will Deacon
2011-10-28 14:44 ` [PATCH 45/51] ARM: mach-w90x900: " Will Deacon
2011-10-28 14:44 ` [PATCH 46/51] ARM: plat-spear: " Will Deacon
2011-10-28 14:44 ` [PATCH 47/51] ARM: plat-tcc: " Will Deacon
2011-10-28 14:44 ` [PATCH 48/51] ARM: plat-s5p: " Will Deacon
2011-10-28 14:44 ` [PATCH 49/51] ARM: plat-mxc: " Will Deacon
2011-10-28 14:44 ` [PATCH 50/51] ARM: plat-s3c24xx: " Will Deacon
2011-10-28 14:44 ` [PATCH 51/51] ARM: reset: remove empty arch_reset definitions Will Deacon
2011-10-28 22:08 ` [PATCH 00/51] Remove inline arch_reset definitions from system.h Deepak Saxena
2011-10-28 22:14   ` Deepak Saxena

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1319813059-8914-18-git-send-email-will.deacon@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).