Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/sunxi Fix sun4i platform delay to sleep the req...
details: https://anonhg.NetBSD.org/src/rev/49df9e04829a
branches: trunk
changeset: 827223:49df9e04829a
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Oct 21 02:21:30 2017 +0000
description:
Fix sun4i platform delay to sleep the requested number of microseconds
instead of the requested number of clock ticks.
diffstat:
sys/arch/arm/sunxi/sunxi_platform.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 856dc5ee5159 -r 49df9e04829a sys/arch/arm/sunxi/sunxi_platform.c
--- a/sys/arch/arm/sunxi/sunxi_platform.c Sat Oct 21 02:06:34 2017 +0000
+++ b/sys/arch/arm/sunxi/sunxi_platform.c Sat Oct 21 02:21:30 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_platform.c,v 1.11 2017/10/11 10:52:54 jmcneill Exp $ */
+/* $NetBSD: sunxi_platform.c,v 1.12 2017/10/21 02:21:30 jmcneill Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
#include "opt_fdt_arm.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.11 2017/10/11 10:52:54 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.12 2017/10/21 02:21:30 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -194,8 +194,9 @@
{
static bus_space_tag_t bst = &armv7_generic_bs_tag;
static bus_space_handle_t bsh = 0;
+ const long incs_per_us = SUNXI_REF_FREQ / 1000000;
+ long ticks = n * incs_per_us;
uint32_t cur, prev;
- long ticks = n;
if (bsh == 0)
bus_space_map(bst, SUN4I_TIMER_BASE, SUN4I_TIMER_SIZE, 0, &bsh);
Home |
Main Index |
Thread Index |
Old Index