From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 3/3] ARM: add a default mach/system.h header
Date: Wed, 27 Jul 2011 22:32:14 -0500 [thread overview]
Message-ID: <1311823934-29553-4-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1311823934-29553-1-git-send-email-robherring2@gmail.com>
From: Rob Herring <rob.herring@calxeda.com>
This adds default implementations of arch_idle and arch_reset. Any
platform with a system.h will pickup their version of the functions.
Platforms needing custom idle and reset functions can set pm_idle and
machine_reset, respectively, to custom implementations at boot time.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/include/mach/system.h | 13 +++++++++++++
arch/arm/kernel/process.c | 5 ++++-
2 files changed, 17 insertions(+), 1 deletions(-)
create mode 100644 arch/arm/include/mach/system.h
diff --git a/arch/arm/include/mach/system.h b/arch/arm/include/mach/system.h
new file mode 100644
index 0000000..9ab0684
--- /dev/null
+++ b/arch/arm/include/mach/system.h
@@ -0,0 +1,13 @@
+#ifndef __MACH_SYSTEM_H
+#define __MACH_SYSTEM_H
+
+static inline void arch_idle(void)
+{
+ cpu_do_idle();
+}
+
+static inline void arch_reset(char mode, const char *cmd)
+{
+}
+
+#endif
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 5e1e541..b3b10bc 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -91,6 +91,9 @@ static int __init hlt_setup(char *__unused)
__setup("nohlt", nohlt_setup);
__setup("hlt", hlt_setup);
+void (*machine_reset)(char mode, const char *cmd) = arch_reset;
+EXPORT_SYMBOL(machine_reset);
+
void arm_machine_restart(char mode, const char *cmd)
{
/* Disable interrupts first */
@@ -116,7 +119,7 @@ void arm_machine_restart(char mode, const char *cmd)
/*
* Now call the architecture specific reboot code.
*/
- arch_reset(mode, cmd);
+ machine_reset(mode, cmd);
/*
* Whoops - the architecture was unable to reboot.
--
1.7.4.1
next prev parent reply other threads:[~2011-07-28 3:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-28 3:32 [RFC PATCH 0/3] ARM: Add default system.h and uncompress.h Rob Herring
2011-07-28 3:32 ` [RFC PATCH 1/3] ARM: include mach headers before common arm headers Rob Herring
2011-07-28 3:32 ` [RFC PATCH 2/3] ARM: add a default mach/uncompress.h header Rob Herring
2011-07-28 3:32 ` Rob Herring [this message]
2011-07-28 4:40 ` [RFC PATCH 0/3] ARM: Add default system.h and uncompress.h Nicolas Pitre
2011-07-28 13:53 ` Rob Herring
2011-07-28 9:52 ` Russell King - ARM Linux
2011-07-28 13:21 ` Rob Herring
2011-07-28 15:01 ` Russell King - ARM Linux
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=1311823934-29553-4-git-send-email-robherring2@gmail.com \
--to=robherring2@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.