Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/samsung Move the WDT register definitions to th...



details:   https://anonhg.NetBSD.org/src/rev/603a525395ea
branches:  trunk
changeset: 328828:603a525395ea
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Sat Apr 19 15:30:41 2014 +0000

description:
Move the WDT register definitions to the C source to unclutter the directory

diffstat:

 sys/arch/arm/samsung/exynos_wdt.c     |  24 ++++++++++++++--
 sys/arch/arm/samsung/exynos_wdt_reg.h |  51 -----------------------------------
 2 files changed, 21 insertions(+), 54 deletions(-)

diffs (100 lines):

diff -r e4a9724f32e6 -r 603a525395ea sys/arch/arm/samsung/exynos_wdt.c
--- a/sys/arch/arm/samsung/exynos_wdt.c Sat Apr 19 13:00:57 2014 +0000
+++ b/sys/arch/arm/samsung/exynos_wdt.c Sat Apr 19 15:30:41 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exynos_wdt.c,v 1.2 2014/04/18 14:32:49 reinoud Exp $   */
+/*     $NetBSD: exynos_wdt.c,v 1.3 2014/04/19 15:30:41 reinoud Exp $   */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "exynos_wdt.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exynos_wdt.c,v 1.2 2014/04/18 14:32:49 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exynos_wdt.c,v 1.3 2014/04/19 15:30:41 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -46,7 +46,25 @@
 
 #include <arm/samsung/exynos_reg.h>
 #include <arm/samsung/exynos_var.h>
-#include <arm/samsung/exynos_wdt_reg.h>
+
+
+/* Watchdog register definitions */
+#define EXYNOS_WDT_WTCON               0x0000
+#define  WTCON_PRESCALER               __BITS(15,8)
+#define  WTCON_ENABLE                  __BIT(5)
+#define  WTCON_CLOCK_SELECT            __BITS(4,3)
+#define  WTCON_CLOCK_SELECT_16         __SHIFTIN(0, WTCON_CLOCK_SELECT)
+#define  WTCON_CLOCK_SELECT_32         __SHIFTIN(1, WTCON_CLOCK_SELECT)
+#define  WTCON_CLOCK_SELECT_64         __SHIFTIN(2, WTCON_CLOCK_SELECT)
+#define  WTCON_CLOCK_SELECT_128                __SHIFTIN(3, WTCON_CLOCK_SELECT)
+#define  WTCON_INT_ENABLE              __BIT(2)
+#define  WTCON_RESET_ENABLE            __BIT(0)
+#define EXYNOS_WDT_WTDAT               0x0004
+#define  WTDAT_RELOAD                  __BITS(15,0)
+#define EXYNOS_WDT_WTCNT               0x0008
+#define  WTCNT_COUNT                   __BITS(15,0)
+#define EXYNOS_WDT_WTCLRINT            0x000C
+
 
 #if NEXYNOS_WDT > 0
 static int exynos_wdt_match(device_t, cfdata_t, void *);
diff -r e4a9724f32e6 -r 603a525395ea sys/arch/arm/samsung/exynos_wdt_reg.h
--- a/sys/arch/arm/samsung/exynos_wdt_reg.h     Sat Apr 19 13:00:57 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/* $NetBSD */
-/*-
- * Copyright (c) 2014 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Nick Hudson.
- *
- * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
- */
-
-#ifndef _ARM_SAMSUNG_EXYNOS_WDT_REG_H_
-#define _ARM_SAMSUNG_EXYNOS_WDT_REG_H_
-
-#define EXYNOS_WDT_WTCON               0x0000
-#define  WTCON_PRESCALER               __BITS(15,8)
-#define  WTCON_ENABLE                  __BIT(5)
-#define  WTCON_CLOCK_SELECT            __BITS(4,3)
-#define  WTCON_CLOCK_SELECT_16         __SHIFTIN(0, WTCON_CLOCK_SELECT)
-#define  WTCON_CLOCK_SELECT_32         __SHIFTIN(1, WTCON_CLOCK_SELECT)
-#define  WTCON_CLOCK_SELECT_64         __SHIFTIN(2, WTCON_CLOCK_SELECT)
-#define  WTCON_CLOCK_SELECT_128                __SHIFTIN(3, WTCON_CLOCK_SELECT)
-#define  WTCON_INT_ENABLE              __BIT(2)
-#define  WTCON_RESET_ENABLE            __BIT(0)
-#define EXYNOS_WDT_WTDAT               0x0004
-#define  WTDAT_RELOAD                  __BITS(15,0)
-#define EXYNOS_WDT_WTCNT               0x0008
-#define  WTCNT_COUNT                   __BITS(15,0)
-#define EXYNOS_WDT_WTCLRINT            0x000C
-
-#endif /* _ARM_SAMSUNG_EXYNOS_WDT_REG_H_ */
-



Home | Main Index | Thread Index | Old Index