From e8227a9080380ea759f6cd0c08263e560feaa0e2 Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Sun, 27 Oct 2013 12:58:54 +0000 Subject: Fix timer on for A20 as the address and offsets for the A20 counter were off. from Markus Hennecke, ok aalm@ --- sys/arch/armv7/sunxi/sunxireg.h | 4 ++-- sys/arch/armv7/sunxi/sxitimer.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'sys') diff --git a/sys/arch/armv7/sunxi/sunxireg.h b/sys/arch/armv7/sunxi/sunxireg.h index 24df6753f06..68a63bb275e 100644 --- a/sys/arch/armv7/sunxi/sunxireg.h +++ b/sys/arch/armv7/sunxi/sunxireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sunxireg.h,v 1.4 2013/10/24 11:09:02 jasper Exp $ */ +/* $OpenBSD: sunxireg.h,v 1.5 2013/10/27 12:58:53 jasper Exp $ */ /* * Copyright (c) 2013 Artturi Alm * @@ -114,5 +114,5 @@ #define GIC_SIZE 0x8000 #define CPUCONFG_ADDR 0x01c25c00 /* not in use */ #define CPUCONFG_SIZE 0x200 -#define CPUCNTRS_ADDR 0x01c25200 /* used by sxitimer */ +#define CPUCNTRS_ADDR 0x01c25e00 /* used by sxitimer */ #define CPUCNTRS_SIZE 0x200 diff --git a/sys/arch/armv7/sunxi/sxitimer.c b/sys/arch/armv7/sunxi/sxitimer.c index 8a9736472b8..bc744199a56 100644 --- a/sys/arch/armv7/sunxi/sxitimer.c +++ b/sys/arch/armv7/sunxi/sxitimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sxitimer.c,v 1.1 2013/10/23 17:08:48 jasper Exp $ */ +/* $OpenBSD: sxitimer.c,v 1.2 2013/10/27 12:58:53 jasper Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn * Copyright (c) 2013 Raphael Graf @@ -44,10 +44,10 @@ #define TIMER_INTV(x) (0x14 + (0x10 * (x))) #define TIMER_CURR(x) (0x18 + (0x10 * (x))) -/* A20 counter */ -#define OSC24M_CNT64_CTRL 0x280 -#define OSC24M_CNT64_LOW 0x284 -#define OSC24M_CNT64_HIGH 0x288 +/* A20 counter, relative to CPUCNTRS_ADDR */ +#define OSC24M_CNT64_CTRL 0x80 +#define OSC24M_CNT64_LOW 0x84 +#define OSC24M_CNT64_HIGH 0x88 /* A1X counter */ #define CNT64_CTRL 0xa0 -- cgit v1.2.3