From patchwork Thu Jul 28 03:32:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 1014302 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6S3Xuo5015208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 28 Jul 2011 03:34:16 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QmHLy-00054A-Qu; Thu, 28 Jul 2011 03:33:43 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QmHLy-0005PP-BA; Thu, 28 Jul 2011 03:33:42 +0000 Received: from mail-gw0-f49.google.com ([74.125.83.49]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QmHL4-0005CW-5j for linux-arm-kernel@lists.infradead.org; Thu, 28 Jul 2011 03:32:47 +0000 Received: by mail-gw0-f49.google.com with SMTP id 1so2197050gwb.22 for ; Wed, 27 Jul 2011 20:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=Xmvnpte+t+tF0F5TfnpfKHRHufzyYRHYtpZOSX73PHc=; b=dXkEQ86ipMW85fuB1OQf3Sx/fak3zqqxW40zbHd8YPwVdZMNEhN32swcgzvDqJ2ZrR L7Thm8CLVxvSjzUdT+bHOSQQUx9Xox+s5SiyiowCkHrqwv/6e9ywuX6yNDtsYysXWODh 0VIthhVZFljOogK/nHR5xm9ePb8ySidTPBF+s= Received: by 10.91.159.29 with SMTP id l29mr398450ago.171.1311823965730; Wed, 27 Jul 2011 20:32:45 -0700 (PDT) Received: from rob-laptop.grandecom.net (65-36-74-215.dyn.grandenetworks.net [65.36.74.215]) by mx.google.com with ESMTPS id j20sm401787anb.0.2011.07.27.20.32.44 (version=SSLv3 cipher=OTHER); Wed, 27 Jul 2011 20:32:45 -0700 (PDT) From: 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 Message-Id: <1311823934-29553-4-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1311823934-29553-1-git-send-email-robherring2@gmail.com> References: <1311823934-29553-1-git-send-email-robherring2@gmail.com> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110727_233246_518210_C17BCA59 X-CRM114-Status: GOOD ( 12.57 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (robherring2[at]gmail.com) 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (robherring2[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service Cc: Rob Herring , nico@fluxnic.net X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 28 Jul 2011 03:34:17 +0000 (UTC) From: Rob Herring 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 --- 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.