All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: AM33xx: add support for reboot
@ 2012-10-28 18:17 ` Daniel Mack
  0 siblings, 0 replies; 14+ messages in thread
From: Daniel Mack @ 2012-10-28 18:17 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux, arnd, nsekhar, hvaibhav, afzal, linux-omap, Daniel Mack

This patch adds the ability to reboot am33xx-based systems.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 arch/arm/mach-omap2/board-generic.c | 1 +
 arch/arm/mach-omap2/prcm.c          | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 601ecdf..6a69ceb 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -114,6 +114,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
 	.init_machine	= omap_generic_init,
 	.timer		= &omap3_am33xx_timer,
 	.dt_compat	= am33xx_boards_compat,
+	.restart	= omap_prcm_restart,
 MACHINE_END
 #endif
 
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 0f51e03..8a3068a 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -32,6 +32,7 @@
 #include "clock2xxx.h"
 #include "cm2xxx_3xxx.h"
 #include "prm2xxx_3xxx.h"
+#include "prm33xx.h"
 #include "prm44xx.h"
 #include "prminst44xx.h"
 #include "cminst44xx.h"
@@ -72,6 +73,11 @@ void omap_prcm_restart(char mode, const char *cmd)
 		omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0));
 	} else if (cpu_is_omap44xx()) {
 		omap4_prminst_global_warm_sw_reset(); /* never returns */
+	} else if (soc_is_am33xx()) {
+		prcm_offs = AM33XX_PRM_DEVICE_MOD;
+		omap2_prm_set_mod_reg_bits(OMAP4430_RST_GLOBAL_COLD_SW_MASK,
+					   prcm_offs,
+					   AM33XX_PRM_RSTCTRL_OFFSET);
 	} else {
 		WARN_ON(1);
 	}
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-10-29  9:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-28 18:17 [PATCH] ARM: AM33xx: add support for reboot Daniel Mack
2012-10-28 18:17 ` Daniel Mack
2012-10-28 19:19 ` Daniel Mack
2012-10-28 19:19   ` Daniel Mack
2012-10-29  4:34   ` Bedia, Vaibhav
2012-10-29  4:34     ` Bedia, Vaibhav
2012-10-29  8:08   ` Afzal Mohammed
2012-10-29  8:08     ` Afzal Mohammed
2012-10-29  4:31 ` Hiremath, Vaibhav
2012-10-29  4:31   ` Hiremath, Vaibhav
2012-10-29  9:49   ` Daniel Mack
2012-10-29  9:49     ` Daniel Mack
2012-10-29  9:56     ` Hiremath, Vaibhav
2012-10-29  9:56       ` Hiremath, Vaibhav

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.