Index: head/sys/arm/allwinner/a10_wdog.c =================================================================== --- head/sys/arm/allwinner/a10_wdog.c (revision 296040) +++ head/sys/arm/allwinner/a10_wdog.c (nonexistent) @@ -1,207 +0,0 @@ -/*- - * Copyright (c) 2013 Oleksandr Tymoshenko - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include - -#define READ(_sc, _r) bus_read_4((_sc)->res, (_r)) -#define WRITE(_sc, _r, _v) bus_write_4((_sc)->res, (_r), (_v)) - -#define WDOG_CTRL 0x00 -#define WDOG_CTRL_RESTART (1 << 0) -#define WDOG_MODE 0x04 -#define WDOG_MODE_INTVL_SHIFT 3 -#define WDOG_MODE_RST_EN (1 << 1) -#define WDOG_MODE_EN (1 << 0) - -struct a10wd_interval { - uint64_t milliseconds; - unsigned int value; -}; - -struct a10wd_interval wd_intervals[] = { - { 500, 0 }, - { 1000, 1 }, - { 2000, 2 }, - { 3000, 3 }, - { 4000, 4 }, - { 5000, 5 }, - { 6000, 6 }, - { 8000, 7 }, - { 10000, 8 }, - { 12000, 9 }, - { 14000, 10 }, - { 16000, 11 }, - { 0, 0 } /* sentinel */ -}; - -static struct a10wd_softc *a10wd_sc = NULL; - -struct a10wd_softc { - device_t dev; - struct resource * res; - struct mtx mtx; -}; - -static void a10wd_watchdog_fn(void *private, u_int cmd, int *error); - -static int -a10wd_probe(device_t dev) -{ - - if (!ofw_bus_status_okay(dev)) - return (ENXIO); - - if (ofw_bus_is_compatible(dev, "allwinner,sun4i-a10-wdt")) { - device_set_desc(dev, "Allwinner A10 Watchdog"); - return (BUS_PROBE_DEFAULT); - } - - return (ENXIO); -} - -static int -a10wd_attach(device_t dev) -{ - struct a10wd_softc *sc; - int rid; - - if (a10wd_sc != NULL) - return (ENXIO); - - sc = device_get_softc(dev); - sc->dev = dev; - - rid = 0; - sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (sc->res == NULL) { - device_printf(dev, "could not allocate memory resource\n"); - return (ENXIO); - } - - a10wd_sc = sc; - mtx_init(&sc->mtx, "A10 Watchdog", "a10wd", MTX_DEF); - EVENTHANDLER_REGISTER(watchdog_list, a10wd_watchdog_fn, sc, 0); - - return (0); -} - -static void -a10wd_watchdog_fn(void *private, u_int cmd, int *error) -{ - struct a10wd_softc *sc; - uint64_t ms; - int i; - - sc = private; - mtx_lock(&sc->mtx); - - cmd &= WD_INTERVAL; - - if (cmd > 0) { - ms = ((uint64_t)1 << (cmd & WD_INTERVAL)) / 1000000; - i = 0; - while (wd_intervals[i].milliseconds && - (ms > wd_intervals[i].milliseconds)) - i++; - if (wd_intervals[i].milliseconds) { - WRITE(sc, WDOG_MODE, - (wd_intervals[i].value << WDOG_MODE_INTVL_SHIFT) | - WDOG_MODE_EN | WDOG_MODE_RST_EN); - WRITE(sc, WDOG_CTRL, WDOG_CTRL_RESTART); - *error = 0; - } - else { - /* - * Can't arm - * disable watchdog as watchdog(9) requires - */ - device_printf(sc->dev, - "Can't arm, timeout is more than 16 sec\n"); - mtx_unlock(&sc->mtx); - WRITE(sc, WDOG_MODE, 0); - return; - } - } - else - WRITE(sc, WDOG_MODE, 0); - - mtx_unlock(&sc->mtx); -} - -void -a10wd_watchdog_reset() -{ - - if (a10wd_sc == NULL) { - printf("Reset: watchdog device has not been initialized\n"); - return; - } - - WRITE(a10wd_sc, WDOG_MODE, - (wd_intervals[0].value << WDOG_MODE_INTVL_SHIFT) | - WDOG_MODE_EN | WDOG_MODE_RST_EN); - - while(1) - ; - -} - -static device_method_t a10wd_methods[] = { - DEVMETHOD(device_probe, a10wd_probe), - DEVMETHOD(device_attach, a10wd_attach), - - DEVMETHOD_END -}; - -static driver_t a10wd_driver = { - "a10wd", - a10wd_methods, - sizeof(struct a10wd_softc), -}; -static devclass_t a10wd_devclass; - -DRIVER_MODULE(a10wd, simplebus, a10wd_driver, a10wd_devclass, 0, 0); Property changes on: head/sys/arm/allwinner/a10_wdog.c ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sys/arm/allwinner/a10_wdog.h =================================================================== --- head/sys/arm/allwinner/a10_wdog.h (revision 296040) +++ head/sys/arm/allwinner/a10_wdog.h (nonexistent) @@ -1,35 +0,0 @@ -/*- - * Copyright (c) 2013 Oleksandr Tymoshenko - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - * - */ -#ifndef __A10_WDOG_H__ -#define __A10_WDOG_H__ - -void a10wd_watchdog_reset(void); - -#endif /*__A10_WDOG_H__*/ - Property changes on: head/sys/arm/allwinner/a10_wdog.h ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sys/arm/allwinner/allwinner_machdep.c =================================================================== --- head/sys/arm/allwinner/allwinner_machdep.c (revision 296040) +++ head/sys/arm/allwinner/allwinner_machdep.c (revision 296041) @@ -1,189 +1,189 @@ /*- * Copyright (c) 2012 Ganbold Tsagaankhuu * Copyright (c) 2015-2016 Emmanuel Vadot * All rights reserved. * * This code is derived from software written for Brini by Mark Brinicombe * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * from: FreeBSD: //depot/projects/arm/src/sys/arm/ti/ti_machdep.c */ #include "opt_ddb.h" #include "opt_platform.h" #include __FBSDID("$FreeBSD$"); #define _ARM32_BUS_DMA_PRIVATE #include #include #include #include #include #include #include #include #include #include -#include +#include #include #include "platform_if.h" static u_int soc_type; static u_int soc_family; static int a10_attach(platform_t plat) { soc_type = ALLWINNERSOC_A10; soc_family = ALLWINNERSOC_SUN4I; return (0); } static int a20_attach(platform_t plat) { soc_type = ALLWINNERSOC_A20; soc_family = ALLWINNERSOC_SUN7I; return (0); } static int a31_attach(platform_t plat) { soc_type = ALLWINNERSOC_A31; soc_family = ALLWINNERSOC_SUN6I; return (0); } static int a31s_attach(platform_t plat) { soc_type = ALLWINNERSOC_A31S; soc_family = ALLWINNERSOC_SUN6I; return (0); } static vm_offset_t allwinner_lastaddr(platform_t plat) { return (arm_devmap_lastaddr()); } /* * Set up static device mappings. * * This covers all the on-chip device with 1MB section mappings, which is good * for performance (uses fewer TLB entries for device access). * * XXX It also covers a block of SRAM and some GPU (mali400) stuff that maybe * shouldn't be device-mapped. The original code mapped a 4MB block, but * perhaps a 1MB block would be more appropriate. */ static int allwinner_devmap_init(platform_t plat) { arm_devmap_add_entry(0x01C00000, 0x00400000); /* 4MB */ return (0); } struct arm32_dma_range * bus_dma_get_range(void) { return (NULL); } int bus_dma_get_range_nb(void) { return (0); } void cpu_reset() { - a10wd_watchdog_reset(); + aw_wdog_watchdog_reset(); printf("Reset failed!\n"); while (1); } static platform_method_t a10_methods[] = { PLATFORMMETHOD(platform_attach, a10_attach), PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), PLATFORMMETHOD_END, }; static platform_method_t a20_methods[] = { PLATFORMMETHOD(platform_attach, a20_attach), PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), PLATFORMMETHOD_END, }; static platform_method_t a31_methods[] = { PLATFORMMETHOD(platform_attach, a31_attach), PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), PLATFORMMETHOD_END, }; static platform_method_t a31s_methods[] = { PLATFORMMETHOD(platform_attach, a31s_attach), PLATFORMMETHOD(platform_lastaddr, allwinner_lastaddr), PLATFORMMETHOD(platform_devmap_init, allwinner_devmap_init), PLATFORMMETHOD_END, }; u_int allwinner_soc_type(void) { return (soc_type); } u_int allwinner_soc_family(void) { return (soc_family); } FDT_PLATFORM_DEF(a10, "a10", 0, "allwinner,sun4i-a10"); FDT_PLATFORM_DEF(a20, "a20", 0, "allwinner,sun7i-a20"); FDT_PLATFORM_DEF(a31, "a31", 0, "allwinner,sun6i-a31"); FDT_PLATFORM_DEF(a31s, "a31s", 0, "allwinner,sun6i-a31s"); Index: head/sys/arm/allwinner/aw_wdog.c =================================================================== --- head/sys/arm/allwinner/aw_wdog.c (nonexistent) +++ head/sys/arm/allwinner/aw_wdog.c (revision 296041) @@ -0,0 +1,259 @@ +/*- + * Copyright (c) 2013 Oleksandr Tymoshenko + * Copyright (c) 2016 Emmanuel Vadot + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include + +#define READ(_sc, _r) bus_read_4((_sc)->res, (_r)) +#define WRITE(_sc, _r, _v) bus_write_4((_sc)->res, (_r), (_v)) + +#define A10_WDOG_CTRL 0x00 +#define A31_WDOG_CTRL 0x10 +#define WDOG_CTRL_RESTART (1 << 0) +#define A10_WDOG_MODE 0x04 +#define A31_WDOG_MODE 0x18 +#define A10_WDOG_MODE_INTVL_SHIFT 3 +#define A31_WDOG_MODE_INTVL_SHIFT 4 +#define A10_WDOG_MODE_RST_EN (1 << 1) +#define WDOG_MODE_EN (1 << 0) +#define A31_WDOG_CONFIG 0x14 +#define A31_WDOG_CONFIG_RST_EN_SYSTEM (1 << 0) +#define A31_WDOG_CONFIG_RST_EN_INT (2 << 0) + +struct aw_wdog_interval { + uint64_t milliseconds; + unsigned int value; +}; + +struct aw_wdog_interval wd_intervals[] = { + { 500, 0 }, + { 1000, 1 }, + { 2000, 2 }, + { 3000, 3 }, + { 4000, 4 }, + { 5000, 5 }, + { 6000, 6 }, + { 8000, 7 }, + { 10000, 8 }, + { 12000, 9 }, + { 14000, 10 }, + { 16000, 11 }, + { 0, 0 } /* sentinel */ +}; + +static struct aw_wdog_softc *aw_wdog_sc = NULL; + +struct aw_wdog_softc { + device_t dev; + struct resource * res; + struct mtx mtx; + uint8_t wdog_ctrl; + uint8_t wdog_mode; + uint8_t wdog_mode_intvl_shift; + uint8_t wdog_mode_en; + uint8_t wdog_config; + uint8_t wdog_config_value; +}; + +#define A10_WATCHDOG 1 +#define A31_WATCHDOG 2 + +static struct ofw_compat_data compat_data[] = { + {"allwinner,sun4i-a10-wdt", A10_WATCHDOG}, + {"allwinner,sun6i-a31-wdt", A31_WATCHDOG}, + {NULL, 0} +}; + +static void aw_wdog_watchdog_fn(void *private, u_int cmd, int *error); + +static int +aw_wdog_probe(device_t dev) +{ + struct aw_wdog_softc *sc; + + sc = device_get_softc(dev); + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + switch (ofw_bus_search_compatible(dev, compat_data)->ocd_data) { + case A10_WATCHDOG: + device_set_desc(dev, "Allwinner A10 Watchdog"); + return (BUS_PROBE_DEFAULT); + case A31_WATCHDOG: + device_set_desc(dev, "Allwinner A31 Watchdog"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); +} + +static int +aw_wdog_attach(device_t dev) +{ + struct aw_wdog_softc *sc; + int rid; + + if (aw_wdog_sc != NULL) + return (ENXIO); + + sc = device_get_softc(dev); + sc->dev = dev; + + rid = 0; + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (sc->res == NULL) { + device_printf(dev, "could not allocate memory resource\n"); + return (ENXIO); + } + + aw_wdog_sc = sc; + + switch (ofw_bus_search_compatible(dev, compat_data)->ocd_data) { + case A10_WATCHDOG: + sc->wdog_ctrl = A10_WDOG_CTRL; + sc->wdog_mode = A10_WDOG_MODE; + sc->wdog_mode_intvl_shift = A10_WDOG_MODE_INTVL_SHIFT; + sc->wdog_mode_en = A10_WDOG_MODE_RST_EN | WDOG_MODE_EN; + break; + case A31_WATCHDOG: + sc->wdog_ctrl = A31_WDOG_CTRL; + sc->wdog_mode = A31_WDOG_MODE; + sc->wdog_mode_intvl_shift = A31_WDOG_MODE_INTVL_SHIFT; + sc->wdog_mode_en = WDOG_MODE_EN; + sc->wdog_config = A31_WDOG_CONFIG; + sc->wdog_config_value = A31_WDOG_CONFIG_RST_EN_SYSTEM; + break; + default: + bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->res); + return (ENXIO); + } + + mtx_init(&sc->mtx, "AW Watchdog", "aw_wdog", MTX_DEF); + EVENTHANDLER_REGISTER(watchdog_list, aw_wdog_watchdog_fn, sc, 0); + return (0); +} + +static void +aw_wdog_watchdog_fn(void *private, u_int cmd, int *error) +{ + struct aw_wdog_softc *sc; + uint64_t ms; + int i; + + sc = private; + mtx_lock(&sc->mtx); + + cmd &= WD_INTERVAL; + + if (cmd > 0) { + ms = ((uint64_t)1 << (cmd & WD_INTERVAL)) / 1000000; + i = 0; + while (wd_intervals[i].milliseconds && + (ms > wd_intervals[i].milliseconds)) + i++; + if (wd_intervals[i].milliseconds) { + WRITE(sc, sc->wdog_mode, + (wd_intervals[i].value << sc->wdog_mode_intvl_shift) | + sc->wdog_mode_en); + WRITE(sc, sc->wdog_ctrl, WDOG_CTRL_RESTART); + if (sc->wdog_config) + WRITE(sc, sc->wdog_config, + sc->wdog_config_value); + *error = 0; + } + else { + /* + * Can't arm + * disable watchdog as watchdog(9) requires + */ + device_printf(sc->dev, + "Can't arm, timeout is more than 16 sec\n"); + mtx_unlock(&sc->mtx); + WRITE(sc, sc->wdog_mode, 0); + return; + } + } + else + WRITE(sc, sc->wdog_mode, 0); + + mtx_unlock(&sc->mtx); +} + +void +aw_wdog_watchdog_reset() +{ + + if (aw_wdog_sc == NULL) { + printf("Reset: watchdog device has not been initialized\n"); + return; + } + + WRITE(aw_wdog_sc, aw_wdog_sc->wdog_mode, + (wd_intervals[0].value << aw_wdog_sc->wdog_mode_intvl_shift) | + aw_wdog_sc->wdog_mode_en); + if (aw_wdog_sc->wdog_config) + WRITE(aw_wdog_sc, aw_wdog_sc->wdog_config, + aw_wdog_sc->wdog_config_value); + while(1) + ; + +} + +static device_method_t aw_wdog_methods[] = { + DEVMETHOD(device_probe, aw_wdog_probe), + DEVMETHOD(device_attach, aw_wdog_attach), + + DEVMETHOD_END +}; + +static driver_t aw_wdog_driver = { + "aw_wdog", + aw_wdog_methods, + sizeof(struct aw_wdog_softc), +}; +static devclass_t aw_wdog_devclass; + +DRIVER_MODULE(aw_wdog, simplebus, aw_wdog_driver, aw_wdog_devclass, 0, 0); Property changes on: head/sys/arm/allwinner/aw_wdog.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sys/arm/allwinner/aw_wdog.h =================================================================== --- head/sys/arm/allwinner/aw_wdog.h (nonexistent) +++ head/sys/arm/allwinner/aw_wdog.h (revision 296041) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2013 Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ +#ifndef __AW_WDOG_H__ +#define __AW_WDOG_H__ + +void aw_wdog_watchdog_reset(void); + +#endif /*__AW_WDOG_H__*/ + Property changes on: head/sys/arm/allwinner/aw_wdog.h ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sys/arm/allwinner/files.allwinner =================================================================== --- head/sys/arm/allwinner/files.allwinner (revision 296040) +++ head/sys/arm/allwinner/files.allwinner (revision 296041) @@ -1,20 +1,20 @@ # $FreeBSD$ kern/kern_clocksource.c standard arm/allwinner/a10_ahci.c optional ahci arm/allwinner/a10_clk.c standard arm/allwinner/a10_codec.c optional sound arm/allwinner/a10_common.c standard arm/allwinner/a10_dmac.c standard arm/allwinner/a10_ehci.c optional ehci arm/allwinner/a10_gpio.c optional gpio arm/allwinner/a10_mmc.c optional mmc arm/allwinner/a10_sramc.c standard -arm/allwinner/a10_wdog.c standard +arm/allwinner/aw_wdog.c standard arm/allwinner/a20/a20_cpu_cfg.c standard arm/allwinner/allwinner_machdep.c standard arm/allwinner/axp209.c optional axp209 arm/allwinner/if_emac.c optional emac arm/allwinner/sunxi_dma_if.m standard dev/iicbus/twsi/a10_twsi.c optional twsi #arm/allwinner/console.c standard