software-initiated-reset glue for AM335x on BeagleBone

This commit is contained in:
jakllsch 2012-12-13 02:12:15 +00:00
parent b54764018c
commit d2066ccadf
2 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: am335x_prcm.h,v 1.1 2012/12/11 18:53:26 riastradh Exp $ */
/* $NetBSD: am335x_prcm.h,v 1.2 2012/12/13 02:12:15 jakllsch Exp $ */
/*
* TI OMAP Power, Reset, and Clock Management on the AM335x
@ -61,4 +61,8 @@ struct omap_module {
#define AM335X_PRCM_PRM_GFX 0x1100
#define AM335X_PRCM_PRM_CEFUSE 0x1200
#define PRM_RSTCTRL 0x00 /* offset from AM335X_PRCM_PRM_DEVICE */
#define RST_GLOBAL_WARM_SW __BIT(0)
#define RST_GLOBAL_COLD_SW __BIT(1)
#endif /* _ARM_OMAP_AM335X_PRCM_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: beagle_machdep.c,v 1.29 2012/12/13 01:23:16 matt Exp $ */
/* $NetBSD: beagle_machdep.c,v 1.30 2012/12/13 02:12:16 jakllsch Exp $ */
/*
* Machine dependent functions for kernel setup for TI OSK5912 board.
@ -125,7 +125,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.29 2012/12/13 01:23:16 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.30 2012/12/13 02:12:16 jakllsch Exp $");
#include "opt_machdep.h"
#include "opt_ddb.h"
@ -530,6 +530,8 @@ beagle_reset(void)
{
#if defined(OMAP_4430)
*(volatile uint32_t *)(OMAP_L4_CORE_VBASE + (OMAP_L4_WAKEUP_BASE - OMAP_L4_CORE_BASE) + OMAP4_PRM_RSTCTRL) = OMAP4_PRM_RSTCTRL_WARM;
#elif defined(TI_AM335X)
*(volatile uint32_t *)(OMAP_L4_CORE_VBASE + (OMAP2_CM_BASE - OMAP_L4_CORE_BASE) + AM335X_PRCM_PRM_DEVICE + PRM_RSTCTRL) = RST_GLOBAL_WARM_SW;
#else
#if NPRCM > 0
prcm_cold_reset();