diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/beagle/dev/omap.c | 5 | ||||
-rw-r--r-- | sys/arch/beagle/dev/omap4.c | 19 | ||||
-rw-r--r-- | sys/arch/beagle/dev/omdog.c | 5 |
3 files changed, 25 insertions, 4 deletions
diff --git a/sys/arch/beagle/dev/omap.c b/sys/arch/beagle/dev/omap.c index a068e6e1087..aa8307cb29c 100644 --- a/sys/arch/beagle/dev/omap.c +++ b/sys/arch/beagle/dev/omap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omap.c,v 1.2 2011/11/11 10:46:35 matthieu Exp $ */ +/* $OpenBSD: omap.c,v 1.3 2011/11/15 23:01:11 drahn Exp $ */ /* * Copyright (c) 2005,2008 Dale Rahn <drahn@openbsd.com> * @@ -54,6 +54,7 @@ struct board_dev beagleboard_devs[] = { { "intc", 0 }, { "gptimer", 0 }, { "gptimer", 1 }, + { "omdog", 0 }, { "omgpio", 0 }, { "omgpio", 1 }, { "omgpio", 2 }, @@ -70,6 +71,7 @@ struct board_dev overo_devs[] = { { "intc", 0 }, { "gptimer", 0 }, { "gptimer", 1 }, + { "omdog", 0 }, { "omgpio", 0 }, { "omgpio", 1 }, { "omgpio", 2 }, @@ -84,6 +86,7 @@ struct board_dev overo_devs[] = { struct board_dev pandaboard_devs[] = { { "ampintc", 0 }, { "amptimer", 0 }, + { "omdog", 0 }, { "omgpio", 0 }, { "omgpio", 1 }, { "omgpio", 2 }, diff --git a/sys/arch/beagle/dev/omap4.c b/sys/arch/beagle/dev/omap4.c index 77b8534398f..12299a6cc7d 100644 --- a/sys/arch/beagle/dev/omap4.c +++ b/sys/arch/beagle/dev/omap4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omap4.c,v 1.4 2011/11/10 23:43:01 uwe Exp $ */ +/* $OpenBSD: omap4.c,v 1.5 2011/11/15 23:01:11 drahn Exp $ */ /* * Copyright (c) 2011 Uwe Stuehler <uwe@openbsd.org> @@ -16,8 +16,11 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <sys/types.h> +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/device.h> #include <machine/bus.h> +#include <arch/arm/armv7/armv7var.h> #include <beagle/dev/omapvar.h> @@ -29,6 +32,9 @@ #define GTIMER_ADDR 0x48240000 #define GTIMER_SIZE 0x300 +#define WD_ADDR 0x4a314000 +#define WD_SIZE 0x80 + #define GPIOx_SIZE 0x1000 #define GPIO1_ADDR 0x4a310000 #define GPIO2_ADDR 0x48055000 @@ -123,6 +129,15 @@ struct omap_dev omap4_devs[] = { }, /* + * Watchdog Timer + */ + + { .name = "omdog", + .unit = 0, + .mem = { { WD_ADDR, WD_SIZE } } + }, + + /* * UART */ diff --git a/sys/arch/beagle/dev/omdog.c b/sys/arch/beagle/dev/omdog.c index af67391a7e2..4a3e2ef8c03 100644 --- a/sys/arch/beagle/dev/omdog.c +++ b/sys/arch/beagle/dev/omdog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omdog.c,v 1.4 2011/11/10 19:37:01 uwe Exp $ */ +/* $OpenBSD: omdog.c,v 1.5 2011/11/15 23:01:11 drahn Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org> * @@ -98,6 +98,9 @@ void omdog_reset(void); /* XXX */ void omdog_reset() { + if (omdog_sc == NULL) + return; + bus_space_write_4(omdog_sc->sc_iot, omdog_sc->sc_ioh, WCRR, 0xffffff80); omdog_wpending(WWPS_PEND_ALL); |