From 6df44be959f24d9d2836a7c860231c2efdc774fb Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 8 Oct 2016 11:21:42 +0000 Subject: Make sxidog(4) set cpuresetfn, and cut some dead wood from the platform code. --- sys/arch/armv7/sunxi/sunxi_machdep.c | 35 +---------------------------------- 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 * @@ -23,26 +23,15 @@ #include #include -#include -#include - #include #include #include #include #include -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) { @@ -50,24 +39,6 @@ sunxi_platform_init_mainbus(struct device *self) mainbus_legacy_found(self, "sunxi"); } -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) { @@ -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 * @@ -17,19 +17,13 @@ #include #include -#include -#include #include -#include -#include -#include -#include #include #include +#include #include -#include #include #include @@ -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); -- cgit v1.2.3