From patchwork Fri Feb 26 10:25:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Koskinen, Aaro (Nokia - FI/Espoo)" X-Patchwork-Id: 82291 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1QAKko8015652 for ; Fri, 26 Feb 2010 10:23:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753109Ab0BZKXj (ORCPT ); Fri, 26 Feb 2010 05:23:39 -0500 Received: from smtp.nokia.com ([192.100.122.233]:60176 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752929Ab0BZKXi (ORCPT ); Fri, 26 Feb 2010 05:23:38 -0500 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o1QANCkw010964; Fri, 26 Feb 2010 12:23:34 +0200 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 26 Feb 2010 12:23:25 +0200 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 26 Feb 2010 12:23:25 +0200 Received: from localhost.localdomain (corebot.research.nokia.com [172.21.41.254]) by mgw-sa02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o1QANN0s020423; Fri, 26 Feb 2010 12:23:23 +0200 From: Aaro Koskinen To: linux-omap@vger.kernel.org, tony@atomide.com Subject: [PATCHv2] OMAP: pass the reboot command to the boot loader Date: Fri, 26 Feb 2010 12:25:28 +0200 Message-Id: <1267179928-21721-1-git-send-email-aaro.koskinen@nokia.com> X-Mailer: git-send-email 1.5.6.5 X-OriginalArrivalTime: 26 Feb 2010 10:23:25.0492 (UTC) FILETIME=[BAF91F40:01CAB6CD] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 26 Feb 2010 10:23:40 +0000 (UTC) diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index 81872aa..9537f6f 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c @@ -133,7 +133,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 */ -void omap_prcm_arch_reset(char mode) +void omap_prcm_arch_reset(char mode, const char *cmd) { s16 prcm_offs = 0; @@ -145,7 +145,7 @@ void omap_prcm_arch_reset(char mode) u32 l; prcm_offs = OMAP3430_GR_MOD; - l = ('B' << 24) | ('M' << 16) | mode; + l = ('B' << 24) | ('M' << 16) | (cmd ? (u8)*cmd : 0); /* Reserve the first word in scratchpad for communicating * with the boot ROM. A pointer to a data structure * describing the boot process can be stored there, diff --git a/arch/arm/plat-omap/include/plat/prcm.h b/arch/arm/plat-omap/include/plat/prcm.h index d6a0e27..9fbd914 100644 --- a/arch/arm/plat-omap/include/plat/prcm.h +++ b/arch/arm/plat-omap/include/plat/prcm.h @@ -24,7 +24,7 @@ #define __ASM_ARM_ARCH_OMAP_PRCM_H u32 omap_prcm_get_reset_sources(void); -void omap_prcm_arch_reset(char mode); +void omap_prcm_arch_reset(char mode, const char *cmd); int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, u8 idlest, const char *name); diff --git a/arch/arm/plat-omap/include/plat/system.h b/arch/arm/plat-omap/include/plat/system.h index c58a4ef..d0a119f 100644 --- a/arch/arm/plat-omap/include/plat/system.h +++ b/arch/arm/plat-omap/include/plat/system.h @@ -22,7 +22,7 @@ static inline void arch_idle(void) cpu_do_idle(); } -static inline void omap1_arch_reset(char mode) +static inline void omap1_arch_reset(char mode, const char *cmd) { /* * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 @@ -43,9 +43,9 @@ static inline void omap1_arch_reset(char mode) static inline void arch_reset(char mode, const char *cmd) { if (!cpu_class_is_omap2()) - omap1_arch_reset(mode); + omap1_arch_reset(mode, cmd); else - omap_prcm_arch_reset(mode); + omap_prcm_arch_reset(mode, cmd); } #endif