summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-02-02 21:40:48 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-02-02 21:40:48 +0000
commitc0687fbf020f2c260fb25351f2a5bf3e3632d7f7 (patch)
tree36d9face01c0f63df6367bc8b7fc4bdd26777120 /sys
parent57712a6c7308b4fd255dae592d8362c69529e66a (diff)
give sxidog it's own mapping as well so it wont't require sxitimer
from Artturi Alm
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/armv7/sunxi/sunxireg.h4
-rw-r--r--sys/arch/armv7/sunxi/sxidog.c11
2 files changed, 6 insertions, 9 deletions
diff --git a/sys/arch/armv7/sunxi/sunxireg.h b/sys/arch/armv7/sunxi/sunxireg.h
index 323264bdc18..8153efa4834 100644
--- a/sys/arch/armv7/sunxi/sunxireg.h
+++ b/sys/arch/armv7/sunxi/sunxireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sunxireg.h,v 1.7 2016/01/31 04:39:05 jsg Exp $ */
+/* $OpenBSD: sunxireg.h,v 1.8 2016/02/02 21:40:47 jsg Exp $ */
/*
* Copyright (c) 2013 Artturi Alm
*
@@ -65,7 +65,7 @@
#define TIMER2_IRQ 24
#define STATTIMER_IRQ TIMER1_IRQ /* XXX */
-#define WDOG_ADDR 0x90
+#define WDOG_ADDR 0x01c20c90
#define WDOG_SIZE 0x08
#define WDOG_IRQ 24
diff --git a/sys/arch/armv7/sunxi/sxidog.c b/sys/arch/armv7/sunxi/sxidog.c
index 6212e5817fc..8350fe8cc2d 100644
--- a/sys/arch/armv7/sunxi/sxidog.c
+++ b/sys/arch/armv7/sunxi/sxidog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sxidog.c,v 1.6 2014/12/13 00:49:20 jsg Exp $ */
+/* $OpenBSD: sxidog.c,v 1.7 2016/02/02 21:40:47 jsg Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -30,9 +30,6 @@
#include <armv7/sunxi/sunxireg.h>
#include <armv7/armv7/armv7var.h>
-/* XXX other way around than bus_space_subregion? */
-extern bus_space_handle_t sxitimer_ioh;
-
/* registers */
#define WDOG_CR 0x00
#define WDOG_MR 0x04
@@ -89,9 +86,9 @@ sxidog_attach(struct device *parent, struct device *self, void *args)
struct sxidog_softc *sc = (struct sxidog_softc *)self;
sc->sc_iot = aa->aa_iot;
- if (bus_space_subregion(sc->sc_iot, sxitimer_ioh,
- aa->aa_dev->mem[0].addr, aa->aa_dev->mem[0].size, &sc->sc_ioh))
- panic("sxidog_attach: bus_space_subregion failed!");
+ if (bus_space_map(sc->sc_iot, aa->aa_dev->mem[0].addr,
+ aa->aa_dev->mem[0].size, 0, &sc->sc_ioh))
+ panic("sxidog_attach: bus_space_map failed!");
#ifdef DEBUG
printf(": ctrl %x mode %x\n", SXIREAD4(sc, WDOG_CR),