diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-10-08 11:21:42 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-10-08 11:21:42 +0000 |
commit | 6df44be959f24d9d2836a7c860231c2efdc774fb (patch) | |
tree | c67ec6a7ba707cbc39d134f7eecdbe2e94cd2128 /sys/arch/armv7 | |
parent | d8093a0bf365548c6860b568120bb50da83002d1 (diff) |
Make sxidog(4) set cpuresetfn, and cut some dead wood from the platform code.
Diffstat (limited to 'sys/arch/armv7')
-rw-r--r-- | sys/arch/armv7/sunxi/sunxi_machdep.c | 35 | ||||
-rw-r--r-- | sys/arch/armv7/sunxi/sxidog.c | 11 |
2 files changed, 4 insertions, 42 deletions
diff --git a/sys/arch/armv7/sunxi/sunxi_machdep.c b/sys/arch/armv7/sunxi/sunxi_machdep.c index 8b7968868f2..0ae64b471d8 100644 --- a/sys/arch/armv7/sunxi/sunxi_machdep.c +++ b/sys/arch/armv7/sunxi/sunxi_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sunxi_machdep.c,v 1.12 2016/08/20 13:24:38 patrick Exp $ */ +/* $OpenBSD: sunxi_machdep.c,v 1.13 2016/10/08 11:21:41 kettenis Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -23,27 +23,16 @@ #include <machine/bus.h> #include <machine/bootconfig.h> -#include <dev/ic/comreg.h> -#include <dev/ic/comvar.h> - #include <arm/cortex/smc.h> #include <arm/armv7/armv7var.h> #include <arm/mainbus/mainbus.h> #include <armv7/armv7/armv7var.h> #include <armv7/armv7/armv7_machdep.h> -extern void sxidog_reset(void); extern struct board_dev *sunxi_board_devs(void); extern void sunxi_board_init(void); void -sunxi_platform_smc_write(bus_space_tag_t iot, bus_space_handle_t ioh, - bus_size_t off, uint32_t op, uint32_t val) -{ - -} - -void sunxi_platform_init_mainbus(struct device *self) { mainbus_legacy_found(self, "cortex"); @@ -51,24 +40,6 @@ sunxi_platform_init_mainbus(struct device *self) } void -sunxi_platform_watchdog_reset(void) -{ - sxidog_reset(); -} - -void -sunxi_platform_powerdown(void) -{ - -} - -void -sunxi_platform_disable_l2_if_needed(void) -{ - -} - -void sunxi_platform_board_init(void) { sunxi_board_init(); @@ -76,10 +47,6 @@ sunxi_platform_board_init(void) struct armv7_platform sunxi_platform = { .board_init = sunxi_platform_board_init, - .smc_write = sunxi_platform_smc_write, - .watchdog_reset = sunxi_platform_watchdog_reset, - .powerdown = sunxi_platform_powerdown, - .disable_l2_if_needed = sunxi_platform_disable_l2_if_needed, .init_mainbus = sunxi_platform_init_mainbus, }; diff --git a/sys/arch/armv7/sunxi/sxidog.c b/sys/arch/armv7/sunxi/sxidog.c index ad31692a34d..2f4c4c4a196 100644 --- a/sys/arch/armv7/sunxi/sxidog.c +++ b/sys/arch/armv7/sunxi/sxidog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sxidog.c,v 1.10 2016/09/04 11:56:59 mglocker Exp $ */ +/* $OpenBSD: sxidog.c,v 1.11 2016/10/08 11:21:41 kettenis Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org> * @@ -17,19 +17,13 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/queue.h> -#include <sys/malloc.h> #include <sys/device.h> -#include <sys/evcount.h> -#include <sys/socket.h> -#include <sys/timeout.h> -#include <machine/intr.h> #include <machine/bus.h> #include <machine/fdt.h> +#include <armv7/armv7/armv7_machdep.h> #include <armv7/sunxi/sunxireg.h> -#include <armv7/armv7/armv7var.h> #include <dev/ofw/openfirm.h> #include <dev/ofw/fdt.h> @@ -109,6 +103,7 @@ sxidog_attach(struct device *parent, struct device *self, void *aux) sc->sc_type = SXIDOG_A10; sxidog_sc = sc; + cpuresetfn = sxidog_reset; #ifndef SMALL_KERNEL wdog_register(sxidog_callback, sc); |